Most software developers dread having to work on a "legacy" software project, because it is in an old language, or is poorly designed, or inflexible and difficult to modify. In his talk from RailsConf Europe, David Heinemeier Hansson argues that legacy is a frame of mind that indicates learning and progress on the part of a developer. If you can see what's wrong with code, you're better than you were when you wrote it.
As a developer gains experience and skill, their view of their old code goes from "Best Code Ever" down to "This code sucks and I can't take it anymore", even if the code stays exactly the same. Viewing something as legacy means that your taste and skill have improved. The only way to avoid writing legacy code is to stop learning. In this talk, after discussing the concept of legacy code in general terms, Heinemeier Hansson does some detailed analysis of his own old Rails code.
David Heinemeier Hansson is a programmer and evangelist of Less Software. He’s the creator of applications like Instiki, Basecamp, and Ta-da, and works with the open source community and design extraordinaires 37signals. Since its release in late July 2004, he’s also been leading the development of Ruby on Rails, a web application framework and environment for building real-world applications with joy and less code than most frameworks spend doing XML sit-ups.
This free podcast is from our Rails Conference series.