DEV Community

Discussion on: How do you deal with legacy projects?

Collapse
 
starswan profile image
Stephen Dicks • Edited

Simple - stop writing legacy code. Too many projects are 'on the road to legacy' from the day they were born - write good tests and enough documentation and comments (comments the WHY of code) so that the next person at least has a vague idea what you were thinking at the time. Practice TDD 'test-first' so that your tests describe your system's intended behaviour at an appropriate level of abstraction (i.e. not all unit tests, that just demonstrate that a component meets it's public interface)