The document discusses the challenges of deciding whether to rewrite an existing codebase from scratch or work with the legacy code. It outlines reasons for not working with the existing code, such as missing documentation or tools. It also notes potential issues with rewriting from scratch, such as the impact on other teams and office politics. The document recommends starting by automating infrastructure and tests, learning the essential business concepts, and trying to introduce incremental changes to the legacy code before deciding to fully rewrite it.
4. A. I can't work with it
• Missing source code
• Missing protocol documentation, passwords
• Missing tooling (e.g. no licence for Visual C++
5.0)
• Legal or regulatory reasons
5. B. It won't work properly
• Breaks often in production
• Performs poorly
• Hard to deploy
• No monitoring or logging
6. C. I won't work with it
• Brittle code
• Big ball of mud
• Hidden knowledge
• I don't know the language
• Unused code
8. "Programmers are, in their hearts,
architects, and the first thing they want to
do when they get to a site is to bulldoze
the place flat and build something grand.
We're not excited by incremental
renovation: tinkering, improving, planting
flower beds."
-- Joel Spolsky - "Things You Should Never Do"
http://www.joelonsoftware.com/articles/fog0000000069.html
9.
10.
11. "Programmers are, in their hearts,
architects, and the first thing they want to
do when they get to a site is to bulldoze
the place flat and build something grand.
We're not excited by incremental
renovation: tinkering, improving, planting
flower beds."
-- Joel Spolsky - "Things You Should Never Do"
http://www.joelonsoftware.com/articles/fog0000000069.html
12. It's never just the code
Sysops
Third parties
Designers
Other teams
Marketing
Technology
salesmen
26. Steps to introduce tests
in legacy code
• Find where to make the changes
• Find what to test
• Break dependencies (without refactoring)
• Write tests
• Make changes and refactor
29. Swallow small bits
• Carve an integration point (service, DB)
• Rewrite only the parts that touch it
• Don't try to rewrite the whole monolith at once
30. Rewrite by feature,
not by module
• Play to the strengths of your target language and
framework
• Don't replicate past implementation
31.
32.
33.
34. Take your time
• Insist on quality
• Train the team. Build good habits
• Absorb the culture of your new language/
framework
• Be aware of cultural dissonances