~/talk

Refactoring from Good to Great - A Live-Coding Odyssey

Talkat RubyConf AU 2013 · 2013-02-20..02-22· [testing, developer-experience]
slides:none on file

Live‑coding refactors convert a messy orders report into short, named methods and a small public API by repeatedly running tests and keeping red/green cycles tiny. Examples: a Vim macro automates extract temp to query, a struct → DateRange → Range value object removes parameter clumps, and a NullObject replaces nil checks to delete many conditionals. Caching waits for profiling; Rails speedups use Zeus. Outcomes: less parameter coupling, clearer names, fewer lines in public methods, and incremental commits that stay green.

AI-written summary · about

  1. 0:00Introduction
  2. 5:30Consistency
  3. 8:30Private methods
  4. 9:15Performance concerns
  5. 9:35Premature optimization
  6. 10:25Extracting private methods
  7. 11:30Fanout and Fanin
  8. 12:30Macros
  9. 13:30Classes
  10. 14:45Commit
  11. 22:25Break Everything
  12. 23:55Coupling
  13. 26:05Improvements
  14. 26:35Openstruct
  15. 28:05Ordered Report
  16. 28:35Faster Tests
  17. 30:45Fixing Unit Tests
  18. 31:50DateRange Behavior Magnet
  19. 34:35DateRange as a Range
  20. 36:00Cleaning up the class
  21. 37:30New code
  22. 38:40Null object
  23. 45:15When to Refactor
~/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.