‹ BackHN Continuity

Thread

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

129 points · 169 comments · bucket2015

  1. zug_zug · · focus · HN ↗
    I think this is a bit of a simplistic mental approach. I've certainly seen a lot of "The engineer owns the outcome, AI is just a tool, don't release anything you don't vouch for."

    However, I just don't think that's realistic. It's asking an author to suddenly become an editor. It's asking somebody who writes code to now read and debug others code.

    It can actually be harder to find the the bug in a tricky piece of code than it can be to write your own correct code from scratch. I see AI introduce all sorts of bugs all the time in my personal projects that I would never introduce, and would never think to test for, especially around anything graphical.

    1. arcanemachiner · · focus · HN ↗
      I think the answer is not to debug the code, but, when possible, to debug the outputs. The code may be considered to be a black box much of the time. (This is much more true for my hobby projects than my work projects.)
      1. yosefk · · focus · HN ↗
        ...because your work projects are bigger, there's only so big a black box can get before you lose all comprehension of it, and splitting it to smaller black boxes the shapes of which you keep refining is programming, and the part of it LLMs currently can't do
        1. dist-epoch · · focus · HN ↗
          I routinely see Astra extract related functionality into it's own file after it gets past a certain size, unprompted.

          And prompted it can extract the black boxes if you tell it what the boxes are or what to look for.

          Same for cleaning up tech debt after organic development, it's suggestions on how to simplify and modularize are good, but you need to prompt.

          Given that the prompts are quite generic, "look for technical debt, suggest simpler architectures, what could be extracted in a separate module", it won't be long till it will do it on it's own.

          1. zahlman · · focus · HN ↗
            With directed prompting like "aggressively refactor into short functions with intention-revealing names" (a paraphrase; I'll give it a few sentences to describe a general style), even Luna handles this pretty well IMX. I have too much pride in my own analytical skills to try something like "how would you refactor this for clarity?" followed by "do it", but I imagine it would at least result in a step in the right direction.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.