28

Everyone talks about legacy code in software development and I have heard the term over the last ten years used to paint any codebase as being bad.

Where did this term, which has such powerful connotations to programmers alike originate?

I am sure there must be some book on software development that pioneered this term. I would love to locate the origin of the term "legacy code".

stevebot
  • 2,013

4 Answers4

39

Legacy code is based on the phrase of a legacy system that specifically applies to code. According to Wikipedia it probably dates back to the 1970s and was in common usage in the 1980s. It took off with the tech explosion of the 1990s.

This can be seen with Google's ngram viewer: legacy system,legacy code

legacy system and code

Digging into this further, you can find documented uses of the term 'legacy system' in the 1970s.

The earliest example of 'legacy system' that google has is in a book on Proceedings of the Army Numerical Analysis and Computers Conference from 1978:

... well strutted and documented solution to a clearly defined problem is the legacy system operation needs to be understood and to change the existing system with confidence.

There is also an example of 'legacy system' being used outside of the technology industry in Clout: Womanpower and Politics grin 1976:

... in addition, she holds a seat as the third-ranking Democrat on the powerful Banking and Currency Committee - positions of power she has built up on her own, not via the legacy system.

Beyond these example which shows its use has extended beyond the pure software world, the specifics of where exactly the term originated are probably lost to the sands of time. Given the military and political references, it may have originated with them (primarily the military and its jargon migration ("It seems likely that 'kluge' came to MIT via alumni of the many military electronics projects run in Cambridge during the war (many in MIT's venerable Building 20, which housed TMRC..."))

5

Legacy code base usually refers not to a POS system, but rather any system that exists in a code base or system that is no longer used for new development. For instance my team currently supports a few .net 1.1 and 2.0 applications that are considered legacy code. If there comes a time where a modification is required they will be either rewritten or updated to use the latest frameworks and standards. Until then we manage them as legacy applications that need to continue to function but no enhancements or code fixes are implemented.

There are also a few legacy systems that we do not support at all that were written in VB6 and Classic ASP. We have no capacity, or directive to support or modify these systems but as long as they continue to run and have no needs for enhancements they will not likely be updated. There is nothing particularly wrong with any of these systems. They perform their jobs the way they are supposed to and aside from looking like an app from the mid to late 90's they have no major issues.

So legacy does not mean POS just a system that was created in an earlier technology or language that is not up to current standards. Some legacy systems qualify as POS mostly because they lacked the development methodologies that exist to day that allow for managed code and the 15+ years of experience of the veteran web coders.

SoylentGray
  • 3,104
3

"Legacy code" is a term used by marketing people to pressure those whose code is old (but presumably works fine) into updating to the latest greatest (and probably more bug-ridden) software languages and techniques. It is closely linked to "legacy system", which refers to old hardware and operating systems that work fine but don't conform to what is now "politically correct" (e.g. OpenVMS, IBM system).

JohnM
  • 63
2

The term legacy code dates to at least 1989 as used by Glenn Everhart in comp.sys.amiga:

(...by the way, yes, I do sometimes program in C also...but I find it easier to convert legacy code w/o changing its language...)

I found nothing verifiably earlier in Google Books.

Hugo
  • 3,699