Quickly and Safely Refactoring Legacy Code
summary
Argues refactoring succeeds by three concrete practices: one-line commits and running the automated test suite before each commit, deploying tiny deltas several times a day, and using feature flags/dark launching to separate deploy from release. Shows test techniques like characterization testing and sprout class/method plus a simulate‑TDD workflow of uncommenting lines to build tests. Reports committing every five minutes, splitting a long rename into staged DB then code changes, and recovering from small inevitable mistakes.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 0:50What is bad code
- 3:47The catch22
- 4:21The question
- 4:38My 3 answers
- 6:01Work in tiny steps
- 7:53Multiple feedback levels
- 13:26Feature flags
- 15:53Working in tiny steps
- 16:26Staying on the trail
- 23:43Add Tasks
- 24:07Add Tests
- 26:46First Tests
- 28:36Adding Tests
- 34:23Recap
- 34:54Outro
related talks
55mHow To Approach Refactoring
40mTesting Legacy Code: Safe Refactoring
48mThree Principles To Bring Your Legacy Code Into the Future
46mThe Surprising Effectiveness of Small Steps
38mCompassionate Refactoring
57mUnlocking The Awesome Power of Refactoring
36mThe Secrets of Successful Refactoring
05mRefactor or die
