Worst. Code. I've. Ever. Seen.

Around a few years ago, I helped a friend who, as CEO, was having problems with their CTO and cofounder. They had shared with me that things were constantly breaking, nothing working as expected, and a technical leader who turned combative the moment anyone asked questions.

When they first came to me, we exchanged text messages now and then but it wasn't until a few years later, that I came back to help. I brought along two senior engineering friends of mine, to actually look. My friend's assessment to the CEO directly was: "This is the Titanic at the bottom of the ocean."

He absolutely was not exaggerating. It was the worst code and architecture I've ever seen. (Sure, I haven't seen tens of thousands, but certainly seen and participated in ~1000 (private, and public) since 1998.

The Flagship Disaster

The mobile app, in react native, was a hot mess. He refused to use hooks and felt that functions should not be extended and instead lengthened for new use cases. When I expressed opportunities for polymorphism, event-based architecture, and other rather common patterns he had no experience or idea with what I was suggesting. Yet somehow, he had about 30 years of software engineering under his belt.

I grew suspicious quickly of his resume and claims. after my interactions and seeing everything.

Looking at a component that caused a lot of customer frustration, which was responsible for calculating customer KPIs, this consistently gave customers completely wrong data. Not edge cases. Not rounding errors. Dead Wrong.

The code for this single component had so many lines it would require a dedicated book to explain. And he couldn't even explain how it worked after numerous discussions to review and understand this.

And the tests the he swore existed? When we finally tracked them down, they were copy-pasted production code with some assertions tacked on.

Ready to just swim to the surface and bail yet? Hold on.

250 Lambdas. 250 Classes.

The AWS infrastructure from this "top 3% architect" contained approximately 250 Lambda functions. You might think: aggressive microservices approach, an affinity for serverless, perhaps some interesting overkill, but surely there's an interesting philosophy in this...

Nope.

Each Lambda was responsible for a single code class. One class. One Lambda. Not one service. Not one domain. ONE. CLASS.

Ah yes. The Titanic reference was, indeed, exactly correct. Except the Titanic was at least structurally sound before it hit the iceberg.

The Defensive Posture

Every time we asked to see tests, he got mad. Every time we asked about architectural decisions, he got mad. Eventually he texted me that "he was a top 3% architect from Amazon."

If you feel the need to proclaim this, because your work clearly doesn't reflect it, someone is lying.

The Pivot Parade

After 100% customer churn year after year after year, they changed their business name. The churn continued. Today, with basically everyone gone except the CEO, CTO, and a junior engineer, they've pivoted again, and of course they're proclaiming AI will solve everything.

Fool me once... shame on me... fool me twice... fool me 9 times... I forget how that saying goes.

I'd love to point an LLM at their codebase. The response would be: "My recommendation is to start over. Actually, please go bag groceries."

❤️

Jake