‹ BackHN Continuity

Thread

If AI coding is lowering your code quality, you're not managing quality right

129 points · 169 comments · bucket2015

  1. fishfasell · · focus · HN ↗
    I think there's a lot of setup and context required for an AI agent to consistently write good code. Once the agent has these guard rails in place I usually get great quality- far better than what I would write in most cases.

    I think where things get dicey is being able to write in any language. I write and review code in many languages and frameworks I'm not fluent in, so it's hard for me to distinguish between working code and great code. I can spot when the fundamental logic is wrong, but when it comes to "best fit" choices I'm clueless.

    1. kuczmama · · focus · HN ↗
      I'm curious as to what guardrails you've tried.

      This is something I have been trying to get right as well. I've attempted to use lots of linting and things like strong typing, duplicate checks, cyclomatic complexity, and robust tests. However, I still happen to find issues, which requires me to look at the code (at least at a high level)

      For example, I can say "Don't repeat yourself, and don't re-write helper functions" and I will even have a duplicate linter check, but inevitably the LLM will always want to re-write a similar yet slightly different helper function. Like it will always want to re-write something small like a trim() or a toString() function in every file.

      1. ytoawwhra92 · · focus · HN ↗
        > Don't repeat yourself, and don't re-write helper functions

        It's worth reflecting on why these things are important to you and whether they remain important in an agent-developed codebase.

        1. sevenseacat · · focus · HN ↗
          Yes, they are both still very important for consistency throughout your codebase and any user interface for it.
          1. ytoawwhra92 · · focus · HN ↗
            Consistency of behaviour and UI can be tested.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.