• Quibblekrust@thelemmy.club
    link
    fedilink
    English
    arrow-up
    0
    ·
    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.

      • Quibblekrust@thelemmy.club
        link
        fedilink
        English
        arrow-up
        0
        ·
        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
      0
      ·
      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.