logoalt Hacker News

jazzypantstoday at 1:52 PM1 replyview on HN

How would you detect the presence of bugs in this scenario? How would you make sure the LLM isn't adding yet another useless, redundant function to the code base? Even if there isn't a bug in this PR, do you not want to be familiar with the actual shape of the code in case you need to dig through it while bug hunting later?

Every time I try to take a hands-off approach to the code like this, I come to regret it later. The code ends up bloated and labyrinthine. When I let it grow unabated, it becomes gradually more difficult for the LLM to understand the intended structure as the project becomes too big for the model to keep the whole thing in its context.


Replies

mgtoday at 2:12 PM

    How would you detect the
    presence of bugs in this
    scenario?
I would ask AI. "Did the last commit introduce any bugs or unintended consequences?". In fact I already use this prompt after every change I make manually.

    How would you make sure the LLM
    isn't adding yet another
    useless, redundant function to
    the code base?
By asking AI. In fact, I already run a long "Can you refactor anything in this codebase to reduce redundancy, improve readability, performance or maintainability" pretty regularly.
show 1 reply