Practice legacy code vocabulary from Michael Feathers: characterization tests, seams for testing, zero-documentation modules, and the discipline of writing tests before refactoring.
0 / 5 completed
1 / 5
Michael Feathers defines legacy code as code that:
In 'Working Effectively with Legacy Code', Feathers defines legacy code as code without tests — regardless of age. Tests are what make code safe to change.
2 / 5
A '_____ test' documents the current behavior of legacy code before refactoring begins.
A characterization test (Feathers) captures the current behavior of code — even if that behavior is wrong — so that changes don't unintentionally alter what the code does.
3 / 5
'We added a _____ to enable testing.' What is inserted into legacy code to allow dependencies to be replaced in tests?
A 'seam' (Feathers) is a place in code where behavior can be changed without editing the code itself — enabling dependency injection and testability in otherwise untestable legacy code.
4 / 5
'We're writing tests _____ refactoring.' What is the correct order?
The legacy code discipline requires writing characterization tests BEFORE refactoring — so you have a safety net that detects if the refactoring accidentally changes behavior.
5 / 5
'The legacy module has zero _____.' What is missing that makes the module especially hard to work with?
Zero documentation makes legacy code especially risky — there is no record of intent, edge cases, or design decisions. Characterization tests serve as a form of executable documentation.