3 ms·
Pro tip: Legacy code can be code you yourself wrote 6 months ago. I really like the techniques described here. I haven't gotten around to going through Michael
by ryanar 6y ago
Pro tip: Legacy code can be code you yourself wrote 6 months ago.
I really like the techniques described here. I haven't gotten around to going through Michael Feathers's book, but the list of steps described is what I try and do anyways when working with legacy code.
It is amazing how fast bitrot can take hold of a codebase that isn't being continually maintained. The author's reference to broken window theory, that once you have a chunk of code that is pretty gnarly, the next person who comes along and has to add something to it just slaps it in there, it is already a mess, so why try and clean it up? There is a hard tradeoff with pragmatism that we have to make, especially if you are working at a startup where not getting to market could be the death of your company. But I think that knowing and understanding these techniques can give you confidence that you will be able to go back later and clean up your own legacy code.
- firebaze 6y agoTo emphasize your point: if I don't consider my own code legacy after a year at most, I'd assume I didn't improve in that time frame.