16

I've recently joined a team taking over a supposedly profitable software product of dubious quality (Poor documentation, lack of automated tests, unconventional coding conventions, high complexity, etc) from a startup acquisition, as an individual contributor software developer.

Unfortunately, the acquiring company is laying off the entire acquired team who actually know and understand the product, in one month. The team I joined has been attempting to ramp up for months but lectures on various topics from the departing team aren't particularly effective.

There's some sentiment among team members that our team is doomed in a hopeless scenario. We hardly have the expertise that when we take over on call, whoever's on shift feels comfortable handling whatever could happen.

  1. What can I do in the immediate future (as an individual contributor) to benefit myself and the team?

  2. How can I best frame this work experience? We can barely comprehend the product, algorithms and design choices, etc. and I worry this will hurt my career, being unable to speak deeply on these topics and my work experience besides putting out metaphorical fires and archaelogical work. In this poor job market, I am looking to take it easy and if not for the situation my team is in, this would be a pretty good job.

If I was in management it'd be a sensible decision to at least try to keep on the old team as contractors so we could continue to work with them until we were comfortably settled in.

I am not close enough to decision makers to get a read on them, and perhaps they don't know or care about the challenges we are facing. They do not appear interested in hiring the original team as they are from a higher cost of living area.

My question is subjective but I think others may have good answers that will be broadly applicable.

7
  • 9
    @StephanBranczyk Working Effectively with Legacy Code, Michael C. Feathers Commented 2 days ago
  • Can you hire some of the original team that was laid off? Commented 2 days ago
  • 3
    How is management handling this situation? Are they aware of the challenges you are facing? Are they dismissive of your concerns? Commented 2 days ago
  • This might provide some insights: workplace.stackexchange.com/a/199770/148957. Do you feel comfortable at/recognized yourself as the one being described as the senior dev in that post? If not, is there at the very least someone like that in your team who you can learn from? If the answer is still no, get the friendy way out of there. Commented 2 days ago
  • 3
    Writing this on SE when SE is kind of dying because of AI is a bit cynical, but: feed the code to a good AI. It will figure out what it's meant for (and might enable you to offer some initial kind of support) and be able to greatly assist in rewriting portions or most of it. But always BYOB: bring your own brain, of course. Commented 2 days ago

3 Answers 3

21

We were in a similar situation some years ago: We got a piece of legacy software that generated revenue, had incredibly poor code quality (On Error Resume Next littered all over the codebase), and none of the original developers were available for questions.

There's some sentiment among team members that our team is doomed in a hopeless scenario. We hardly have the expertise that when we take over on call, whoever's on shift feels comfortable handling whatever could happen.

The good news: It's not hopeless. The bad news: It will take a lot of time before you "feel comfortable" handling support requests for it.

Some of the lessons we learned:

  • The short-term revenue created by software is mostly independent of the quality of the software. Spaghetti code solving your customers' problems will generate revenue, beautifully-written code that doesn't, won't.
  • Obviously, bad code quality makes maintenance a nightmare. It decreases software developer satisfaction, and every small thing (support cases, feature changes, etc.) takes much, much longer than expected. This will get better over time, as you get more familiar with the product. If possible, try to keep fluctuation in your team to a minimum, so that the painfully aquired know-how isn't lost.
  • Do not---I repeat: DO NOT---make the mistake of trying to rewrite everything from scratch.

Whole books have been written on how to deal with legacy code: Isolate components, write unit tests, etc. I won't repeat that here.

  1. What can I do in the immediate future (as an individual contributor) to benefit myself and the team?

Adjust your expectations.

  • Answering a short, simple support question might require a few hours of digging into the code and doing tests. That's OK, and the time is not wasted, because now you are more familiar with the code than before.
  • Changes to the code (bugfixes, new features) will take a lot more time than you would expect. In particular, the time it takes will be more unpredictable: A small change might take 5 minutes or 5 days, and you won't be able to tell in advance which one it will be. Make sure the higher-ups understand that.
  • Make sure that the office climate is good. Support each other. Working with legacy code is often not fun, so make sure that there are lots of other opportunities for your colleagues to enjoy work. For example, set time aside to rewrite some small(!), particular annoying part of the old application.
  1. How can I best frame this work experience? We can barely comprehend the product, algorithms and design choices, etc. and I worry this will hurt my career, being unable to speak deeply on these topics and my work experience besides putting out metaphorical fires and archaelogical work.

Everyone enjoys writing new software from scratch using the newest gadgets and tools. However, what companies often really need are people able to maintain that decades-old legacy application that brings in all the revenue. So knowing how to "put out metaphorical fires and do archaeological work" (and being willing to do that!) are actually skills many companies are looking for.

10
  • 3
    "Do not---I repeat: DO NOT---make the mistake of trying to rewrite everything from scratch" It kind of depends on the situation and the size of the project. You cannot say for sure that rewriting everything from scratch is always bad. I've been in plenty of projects where I decided to maintain the badly written mess as it is, then later realized that it would have been much better, faster & cheaper just to rewrite the damn thing from scratch, as that was what I had essentially been doing anyway, file after file, while hunting down bugs. Commented 2 days ago
  • 2
    One particular project I spent nearly 3 years at salvaging a trainwreck of a code base and the product is still glitchy and unsatisfactory. If I had rewritten it from scratch that would have taken at most a year and likely resulted in a much better product. It depends on your skill and experience of course - rookies are usually very bad at program design so writing something from scratch for a rookie will not necessarily mean that the new code is any better, just a different kind of mess. But at least maintaining your own mess is far easier than someone else's mess :) Commented 2 days ago
  • 5
    @Lundin: I agree that there are exceptions to that rule, and, yes, I have also done my share of from-the-scratch-rewriting. As you say, it depends on the situation. In my experience, "technical infrastructure" code is much easier to rewrite than "business logic" code where you can't say for sure whether that strange if condition is a bug or a deliberate change based on a long-forgotten, undocumented user requirement, which might or might not still be required. Commented 2 days ago
  • 3
    On that link Things You Should Never Do, Part I: Never listen to advice that begins with "Never ...". ... Commented 2 days ago
  • 7
    @Lundin "I think I would have been better off if I had rewritten it" is NOT THE SAME AS "I rewrote it and it worked great". There are hundreds of situations where "I think rewriting it would be less painful" to the one case of "rewriting it was less painful". The fundamental problem is both fixing and rewriting require fully understanding what the original code does. If you don't fully understand what the original code does, rewriting is a huge gamble. And working out how it works exactly is the hard part of fixing it. Rewriting pretends you can skip over that part. Commented yesterday
2

The workplace problem

The management already made their decision. Which leaves you with a simple choice: take it or leave it.


The technical problem

You have to maintain or rewrite a software that you do not understand. You already study the code and it is hopeless.

Then change the approach: find (i.e., create) the requirements of the software. Or better requirements. Start with the main stakeholders for you: the management. What do they actually want? The exact same behavior? Or just a similar enough behavior? What improvements do they expect compared to what is already implemented?

Once you do that, you might find out that you can completely rewrite the software, and even make it better.

You can also infer requirements through usage and testing. "If I do this, I get that". Write that down, they will be very useful in the future.

Regarding the code, change it step by step. Start with what you understand, and gradually move towards the things that you do not understand so well. You might be able to find tools to reverse engineer the software for you, and present you with valuable information: classes, methods, data structures, call graphs, caller graphs...

Static analysis tools might come in handy to spot bugs or code structures that can be beautified and simplified.

But the most important, start with the requirements.

2
  • As noted in my other comment, I agree: either focus on fixing individual, well understood, pieces within the existing framework, or start building a new framework that reuses existing pieces when appropriate. Trying to do anything between these is a recipe for disaster. Also, remember that infinite improvement of code that is used 1% of the time is still only a 1% practical improvement; use measurement tools where possible rather than trusting your own guess about where to invest your effort, and remember the 90/10 rule; good enough really is good enough. Also, COMMENT any code you touch. Commented 2 days ago
  • Regarding the workplace problem: Make 100% sure management is fully aware of the implications of the situation. Supporting, maintaining, and eventually extending the product is going to be difficult and expensive and management needs to calibrate their expectations accordingly. Commented yesterday
2

First, some ideas for what you can do to benefit yourself and the team; I think you could do ANY of these but I would recommend doing ALL (in no particular order):

  1. Make sure the current (working-but-dubious) version of the software is well version-controlled, including infrastructure, so that as your team starts to make changes you can always confidently roll back to the current version. Better yet, ensure (before the departing team leaves for good) that you can completely rebuild/redeploy the software, including all its supporting infrastructure, from scratch (i.e., the repo(s)). If this is not feasible today, I would start here.
  2. You mention that "lectures on various topics from the departing team aren't particularly effective"—which is understandable. So try this: reverse the flow of information and make all your sessions "reverse KT"-style: document what you think you understand, and present it to the departing team. It might be easier for them to point out what you haven't gotten right, and it might be easier for you to fit those corrections into your working knowledge than listening to standard KT lectures.
  3. On that note, record every meeting, every conference call, etc., where KT is occurring. Ideally cover every topic multiple times, from different angles. In my experience, some of this may seem irrelevant until months later when you think, "Didn't they say something about this during one of our KT sessions?" and are thankful you recorded it.
  4. Develop the best understanding you can of the original product use case(s) and requirements, and especially the relative importance of those.
  5. I agree with others that rewriting everything from scratch is a temptation that often proves less pleasant than first perceived. Regardless, if you do go that route, I would strongly recommend thinking in terms of the strangler pattern: how can you refactor the application so that you can start to migrate its codebase to something more standard/modern/understandable (whatever the case may be) in piecewise fashion?
  6. For better or worse, I think this is a great use case for AI. Give an LLM the context and the code (many possible approaches for doing this), either module by module or all at once (or both) and interrogate it to improve your understanding of the code's current state, the purpose of individual modules (if poorly named/commented), what looks most brittle, etc. Other types of code analysis can complement this exercise, of course.
  7. In conjunction with some of the points above, figure out what the 'high-value, but highly brittle' parts of the application are, intersecting "What is most likely to break?" (from a technical standpoint) with "What is most likely to cause loss of business?" (from a business standpoint). Invest most of your effort in ensuring there are robust tests for those features and/or portions of the code. Once you have that, you can start to refactor with some confidence.

You might also ask your leaders if the original developers will have ANY availability or be contactable after their end date. If they are truly being laid off, it is likely they won't want to help, anyway, but sometimes people are still open to answering honest questions on the side, especially about an application they personally created.

As for what you do vs. what your team does, I think these points could apply equally to both: you should try doing whichever of these you can, but if you can align your team on them, all the better. Ideally as a team you can understand the seams in the application and split yourselves up so that each of you can focus on individual modules to reduce the overall workload.

Now, as to your second question of 'how can I best frame this work experience', the answer is hinted at in the above paragraph: whatever you identify as solutions to the quandary you're in, by not only taking 'ownership' yourself to try to understand the app, but also (especially) by encouraging/leading your teammates to do the same, you are demonstrating key values employers are usually looking for: initiative, leadership, creativity, etc. When prospective employers ask you to name challenges you've overcome or when you've shown personal leadership, this is an opportunity for you to have a great anecdote to address such questions.

New contributor
Andy Mo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.