Where does 'legacy code' comes from?
Often people are scared to touch legacy system, and holding on tightly to the principle 'if it ain't broken don't fix it'. New features then is added around this huge mess of tangled webs of codes, which do nothing but contributing to more chaos.
So when does a good working code turned into 'legacy code' ?
It's important to have a common definition to the term 'legacy code' to stop it from being produced in the first place. Any code without test around it, that verifies how it should behave, is legacy code even it was 'only' 1 day old.
Creative Common: branditlessler
UPDATED 30 November 2008
Just a shout out on this post. I *think I* read about the idea from Gerard Meszaros's xUnit Test Patterns. It's interesting to listen to Michael Feathers advocating the same idea on Dot Net Rocks #397 Michael Feather talks legacy code. A good listen.