• ☆ Yσɠƚԋσʂ ☆@lemmy.ml
    link
    fedilink
    arrow-up
    4
    arrow-down
    3
    ·
    3 hours ago

    Exactly, the argument that whether the code was written entirely by hand or produced by an LLM is the wrong thing to focus on. To see why, we have to consider how software development actually works at scale.

    There’s a view that code written by hand has to be more intentional, almost has to be by definition since it requires the maintainer to actually put it in there themselves. That’s, of course, true but once a project grows past a certain size or it has multiple maintainers, nobody really has the totality of the code in their heads. So, any new code that’s added is always done with limited understanding. Code being written by hand should not be equated with it expressing the intent faithfully; if that were the case, then we’d never have software bugs. Humans make mistakes all the time as is clearly evidenced by there being no lack of buggy code predating LLM use.

    I’m also not intimately familiar with most of the code in the projects I’ve been maintaining over the years. Any code I’ve written even a few months ago might as well have been written by someone else. When I need to make changes, I read through the code and figure out what it’s doing, and I rely on the test harness to make sure I don’t introduce regressions.

    It’s simply not feasible for humans to keep the entirety of large projects in their heads all at once. When you’re working on a project, you’re constantly forgetting and relearning code as you go. And the situation is even worse for projects where multiple people work together where nobody knows what everyone else was thinking. We look at the code and try to build up sufficient context in our heads to make the necessary changes. When we misjudge that context or misunderstand existing code, then we end up making mistakes.

    The way we judge whether projects are actually solid is by the level of specification and testing they have, the experience of the developers, and amount of usage they see in the wild. All of these same tools work just as well with LLM generated code as they do with code written by hand.

    Farming out design decisions to the LLM without reviewing the output or doing proper testing will almost certainly produce low quality code, but that is no different from somebody just slapping some code together to make a kludge rather than really thinking through a problem. Working with LLMs does not mean farming out your thinking to the machine. What these tools actually do is automate the mechanical aspect of producing the code. Once it is written, you can read it, understand it, and change it as you would with any other code.