TLDRocket
Sign in

Most rewrites serve the engineer, not the business

anatoliybabushka.com

A dev confesses to secretly rewriting working CakePHP code into Laravel, just because he liked it better. The lesson: most rewrites fix the engineer's ego, not the business's problem.

Based on reporting by anatoliybabushka.com — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

There's a confession buried in this essay that a lot of engineers will recognize with a wince. The author spent weeks waking up at 4am to rewrite a CakePHP app into Laravel, on his own time, unasked. Nobody requested it. The app worked fine. The rewrite changed nothing for users or the business, and improved exactly one thing: how the code felt to him.

That's the pattern he's naming, and it's worth sitting with. Production code that's survived years of real traffic is a ledger of every bug someone already found and fixed. Joel Spolsky said as much back in 2000, calling the full rewrite the worst strategic mistake a software company can make, because you don't just throw away ugly code, you throw away the fixes hiding inside it. The author's own examples back this up: a Perl system over a decade old, a homegrown PHP CMS about the same age, both untouched, both still earning their keep quietly every day nobody rewrote them.

The deeper trap is mistaking unfamiliarity for brokenness. He admits he'd never actually learned CakePHP before deciding it was garbage. That's the tell: when you don't understand a system, every choice in it looks like a mistake, because you can't see the constraints that shaped it. The fix he proposes isn't a freeze on all rewrites, though. Some debt is real. End-of-life runtimes with open CVEs, a bus-factor of one walking out the door, feature costs tripling because of bad architecture, a business need the code was never built to support, these are forcing functions with numbers attached. If you can point to a CVE or a velocity tax or a missed deal, you have a case. If all you have is a feeling that the code offends you, you have a preference.

Then there's the AI wrinkle, and this is where the piece gets sharper. The new argument going around is that AI makes rewrites cheap, since an agent can port a module in an afternoon. But the author points out that typing was never the expensive part. Rediscovery was. The reason a weird timeout exists lives in a 2021 Slack thread nobody linked to a postmortem, and the agent has no access to that. It writes something clean and plausible with the scar tissue quietly removed, and then the team meets the old bugs again, minus the context the original fix carried. Cheap generation doesn't shrink the rewrite problem, he argues. It just makes it easier to start and harder to stop, because in two years someone opens the AI-written version, doesn't understand why it's shaped that way, and wants to rewrite it too.

My take — AI-written commentary, not fact-checked reporting

I've watched this exact 4am-rewrite story play out on three different teams, and it's never framed as vanity in the moment, it's framed as 'cleanup.' The AI angle here is the real warning shot: coding agents don't lower the cost of rewrites, they lower the cost of forgetting why the code was right in the first place, which is a much worse trade. If your team ships an AI-generated rewrite without writing down the reasons behind the old decisions, you haven't modernized anything, you've just reset the bug clock and called it progress.

Read more about this at: anatoliybabushka.com

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.