What's the worst codebase you've ever worked on?

17 points by zoozla ↗ HN
You know the kind I'm talking about.

A huge lumping monolith of spaghetti with barely any tests, class hierarchies a mile deep, and a list of dependencies that can make a grown man weep.

Written by a self proclaimed "genius" 15 years ago with junior devs patching features on top of it since.

What's your story? How did you deal with that mess? Are you still on that team?

71 comments

[ 3.0 ms ] story [ 151 ms ] thread
Mine was huge Java monolith that ran (and maybe still runs) part of the foreign exchange system that banks use to trade currency.

There were 8 layers of abstract classes with only one concrete class at the bottom.

There was a whole half-assed quasi-functional almost-but-not-quite-turing-complete language in XML for parsing legacy binary files.

There were unit tests, but they modified the dev DB so you needed to manually reseed it after every run (defintely no CI).

I spent months trying to refactor some of the more afwul bits. Not sure I actually made things any better.

I still shudder.

> almost-but-not-quite-turing-complete language

Not to detract from the obvious nightmare, but at least they dodged the "accidentally Turing complete" bullet... entirely inadvertently, I'm sure.

Something that was managing the largest construction project in the world amongst other building projects. Had plenty of devs on it, not junior but highly expert. Gave them 12months of my time to achieve their objectives, but it became clear the code was a can of worms, fix one thing, something else broke because of too many different coding styles. Told them it needed a rewrite from the ground up, standards put in place that sort of thing. They agreed but wanted it done in 3months, told them impossible need more time than that, they wouldn't agree so I walked.
Sounds like bad codebase compounded by a toxic team. A lethal combo.
Bad management who dont understand programming, which is sadly replicated across many companies, and then people wonder why its so easy to get hacked. eyesroll
Fun fact:

Over 50,000 procedural PHP5 files under zero revision control, without a non-production environment to test on, power one of the largest "grey area" e-commerce platforms currently online. The type of place where you can resell medical pills which claim to cure every illness under the sun.

"index_old_test1.php" etc. was normal and the codebase went back to 2005.

It runs (unless things have changed... which is unlikely) on 3 physical servers - HAProxy, Apache2 and MySQL5.

No backup or failover/redundancy.

Oh, and more PII / GDPR data than you can shake a stick at - unencrypted at rest and in transit between app & database servers.

Everyone shared the same root password (no SSH keys!) with boxes listening on 22 via public IPs.

Thankfully the contract was a short albeit terrifying experience.

Never seen anything so bad in nearly 20yrs of tech.

That sounds aweful. I didn't think there were still shops that don't even have source control and just edit code in prod.
Lmao, this sounds like every 2005 PHP project.

I think part of me would actually kinda enjoy this experience just for the nostalgia factor. I got surprisingly good at making changes in prod without causing downtime...

(comment deleted)
I was with a medical equipment manufacturer for a couple of months. The codebase doesn’t have any consistent styles, and has tons of warnings and linter suggestions lol, no tests no and barely any documentation, it was a pain in da a* to work on that codebase… all the frameworks and packages used were pretty old and out of dated (this one though is understandable considering all the approvals required form FDA and stuff)
My favorite description of a bad project was "dogshit fractal"- at every level of detail it was dogshit. Functions, file layout, architecture, build system, even the business case.
I loathe Apache Airflow. Rather, I love the application but I hate that data engineers just read one or two examples and write whatever they want, and because Airflow is fault tolerant, they keep using their shit code. The last place I worked with had these idiots writing Airflow code, and they had no idea how to write any software. But since it was working they'd made themselves indispensable and the CTO was also in denial. The engineers maintaining it were some of the most egotistical and incompetent people I've ever worked with. After working with Airflow I realized how amazing Django is, because it enforces such developers to stick to its way of doing things. I love Flask more, but I see now why someone would enforce Django at an organization.
Worked for 5 years old a ColdFusion codebase that is still in use for a large SaaS. 1 Big monolith, no tests, all procedural code and changing any code would break something somewhere else.

But honestly now I work on a typescript monolith thats moving to microservices and its probably worse than the ColdFusion code base. I'd rather work on the ColdFusion codebase.

(comment deleted)