Perl Legacy Code

What does Legacy code mean? My new co-worker says that we are working on legacy code, while my new boss says that all the code is not legacy since it has all been written in the past few years. As I have been in the codebase for two full days now I tend to agree with my co-worker.

So I ask you: In three sentences or less, what makes code "legacy" to you?

Until later?


For me Legacy code is basically "code I would like to re-write". This is either because it was poorly implemented or poorly designed in the first place, often times due to tight deadlines or vague and confusing specs. Or, as is more often the case, because what was once a clean implemented and sanely designed codebase has turned in a horror-show over $n years of hastily written enhancements and poorly thought out patches.

At $work we still maintain (and extend/enhance) many of our deployed applications, the oldest right now being over 8 years old. There really is nothing more humbling then having to go back to your 8+ year old code and make changes.

I work with code I consider legacy: code that is older than I am. Most of the code I consider legacy is code that has outgrown its original purpose, has been rewritten multiple times, or has become unreasonably expensive to maintain.

Generally speaking, if you find yourself inflating your estimates because you fear the lurking dragons in the code, then it's probably legacy. Being 5 years old doesn't necessarily make it legacy (I actively maintain code that I wrote new 5 years ago and hasn't outgrown it's purpose yet).


Your blog has been recommended to us as a interviewee's favorite blog!

We would like to do an interview with you about your blog for Blog Interviewer. We'd
like to give you the opportunity to
give us some insight on the "person behind the blog."

It would just take a few minutes of your time. The interview form can
be submitted online here Submit your

Best regards,

Mike Thomas

About this Entry

This page contains a single entry by leonard published on March 19, 2010 10:01 PM.

Moving along in a Programming career was the previous entry in this blog.

Legacy code revisited is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.