All TheLittle Things
summary
A 43-line method full of conditionals becomes a suite of small objects by driving changes through tests: add characterization tests, extract tiny methods, introduce per-item classes with a factory and simple inheritance, and move behavior/config into a hash. Complexity metrics drop (from about 50 to 12 for the worst class), roughly a 75% complexity reduction, the example is the Gilded Rose kata, and every refactor stays green so the behavior keeps working. tests first, extract to objects.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 2:35Complex code problem
- 6:07High-complexity method analysis
- 15:24Refactoring via tests
- 23:57DRY and abstractions
- 30:20Open-closed principle
- 37:56Class hierarchy creation
- 44:03Refactoring results and conclusions
- 46:57Q&A








