There has been version 1.1, 1.2, 1.3, 1.4 and 1.5 and now we have Java 6. Change is part of nature. Still there may be several billion line of code (LOC), written following the Java 1.2, 1.3 versions and so on. With Java 5.0 we have generics (type safe working), var-args, Autoboxing and so many strong API's. We have refinement, enhancements and what say?
The code which is written in precious versions are known as legacy code. Your work is running using that codes. We can't change them in a day; We have to very careful, and specially Java API designers and developers; They have to think it several times whether what they are going to develop would break the existing code; Certainly they would not want to do so.
There is a lot of code which is created using newer version and has to be work with legacy code.
In the dictionary, legacy is "something transmitted by or received from an ancestor or predecessor or from the past."
"Legacy code" is often a code word for ugly old stuff written by some old hack that you wouldn't have written that way because you're much smarter but now you have to live with it. In reality that could mean anything you wrote yesterday. Many times a "legacy system" is something that you cannot modify, so you have to work around its quirks. In my shop "legacy" specifically means mainframe COBOL, probably written in the 1970s.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James: [QB]Many times a "legacy system" is something that you cannot modify, so you have to work around its quirks. In my shop "legacy" specifically means mainframe COBOL, probably written in the 1970s.
I like the definition Micheal Feather uses: legacy code is code that doesn't come with (unit) tests.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Jan 29, 2003
So code with good tests would never become legacy? An interesting notion.
In reality that could mean anything you wrote yesterday.
I agree with this definition (although more often the case would be "what someone else wrote yesterday" or "what I wrote 2 years ago"). It has very little to do with the JDK version that was used to develop it.
I think the definition by the presence of (unit) tests refers mainly to maintainability, which is a big part of it: if there are plenty of tests, the likelihood of the code being maintainable (and thus not feeling like legacy code) is greatly increased.
Ping & DNS - updated with new look and Ping home screen widget
It is basically anything that was written yesterday. It really depends on what kind of projects and companies you work for.
I've worked on projects where legacy meant applications on a Tandem Mainframe system using TAL and later C. I've worked on other projects where legacy meant an old Unix mainframe system using Cobol and DB2.
But I've also worked on projects where EJB 2.0 was considered legacy and what was done six months ago was considered legacy. It really depends on what kind of company and projects you work on.
Many times legacy code means mainframe systems, but many times it could mean a project you did six months ago.