Loading lesson…
Level 1 · Apprentice0 XP
Change the shape of code in tiny steps with tests watching, never both at once.
Step 1 / 5
ProblemA tangled function needs changing. You rewrite it all in one go, nothing runs for two days, and a subtle behaviour is lost. Nobody notices until production.
← → step
Before this: Code smells: the catalogue
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Pick an untested function. Write three characterisation tests that record what it returns today. Then do one extract-method refactoring and run the tests after it.