AI usage generates a fragile codebase evanxmerz.com · 316 points · 370 comments ...
HN Best 30 @best30
AI usage generates a fragile codebase evanxmerz.com · 316 points · 370 comments · HN thread
TL;DR Former Meta engineer Evan Merz argues that AI-generated code produces fragile codebases, citing shallow tests, overcomplicated code, eroded human understanding, and rushed reviews, and predicts more incidents and worse user experience. The HN thread (316 points, 370 comments) is split: many engineers agree that quality is at risk, while others say newer models and better process have largely fixed these problems.
- Merz says he was laid off from Meta in May, suspects his resistance to AI coding tools as a factor, and says AI generated about 90% of his code there without a 10x productivity gain.
- He lists four causes: AI writes shallow tests (trivial getters/setters, e2e tests covering only known paths), overly complex code that over-applies DRY, falling human understanding of codebases, and PR volume that outpaces review.
- Symptoms he expects: more incidents, slower recovery because humans lack deep context, errors visible only to real users, and a poorer user experience.
- He argues products for human users need a human perspective and that machine-led SaaS will lose the premium segment, while cheap products may accept the tradeoff.
- The post states that every word was human-written and the header image was AI-generated, and it is framed as an opinion rather than measured data.
Discussion The thread is large and mostly skeptical of the article's framing, though not uniformly. Many commenters, several of them experienced engineers, report that code quality is now a management or process choice rather than a model limitation, and that verification, linters, adversarial review, and skill files can keep AI output clean. Others describe real damage: 20,000-line files, review loops that never converge, and rewrites needed after agents piled on bloat. A recurring thread is that the article's claims are dated, since commenters say newer models (named in the thread) have fixed shallow tests and overengineering. Some accounts are dismissive of the piece, and a few commenters allege bot or shill activity. The overall mood is contentious, with a strong undercurrent of worry about long-term maintainability and career impact.
- Quality matters; AI makes long-term fragility worse (many): Commenters who have maintained systems warn about black-box software, unpredictable token costs, and codebases that agents can no longer reason about. Several cite bloated, duplicated code and review loops as concrete evidence.
- Fragility is fixable with better process and verification (many): Many argue that AI output reflects the guardrails applied: TDD, mutation testing, static analysis, architecture docs, adversarial review agents, and explicit simplicity instructions. Quality is described as an engineering problem, not a model limit.
- Newer models have already fixed these problems (some): Some respond that the article describes an older state. They say recent frontier models write meaningful tests, avoid overengineering when told to, and handle messy codebases well, so the critique is outdated.
- Code quality has never really mattered to business (some): A group argues that businesses have always prioritized shipping over quality, and that the article's nostalgia is misplaced. Quality was an uphill battle before AI, and AI just makes the tradeoff faster.
- Agents are a black box and that is acceptable (a few): A minority says code is becoming disposable and users only care about outcomes. They report apps with tens of thousands of lines and few visible issues, though critics note such apps have very few users.
Links from the comments
- Commentary on the Oracle RDBMS codebase of about 25 million lines, cited as evidence that large hand-written codebases also decay.
- Big Ball of Mud essay, cited as still relevant to agent-written code.
- Commenter's essay arguing agentic code needs structural support to stay practical at scale.
- Essay on what is lost when AI replaces developer intuition, referenced in the thread.
#aiCodingAgents #codeQuality #technicalDebt #softwareEngineering #maintainability