top | item 43282610

(no title)

Prosammer | 1 year ago

>So if you're as clever as you can be when you wrote it, how will you ever debug it?

LLMs do not write very "clever" code by default. Without prompting them continuously to make it more "clever", they tend to write lots and lots of simple code, vs writing "clever" code that reduces redundant code, improves performance, etc.

What I am curious about is if these slop-filled codebases will be a problem or not in the future - traditionally it's been bad practice to have duplicate code everywhere, but with LLMs it feels like it matters less, as long as the code is simple and readable.

discuss

order

evil-olive|1 year ago

> traditionally it's been bad practice to have duplicate code everywhere, but with LLMs it feels like it matters less, as long as the code is simple and readable.

duplicate code is a bad practice "traditionally" because it means if you have a bug, you have to fix it in N spots (each of which may have drifted to be slightly different) instead of just 1.

how do LLMs improve that? if you have a bug (which everyone seems to agree happens more often with LLM-generated code) you'll still need to fix it in N spots. being able to feed those N instances into the LLM and ask it to fix the bug maybe speeds the process up a little, but it doesn't solve the underlying problem.

when I got into the industry in the 2000s, saving costs by outsourcing to India was the hype cycle of the day. would you have the same opinion that duplicate code doesn't matter, because you can just pay cheap outsourced engineers to make those N redundant bugfixes?

Prosammer|11 months ago

I wasn’t suggesting anyone should duplicate code or that duplication doesn’t have downsides. My point was more about how LLMs, by default, tend to produce less “clever” (and often more repetitive) code. We know that duplicated code can be painful when bugs need fixing across multiple places, but I’m curious how programming practices will evolve moving forwards as I don't see this going away in the short-term.

Fade_Dance|1 year ago

I'd imagine AI refactoring meta layers will continue to develop and grow in importance with time. Right now the focus is on generating reams of new code. As time passes this will inevitably shift to more of a focus on maintaining the code.

I would expect there to be innovation in this arena as well, beyond auto-generating code comments for future maintainers.