"One Small Step"
summary
Starts from a working here‑doc that generates a children’s song and performs an end‑to‑end refactor using small, safe steps: add a characterization test that asserts current output, split the here‑doc into per‑verse methods, separate template and data with C‑style formatting, extract a Critter object (fixing primitive obsession), replace the 1..8 range with a length from an injected eight creatures array, add a tiny contrived test for edge cases and fix an article bug — tests stay green throughout.
AI-written summary · about
chapters (11)
- 0:00The refactoring struggle
- 2:13Defining the problem
- 5:09Preparation and testing
- 8:02Dissecting the structure
- 10:25Naming and revealing logic
- 14:12Safety through undoing
- 17:13Conditional symmetry
- 21:11The object-oriented pivot
- 23:06Handling hard-coded data
- 25:02Generalizing the algorithm
- 29:10Refactoring as a process
related talks
28mTDD for Absolute Beginners
30mIn Praise of Smallness
39mDown The Rabbit Hole: An Adventure in Legacy Code
40mWorkshop - Simplifying Code: Monster to Elegant in Less Than 5 steps
54mTDD Workshop: Outward-in Development, Unit Tests, and Fixture Data
31mAn Optimistic Proposal for Making Horrible Code... Bearable
34mGrowing Software From Seed
41mConcerns, Decorators, Presenters, Service Objects, Helpers, Help Me Decide!
