• ZkhqrD5o@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    11 hours ago

    Hot Take: IMO, using generated code is fine, if it goes through the exact same due diligance as normal code. (unit tests, is the algo optimised, etc.)

    • ☆ Yσɠƚԋσʂ ☆@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      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.

        • mushroommunk@lemmy.today
          link
          fedilink
          arrow-up
          0
          ·
          3 hours ago

          Such a strong science backed rebuttal.

          I’m gonna go rethink my entire life now.

          Being aware of the numerous massive lawsuits currently being levied against AI companies for their theft, reading research papers on cognitive decline in AI users, and being aware of where the majority of energy in the US comes from, especially for new AI datacenters, really does have a cognitive impact, but it isn’t decline.

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

            As strong a rebuttal as a parrot requires. I also love how you lump together a whole bunch of issues inherent in capitalism in your complaint further illustrating that you’re not able to put together a coherent argument.

      • MachineFab812@discuss.tchncs.de
        link
        fedilink
        arrow-up
        0
        ·
        4 hours ago

        Programmers already spend about as-much of their time, if not more, reading other’s code as they do writing their own. It doesn’t mater if that “other’s code” is AI generated or not.

        There’s an argument to be made about excessive vs not-enough commenting, but that’s not where you went, and its clear you have negligible programming experience, or creative experience for that matter, to be coming after the concept of sharing code like-so.

        One wonders how many books you’ve read, to be pretending that reading a book without paying for it, even borrowing from a library, is theft. Stick with the environmental costs arguments - its what you are personally suited to argue, and far more urgent than the rest.

        • mnemonicmonkeys@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 hour ago

          Programmers already spend about as-much of their time, if not more, reading other’s code as they do writing their own.

          And how is this an argument in favor of AI code? If 5-10 percent of you job used to be writing code and now you dropped it by half, that’s not very effective of optimization. Especially if the code you now have to review takes more time to review due to it being generated by AI.

          and its clear you have negligible programming experience, or creative experience for that matter, to be coming after the concept of sharing code like-so.

          As someone with several years of experience as a programmer: fuck off with this elitist nonsense

        • mushroommunk@lemmy.today
          link
          fedilink
          arrow-up
          0
          ·
          3 hours ago

          Lol. Way to show how little you know. I swear AI bros get the most butt hurt over provable stuff.

          I’ve stated my experience elsewhere but I’m a senior software engineer, 20 something years of experience. I have actually created a neural network from the ground up for a previous company.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 hours ago

        Only if you don’t care about your own cognitive decline

        That sounds like Socrates’ argument that writing would weaken people’s memories.

        And absolutely, people will probably forget the syntax by heart if they don’t type it as frequently. Personally, knowing syntax is not very valuable to me, as it’s just a means to an end. And whether that leads to cognitive decline or not, is really up to who’s using the tool.

        Saying it leads to cognitive decline is saying you can’t use an LLM and have critical thinking, which I can’t agree with.

          • sel@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            5 hours ago

            Don’t be sorry, that poster walked right into it. Have you met anybody who actually checks code before just putting on production servers? Maybe, but the shareholders need moar monies guy. Proof-reading code is so 2010’s.

        • Pika@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          0
          ·
          7 hours ago

          Firmly agree. I spent 6 years coding in python as a daily language, then I swapped to using nodejs for 10 years, only using python on and off. I went to make a basic script with python the other day and I had to look up how to convert a set over to a list.

          If you don’t use it, you lose it is fully valid.

          • partofthevoice@lemmy.zip
            link
            fedilink
            arrow-up
            0
            ·
            6 hours ago

            Not true. You came into the problem knowing:

            • I need to process data according to rules
            • Python can solve this
            • I need a set data structure
            • I need to convert that to a list data structure

            That’s the thoughts of a good engineer. You don’t think in code and you shouldn’t have to. Loosing your memory on the particular syntax is hardly an issue. You’ll still churn out a small program in under a day. You need to remember that people who really don’t know how to code take months for a product half as good.

            Why should anyone seriously concern themselves with memorizing all the syntaxes? That’s like memorizing all the dates in History class. It takes so much bandwidth away from other concerns with higher payout. Go learn some architecture, some risk management, stuff like that.

        • mushroommunk@lemmy.today
          link
          fedilink
          arrow-up
          0
          ·
          7 hours ago

          That sounds like Socrates’ argument that writing would weaken people’s memories.

          Saying it leads to cognitive decline is saying you can’t use an LLM and have critical thinking, which I can’t agree with.

          That’s not me saying it. MIT, Harvard, and others have released numerous studies that show using LLMs does exactly that, reduce critical thinking. You can disagree all you want but until you do the science you’re disagreeing with a growing body of actual experts.

          • Eager Eagle@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            7 hours ago

            Are those studies in the context of software development? What are the tasks at hand? Do they evaluate critical thinking on matters that people actually care about or on chores? Were they instructed to use LLMs in a particular way that is equivalent to their personal preference?

            You can’t pull a wildcard saying something like that because it’s too broad of a conclusion.

            • mushroommunk@lemmy.today
              link
              fedilink
              arrow-up
              0
              ·
              7 hours ago

              This is where you go look at any of the studies and start figuring out for yourself.

              They’ve been looking at it in several contexts including software development, general problem solving, reading comprehension, writing ability, and more.

              In some they were instructed to use LLMs certain ways, in others they weren’t. That’s the neat thing about so many studies being done is they’ve used a wide set of methodologies.