Refactoring from Good to Great - A Live-Coding Odyssey
summary
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
chapters (23)
- 0:00Introduction
- 5:30Consistency
- 8:30Private methods
- 9:15Performance concerns
- 9:35Premature optimization
- 10:25Extracting private methods
- 11:30Fanout and Fanin
- 12:30Macros
- 13:30Classes
- 14:45Commit
- 22:25Break Everything
- 23:55Coupling
- 26:05Improvements
- 26:35Openstruct
- 28:05Ordered Report
- 28:35Faster Tests
- 30:45Fixing Unit Tests
- 31:50DateRange Behavior Magnet
- 34:35DateRange as a Range
- 36:00Cleaning up the class
- 37:30New code
- 38:40Null object
- 45:15When to Refactor
related talks
47mRefactoring from Good to Great
44mRefactoring from Good to Great
45mPanel Discussion Refactoring
33mSo You Want to Start Refactoring?
18mImpactful Refactors: Refactoring for Readability
35mQuickly and Safely Refactoring Legacy Code
01h 04mRefactoring Is Not Just Clickbait
12mImpactful Refactors: Refactoring for Readability
