• Quibblekrust@thelemmy.club
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    8
    ·
    edit-2
    3 months ago

    And most devs I know use it everyday, so… 🤷

    Especially for repetitive mundane code, like they said. It’s much faster to check code for correctness than it is to write it in the first place.

    “I need to restructure this directory tree. If a file has “index” in the name, then it has to go in a parallel directory structure starting at “/home/repos/project/indexes/” and remove the word “index” from the name. Use the same child folders as the original.”

    There, I just finished a custom Python script to accomplish that. Can I do it myself? Yes. Can I do it in 30 seconds? No. Why would I waste my time writing such a mundane script for a one-off thing? And it can do so much more.

    • Senal@programming.dev
      link
      fedilink
      English
      arrow-up
      7
      ·
      3 months ago

      It’s much faster to check code for correctness than it is to write it in the first place.

      In certain circumstances sure, but at any level of complexity, not so much.

      At some point it becomes less about code correctness and more about logical correctness, which requires contextual domain understanding.

      Want to churn out directory changing python scripts, go nuts.

      Want to add business logic that isn’t a single discrete change to an existing system, less likely.

      For small things is works OK, it’s less useful the more complex the task.

        • Senal@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 months ago

          Perhaps for the the style or complexity of the code you (and i) are seeing on a regular basis this is true.

          I find, for low logical complexity code, it’s less about the difficulty of reading it and more about the speed.

          I can read significantly quicker than i can type and if the code isn’t something i need additional time to reason about then spotting issue with existing code can be quicker than me writing the same code out.

          Boilerplate code is a good example of this.

          Though, as i said, I’ve found the point at which that loses it’s reliable usefulness is relatively low in the complexity scale.

          The specific issue i have with people pushing LLM’s as a panacea for boilerplate code is that it’s not declarative and is prone to reasonable looking hallucinations , given enough space.

          Even boilerplate in large enough amount can be subject to eccentricities of LLM imagination.

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

        It was just a contrived example for the purpose of the comment, and I admit it wasn’t a good one.

        How about turning a directory tree of dozens of .url files (Windows web shortcut files) into an HTML file? Directory names as section headings, and nested bulleted lists of hrefs using the .url file names as the link text, minus the “.url”. Can you do that on the CLI? Sure, but it would be a hell of a hack. It would be a disgusting blob of awk code, probably. You’re much better off writing it in something like Python.

        It’s not hard stuff. It’s simple directory recursion, string building, and file writing. It’s just so mind-numbingly boring to write, and it takes time. Instead, Copilot made that for me in 10 seconds. As fast as I could articulate the need in text. No debugging needed. Worked the first time. All I had to ask for in a second pass was more indenting of each nested list, and I could have just added that myself.

        I would argue that I can probably do it faster by hand than you can prompt your LLM and debug the slop it hands you back.

        It’s funny that you’re not even sure you can do that extremely simple thing in my original comment faster than I could prompt an LLM. And your prejudice is showing by assuming I had to even debug it, or that the code was slop. The code looked great. It was perfect Python.

        I wish all of you people would stop knocking what you’ve never even tried. Because it just makes you sound bigoted, using words like “slop” and making assumptions about the quality of the output while never having tried it yourself. Prejudice is never a good thing.

        I’ve written a fair amount of advanced command line stuff using grep and sed and whatever else. Anything non-trivial takes just as much debugging as Python code, and it’s harder to read and debug. And when it’s boring, one-off code, why would you even want to do it yourself?

        I’ll never understand the LLM hate on lemmy. Feel free to hate on capitalism, or on using fossil fuels to power LLMs, or on having no social safety net when LLMs displace jobs, or any number of other things, but to be prejudiced and assume it’s always slop when you’ve never even tried it just makes no sense to me. (Maybe you have, but I’m certain most of the haters haven’t.) It’s a revolutionary tool in its infancy, and it’s already very useful on certain tasks.

        • Senal@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          3 months ago

          It’s a revolutionary tool in its infancy, and it’s already very useful on certain tasks.

          That’s a bold and premature statement IMO, how many AI winters have there been before this one ?

          I’m not even saying you’re wrong, but to assert it with such confidence sounds like crypto bro-nanigans.

          i would argue that it’s evolutionary rather than revolutionary, but that’s subjective i suppose.

          I’ll never understand the LLM hate on lemmy.

          Speaking for me personally i don’t hate LLM’s, i dislike the confidence with which they are being pushed and the lack of acknowledgement of their very real and IMO very important limitations.

          You get statements like

          “And most devs I know use it everyday”

          Without context, and that feeds into the general propaganda feel of the sentiment, because people who don’t actually use them or don’t understand the implied context hear “LLM’s can do all the things, all the professional devs are using it all day”.

          I understand it’s not on you to police peoples impressions, but trying to add actual context to those statements isn’t hate, it’s prudence.

          Then again, that’s subjective too.

    • lightnsfw@reddthat.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 months ago

      Now re-explain this 5 more times before it shits out something remotely close to what you’re asking it to do.

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

        That hasn’t been my experience for something this simple. Not at all. I vibe coded a 75 line Python script the other day and it worked perfectly the first try.