~/talk

Down The Rabbit Hole: An Adventure in Legacy Code

Talkat RailsConf 2018 Β· 2018-04-17..04-19Β· [ruby-on-rails]
slides:none on file

Adds concrete steps for changing legacy Rails code: write tests to preserve behavior, use Rails model specs (joins and queries) to reproduce and fix a silk-blend bug, implement minimal query changes to make tests pass, then run the full suite before refactoring. Uses a contrived Yarn Hearts marketplace example and a real-world get_sellers method with nested conditionals, demonstrates that incremental tests + fixes work and suggests extracting classes or polymorphism when time allows.

AI-written summary Β· about

  1. 0:00Introduction
  2. 1:20What is Legacy Code
  3. 4:37When not to change
  4. 5:36Four reasons to change
  5. 6:58Adding a feature
  6. 7:53Testing
  7. 9:57Why Test
  8. 13:23Yarn Model
  9. 15:04Get Sellers
  10. 17:00Write the simplest test
  11. 18:51Add tests
  12. 20:44Refactoring
  13. 22:49Test
  14. 29:38Look for opportunities
  15. 31:13Example
  16. 32:28Changing the code
  17. 35:22Lessons learned
  18. 37:12Recommendations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark β€” the status bar button does the same
?
this help
esc
close this, then clear every filter β€” or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.