Hacker News new | past | comments | ask | show | jobs | submit

AI usage generates a fragile codebase

https://evanxmerz.com/post/ai-usage-generates-a-fragile-codebase/
I think looking at AI usage for code and development from an engineering perspective is going to be an exercise in frustration. I'm a software engineer for 20+ years and I've pivoted to using AI for my code 100%. I find it invaluable about the only way to stay relevant and run a business nowadays. Happy for anyone to disagree with me, because I don't want to be right for the first time in my life.

That said, my experience tells me that enterprise and business coding has rarely ever been about stable or robust codebases. We engineers and a fraction of competent engineering managers and a vanishing small number of directors fought against business interests to ensure quality was priority when it came to code, but it was always an uphill battle and we were oftentimes disciplined for spending too much time on quality and design.

A timed cadence of release is anathema to quality code because you can't timebox it.

So, AI is just the extension of that. Do I try to ensure my agents design code I would consider to be good? Yes, absolutely! But I've fully outsourced it and I find it's also fully capable of fixing it's own mistakes. I've gone far beyond anything I individually or even with a team was ever capable of with AI assistance, so I believe I just have to apply my experience and skills into management and architecture rather than actual lines of code.

Time only will tell how this plays out.

Wallaahu aʿlam.

loading story #50446415
loading story #50445123
loading story #50445941
loading story #50444628
loading story #50444730
loading story #50446278
loading story #50445938
loading story #50444558
loading story #50444629
loading story #50444924
loading story #50444722
loading story #50445551
loading story #50445507
loading story #50446146
This reads like a piece of content written a year ago. Things have radically changed since then.

"AI writes shallow tests" - used to be true, not true anymore since Astra and Fable 5.1 / Opus 5.5.

"AI writes overly complex ccode" - only if you let it. A "do not overengineer it" or "Pareto, 80% result with 20% of effort" go a long long way.

"Reliance on AI decreases human understanding" - human understanding does not decrease, it just moves up a level or two. The same way you do not really understand how the Linux kernel works, nor do you know how assembly really works (with probably a bunch of exceptions here given this is the HN crowd!). And then there is hardware and physics too.

Understanding code, algorithms and data structures becomes a rarer need than it used to be.

"AI moves too quickly to maintain a high quality bar" - if you are stuck with the mantra that humans must review the code today, then obviously that statement becomes true. The problem is the assumption, not the observation. The good news about AI progressing fast is that coding AND reviewing get better and better with each release.

I know it is tough to let go. But as a software engineer, the sooner you do it, the quicker you will learn to yield a much, much more powerful weapon.

loading story #50446365
loading story #50446449
loading story #50446369
loading story #50446269
Blah, blah. They told us the same in 2025, 2024, 2023: "This is fixed in the latest frontier model!!!"
loading story #50446594
loading story #50446392
loading story #50444766
loading story #50446018
loading story #50444086
loading story #50446929
loading story #50445915
loading story #50439197
loading story #50439165
loading story #50446753
loading story #50443846
loading story #50446420
loading story #50443730
After 7 months and a 500k LOC codebase I can say that in my experience the fragility is inconsequential.

Disclaimer: I have no SaaS platform, it's a mobile app.

In my experience maintenance does not suffer long term with codebase size, if anything it became easier with model advances.

Most people talking about suboptimal implementation, fragility, and maintenance burden seem to theorize and extrapolate with no actual experience in implementing a large project with AI.

I can't blame them, I see the same in my day job, but the results after 500h+ on a separate project show that the concerns do not manifest in practice.

loading story #50439008
loading story #50439061
loading story #50439026
loading story #50439250
Available in the AppStore? Would love to see it!
loading story #50439038
loading story #50439042
loading story #50439055
loading story #50439502
loading story #50439078
loading story #50445302
Try using a statically typed language, refined types, and functional programming. Your tests become limited to things that are hard or impossible to assert with the type system.

My code has never been stronger.

loading story #50439124
loading story #50439039
loading story #50439015
loading story #50439025
loading story #50439001
loading story #50441478
loading story #50445626
loading story #50446162
loading story #50445586
This is absolutely right because AI lacks Fingerspitzengefühl: https://architecturenotes.co/p/the-cost-of-ai-in-code-goodby...
loading story #50438903
loading story #50439255
loading story #50444821
loading story #50445383
loading story #50446064
loading story #50439334
loading story #50444706
Every once in a while something comes up that proves beyond a doubt that 99% of human beings on planet earth cannot think for themselves. And most sensible things that human beings do, they do by following the herd or "instructions".
loading story #50439013
loading story #50445423
The most interesting engineering challenge of 2026 onwards is how to use AI coding tools to create a more robust codebase, avoiding the default which is a lean towards fragility.
loading story #50444916
loading story #50444664
loading story #50444227
loading story #50445904
loading story #50444591
My experience has been sort of the opposite. In the past 6 months I don’t think I’ve introduced a single production bug through my work, which is unheard of (for me, at least).

LLM code is verbose, and often quite inflexible, but that rigidity and verbosity tends to come from the AI being very thorough about ensuring the code does exactly what’s expected, and it seems to leave much less room for error as a result. It acts as a really good forcing function for specificity on requirements, and for thinking through "what if" scenarios.

loading story #50439095
loading story #50444856
We just need new Software Engineering books that explain how to build software in the AI age.
loading story #50439060
loading story #50439710
loading story #50445309
loading story #50444250
it doesn't have to.

AI is great at following patterns and loves to write tests. Start with good patterns that most teams would not have the discipline to write by hand and it is possible to get very robust code.

loading story #50438929
The question is, is it really a problem when letting agents rewrite everything better costs not that much.
loading story #50444967
loading story #50439103
loading story #50444798
loading story #50439341
loading story #50439435
AI Without Oversight Considered Harmful :)
loading story #50444632
Business incentives create fragile codebases.

AI is a force multiplier in whatever you apply it to. Most software companies output binaries with new features, whether it runs locally or on a server. Binaries with new features. None of the business owners give a shit about what is in the binary. It may be extremely fragile and only work for one type of user, but if they only have one type of user nobody cares. Most software doesn't keep evolving forever and at some point gets rewritten as a 2.0 version or whatever, so the quality was never as important.

It doesn't have to be that way. You can use AI just as effectively to produce quality source code as you can slop binaries. It depends on the business priorities and what is actually important.

The caveat is if you are the one engineer on the team trying to use AI the right way to produce quality source instead of binaries as fast as possible, you might get left behind or let go since your work no longer aligns with the business.

loading story #50444419
Humans not using their own brains and relying on AI to think for them creates a fragile code base.

I say that as a frustrated slop fighter.

loading story #50439094
loading story #50438795
loading story #50438832
loading story #50445933
Imagine a junior engineer in the same position: they write shallow tests, they write overly complex code.

What do you do? You provide guidance, support and tooling so they can write better tests and code. You supervise and help them meet the standard. It is the same with AI agents (including the challenge of how to carry that knowledge around and transfer it). You are responsible.

You are also responsible for the understanding part: know what is being worked on, glance at changes, inspect the outcomes, cross-check specifications, tests, product requirements. The 'moving too quickly' idea is the other side of the same coin; it is your responsibility to keep track of things and decide what's worth intervention. The exact same thing happens in a project where you have ten developers (or 200) working together — you cannot possibly read all of the code they write.

Seeing all of these as downsides is a choice.

loading story #50439003
loading story #50438972
loading story #50438908
loading story #50439077
> Here are the four most common ways that I have seen AI generating a fragile codebase. / Four signs that you have a fragile codebase

It would be nice if the listed symptoms (which have their own issues, e.g. "AI writes overly complex code" - overly complex for who?) were backed up with numbers or at least case studies, rather than stating "this is how you can recognize that X is happening", then stating "X is happening" in the title.

loading story #50439481
The market will fix itself.

If the article is correct: AI generated codebase creates incidents that are more severe and take longer to recover from, companies will dial it back after they get burned bad enough.

If it's a skill issue: Maybe some coders can push the frontier out even a lot more than others before such things happen. Then the problem is the human in front of the screen.

loading story #50443267
loading story #50444819
AI coding requires a lot of care to observability and verification.

If you can’t measure the problem, is it really a problem? A lot of assertions about code fragility seem to merge in with bike shedding arguments about style and what one person sees as readable.

But in the end if you have 100k of slop but we can know with high levels of certainty it does what it needs to - does it matter?

loading story #50439130
loading story #50445101
loading story #50439366
loading story #50443787
loading story #50439595
loading story #50439184
AI non-usage brings about irrelevance under pressure from competitors with fragile codebase.
{"deleted":true,"id":50438745,"parent":50438318,"time":1794309553,"type":"comment"}
loading story #50439186
loading story #50444568
We shouldn't worry about that. We should be grateful about the mountains of technical debt, because that will be the social security of the post boomers generations: working till death fixing the last hurrah of the boomers.
I do agree with some parts but not others. Reverting a flawed changed, e.g. should have never been as difficult as I have seen it been in some orgs before the advent of LLMs. Same for poor UX landing, both are issues that sure, may be thrown into sharper relief now, but were issues in some code bases and not others and remain that way today. More over, they are issues which can be permanently addressed in the former and in the later are one of the key sources of differentiation today.

On code readability, shallow tests and general quality, I can agree emphatically, though not universally. In other words, there are models which write the densest, hardest (for me) to parse code and tests that break with the lowest load/timing deviations yet proof less than nothing.

These do that regardless of how much one ships in my experience however so I wouldn’t attribute this to the velocity and more poor data at the heart.

I know this reads a bit like “you are using the wrong model” and I understand if someone testing e.g. an OpenAI models understandably extrapolates across all models and considers poor parse-ability in code a likely result of velocity, but you can always step back and work slower, plus, for what it’s worth, I struggle to parse OpenAI code when running their models through my evals after step 7 which is still a fairly measured in scope code base.

Essentially, I have seen LLMs, even the newest frontier, produce barely legible slop when building simple CRUD and I have seen a massive rewrite of the existing Firefox code base using APZ to enable an infinite canvas of browser tiles grow in a manner where, even at this stage having replaced a lot outside Places and Gecko, I can walk through changes made and explain the logic, as well as look at any part I haven’t been in for a while and find my bearing even without assistance.

Whatever model you use, however much you trust it, if you can get a grip and explain what something does, that puts you in great shape. It also, for what it’s worth, helps future changes by better models to land with higher token efficiency and accuracy. I have put Opus 5.5 into a GPT-6 Astra written code base and it could land features, but the rework the model did along the way was eye opening. I then repeated, explicitly enforcing no changes beyond the initial scope which Opus 5.5 still could succeed in, but took far longer, far more tool calls and significantly more tokens then that change should have taken. I also have examples where any model can be more error prone and slower than myself, though those are unique and I myself have been told I was using the wrong model and sucked at prompting.

Use models like any tech if you want for what you feel comfortable for or don’t, both can yield good or bad outcomes. I was and still am an enthusiastic Flutter/Dart dev, which with pub.dev meant I drew in a lot of external packages of dubious quality and compatibility, that I never read. LLM output, I do read and can go beyond my manual contributions in understanding because of it. Doesn’t mean model use doesn’t enable me to do more. Code was, for me, always a means to an end, enabling something. That hasn’t changed and never needed more LOC or massive scope.

loading story #50446057
The silent part is "undirected". You can patch these holes by observing them and the author us aware. By itself, these are the flaws.

I think speed is the biggest flaw though. If i could get variable speed while planning vs building, thatd change some things. I run local models, so i am mostly in the slow lane. When patching these flaws, i want it to read the code parts and diagnose quickly.

When its coding, i want to see the problems its encountering with the prompt. I usually observe its thinking a few rounds and if it misunderstands, i redirect.

But in all of this, i want a dial that just speeds up once i feel its doing the right thing.

SOTA today, to me, would put a model floor like qwen3.8-flash-next on a platform i can dial up the speed. Thats all. I think many of us will bring our own harness, so the only hard point is how dumb the engineers tools are.

Since im building local, my tools do a lot more management. So.e of tge opinions i see on HN trigger a "skill issue" reflex because we have a whole shopping mall now if tools and the incurious seem oblivious to how these models are used by cloud providers.

Learning about the raw capabilities of LLMs makes getting them to "do the right thing" is now just a job description.

Lastly, the last decade of tech oligarchy exposes how little education elites had about humanity and wicked problems. Elon musk reinventing public transportation several times ignorantly. The fact that a social program requires the consent of the people it helps. LLMs are a stark lesson in the difficulty of knowing all the constituent parts and still being unable to predict outcomes.

Welcome to Socioligy 101 tech nerds.

loading story #50438968
loading story #50446458
loading story #50443667
loading story #50444267
loading story #50439279
loading story #50441317
loading story #50439126