14 votes

The coming loop

5 comments

  1. [4]
    fxgn
    (edited )
    Link
    The developers of Pi keep surprising me with very reasonable takes. I already commented about this one in this thread, so I'll copy my comment: There is one type of cancerous coding pattern all...

    The developers of Pi keep surprising me with very reasonable takes. I already commented about this one in this thread, so I'll copy my comment:


    There is one type of cancerous coding pattern all models make, no matter how good the model is, and no matter how detailed the AGENTS.md. I found it's best described here:

    Present-day models tend to produce code that is too defensive, too complex, too local in its reasoning. They avoid strong invariants. They add fallbacks instead of making bad states impossible.
    [...]
    Furthermore it’s well understood that models tend to observe some local failure and add a local defense. Karpathy mentioned how they are “mortally terrified of exceptions”. In systems with important invariants, especially persisted data formats or core infrastructure, the right fix is not “handle every malformed case.” The right fix is to make the malformed case unrepresentable or impossible to write in the first place. Yet even with a lot of manual steering, that type of code does not come out of LLMs naturally, and even if the code comes out naturally like that, they will still attempt to handle now impossible errors.

    The models would rather add a if (property !== null) check all over the code than just add that to the type definition and handle the null case in the single place it could possibly arise.

    Until this is somehow improved, there is no way I'd ever prompt AI without fixing the generated code. Sometimes the model does a bad job and I have to refactor most of it myself, sometimes it does a good job and I dont. In any case, I don't think I've ever had a situation where I didn't have to first remove a bunch of useless defensive checks from the generated code.

    It seems like the "best" models are even worse in this regard. I've tried GPT-5.5, but I keep going back to DeepSeek v4, because GPT keeps insisting on adding that stuff all over even when I remove it.

    8 votes
    1. [3]
      tauon
      Link Parent
      Haven’t gotten around to reading the article itself yet, but FYI: While Armin Ronacher’s blog is (I think?) receiving more coverage (and new entries) nowadays, Mario Zechner aka badlogic is...

      The developer of Pi

      Haven’t gotten around to reading the article itself yet, but FYI: While Armin Ronacher’s blog is (I think?) receiving more coverage (and new entries) nowadays, Mario Zechner aka badlogic is actually the person you’d call “the” developer of Pi.
      Armin is of course the a long-time power-user, prominent contributor/co-maintainer (and now a co-owner via Earendil), but he is not the original or primary developer, even though I believe he was also actually “there” already when Pi was first written/conceptualized.

      1. [2]
        fxgn
        Link Parent
        Sorry, that was a typo, I meant to say "developers" in plural! Mario and Armin both have great and grounded takes on LLM coding.

        Sorry, that was a typo, I meant to say "developers" in plural! Mario and Armin both have great and grounded takes on LLM coding.

        1 vote
        1. tauon
          Link Parent
          Ah, that makes a lot of sense. And yeah, absolutely, I love reading what they post as well. Semi-related: A collection of Mario’s “recommended readings” (I believe from tweets):...

          Ah, that makes a lot of sense.
          And yeah, absolutely, I love reading what they post as well.

          Semi-related:
          A collection of Mario’s “recommended readings” (I believe from tweets): https://badlogic-list.lakebed.app/
          (PS: That site, created by a third person, also has an RSS feed!)

          1 vote
  2. vord
    (edited )
    Link
    I hadn't been able to come up with proper words for this, but yes. The exception handling and overabstraction of functions. Things that make it easy to feign competence. Once had Claude vibecode a...

    I hadn't been able to come up with proper words for this, but yes. The exception handling and overabstraction of functions. Things that make it easy to feign competence.

    Once had Claude vibecode a class. Came out to be 1000 lines. Once I stripped away all of the useless abstractions (defined as function definitions that get called precisely one time ever), ancient method calls, and overcomplicated exception handling I had cut it down to 300.

    4 votes