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

111–120 of 704 posts

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

#112

20 Million dollars per year. This should be the thing that starts every conversation. Because IT WORKS for the intended purpose. Someone else said it. Put everything in source control first. And just fix things that directly impact that 20 Million dollars a year. Example, fix speed issues. Fix any javascript issues. Fix anything that will get you to 21 million dollars a year. Then if you want, you can put together a…

Right. An attempt to do a full rewrite just doesn't pass the most basic cost/benefit analysis.

Redoing it in [sexy language / framework / paradigm / design pattern] will feel aesthetic, but even if it goes perfectly, it won't get you to $40M a year.

But if it goes poorly, it might get you to $0M a year (and fired).

The bigger question for OP should be "do I wish to be employed by an organization that is OK with these engineering practices?" Nobody can change culture by themselves, and certainly not just by introducing a sexier technology.

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

#113

Save yourself a lot of trauma and get out of this mess. Been in a similar situation, spent five years trying to fix things, gave up. Could have saved myself some of the therapy I now need.

This alternative is not to be neglected. You don't have to save the whole world. Save what you can that is worth saving. If you are competent to build good new things, do that.

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

#114

Talk with the team. Hear their pain points and propose source control and a test and dev environment. If you are not managing them directly and they don't want to do those kind of things because it sounds hard or foreign, then you can't really do anything about it.

And get out fast.

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

#116
Lots of people are giving advice on how to fix the code piecemeal. First put it on Git, then add tests, then, carefully and gradually, start fixing the issues. Depending on the project, this could take a year or several years, which isn't bad.

The problem with this plan is corporate politics. Say that OP takes on this challenge. He makes a plan and carefully and patiently executes it. Say that in six months he's already fixed 30% of the problem, and by doing do he meaningfully improved the team's productivity.

The executives are happy. The distaster was averted, and now they can ask for more features and get them more quickly, which they do.

Congratulations, OP. You are now the team lead of a mediocre software project. You want to continue fixing the code beyond the 30%? Management will be happy for you to take it as a personal project. After all, you probably don't have anything to do on the weekend anyway.

You could stand strong and refuse to improve the infrastructure until the company explicitly prioritizes it. But then why would that job be better than just taking a random position in a FAANG company? The code quality will be better and so will the pay.

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

#117
post #64

> this code generates more than 20 million dollars a year of revenue From a business perspective, nothing is broken. In fact, they laid a golden goose. > team is 3 people, quite junior. One backend, one front, one iOS/android. Resistance to change is huge. My mistake, they didn't lay a golden goose--they built a money printer. The ROI here is insane. > productivity is abysmal which is understandable. The mess is just…

$20M revenue is not the same as $20M profit.

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

#118

Save yourself a lot of trauma and get out of this mess. Been in a similar situation, spent five years trying to fix things, gave up. Could have saved myself some of the therapy I now need.

Yes, life is too short and there are so many much better jobs to waste time on such a project.

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

#119
post #96

Earlier quoted context omitted.

You don't need comprehensive tests for tests to start delivering value. Figure out the single most important flow in the application - user registration and checkout in an e-commerce app, for example. Write an automated end-to-end test for that. You could go with full browser automation using something like Playwright, or you could use code that exercises HTTP endpoints without browser automation. Either is fine. Get…

You're assuming the existing flow is working perfectly and I agree with you that testing is a godsend. I constantly yell that testing is great. Heck, I even worked for Pivotal Labs that does TDD and pair development, and loved it. Let's say you start to write tests and start to see issues crop up. Now what? How do you fix those things? Github actions!? They don't even have source control to begin with. There are so m…

Source control seems like a straightforward first step, regardless of what approach is going to be taken going forward

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

#120
post #95

Here's a way to introduce version control without having to stop everyone and teach them how to use it first: 1. Commit the entire production codebase to git and push it to a host (GitHub would be easiest here) 2. Set up a cron that runs once every ten minutes and commits ALL changes (with a dummy commit message) and pushes the result Now you have a repo that's capturing changes. If someone messes up you have a chanc…

Love your Git scraping technique, very clever. Thanks for sharing.
Post reply on HN