DEV Community

Cover image for AI Code at Scale: Why Speed Can Turn Into Fragility
Masood Akhtar Vaheed
Masood Akhtar Vaheed

Posted on

AI Code at Scale: Why Speed Can Turn Into Fragility

You ever look at a pull request and wonder, "How did we get here so fast?" That’s what comes to mind when reading Evan X. Merz’s take on AI-generated codebases from his time at Meta. He points out something that should make any engineer pause: even when 90% of your code is written by AI, productivity doesn’t just shoot up. In fact, speed can come at a cost, and that’s not always visible until things break.

The Good and the Not-So-Good of AI Coding

AI in coding looks like a dream come true. It fills in your boilerplate, cranks out test cases, and sometimes even gets tricky algorithms almost right. But there’s a catch, and Merz calls it out directly: quantity does not equal quality. Just because more code is getting out the door does not mean it is good code, or even sustainable code. This becomes especially significant at the scale companies like Meta operate.

How AI Makes Codebases Fragile

Let’s break down the four main ways AI makes things brittle, based on Merz’s experience. First up: testing. AI loves writing shallow tests. You’ll see a test for a getter or setter, but what about the edge cases, the gnarly business logic, or what actually happens when real users thrash your app? Too often, those tests are missing. So you get this illusion of coverage, but when production traffic hits, gaps show up fast.

Next, there’s code complexity. AI seems to have a fondness for abstraction and code reuse, sometimes to a fault. You might find three little helper functions where one would have done, or layers of wrappers that nobody asked for. All this extra scaffolding just makes it harder for the next human, maybe you, maybe not, to figure out what’s actually going on. Instead of saving time, you’re sifting through a maze.

Here’s something people don’t talk about enough: the more code the AI writes, the less humans seem to understand it. It’s almost like AI becomes your teammate who checks in code but never explains their logic. Over time, collective knowledge in the team thins out. You end up with developers who can’t confidently say why a particular chunk of code exists. That’s when debugging turns into archaeology.

Finally, there’s the tidal wave of pull requests. When AI is cranking out code, PRs land faster than anyone can properly review them. You skim, you approve, you move on, because there’s always another one waiting. Details get missed, and over weeks or months, technical debt quietly piles up. The pace looks amazing on paper, but in reality, you’re burning future hours just to keep the lights on.

The Telltale Signs: When Code Feels Fragile

Merz points out a few signals that things aren’t right. Incidents spike after AI-generated code goes live. Fixing those incidents takes longer, because people can’t quickly grok what the code’s doing. You start seeing bugs in scenarios nobody thought to test, and users notice features acting odd or slowing down. The user experience takes a hit, and nobody’s really sure where the rot started.

Why the Human Element Still Matters

At the end of the day, AI has no skin in the game. It doesn’t know what feels clunky to a user or why a seemingly minor bug can ruin someone’s day. Merz’s observations draw a line between code that “just works” and code that actually fits human needs. There’s something about a developer’s intuition, or even just the habit of asking "what if," that AI can’t quite learn from the data.

So, if code is the DNA of modern products, what happens when more and more of it is written by something that never uses the product itself? Maybe this is the biggest question behind the whole AI coding rush: are we building for people, or just optimizing for speed? The answer might decide whether our codebases survive, or quietly crack apart.

Source: https://evanxmerz.com/post/ai-usage-generates-a-fragile-codebase/

Top comments (0)