~/talk

Refactoring from Good to Great

Talkat Aloha RubyConf 2012 · 2012-10-08..10-09· [developer-experience]
slides:none on file

Live coding refactors Ruby code into clearer objects and fewer conditionals: extracting an orders query, adding a DateRange value object, moving date logic off Order, and replacing nil checks with a NullContact class which removes three conditionals. Tests run frequently and stay green while vim macros speed edits. A simple payment gateway abstraction centralizes BrainTree calls to avoid shotgun surgery and makes stubbing and testing easy. Concrete wins: smaller methods, lower coupling, and deleted code that still passes specs.

AI-written summary · about

  1. 0:00Introduction to refactoring
  2. 2:58Extracting method
  3. 5:58Tell don't ask principle
  4. 8:47Extracting value objects
  5. 12:03Reducing code coupling
  6. 16:05Performance and code clarity
  7. 19:16Fixing edge cases
  8. 22:17Null object pattern
  9. 25:00Polymorphism over conditionals
  10. 28:57Organizing refactored code
  11. 31:14Depend on abstractions
  12. 35:02Implementing a gateway
  13. 37:44Refactoring strategies
~/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.