~/talk

Fluent Refactoring

Talkat Cascadia Ruby 2013 · 2013-10-14..10-15· [ruby, developer-experience]
slides:none on file

Refactors a messy 50-line Rails controller method by actually changing code not theory: extracts a method object (replace method with method object), uses a temporary method_missing hack to keep tests green, applies flatten nested conditionals to expose a guard clause, extracts five private helpers, moves HTTP concerns into a responder pattern, then splits that into Ajax and HTML responders (replace conditional with polymorphism) and eliminates duplicated xhr checks; tests run green throughout and the refactor reduces noise and duplication.

AI-written summary · about

  1. 0:00Start
  2. 1:13Algebra Isn't Math
  3. 1:49Math is a Language
  4. 4:46Language Hunters
  5. 4:58Levels of Proficiency
  6. 6:32Production Rails Code
  7. 8:08Complexity
  8. 9:16Make the Job Smaller
  9. 20:09Recap
  10. 22:00Replace Conditional With Polymorphism
  11. 25:30Throw Your Work Away
  12. 26:10Speed Up Your Tests!
~/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.