Jacques Mattheij has written neat article on topic of improving legacy code. It happens to everybody - you get handed legacy code, quite often without proper documentation or hopelessly out of sync with what is presently keeping the company afloat. However it can be a lucrative business to be able to take such a code and to turn them into healthy maintainable projects.
Author suggests the most sensible approach is to work incrementally. Article pays attentions to importance of:
- Backups, especially configuration data
- Having build process and that it actually produces what runs in production
- Writing the tests
- Instrumentations and logging
- Changing only one thing at the time
- Using proxies between end-user and the old system
- and more
In a situation like that author prefers total control and an iron clad process. Can not agree more.
[Read More]