MHN
Add a comment on Hacker News →
16 of 626 comments
  1. > 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.

  2. I don't disagree with the article but it may give some readers the impression that pre-AI hand-written code wasn't fragile.

    Here's the famous commentary about Oracle RDBMS codebase of 25 million lines: https://news.ycombinator.com/item?id=18442941

    Every big company codebase with millions of lines devolves into a similar state. The small codebase starts with clean conceptual integrity. It then inevitably decays into incomprehensible spaghetti code as more people are added to it. Various reasons for it including the later devs caring less about the code than the initial team of devs, deadlines, avoiding refactoring because of fear about breaking things, etc.

    If you don't want AI to create fragile code, you have to apply the same quality gates that would have been applied to pre-AI hand-written code to keep everything clean. Most companies don't do that.

  3. I agree with most of this, but the market will solve itself[0]. I do think the last analogy diminishes the point.

    > Shopping for clothes from a website always results in worse fits than shopping in person.

    Knowing how one brand's clothes fit means that this isn't always true, and you just adjust depending on the brand. I don't understand what is trying to be conveyed here.

    [0] https://news.ycombinator.com/item?id=50439062

  4. AI in software development should be limited to security scans and maybe occasional bug-fixing.
    We'll have the best of all worlds: more secure code bases, happier & not unemployed developers, human understanding of what the code does, and far less money for companies that are hijacking our future by developing a god-like artificial super-intelligence.

  5. So do bad developers. So do very junior developers. So do PMs when they think they can start slinging code.

    You still need systems in place to ensure quality.

    That in turn requires you describe what 'quality' means to you.

    Then you need to design your AI-driven token factory in a way where it converges on something resembling that definition.

    Otherwise, yeah. You're gonna have a bad time, until the models get significantly better.

    But if you can figure that out, you can build some INCREDIBLE software. (Just look at Rex!)

  6. 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.

    1. In my experience (15+ years), the biggest trade-off is a lack of technical innovation. Current AI is unable to innovate. Humans can, but doing so requires
      spending extended periods deep in the code and building a solid mental model of the system.

    2. The issue is there are multiple dimensions of quality, and people mean different things when they talk about it. Personally I think code quality for its own sake has always been a false flag that only gained currency because of skill moat of software development. On the other hand, user experience and fitness for purpose has always mattered a great deal, all the moreso when code is cheap, and this is definitely tied to code quality. The connection is even more stark when you talk about evolution of a system over time and data integrity. Here, the tacit assumptions, invariants and external interfaces chosen have a huge impact on the quality of the system and fitness for purpose over time. Every choice made affects the future, and it's very easy to box yourself in with bad choices, which ultimately depend on the offline human concerns that system is impacting.

      I don't think any of this changes with AI, the only thing is that it's possible to handle much more incidental complexity. Ultimately I expect it to land on a similar equilibrium in terms of software quality that is gated by what the users of the system will tolerate. The more things change, the more they stay the same.

    3. > Time only will tell how this plays out.

      I can imagine things like this happening very easily mid/long term: https://www.reddit.com/r/ClaudeCode/comments/1xq2n3t/a_year_....

      As of 2026, I think LLMs still lack vision, and long term, tend to build a very scattered codebase, if maintainers don't pay a lot of attention.

      LLMs do have cognitive limits as well!

      1. >The part that actually hurts is who is left.

        Another AI-generated post complaining about AI? Or maybe the author just started writing like Claude themselves

        1. That reddit post is written from the perspective of someone who's actually pro AI ("It felt great for about 6 months ...") and only realizes retrospectively they ended up in a mess. So there's no internal inconsistency in the narrative.

          Anyway most of reddit is dead internet and that post is just engagement farming... As is most of hn.

    4. We already went through this when everyone started “outsourcing” in the 2010s.

      I realised then when I became more of a manager than a coder that then types of code quality issues engineers obsess over are practically irrelevant.

    5. Very true!

  7. On the other hand I've fixed some really amazingly hard technical debt issues with AI that have made my codebases less fragile, also written up end to end test pipelines, automated QA etc.

  8. I read it and I wish I could agree with the points in the post, but I can’t. I love coding, I love typing my solutions by hand, but I also switched couple of months ago to AI generated code. If you do that in a targeted way, where it doesn’t have to build a "world model" of your codebase then it writes much better code than an average human being would. My codebase at work is about 220k lines of Python, Rust, C++ and some Bash. I can tell for Python it’s the best, for Rust, compiler helps a lot (some sneaky logic errors are still there though), for C++ it’s horrible (bloated sheeeet) and for Bash (well who cares about Bash ).
    So, what I am trying to say is, that it matters how you work with your setup and what the volumes are and if you can still keep up with proper reviews or not. I see literally two ways going forward, either full control and tiny gradual, marginal changes (like before AI) or full vibe-coding. There is nothing in between.

  9. It can generate a fragile codebase because it can leave gaps if you're not thorough.

    The old adage of software development still stands "Computers do what you say, not necessarily what you mean."

    But as a software engineer, this is ideal.

    It would be horrible if it didn't follow the spec exactly as written because then all projects would converge on the exact same designs based on the AI's taste and it would be impossible to steer it away from slop.

    If your codebase is simple, if you use a well designed foundation, the code it generates will be simple. I know because I've worked on both kinds of projects.