~/talk

Fluent Refactoring

Talkat LoneStarRuby Conf 2013 · 2013-08-11..08-13· [developer-experience]
slides:none on file

Refactors a gnarly 50‑line controller action pulled from an 800‑line Rails controller into a call object, a replace method with method object move that uses a temporary method_missing/delegate hack, many small extracted helpers, a responder pattern split into ajax/html variants via replace conditional with polymorphism, and focused guard‑clause and flattened‑condition changes. Tests shrink from about 30s→0.5s. Result is a much smaller, readable core method, duplicated branches moved to responders, and behavior preserved and verifiable by fast tests.

AI-written summary · about

  1. 0:00Start
  2. 4:03Language Hunters
  3. 12:39Replace Method with Method Object
  4. 17:01Flattened Nested Conditionals
  5. 23:29The Single Responsibility Principle
  6. 26:31Replaced Conditional with Polymorphism
  7. 29:41Embrace Duplication
  8. 31:16Perspective on Code Matters
  9. 32:34Practical Object Oriented Design
  10. 34:08Characterization 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.