• MagicShel@lemmy.zip
    link
    fedilink
    English
    arrow-up
    40
    arrow-down
    10
    ·
    2 days ago

    If you get a good answer just 20% of the time, an LLM is a smart first choice. Your armpit can’t do that. And my experience is that it’s much better than 20%. Though it really depends a lot of the code base you’re working on.

    • chaosCruiser@futurology.today
      link
      fedilink
      English
      arrow-up
      38
      arrow-down
      2
      ·
      2 days ago

      Also depends on your level of expertise. If you have beginner questions, an LLM should give you the correct answer most of the time. If you’re an expert, your questions have no answers. Usually, it’s something like an obscure firmware bug edge case even the manufacturer isn’t aware of. Good luck troubleshooting that without writing your own drivers and libraries.

      • MagicShel@lemmy.zip
        link
        fedilink
        English
        arrow-up
        16
        ·
        2 days ago

        If you’re writing cutting edge shit, then LLM is probably at best a rubber duck for talking things through. Then there are tons of programmers where the job is to translate business requirements into bog standard code over and over and over.

        Nothing about my job is novel except the contortions demanded by the customer — and whatever the current trendy JS framework is to try to beat it into a real language. But I am reasonably good at what I do, having done it for thirty years.

        • Zos_Kia@lemmynsfw.com
          link
          fedilink
          English
          arrow-up
          11
          ·
          1 day ago

          Yeah the internet seems to think coding is an expert thing when 99.9% of coders do exactly what you described. I do it, you do it, everybody does it. Even the people claiming to do big boy coding, when you really look at the details, they’re mostly slapping bog standard code on business needs.

        • chaosCruiser@futurology.today
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 day ago

          Boring standard coding is exactly where you can actually let the LLM write the code. Manual intervention and review is still required, but at least you can speed up the process.

          • Aceticon@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            7
            arrow-down
            2
            ·
            edit-2
            1 day ago

            Code made up of severally parts with inconsistently styles of coding and design is going to FUCK YOU UP in the middle and long terms unless you never again have to touch that code.

            It’s only faster if you’re doing small enough projects that an LLM can generate the whole thing in one go (so, almost certainly, not working as professional at a level beyond junior) and it’s something you will never have to maintain (i.e. prototyping).

            Using an LLM is like giving the work to a large group of junior developers were each time you give them work it’s a random one that picks up the task and you can’t actually teach them: even when it works, what you get is riddled with bad practices and design errors that are not even consistently the same between tasks so when you piece the software together it’s from the very start the kind of spaghetti mess you see in a project with lots of years in production which has been maintained by lots of different people who didn’t even try to follow each others coding style plus since you can’t teach them stuff like coding standards or design for extendability, it will always be just as fucked up as day one.

            • MagicShel@lemmy.zip
              link
              fedilink
              English
              arrow-up
              2
              ·
              21 hours ago

              That is a bit … overblown. If you establish an interface, to a degree you can just ignore how the AI does the implementation because it’s all private, replaceable code. You’re right that LLMs do best with limited scope, but you can constrain scope by only asking for implementation of a SOLID design. You can be picky about the details, but you can also say “look at this class and use a similar coding paradigm.”

              It doesn’t have to be pure chaos, but you’re right that it does way better with one-off scripts than it does with enterprise-level code. Vibe coding is going to lead people to failure, but if you know what you’re doing, you can guide it to produce good code. It’s a tool. It increases efficiency a bit. But it also don’t replace developers or development skills.

      • SkunkWorkz@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        1 day ago

        Yeah but in that edge case SO wouldn’t help either even before the current crash. Unless you were lucky. I find LLM useful to push me in the right direction when I’m stuck and documentation isn’t helping either not necessarily to give me perfectly written code. It’s like pair programming with someone who isn’t a coder but somehow has read all the documentation and programming books. Sometimes the left field suggestions it makes are quite helpful.

        • chaosCruiser@futurology.today
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          I’ve found some interesting and even good new functions by moaning my code woes to an LLM. Also, it has taken me on some pointless wild goose chases too, so you better watch out. Any suggestion has the potential to be anywhere from absolutely brilliant to a completely stupid waste of time.

    • Avid Amoeba@lemmy.ca
      link
      fedilink
      English
      arrow-up
      21
      arrow-down
      4
      ·
      1 day ago

      How do you know it’s a good answer? That requires prior knowledge that you might have. My juniors repeatedly demonstrate they’ve no ability to tell whether an LLM solution is a good one or not. It’s like copying from SO without reading the comments, which they quickly learn not to do because it doesn’t pass code review.

      • MagicShel@lemmy.zip
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        2
        ·
        edit-2
        1 day ago

        That’s exactly the question, right? LLMs aren’t a free skill up. They let you operate at your current level or maybe slightly above, but they let you iterate very quickly.

        If you don’t know how to write good code then how can you know if the AI nailed it, if you need to tweak the prompt and try over, or if you just need to fix a couple of things by hand?

        (Below is just skippable anecdotes)


        Couple of years ago, one of my junior devs submitted code to fix a security problem that frankly neither of us understood well. New team, new code base. The code was well structured and well written but there were some curious artifacts, like there was a specific value being hard-coded to a DTO and it didn’t make sense to me that doing that was in any way security related.

        So I quizzed him on it, and he quizzed the AI (we were remote so…) and insisted that this was correct. And when I asked for an explanation of why, it was just Gemini explaining that its hallucination was correct.

        In the meanwhile, I looked into the issue, figured out that not only was the value incorrectly hardcoded into a model, but the fix didn’t work either, and I figured out a proper fix.

        This was, by the way, on a government contract which required a public trust clearance to access the code — which he’d pasted into an unauthorized LLM.

        So I let him know the AI was wrong, gave some hints as to what a solution would be, and told him he’d broken the law and I wouldn’t say anything but not to do that again. And so far as I could tell, he didn’t, because after that he continued to submit nothing weirder than standard junior level code.

        But he would’ve merged that. Frankly, the incuriousity about the code he’d been handed was concerning. You don’t just accept code from a junior or LLM that you don’t thoroughly understand. You have to reason about it and figure out what makes it a good solution.


        Shit, a couple of years before that, before any LLMs I had a brilliant developer (smarter than me, at least) push a code change through while I was out on vacation. It was a three way dependency loop like A > B > C > A and it was challenging to reason about and frequently it was changing to even get running. Spring would sometimes fail to start because the requisite class couldn’t be constructed.

        He was the only one on the team who understood how the code worked, and he had to fix that shit every time tests broke or any time we had to interact with the delicate ballet of interdependencies. I would never have let that code go through, but once it was in and working it was difficult to roll back and break the thing that was working.

        Two months later I replaced the code and refactored every damn dependency. It was probably a dozen classes not counting unit tests — but they were by far the worst because of how everything was structured and needed to be structured. He was miserable the entire time. Lesson learned.

      • mcv@lemmy.zip
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 day ago

        This is the big issue. LLMs are useful to me (to some degree) because I can tell when its answer is probably on the right track, and when it’s bullshit. And still I’ve occasionally wasted time following it in the wrong direction. People with less experience or more trust in LLMs are much more likely to fall into that trap.

        LLMs offer benefits and risks. You need to learn how to use it.

    • PlutoniumAcid@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      1
      ·
      2 days ago

      Also depends on how you phrase the question to the LLM, and whether it har access to source files.

      A web chat session can’t do a lot, but an interactive shell like Claude Code is amazing - if you know how to work it.