• bluGill@fedia.io
      link
      fedilink
      arrow-up
      17
      ·
      12 hours ago

      I’m writing code because it is often faster than explaining to the ai how to do it. I’m spending this month seeing what ai can do - it ranges from saving me a lot of tedious effort to making a large mess to clean up

      • LedgeDrop@lemmy.zip
        link
        fedilink
        English
        arrow-up
        8
        ·
        7 hours ago

        I’ve had better success, when using AI agents in repeated, but small and narrow doses.

        It’s been kinda helpful in brainstorming interfaces (and I always have to append at the end of every statement “… in the most maintainable way possible.”)

        It’s been really helpful in writing unit tests (I follow Test Driven Development), and sometimes it picks up edge cases I would have overlooked.

        I wouldn’t blindly trust any of it, as all too often it’s happy to just disregard any sort of error handling (unless explicitly mentioned, after the fact). It’s basically like being paired up with an over-eager, under-qualified junior developer.

        But, yeah, you’re gonna have a bad time if you prompt it to “write me a Unix operating system in web assembly”.

      • Thorry@feddit.org
        link
        fedilink
        English
        arrow-up
        5
        ·
        7 hours ago

        I totally get it. I’ve been critical about using AI for code purposes at work and have pleaded to stop using it (management is forcing it, less experienced folk want it). So I’ve been given a challenge by one of the proponents to use a very specific tool. This one should be one of the best AI slop generators out there.

        So I spent a lot of time thoroughly writing specs for a task in a way the tool should be able to do it. It failed miserably, didn’t even produce any usable result. So I asked the dude that challenged me to help me refine the specs, tweak the tool, make everything perfect. The thing still failed hard. It was said it was because I was forcing the tool into decisions it couldn’t handle and to give it more freedom. So we did that, it made up the rules themselves and subsequently didn’t follow those rules. Another failure. So we split up the task into smaller pieces, it still couldn’t handle it. So we split it up even further, to a ridiculous level, at which point it would definitely be faster just to create the code manually. It’s also no longer realistic, as we pretty much have the end result all worked out and are just coaching the tool to get there. And even then it’s making mistakes, having to be corrected all the time, not following specs, not following code guidelines or best practices. Another really annoying thing is it keeps on changing code it shouldn’t touch, since we’ve made the steps so small, it keeps messing up work it did previously. And the comments it creates are crazy, either just about every line has a comment attached and functions get a whole story, or it has zero comments. As soon as you say to limit the comments to where they are useful, it just deletes all the comments, even the ones it put in before or we put in manually.

        I’m ready to give up on the thing and have the use of AI tools for coding limited if not outright stopped entirely. But I’ll know how that discussion will go: Oh you used tool A? No, you should be using tool B, it’s much better. Maybe the tools aren’t there now, but they are getting better all the time, so we’ll benefit any day now.

        When I hear even experienced devs be enthusiastic about AI tools, I really feel like I’m going crazy. They suck a lot and aren’t useful at all (on top of the thousand other issues with AI), why are people liking it? And why have we hedged the entire economy on it?

        • mcv@lemmy.zip
          link
          fedilink
          English
          arrow-up
          5
          ·
          7 hours ago

          I’ve started using it as an interactive rubber duck. When I’ve got a problem, I explain it to the AI, after which it gives a response that I ignore because after explaining it, I figured it out myself.

          AI has been very helpful for finding my way around Azure deploy problems, though. And other complex configuration issues (I was missing a certificate to use az login). I fixed problems I probably couldn’t have solved without it.

          But I’ve lost a lot of time trying to get it to solve complex coding problems. It makes a heroic effort trying to combine aspects of known patterns and algorithms into something resembling a solution, and it can “reason” about how it should work, but it doesn’t really understand what it’s doing.

          • Ænima@lemmy.zip
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            3 hours ago

            after explaining it, I figured it out myself.

            I use colleagues or people on Discord for this. I get the solution immediately after asking AND those that saw me, or heard me, ask now think I’m an idiot. It’s my neurodivergent kink!

          • addie@feddit.uk
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 hours ago

            Which is strange, because Azure’s documentation is complete dogshit.

            We were trying to solve something at work (send SMTP messages using OAuth authentication, not rocket science) and Azure’s own chatbot kept on making up non-existent server commands, rest endpoints that don’t exist, and phantom permissions that needed to be added to the account.

            Seriously; fuck Azure, fuck Copilot. Made a task that should have taken hours, take weeks.

      • Joe@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        6
        ·
        10 hours ago

        You will need more than a month to figure out what its good for and what not, and to learn how to effectively utilize it as a tool.

        If can properly state a problem, outline the approach I want, and can break it down into testable stages, it can be an accelerator. If not, it’s often slop.

        The most valuable time is up front design and planning, and learning how to express it. Next up is the ability to quickly make judgement calls, and to backtrack without getting bogged down.