Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What makes code legacy?

Tags:

legacy

I have heard many developers refer to code as "legacy". Most of the time it is code that has been written by someone who no longer works on the project. What is it that makes code, legacy code?

Update in response to: "Something handed down from an ancestor or a predecessor or from the past" http://www.thefreedictionary.com/legacy. Clearly you wanted to know something else. Could you clarify or expand your question? S.Lott

I am looking for the symptoms of legacy code that make it unusable or a nightmare to work with. When is it better to throw it away? It is my opinion that code should be thrown away more often and that reinventing the wheel is valuable part of development. The academic ideal of not reinventing the wheel is a nice one but it is not very practical.

On the other hand there is obviously legacy code worth keeping.

like image 919
Chris de Vries Avatar asked Jan 26 '09 12:01

Chris de Vries


People also ask

How does something become legacy code?

Legacy code is old computer source code. It could simply refer to an organization's existing code base which has been written over many years, or it could imply a codebase that is in some respect obsolete or supporting something obsolete.

What's wrong with legacy code?

The problem with legacy code is that the older it gets, the more it becomes incoherent or difficult to understand. At one point, that legacy code no doubt made sense. Since then, it's been worked on, expanded and patched up by developer after developer.

What is legacy code in testing?

Another commonly used definition of legacy code is code written without proper tests. The first definition (“ugly code”) does not necessarily rule out the second one (“code without tests”). We can say that there are many different cases when code can be called “legacy”.

What is legacy language?

A ProgrammingLanguage which is still used in production code, but only in LegacySystems. In other words, where the language is typcally only selected when its use is a bona fide requirement, usually due to the need to interface with zillions of lines of code that already exist.


2 Answers

By using hardware, software, APIs, languages, technologies or features that are either no longer supported or have been superceded, typically combined with little to no possibility of ever replacing that code, instead using it til it or the system dies.

like image 53
cletus Avatar answered Sep 22 '22 23:09

cletus


What is it that makes code, legacy code?

As with plain legacy, when the author is dead or missing, you as a heir get all or some of his code.

You shed some tears and try to figure out what to do with all this rubbish.

like image 27
Quassnoi Avatar answered Sep 22 '22 23:09

Quassnoi