TDD and legacy code - zhendrikse/tdd GitHub Wiki
Definition of legacy code
To me, legacy code is simply code without tests โ Michael Feathers
The site maintained by Nicolas Carlo, understandlegacycode.com, boasts a blog post that summarizes the key points of Working Effectively with Legacy Code.
Nicolas himself uses a somewhat different definition of legacy code.
Legacy Code is valuable code youโre afraid to change โ Nicolas Carlo
as you may sometimes encounter code without (sufficient) tests, but the code reveals its intention so well, that you're not afraid to modify it.
Practice materials
References
- Awesome legacy systems, a curated list of awesome resources and links about tackling legacy systems that gives hope.
- Nicolas Carlo on separating infrastructure (tests) from domain (tests): If you mock, are you even testing?
- TDD and legacy code: creating a snapshot with approval tests
- TDD and legacy code: moving behavior back to where it belongs
- An article about the middle man and train wreck code smells.
- Splitting up a monolith using a team first approach
- What NOT to fix in a Legacy Codebase
understandlegacycode.com
Nicolas Carlo shares tips & tricks to work with Legacy Code on his blog:- The key points of Working Effectively with Legacy Code
- 7 techniques to regain control of your legacy codebase
- Reveal code structure using a word counter
- When is it the best time to refactor?
- Elevate Your Coding: Efficient Practices for Refactoring Katas
- What is Wrong With Boolean Parameters
- Refactoring... but at scale!
- When should you stop refactoring Legacy Code?