Live data from Hacker News

Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

news.ycombinator.com

81–90 of 704 posts

Re: Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

#81
Rewrite is rarely the best approach. The best approach is to refactor it by order of importance. Break it up and go from there. If it's not broken, don't fix it.

The best approach is to:

-Assess the situation

-Create a task list

-Decide what needs immediate attention

-Create a time line for it all

-Get feedback from team

-Add the business roadmap to you list

-With upper management work on a timeline

-Define your project with realistic times

Execute and manage the project.

It took 12 years to get to this point so don't expect to change it overnight.

BTW, this type of team and codebase is not out of the ordinary. Companies start to program with the idea that eventually the problems will be fixed yet it never happens. Upper management does not care because all they care about is reducing cost and getting the results they need. You're dealing with the results.

Re: Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

#82

Three engineers have built and supported a codebase generating 20 MM in revenue a year. Maybe get off your high horse, it’s really easy to mistake a complex order for chaos from the sidelines. Rewrites are almost never the answer unless you wrote the previous version. Sure, to most of us here the code you’re describing might look like garbage, but it works and certainly a ton of wisdom has been embedded into it that…

No source control? There's "it works" and then there's "they got lucky enough to not implode yet".

The NGINX config description actually had me laughing out loud. That one seems particularly heinous.

Re: Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

#83
post #30

Seeing a lot of people say that a rewrite is a terrible idea, but (as someone who doesn’t understand why) I’d love to hear a more fleshed out explanation re: why exactly that’d be a bad idea.

A rewrite is likely to take a lot of time, and if you're not careful, it's easy to end up running two systems rather than one at the end: the new one that doesn't quite do everything, and the old system that still does some important things.

In addition, if you don't change the development conditions, you're likely to end up with a similar mess at the end. Sometimes, code is messy because you didn't know what you were doing when you started and a rewrite could help; but sometimes code is messy because the requirements are messy and change rather a lot --- a rewrite can't help much with that.

That doesn't mean never do a rewrite, but you've got to have a pretty good reason, and it sure helps to have an incremental plan so that you don't end up with two systems and so that you start seeing the fruits of your labor quickly.

Re: Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

#84

Rewrite is rarely the best approach. The best approach is to refactor it by order of importance. Break it up and go from there. If it's not broken, don't fix it. The best approach is to: -Assess the situation -Create a task list -Decide what needs immediate attention -Create a time line for it all -Get feedback from team -Add the business roadmap to you list -With upper management work on a timeline -Define your proj…

The problem here is normalization of deviance across the entire organization. That has nothing to do with tasks.

The task #0 is sit down with the team and ask them to say in their own words what do they think about the project, about their engineering good practices, etc. See how aware are they about the problem they have created.

Try to understand how the status quo became normal and acceptable, before the same thing happens to you.

If this shit happened in the first place was because likely everyone was too busy living in their Jira alternate reality where you benefit from the perverse incentives made possible by the lack of visibility on code quality.

Re: Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

#85
I won't repeat what others said but you have no idea how common it is for a newbie to come onboard a new team and think "everything is wrong, it needs to be fixed and I will fix it". No doubt the things you said are things that can be improved but they were done that way for a reason and you already mentioned budgetary constraints, so it sounds like the existing team made the best of what they were given and you will have to become like them and adapt. Improve what you can as opportunities arise but migrating away from a 10k line nginx to PHP might sound like a good idea for example, but, you will spend resources on something that won't make a noticable difference? Instead, you can implement the PHP router for new endpoints for example.

The worsr thing you can do is come in with that attitude and expect the team to be onboard. You will only alienate yourself, try to understand why things were done the way they were (never architected but put together piece by piece over time). Make them feel heard and and pace yourself with any changes.

Re: Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

#89
post #66

Earlier quoted context omitted.

The problem with people new to the company starting a rewrite from scratch is that they often are poorly informed on why things were the way they were before. If you start big, you can have bad outcomes where the new system might be objectively worse than the old one... but you are stuck trying to get the new thing out for the next 5 years because too many people sunk too much political capital into it. As an example…

We (my good friend and I who both have 20+ years of experience) were brought in specifically do to the rewrite. We were new to the company. We actually had to rebuild the entire IT department while we were at it as well. > new tech team immediately committed to rewriting the code base into ruby micro-services well... sigh. > These refactors inevitably failed to produce a meaningful impact to revenue It sounds like le…

> We were brought in specifically do to the rewrite.

That's the key difference. The stakeholders should always be in on the rewrite.

Re: Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?

#90

no code is ever deleted. things are just added. Yeah, we hate that. On the one hand, it's impossible to build off a shaky foundation. On the other hand, software quality rarely correlates with revenue. That why we call it work?

If this is an impression of the butt-hurt individual defending his work, then bravo because this is pretty funny.
Post reply on HN