Live data from Hacker News

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

news.ycombinator.com

1–10 of 72 posts

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

#1
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?

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

#2
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.

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

#3
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.

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

#4
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.

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

#5
post #4

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 i…

That sounds aweful. I didn't think there were still shops that don't even have source control and just edit code in prod.

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

#6

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 p…

Sounds like bad codebase compounded by a toxic team. A lethal combo.

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

#8
post #2

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 manua…

> 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.

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

#9
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)
Post reply on HN