I’ve seen a few articles saying that instead of hating AI, the real quiet programmers young and old are loving it and have a renewed sense of purpose coding with llm helpers (this article was also hating on ed zitiron, which makes sense why it would).

Is this total bullshit? I have to admit, even though it makes me ill, I’ve used llms a few times to help me learn simple code syntax quickly (im and absolute noob who’s wanted my whole life to learn code but cant grasp it very well). But yes, a lot of time its wrong.

  • iglou@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    1 day ago
    1. A junior dev wont be a junior dev their whole career, code reviews also educates them
    2. You can’t trust the quality of a junior’s work, but you can trust that they are able to understand the project and their role in it. LLMs are by definition unable to think and understand. Just pretty good at pretending they are. Which leads to the third point:
    3. When you “vibe code”, you don’t “just” have to review the produced code, you also have to constantly tell the LLM what you want it to do. And fight with it when it fucks up.
    • Pup Biru@aussie.zone
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      5
      ·
      1 day ago

      if the only point of hiring junior devs were to skill them up so they’d be useful in the future, nobody would hire junior devs

      LLMs aren’t the brain: they’re exactly what they are… a fancy auto complete…

      type a function header, let if fill the body… as long as you’re descriptive enough and the function is simple enough to understand (as all well structured code should be) it usually gets it pretty right: it’s somewhat of a substitute for libraries, but not for your own structure

      let it generate unit tests: doesn’t matter if it gets it wrong because the test will fail; it’ll write a pretty solid test suite using edge cases you may have forgotten

      fill lines of data based on other data structures: it can transform text quicker than you can write regex and i’ve never had it fail at this

      let it name functions based on a description… you can’t think of the words, but an LLM has a very wide vocabulary and - whilst not knowledge - does have a pretty good handle on synonyms and summary etc

      there’s load of things LLMs are good for, but unless you’re just learning something new and you know your code will be garbage anyway, none of those things replace your brain: just repetitive crap you probably hate to start with because you could explain it to a non-programmer and they could carry out the tasks

      • iglou@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        1 day ago

        if the only point of hiring junior devs were to skill them up so they’d be useful in the future, nobody would hire junior devs

        I never said that, and a single review already will make a junior dev better off the bat

        LLMs aren’t the brain: they’re exactly what they are… a fancy auto complete

        I agree, but then you say…

        type a function header, let if fill the body… as long as you’re descriptive enough and the function is simple enough to understand (as all well structured code should be) it usually gets it pretty right: it’s somewhat of a substitute for libraries, but not for your own structure

        …which says the other thing. Implementing a function isn’t for a “fancy autocomplete”, it’s for a brain to do. Unless all you do is reinventing the wheel, then yeah, it can generate a decent wheel for you.

        let it generate unit tests: doesn’t matter if it gets it wrong because the test will fail; it’ll write a pretty solid test suite using edge cases you may have forgotten

        Fuck no. If it gets the test wrong, it won’t necessarily fail. It might very well pass even when it should fail, and that’s something you won’t know unless you review every single line it spits out. That’s one of the worst areas to use an LLM.

        fill lines of data based on other data structures: it can transform text quicker than you can write regex and i’ve never had it fail at this

        I’m not sure what you mean by that.

        let it name functions based on a description… you can’t think of the words, but an LLM has a very wide vocabulary and - whilst not knowledge - does have a pretty good handle on synonyms and summary etc

        I agree with that, naming or even documenting is a good way to use an LLM. With supervision of course, but an imprecise name or documentation is not critical.

        • Pup Biru@aussie.zone
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          edit-2
          14 hours ago

          Implementing a function isn’t for a “fancy autocomplete”, it’s for a brain to do. Unless all you do is reinventing the wheel, then yeah, it can generate a decent wheel for you.

          pretty much every line of code we write in modern software isn’t unique… we use so many orders of magnitude more lines of other people’s code than our own, we’re really just plumbing pipes together

          most functions we write that aren’t business logic specific to the problem domain of our software (and even sometimes then) has been written before… the novel part isn’t in the function body: the low level instructions… the novel part is how those instructions are structured… that may as well be pseudocode, and that pseudocode may as well take the form of function headers

          Fuck no. If it gets the test wrong, it won’t necessarily fail. It might very well pass even when it should fail, and that’s something you won’t know unless you review every single line it spits out. That’s one of the worst areas to use an LLM.

          write tests, tests fail, write code, tests slowly start to pass until you’re done… this is how we’ve always done TDD because it ensures the tests fail when they should. this is a good idea with or without LLMs because humans fuck up unit tests all the time

          I’m not sure what you mean by that.

          for example, you have an external API of some kind with an enum expressed via JSON as a string and you want to implement that API including a proper Enum object… an LLM can more easily generate that code than i can, and the longer the list of values the more cumbersome the task gets

          especially effective for generating API wrappers because they basically amount to function some_name -> api client -> call /api/someName

          this is basically a data transformation problem: translate from some structure to a well-defined chunk of code that matches the semantics of your language of choice

          this is annoying for a human, and an LLM can smash out a whole type safe library in seconds based on little more than plain english docs

          it might not be 100% right, but the price for failure is an error that you’ll see and can fix before the code hits production

          and of course it’s better to generate all this using swagger specs, but they’re not always available and tend not to follow language conventions quite so well

          for a concrete example, i wanted to interact with blackmagic pocket cinema cameras via bluetooth in swift on ios: something they don’t provide an SDK for… they do, however document their bluetooth protocols

          https://documents.blackmagicdesign.com/UserManuals/BlackmagicPocketCinemaCameraManual.pdf?_v=1742540411000

          (page 157 if you’re interested)

          it’s incredibly cumbersome, and basically involves packing binary data into a packet that represents a different protocol called SDI… this would have been horrible to try and work out on my own, but with the general idea of how the protocol worked, i structured the functions, wrote some test case using the examples they provided, handed chatgpt the pdf and used it to help me with the bitbanging nonsense and translating their commands and positionally placed binaries into actual function calls

          could i have done it? sure, but why would i? chat gpt did in 10 seconds what probably would have taken me at least a few hours of copying data from 7 pages of a table in a pdf - a task i dont enjoy doing, in a language i don’t know very well

        • Quibblekrust@thelemmy.club
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          2
          ·
          1 day ago

          fill lines of data based on other data structures: it can transform text quicker than you can write regex and i’ve never had it fail at thisI’m

          not sure what you mean by that.

          Not speaking for them, but I use LLMs for this. You have lines of repetitive code, and you realize you need to swap the order of things within each line. You could brute force it, or you could write a regex search/replace. Instead, you tell the LLM to do it and it saves a lot of time.

          Swapping the order of things is just one example. It can change capitalization, insert values, or generate endless amounts of mock data.

          • Pup Biru@aussie.zone
            link
            fedilink
            English
            arrow-up
            1
            ·
            14 hours ago

            yup! absolutely this too - i provided a different example in my reply, but honestly this is exactly the thing i use it for most… type a couple of lines, it gets the idea of what you’re trying to copy, and then it’s just hitting accept until it’s done… it’s pretty close to 100% accurate, and even if it’s not… fixing it ain’t exactly hard!

            • Quibblekrust@thelemmy.club
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 day ago

              I was tasked once with writing a front-end for an API that didn’t exist yet, but I had a model. I could have written a loop that generated “Person Man 1”, “Person Man 2”, etc. with all of the associated fields, but instead I gave the LLM my class definition and it spat out 50 people with unique names, phone numbers, emails, and everything. It made it easy to test the paging and especially the filtering. It also took like 30 seconds to ask for and receive.

              I originally asked it to make punny names based on celebrities, and it said “I can’t do that.” ☹️