Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming

The Reality of Long-Term Software Maintenance (construct.net) 43

When developers boast "I could write that in a weekend," they're missing the painful reality that haunts software maintainers for years. In a candid blog post, Construct developer Ashley explains why maintaining large software projects is a burden most programmers fail to appreciate. "Writing the initial code for a feature is only a fraction of the work," Ashley explains, estimating it represents just "25% of the total work" in Construct's 750,000-line codebase. The rest? A grinding cycle of "testing, diagnosing and fixing bugs, optimizing performance, upgrading it to work with other changes, refactoring, customer support, writing documentation and similarly revising the documentation over time."

Ashley describes how accepting code contributions feels like someone offering to build you a free extension -- initially attractive until the roof starts leaking years later and the original builder is nowhere to be found. Meanwhile, your tenants (users) are furious, and you're stuck with "no good options." The post recounts Construct's own bruises: a community-contributed storage plugin still causing compatibility headaches a decade later, and third-party libraries that became maintenance nightmares after their creators vanished.

These experiences explain why seasoned maintainers eye large code contributions with deep suspicion rather than gratitude. "If you suggest some software project uses some code -- even a small amount -- will you be there in literally 10 year's time sorting out all the issues that arise from it?" Ashley asks. "Usually the answer is no."

The Reality of Long-Term Software Maintenance

Comments Filter:
  • by BigFire ( 13822 ) on Thursday February 27, 2025 @01:13PM (#65199165)
    Sometimes it's better to just start over than trying to fix hacks on top of hacks. But that is almost always impossible for stuff that's needed for daily function.
    • by aldousd666 ( 640240 ) on Thursday February 27, 2025 @02:02PM (#65199297) Journal
      "Can't replace the hull of the ship while it's sailing" is what my boss is fond of telling people.
      • But sometimes it makes more sense to build a second ship alongside the first - then, when finished, transfer everything and everyone over.

        • "Can't replace the hull of the ship while it's sailing" ...

          But sometimes it makes more sense to build a second ship alongside the first - then, when finished, transfer everything and everyone over.

          While it's sailing? Think that through... :-)

          • Yeah, after hitting "submit" I realized I should have altered the analogy somewhat.

            Although it would be interesting to see someone try building a new ship while stationed on an existing in-use ship!

            • Yeah, after hitting "submit" I realized I should have altered the analogy somewhat.

              Although it would be interesting to see someone try building a new ship while stationed on an existing in-use ship!

              Towing around a floating dry-dock with an under-construction ship inside, having parts/materials/kabor delivered by another ship ... :-)

      • I work on the plane while its flying every single day.

    • Sometimes it's better to just start over than trying to fix hacks on top of hacks. But that is almost always impossible for stuff that's needed for daily function.

      The trouble with starting over is it often seems easier than it is because all of those weird bits are there for a reason, sometimes just bad architecture in the original system, but sometimes real requirements of the business logic.

      I think the best approach is figure out the new "proper architecture" and then start rewriting a bit at a time. More work than a rewrite but more likely to succeed and you always have a working product.

      • To build on what you just said...

        I am very wary of any argument that may boil down to "I do not not really understand what is going on here, but surely it will be easy to do better with a rebuild". Such claims are often founded on broad ignorance regarding the complexity of the real underlying requirements. And what I mean by "real underlying requirements" are those yardsticks by which the success of the project will be judged by the users/consumers who rely on the software. If the PRD was woefully incom

        • I think it comes down to the null hypothesis, without evidence to the contrary assume that all the old cruft is there for a good reason.

          The rewrite-in-place does have its own serious risks.

          The standalone rewrite, when it fails, just means you have a dead side-project. But the rewrite-in-place can leave you with a half-complete frankenbeast that's even less maintainable than when you started. You really need to ensure that each incremental step is an improvement.

          • All your points are true, but I would add that the ultimate determiner is: Whether the programming team has the skill for the rewrite or not. If they have the skill, then they will know how to handle those requirements of business logic.

            IF the team doesn't have the skill, then better to have them clean up what they already have. Otherwise they'll just make another mess by starting from scratch.
      • by Samare ( 2779329 )

        Is this the Wayland vs X discussion all over again?

    • by Kisai ( 213879 )

      It's a double-edged sword...

      C, you can just write everything yourself, and you never need to peer into someone elses black box, if some library goes obsolete, you can replace it with some effort.

      C++, same as C as long as everything was using C bindings.

      Every other language? You are up the creek without a paddle the minute the maintainer of that package stops maintaining it. If a new CPU type comes out, classic example (eg x86-64, ARM64, etc), or a new OS type that doesn't have that library at all.

      PHP, all t

    • by Anonymous Coward

      Example: air-traffic control.

    • by nmb3000 ( 741169 )

      Sometimes it's better to just start over

      Sometimes, but usually not.

      I always think of Joel Spolsky's "Thinks you should never do" [joelonsoftware.com] article from 25 (!!) years ago when someone mentions The Big Rewrite. It came up again recently at my workplace for a large product we support.

      Joel's opinion on this seem to have fallen out of favor in recent years (at least judging by how many articles disregard it when you search for the article title); I'm not sure if that's more due to the speed and nature of modern "agile" software development, or if it's starry-e

    • If the person wrote the mess originally, they're going to write another mess if they rewrite it.

      The way to learn to write clean code is to clean up your own mess, not to try again from scratch.
  • We knew this fact over twenty years ago. Development is only 25% of the cost of a system. the other 75% is maintenance. Old news. How can you reduce the cost of maintenance? That would be news!
    • Hire developers that test properly as they are developing.
      • Not disagreeing with you, but in addition there's a lot to testing in addition to unit testing: load, volume, scalability, etc. In the 80s, it was thought that path analysis would be very useful - but we could scarcely get up to 100% lines of code coverage, not all logic paths. And it's only gotten worse since then.
    • Re:Old News (Score:5, Insightful)

      by Chris Mattern ( 191822 ) on Thursday February 27, 2025 @02:30PM (#65199379)

      "How can you reduce the cost of maintenance?"

      By taking the time to write clean, clear code in the first place.

      But, of course, that's wasting time making it "pretty" instead of making listable features. We can't be wasting time on that!

      • The road to hell is paved with good intentions. You're a low 6-digit dude. You've been around the block, I assume. You *know* that a project that starts out meeting ideals eventually gets taken over by other parties who don't share those ideals, and then it becomes a Golgothan that can't be beat no matter how much holy water you throw at it. It's inevitable. Heck, even in my own projects, I see it. Two days after writing something: "What the heck was I thinking when I did that?! Gah!"

        I don't want t
  • by Murdoch5 ( 1563847 ) on Thursday February 27, 2025 @02:14PM (#65199329) Homepage
    The three largest issues I find:

    1. All the library crap developers add to solve problems they don't need. You're generally better off writing the functionality you require, yourself, than relying on someone else's library. There are cases where that's impractical, but, if you can write it, you probably should.

    2. Lack of comments. To spite what anyone thinks because I don't care, a comment is there to explain how and why you're doing something. You want to leave those explanations in the code, so other developers understand why and what you were thinking. It might be a stupid idea or solution you came up with, but if you leave good comments, at least they know why you did what you did. I typically recommend a code base is at least ~50% comments because if you're commenting less, you're probably not commenting enough. This is combined with the documentation concern, your code should be self documenting, in that you can write a parser to turn the comments into the documentation. If your code can't turn out its own good quality documentation, you failed.

    3. Stupid complexity. Just because you can write interfaces to interface to abstracted state machine interfaces, doesn't mean you should. Unless you're doing something very complicated, the simple and straightforward solution is almost always the right one. I've picked up old code bases that have so much indirection in them, you have to wonder if the developer was in some kind of LSD / DMT fever dream. The annoying part about this point, I know developers who argue the abstraction method is a better, more robust methodology, but they're wrong, almost always.
    • by Brain-Fu ( 1274756 ) on Thursday February 27, 2025 @03:45PM (#65199565) Homepage Journal

      I couldn't possibly agree more. I would have given you mod points, but you already have a score of 5.

      However....

      If writing code for profit, sometimes you need a third party library for something your team COULD write themselves, but would take a long time doing it. The time savings is not only cost savings but it also gets you to market sooner, which can be critical if the business model involves long-term contracts.

      So, I can see that as an excuse for using libraries for ordinary things.

      There is also a strong subculture among developers that takes the exact opposite attitude on this. They insist that it is better to use third party libraries whenever you can. Their reasoning is that whoever wrote those libraries are both devoted, and specialists, so they will do a better job of it than you will. They will find and fix the bugs in it, so you don't have to. Same for security holes. And they are all computer science geniuses who will be able to make it more performant and less memory hungry than you can.

      There is no reasoning with people who are of this mindset. They are every bit as stubborn about this as we are in our insistence that it is better to write it ourselves (if for no other reason than getting a solution that fits our needs exactly rather than something generic that we need to bend and warp our solution to even use).

      I have seen similar passion in the insistence that coding to interfaces (plus a hearty dose of injection, inversion of control, and mocking for tests) is the one-size-fits-all pattern for coding all solutions. Their level of devotion to this is outright religious. The will not be talked out of it. The end result is almost always a huge codebase where 99% of your interfaces have only one implementation and you have to keep re-writing your tests because every other change is a breaking change (and the advocates repeatedly insist that our case is special and usually breaking changes are rare).

      • I strongly agree that in a production for profit environment, sometimes you need to library up, or fail. My issue with libraries, if you run into an edge case, you might need the library maintainer to make an edit for you, which might not be possible. You can also run into the annoying upgrade lock, where a library blocks a framework from updating. Which I've honestly run into many times, and it's always a headache.

        My bigger issue is honestly the comments developers don't use. I don't care if YOU unde
      • by codrus ( 35604 )

        On the abstraction layer -- I suspect you've never had to work on a codebase that was written without abstraction and then later ported to different hardware platforms. Too much abstraction results in code that is bloated and slow, but too little abstraction results in code that is buggy as hell and impossible to maintain. Slow but correct beats fast but wrong every time in my book.

      • They insist that it is better to use third party libraries whenever you can. Their reasoning is that whoever wrote those libraries are both devoted, and specialists, so they will do a better job of it than you will...There is no reasoning with people who are of this mindset.

        That's because they are mediocre programmers. A third party, with high probability, will in fact write better code than them. And they know it.

        The way to "reason" with them is to help them improve their programming skill, so they can actually have confidence in their own code.

    • Your point #2 especially. I've had reviewers of my code diss comments I put in saying it should be self documenting because, well, it's code. Yeah it documents what it does not necessarily what you intended it to do.
    • by nmb3000 ( 741169 )

      a comment is there to explain how and why you're doing something

      Bingo. Where many newer (and not so new) devs fail on this is commenting on what the code is doing instead of why it's doing it or how it's going to accomplish some goal. While there are some times when "what" comments are useful - usually for convoluted or complicated code that is necessary to solve some problem or meet some performance - the vast majority of comments should help future devs understand the rational or method behind the code and not the code itself. Warnings about pitfalls like edge cases

    • Structure is the key to understanding.
  • by zkiwi34 ( 974563 ) on Thursday February 27, 2025 @02:16PM (#65199335)
    It's great fun. Everyone should do it. Noting that the original coders are probably dead or in hiding. Documentation ditto. And the Coding languages... are they still available... in the version you need? Designs? Yeah, nah... They are probably dead or in hiding as well... The system operations experts ditto... That or they want you to suffer a violent and painful demise. However, what is more important is that Pluto regains its planet status!
  • 1. Management saying "if it ain't broke, don't fix it".
    2. The software *works*. Why do you want to waste time and budget rewriting something that *works*?
    3. You're sure you can rewrite it in a week, eh? With everything it does, including the stuff that looks weird that was added for serious reasons?
    4. And how easy is it for the users to use your Wonderful New Code - have you don't any surveys/meetings with them?

    I could go on for a *while*. Just one last piece of junk: in ten years at the NIH as a sr. Linux

  • by mukundajohnson ( 10427278 ) on Thursday February 27, 2025 @02:28PM (#65199371)

    Going to be a lot of maintenance work in 10 years from now.

    • by gweihir ( 88907 )

      Well, maybe. Apparently most AI "code" is so bad that people that could fix it might just walk away.

  • In Software Engineering 101. 20% initial coding, 40% maintenance, rest other stuff. Anybody that does not know this is simply incompetent.

  • by ZipNada ( 10152669 ) on Thursday February 27, 2025 @04:24PM (#65199661)

    You spend a lot of time and effort learning to write software, ideally because you like it and you are good at it. You go through any number of grinding interviews and tests to see if you know your "algorithms and data structures", that you "are a fit with the corporate culture", and eventually you land a job. You are all set to create awesome things nobody has ever seen before.

    And then you find out that your job consists of fixing bugs and making minor enhancements to a huge creaking mass of legacy software written in a big hurry by people who left the company long ago. Your day consists of attending the daily standup meeting, explaining what you accomplished yesterday so the Jira tickets can be moved to the right, and getting a new set of micro-assignments that you will plow into for the remainder of the day. You will contemplate doing this for the next several decades and try to justify it to yourself.

  • I've been involved with several legacy systems. We scrapped a couple and started over. We ported a couple more to new technology. The decisions involved several factors. How critical is this system to our business? How much work is involved in creating a new system? Are there dependencies we can't do anything about? What happens if we don't do anything?

    Of the projects I've been involved in, we scrapped a couple of legacy systems and started over. One was core to our business but ran on bespoke abandonware

  • by jrnvk ( 4197967 ) on Thursday February 27, 2025 @04:35PM (#65199685)

    And I was told by the sales guy that AI does it better and cheaper than humans!

  • Maybe this should be the job of government as well. Governments are the ones that make physical transport, communication, and such possible. Perhaps having divisions to maintain and even perhaps replace software used by a lot of businesses would be a needed thing. For example, things like an OpenPGP program, or OpenSSL should be government maintained, or at least funded to assure a high trust level. Same with things that are needed, but are starting not to have updates. It might be good for some organi

MAC user's dynamic debugging list evaluator? Never heard of that.

Working...