• farmgineer@nord.pub
    link
    fedilink
    English
    arrow-up
    98
    ·
    17 hours ago

    I was doing a code review this week. There was nothing wrong with the code in terms of structure or performance, but it was doing this really weird operation with an ID after DB insert. I asked about it and the author was like “yeah, that’s weird; I don’t know why the AI did that. I’ll remove it.” My dude, I know you can write good code. Don’t be lazy!

    • chunes@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 hours ago

      I know it’s because LLMs are bad at what they do, but I like to imagine that all these weird things getting slipped into code are an attempt to create skynet without us noticing

    • GreenKnight23@lemmy.world
      link
      fedilink
      English
      arrow-up
      23
      ·
      14 hours ago

      I worked with a guy that 100% used AI to dev everything. didn’t even check to see if it would work before submitting a MR.

      It got to the point that I stopped reviewing them and just rejected them outright with a simple comment, “doesn’t work”.

      eventually he was fired. the evidence? the four months of shitty MRs he opened. the best part was, when I said “doesn’t work”, I was never wrong. none of his changes worked.

    • terabyterex@lemmy.world
      link
      fedilink
      English
      arrow-up
      41
      ·
      17 hours ago

      i dont understand that. i use ai for help reading through old stuff or to help me remember how tondo a thing i havent done in two years but blindly copy pasting blows my mind.

      • vividspecter@aussie.zone
        link
        fedilink
        English
        arrow-up
        14
        ·
        14 hours ago

        I suspect it’s the same people that blindly copied stackoverflow code without understanding it. Which is likely where the LLMs are getting most of its answers from in the first place.

        • devfuuu@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 hours ago

          and these people were always the majority.

          so people saying that genai amplifies, they are correct, it amplifies the bullshit and the bad things.

          there were always more mediocre and useless people that top performers.

          it has been a miracle that anything has worked good enough so far.

      • saltesc@lemmy.world
        link
        fedilink
        English
        arrow-up
        25
        ·
        16 hours ago

        Same. I also code up about 50% of stuff so all the structure is there, effectively as guardrails, before using AI. Then prompting it instructions that are effectively the solution, so it doesn’t come up with its own.

        Then, read through it all, replace things that could’ve been done better, and test.

        On average it’s maybe 15-20% quicker than manually coding the whole lot. Try skip any of those steps and the chances of it blowing out increase to the point I just end up doing it all anyway and it’s taken twice as long because of it.

        It’s alarming when people don’t even check.

        • gnutrino@programming.dev
          link
          fedilink
          English
          arrow-up
          11
          ·
          14 hours ago

          On average it’s maybe 15-20% quicker than manually coding the whole lot.

          Out of interest, how much is this 15-20% increase in productivity costing in tokens?

          • saltesc@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 hours ago

            It’d be minimal since I’m doing all the hard work initially and feeding it logic to follow. I find open vibe coding does rip tokens and usually ends up with an overcomplicate mess. Many rabbit holes the AI creates and sends itself down, so a lot more unnecessary lines and often entire redundant blocks.

            If someone’s going to do that, at the least break it up into sections to save tokens and time. But ideally, just get some coding experience under the belt of have a crack at it yourself first so it’s easy to identify the pitfalls and where clear instructions is needed.

          • phutatorius@lemmy.zip
            link
            fedilink
            English
            arrow-up
            4
            ·
            10 hours ago

            You’d really need to know the fully burdened cost of an hour of the person’s time who’d be doing the work, versus the cost of the tokens plus all the overheads involved in its administration and use of the AI solution (tokens, support, training). Same goes with the downsides-- you’d need to know how the rate of serious bugs changes when you incorporate the slop. Some of the defects will make it through reviews and testing and into prod.

    • ryannathans@aussie.zone
      link
      fedilink
      English
      arrow-up
      12
      ·
      15 hours ago

      The lazy part is not questioning the bullshit they noticed and did nothing about - not using the tool

      • phutatorius@lemmy.zip
        link
        fedilink
        English
        arrow-up
        3
        ·
        10 hours ago

        That’s one of my major beefs with AI: it worsens the signal/noise ratio throughout the dev process. The two greatest enemies of good software are complexity and its deformed cousin, extraneous crap. AI increases both, making it harder to address the real underlying problems.

      • farmgineer@nord.pub
        link
        fedilink
        English
        arrow-up
        22
        ·
        15 hours ago

        I disagree on that; we lose the muscles we don’t use and I’ve already seen that happening. It’s also making people want to jump straight to implementation without proper design and I think that’s a recipe for trouble.

        • ryannathans@aussie.zone
          link
          fedilink
          English
          arrow-up
          7
          ·
          edit-2
          15 hours ago

          Again, cowboys have been skipping steps and doing things lazily and poorly well before AI. Everyone knows people who jump straight into an IDE instead of following proper workflows. Yes, skills you don’t practice take a hit. In a professional setting there is such a substantial productivity hit to avoid all AI use, compared to correct and proper use. It will soon be infeasible to take such at anti AI stance and remain in the industry

          • farmgineer@nord.pub
            link
            fedilink
            English
            arrow-up
            9
            ·
            14 hours ago

            cowboys have been skipping steps and doing things lazily and poorly well before AI

            Of course, but I think not understanding what they’re committing is more dangerous than before (even allowing for the classic “I copied and pasted this from xxxx site”). This is also true when people are fully trusting AI to review code as well.

            We use AI for code reviews which I do find useful. It’s still wrong part of the time (sometimes ridiculously so). So far, it’s also failed to provide accurate documentation for various repos which seems like something rather basic. I’m not against all AI (though I do have ethical and environmental concerns with several of the commercial options). I will not have them write code for me, though.

            As for the future, we’ll just have to wait and see. I’ve seen a lot of AI budgets exceeded and/or cut. I do think it’s not there yet for a number of tasks but is suitable (again minus certain concerns) for others.

            • phutatorius@lemmy.zip
              link
              fedilink
              English
              arrow-up
              2
              ·
              10 hours ago

              This is also true when people are fully trusting AI to review code as well.

              Holy shit.

              We use AI for code reviews which I do find useful.

              What’s it going to tell you that a static analysis tool wouldn’t? (And we all know what a hell of false positives you get into with those).

            • ryannathans@aussie.zone
              link
              fedilink
              English
              arrow-up
              7
              ·
              13 hours ago

              Machines cannot take responsibility for problems, which is why I feel containment barriers cannot be entirely AI. AI reviews are fine (and catch a lot of wild issues humans miss) if a human genuinely reviews it too

              I’ve lost count of how many snippets I’ve reviewed that were verbatim pasted from stack overflow pre-AI lol

              My view is that humans produce a lot of garbage, and AI tooling currently amplifies your productivity. If you’re careless, don’t take pride and normally commit tech debt then with AI tooling that’s going to be amplified 10-100x. The more careless you are the faster you can commit more garbage - especially if you’re skipping on unit/integration/functional testing

              • phutatorius@lemmy.zip
                link
                fedilink
                English
                arrow-up
                3
                ·
                9 hours ago

                especially if you’re skipping on unit/integration/functional testing

                That’s a career-limiting move where I work. I draw a hard line on that. You don’t get many chances to blow up prod because you left out mandatory process steps. You might not get sacked the first time (though you should), but it if happens again, you’d better be contemplating your future life as a barista, or pounding farts out of shirt-tails in a steam laundry.

              • Schal330@lemmy.world
                link
                fedilink
                English
                arrow-up
                4
                ·
                12 hours ago

                Machines cannot take responsibility for problems, which is why I feel containment barriers cannot be entirely AI.

                Where I work AI is being pushed hard, but the company has made it their policy that there must be a human in the loop. Ownership of the code written by AI is down to the person using the AI. “Oops, don’t know why the AI wrote that!” Is not a valid answer to bugs being introduced into production.

                I’m seeing senior engineers of 15+ years no longer writing code and churning out a ton more work. They are disappointed they don’t write code anymore but working with the AI is the job they have to do to be able to afford to live. They say the cognitive load has shot up for them, they are constantly spinning plates.

                To make the plate spinning job easier they have implemented guard rails to ensure the agents don’t do anything stupid. I’m seeing a number of stories posted to Lemmy where the AI does dumb shit but the stories don’t apply any accountability to the developers using it.

            • setsubyou@lemmy.world
              link
              fedilink
              English
              arrow-up
              3
              ·
              13 hours ago

              I think not understanding what they’re committing is more dangerous than before

              This kind of reasoning applies to every new tool. 20 years ago I was saying the same thing about work from co-workers who started programming on Java and didn’t understand what their beloved HashMap actually does under the hood.

              Eventually we adapt to either the new tools or to the new dangers, the ones who don’t just become fossils.

              • phutatorius@lemmy.zip
                link
                fedilink
                English
                arrow-up
                2
                ·
                9 hours ago

                Eventually we adapt to either the new tools or to the new dangers

                Another option is to stop using new tools and frameworks that don’t benefit us. Adoption should be based on a good cost/benefit ratio, not treated as an inevitability.

                It’s also good to re-examine old choices and shitcan them when they’re no longer earning their keep. We were using NiFi for something non-core that we do, and replacing it with a simple hand-coded solution gave us a massive performance bump that’s more maintainable as well. Our use case was well outside NiFi’s sweet spot, so we shouldn’t have used it in the first place. But the person who made that decision is long gone, and it’s always someone else who ends up having to clean up those messes. Here’s hoping that someday I find that guy in a dark alley with no camera coverage.