I realize there is a pattern, when the engineering team/department has legacy software in their portfolio and managers (usually non-technical but not necessarily) declare the software as good. On the other hand engineering colleagues are not tired to point out how flawed and broken that software is.

Which effectively means when talking to the manager, I need to pretend everything is okay with the software and answer requests as if nothing happened. Otherwise the managers will get irritated or angry. Even engineering colleagues tend to not give any support on this. This has happened to me already 2 times and now again, so I'm thinking to quit my job.

For example last week I got from my engineering supervisor the very unspecific request to "look at" a software, him also pointing out that this is important to the manager and that the software is more or less unusable and broken. He helped me set it up, gave a very brief introduction and wrote a ticket for me. As it turned out, the bug described in the ticket was just a misunderstanding. As I had no other tasks, I tried to fix some bugs and in a subsequent discussions with the supervisor and the manager, we agreed that I fix one specific bug. This turned out to be a can of worms which I then attempted to fix. When 2 hours later I explained that I cannot give a guarantee to fix this within a week he started to get slightly angry, also pointing out he wants to present it on Friday and "the software used to work". (This is really specific but the other 2 situations in the past at other companies were comparable.)

How can this chasm be bridged?

  • 11
    I'm voting to close this question as off-topic because ask this software engineering question on a software engineering site
    – Fattie
    Commented Apr 10, 2019 at 12:15
  • 4
    Do you use any version control for your code development? Can you "undo" or "shelf" your changes, then apply them after Friday. No professional developer ever that would have a problem with "it used to work"
    – Sandra K
    Commented Apr 10, 2019 at 12:58
  • 19
    @Fattie I disagree. This isn't about the technical aspects of the problem, it's about how to navigate the office politics related to technical debt. The tags "software-industry" and "software-development" are appropriate, as this question may not make sense if you're not familiar with that domain.
    – BobbyA
    Commented Apr 10, 2019 at 14:42
  • 1
    @Fattie It's not off topic because it's about organizational, workplace, complexity. If it gets closed I will vote to open it back up again.
    – user53651
    Commented Apr 10, 2019 at 16:32
  • 1
    @BobbyA agreed. The software engineering is context .
    – Stevetech
    Commented Apr 10, 2019 at 17:30

7 Answers 7


Try formulating everything in costs and benefits for the company. "The software has X amount of (known) bugs" isn't very much of a measurement. There are lots of bugs whose effects are minor, or are triggered very infrequently.

Your engineering colleagues and you think the software is flawed and has bugs, but what do the users think? Are your users filing bug reports? Is your company losing money or opportunities because of those bugs? Bugs which no one seem to notice don't have a high priority to be fixed.

How can this chasm be solved?

You and your manager have to understand both sides.

Of the bugs you know off, collect data. What's the effect of the bug? What are the costs of keeping them? (Production lost, money lost, liability, etc). What is the cost of fixing it? (That is, how long will it take you to fix it -- not just writing the code, also rolling it out, and dealing with any fallout, etc). Then you can make an argument to your manager. You have a list of bugs. You have the costs of having this bug. You have the cost of fixing it.

Then your manager can decide whether it's more useful for the company that your spend time fixing those bugs, or doing something else. And you have to accept that sometimes it's more worthwhile to develop new stuff than to fix bugs.

And do remember that code only becomes "legacy code" if it's code that keeps making money; or else it would have been ditched a long time ago.

  • Thanks! Yeah that's definitely a thing. As the manager pointed out, he's worried that a bug is going to be visible at the presentation, making the application look buggy which in turn might make the customer not place an order.
    – Philip
    Commented Apr 10, 2019 at 10:28
  • 4
    The concept of technical debt is useful here; you can phrase the ongoing costs of poor software (user time, business errors, developer time) as interest on the technical debt, which can be removed by either paying down the debt in pieces or declaring "technical bankruptcy". Commented Apr 10, 2019 at 16:39

Legacy software is almost always a pain. There are many reasons why a re-write is not feasible.

What can be done?

  1. Just maintain it. Implement the changes which are requested and only those changes. Try to do the best job possible, without overdoing it.

  2. With agreement of your superiors (when needed), incrementally repair the mess. Be careful NOT to alter the behavior seen by the final user. If the behavior needs to change, go through a proper change request / bug fix loop. What you consider a minor bug fix can result in a major feature break for the customer.

I tell you this as I had to maintain 20+ years old software myself. I even had to branch "new" software from that mess. The only real alternative was to branch a big portion of a spaghetti code - against my wishes to rewrite everything.

The issue is so common and so widespread, that entire books were written on this. Just do a search on Google for books about dealing with legacy software.

  • 4
    And there are numerous books on the fallacy that re-writes will solve everything. TLDR: it doesn't. The code is not spaghetti due to people being idiots (they're usually not), but it became spaghetti due to business constrains. If you don't change your business (input), you're not going to change your code (output).
    – Nelson
    Commented Apr 12, 2019 at 5:25
  • @Nelson: you are correct - business is the root cause of the ugly code we discuss. Although some of the maintainers are not the best of professionals (to say the least) ;) I had the "opportunity" to see real ugly sh*t, definitely not related to any business.
    – virolino
    Commented Apr 12, 2019 at 5:29
  • 2
    Technically if you hire incompetent people, that's actually a business problem too... sadly...
    – Nelson
    Commented Apr 12, 2019 at 7:37
  • Ultimately, yes, of course.
    – virolino
    Commented Apr 12, 2019 at 8:08
  • +1 for pointing out these 2 options. I also maintain legacy software (20+ years old) with full ownership and i do the sectond option (incremental repairs/improvements on code and documentation). When coworker joins the project for some bigger task they always want to do the first option (doing exactly the minimum).
    – some_coder
    Commented Apr 22, 2022 at 7:27

I used to be in a company where I had to deal with two legacy applications. From what I understand, before they left, the two developers managed to hide (or quick fix) the majority of the bugs when they appeared. Fast forward to one or two years after these developers left, the applications were falling apart and users began to be frustrated. It took some time for my manager to really understand that the applications were not stable enough and like you said, fixing even small bugs began to take a long time for me and it began to really decrease my productivity when I had to create some new functionalities.

So what I did was just being honest, every time I found something shady or breaking, I told my manager even if he didn't like it. At some point, he took the decision to hire people so that we could create new applications while maintaining the old one for the time being.

In order to do that, I think you should document every bug you encounter, shady code and try to make them realize it's going to eventually cost them money and create more and more trouble along the way. Don't count on your colleagues to help you with this. And if, at some point, you see no changes in your manager's opinion about it, I suggest you start looking for something else.


1) Become familiar with the goals of your company, the goals of your department, and the goals of your team. How do they all tie together? Discussions about technical debt should be relevant to these goals.

2) When you're discussing the problem of technical debt with non-developers, make it relevant by framing it as risk that the company needs to mitigate. Technical debt can make it harder to add more features, and can make releases more buggy, which increases development time, which costs the company money.

3) If you're not already doing so, start using source-control. You should be able to roll back changes if they're causing new problems. While you're at it, look into the other steps of the Joel Test.

4) Negotiate for time to address tech debt, and time-box yourself to that allocated time. As you investigate legacy code, you will find dragons. You won't have time to address them right away, but the wonderful thing about source control and branches is you can save your progress so that you may return to it later.

5) If you can't get your management to agree to allocate time to deal with technical debt, be sure to mention the impact the tech debt has on the development of new features they ask for, and its role in bugs that pop up. That will make it more visible.

6) Over time, if you still can't get buy-in to address tech debt, learn to live with it, or look for a new job if you can't.


How Can This Chasm Be Solved?

Unfortunately you've set yourself up for a fall here by doing this;

As I had no other tasks, I tried to fix some bugs and in a subsequent discussions with the supervisor and the manager, we agreed that I fix one specific bug. This turned out to be a can of worms which I then attempted to fix. When 2 hours later I explained that I cannot give a guarantee to fix this within a week he started to get slightly angry, also pointing out he wants to present it on Friday and "the software used to work".

Short answer: Stick to the task at hand and don't broaden it unecesarilly.

Longer answer:Unfortunately because you tried to be productive you've uncovered more and more bugs and left the software in an unusable state. You've put yourself in this position on this occasion - You could have just truthfully said on investigation you have found that the issue you were supposed to work on is a non issue and closed the ticket.

The legacy software you're working on is messy for lots of reasons and some of the messy stuff is actually there to introduce last minute changes and bug fixes - In other words, wanted changes.

If you are required to work on and refactor this code in future then you first must make absolutely sure that you do not change the way it works. There are lots of good books and resources on the internet which will guide you in the art of introducing unit testing to legacy code.

  • 3
    "the software used to work" -- fine. get that version out of source control and throw the breaking changes away. Commented Apr 10, 2019 at 14:24
  • Roger, sometimes software breaks with a new operating system version. Without any changes.
    – gnasher729
    Commented Apr 14, 2022 at 20:02

This problem is often expressed in the software development world, because it's easily visible there. But the truth is, it generalizes to pretty much the entire business world. Whether it's software, or manufacturing, or service, there's always a process or function that can be improved. People in "engineering" roles (that is, roles that focus on designing and changing processes or tools, vs using them) often feel a sense of struggle because they can "see" the opportunity for improvement where those in more operationally-focused roles can sometimes seem blind to them.

This is especially true in software, because the view of the end product (the software) is very different - developers see the code, end users see the user interface.

Ultimately, there's a few things you can keep in mind:

Opportunity for improvement is always framed in a specific context. There are opportunities of a purely technical context (making code easier to maintain) and opportunities of a purely functional context (writing code that adds a specific feature). Ultimately, with software, there are often different decision makers for the different contexts - a business unit manager may be ultimately responsible for understanding and approving functional changes, while a technical manager, lead developer, or architect may be responsible for the technical changes. This split in responsibility can easily trip up a developer who's trying to get buy-in for a specific fix, because the business unit may be completely uninterested in a purely technical improvement, and they may even see such work as "wasting time" or even "risky" since it could potentially introduce functional changes or bugs.

As such, it's important to make sure you understand who the decision makers are with respect to bug fixes, approving timelines or levels of effort, and so on. As an entry level developer, it is sometimes the case that everything is filtered through a team lead or other person internal to your team, but based on your description, it sounds like you're getting caught in the crossfire between these decision makers.

Secondly, there will always be opportunity for improvement. Getting too focused on self-identifying and promoting those opportunities can be a slippery slope. Especially if "fix every last bug" isn't really in line with an organization's strategy for a specific piece of software. As you're finding out, sometimes when you self-discover a bug and work on fixing it, you can end up in what you're describing as a "can of worms." The lesson here is, while there may be things you see as bugs, it's important to respect the decision making process in terms of what you raise to your management and what you work on.

It can be easy to say, "hey boss, can I work on this bug I found?" when you're excited by the opportunity to fix something, but not yet truly sure of the scope or impact of the bug. As such, it's almost always better to take the approach of, "hey boss, we may have an opportunity to improve X. Do you want me to spend some time understand the scope and impact of this bug?" And if or when you get approval, it's important to tie it back to something concrete. "Hi boss, now that I've looked at the bug, it only really impacts X, and it will take Y to fix it." This way, you're removing the ambiguity of the situation, and you're helping those with responsibility for things like X (business or technical functionality) and Y (your time as a resource) to direct you effectively.


There are a lot of good answers here, but I'll add another perspective, which is that the code and the organization (probably) isn't the problem here. Your desire to fix every problem may well be, along with what sound like some either tool or process issues.

First and foremost, you have to realize that you're working for a company now, and most likely, that company needs to make money. Therefore, at some level, every decision that is made should be one of cost versus reward. While the software may well have bugs in some sense, unless those bugs are somehow impacting the business, they're only theoretical bugs. It's entirely possible that people/other processes have come to rely on those bugs, for example. So before you go changing anything, you need to have a business case to make a change.

That business case may be that the bug is really impacting something else, and thus needs to be fixed. Or the business case needs to be that fixing bugs in general is so difficult in the code that by restructuring the code, you'll be saving time going forward. And if it's the latter case, that you're restructuring the code to make things easier going forward (ie, paying down technical debt), there's a lot of work you'll need to do before making those changes. Some of the books/links pointed to in other answers will cover this, but in general, you'll need to make sure that you have a very comprehensive regression suite, so that you can be sure that the change you are making doesn't impact anything else. If such a regression suite doesn't exist, you'd be much better served by building one before you go making any changes to the production program. Is that much less fun and satisfying than fixing bugs? Yes, but it means that in the future, when you do fix bugs, you'll be able to do so safely.

I'd also like to address your statement

When 2 hours later I explained that I cannot give a guarantee to fix this within a week he started to get slightly angry, also pointing out he wants to present it on Friday and "the software used to work".

There are a number of potential concerns here. First, does this mean that the program is now broken in production? That should never, ever happen for a voluntary code change. If it's some sort of emergency hot fix, it's not a great situation, but it's sort of understandable. But otherwise, from their point of view, you just violated the "if it ain't broken, don't fix it" rule. The code may be awful, it may perform badly, and so on. But it was performing an important service, and now it isn't. So, again, like the regression suite, your time would be much better served figuring out how to build a test environment where you can test changes prior to rolling out anything in production. And, second, this also suggests a lack of source code control, which, again, if you don't have, your time would be much better served building, prior to making any code changes.

Don't get me wrong, speaking as a pure computer programmer, it's really irritating to know that something I wrote isn't perfect. I look at code I wrote five years ago with some amount of horror, and I really want to go back and rewrite it. But as a software engineer, a large part of the job is making tradeoffs, and that code is still doing what it was designed to do, and rewriting it would mean that I wouldn't be working on new programs that are solving new problems. From a business point of view, it's much better for me to solve a new problem instead of solving an already solved problem in a slightly better way, in a way no one else will notice.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .