1. 4

  2. 18

    I really love legacy, and have been working on a DOS application that is in use since 1986. I helped to patch the blob to solve clock frequency issues around 2005, and virtualized it completely in 2015 (now allowing the app to reach files and print over the network!)

    I really hate legacy, and have found enormous amounts of garbage and myself struggeling not only with the incomprehensible and untangible structure of bloated software architectures, but also with consequent motivational problems. I even had to disappoint the customer, who invested a lot in me: despite the promising progress, fixing it for real would cost way too much.

    Sometimes I like to tell junior programmers some war stories, especially when they complain when working with the code of others. I romanticize what I call “software archeology,” and declare my love of unraveling the mysteries hidden behind the unknown. This I do for two reasons: I hope to motivate them beyond the point of misery (the trap, in which you believe you can not deal with the problem, and give up) and I hope to give them another perspective, as follows.

    Legacy is something to be proud of. It is the work of a precious generation (be it 30 years or 6 months ago), which dealt with perhaps completely different circumstances. Respect their work, just as you wish others will respect your own. Instilling this picture, that legacy is something great and is what you ultimately hope to produce, might result in work that one can be proud of: work that builds upon the great work of others, and tries to improve upon it!

    1. 4

      “Your code could be legacy some day!” is a legitimate motivational phrase, in my opinion. There’s often a lot wrong with legacy code, but that’s because you’re often looking at it from a very different perspective. Understanding the original authors’ viewpoint is important. You might call it “code empathy”.

      1. 1

        I have made similar experiences with dealing with legacy. It’s easy to complain about certain design decisions, but really, sometimes it just seemed like a good idea at the time. Much can be learned from legacy code, too. Tricks that nobody uses today, space and memory optimization and such.

        Grab a copy of some 70s or 80s source code and go to town with it sometime. Bring it into the 21st century. Enjoy the journey.

        1. 1

          Realizing that legacy code is code that did served well it’s purpose, is part of our path to professionalism.

          But IMHO, this should not stop us to rethink things.

          Most of complexities of modern software (and most of it’s flaws) come from legacy decisions that we didn’t challenge.

          And I’m not only talking about JavaScript in the browsers, but even about things like dynamic linking, root users, using HTTP to deliver computations and so on…

          All useful things, when they were thought. But today we can do it better.

          1. 1

            You know, I did get a pretty uplifted feeling reading that. The respect point is both incredibly spot on, and incredibly not the norm.

            1. 1

              Yes! I often really enjoy working in fifteen year old legacy code for exactly that reason. Sure the abstractions may not be great, but it is useful code that has served the company well all that time. My main job when working in legacy code is to not break what it gets right.

              1. 1

                This is all fine, but what turned me off a bit wrt consulting is a high frequency of modernizing legacy.

                The code did not appear in a vacuum and there are always some of the original forces in place; budgets and schedules and such. Tradeoffs have to be made, and often these include not taking the upgrade path all the way to the latest version.

                This leads to boredom, although the customers are always super and their domains where they work different from each other. It also raises the barrier to invest time in the latest and greatest, since the bulk of it would have to be done out of passion on free-time hobby projects.

              2. 2

                I’ve always thought that Legacy is the real heart of development. Sure, it’s fun in a way to build something new from scratch using the newest and coolest of everything. But it’s even more fun to build things that work and solve problems. Real-world problems tend to be messy, and the code to deal with them often gets a little messy too. Or sometimes a lot. I think where we really show our skill and earn our keep is in being able to go into that messy legacy code, figure out what it’s actually doing, and build bug fixes, feature improvements, and architectural improvements on it.