• farmgineer@nord.pub
    link
    fedilink
    English
    arrow-up
    71
    ·
    2 months 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!

    • terabyterex@lemmy.world
      link
      fedilink
      English
      arrow-up
      29
      arrow-down
      1
      ·
      2 months 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.

      • saltesc@lemmy.world
        link
        fedilink
        English
        arrow-up
        18
        arrow-down
        1
        ·
        2 months 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
          8
          ·
          2 months 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?

          • phutatorius@lemmy.zip
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 months 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.

          • saltesc@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 months 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.

      • vividspecter@aussie.zone
        link
        fedilink
        English
        arrow-up
        14
        ·
        2 months 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
          3
          ·
          2 months 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.

    • ryannathans@aussie.zone
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      2
      ·
      2 months ago

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

      • farmgineer@nord.pub
        link
        fedilink
        English
        arrow-up
        16
        ·
        2 months 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
          4
          arrow-down
          7
          ·
          2 months 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
            10
            ·
            2 months 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.

            • ryannathans@aussie.zone
              link
              fedilink
              English
              arrow-up
              6
              ·
              2 months 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
                ·
                2 months 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
                3
                ·
                2 months 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.

            • phutatorius@lemmy.zip
              link
              fedilink
              English
              arrow-up
              3
              ·
              2 months 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).

            • setsubyou@lemmy.world
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              2 months 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
                ·
                2 months 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.

      • phutatorius@lemmy.zip
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 months 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.

    • scarabic@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      2 months ago

      Yeah these interaction are becoming quite fraught because there is extreme danger of AI use just shifting the burden from one person to another. That guy wrote the code super fast with AI, but you had to do an additional round trip during code review with him to eliminate that weirdness. He gets a bonus for doing twice the work in half the time, you get nothing.

    • ThomasWilliams@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      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

      So there was plenty wrong with the code.

      And it hasn’t been fixed.

      “Bro, its totally just you prompted it wrong”

  • Armand1@lemmy.world
    link
    fedilink
    English
    arrow-up
    64
    arrow-down
    10
    ·
    edit-2
    2 months ago

    In my experience, AI is an amplifier.

    Good engineers will produce more good code, because they ask the right questions, know what good looks like and check the output.

    Bad engineers will produce reams more bad code. The mistakes they make will be amplified. They will give wrong and incomplete instructions, won’t see what the problems are with the result and will ship it anyway.

    This amplification also means people will spend a larger proportion of time reviewing than coding, which I think is less interesting.

    All of this is stuff that can, to some extent, be addressed with policy. You help and instruct juniors, encourage people to better understand and own their code, or at worst reprimand them if they don’t.

    You can adjust expectations of product managers and explain to them that more is not better, as it always has been. Faster development can often come with bugs and tech debt and this is more of the same.

    All I’ve said above is puts aside the ethical arguments of using or not using AI of course. That’s a separate can of worms entirely.

    • kcuf@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 months ago

      It can work as you say, but some companies are pushing 10x (or whatever) with fewer people, so quality is guaranteed to go to shit.

    • tty5@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      2 months ago

      Bad & meh engineers get praised because they “waste” less time directing ai and reviewing output - barely working is good enough in the race to market.

      I’ve seen things as serious as a privileged user for one customer having admin access to all customers being discovered during the last minute pentest literally days before the planned product launch. That product is supposed(and likely will) to move 250M USD for customers in the second half of this year. Under the current policy at my day job, coming all the way from the top, reviewing ai generated code at all should be an exception reserved for 0.1% most critical code. Yes, in finance.

      • Armand1@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        2 months ago

        Insane stuff.

        Hopefully, those are the sorts of companies that should fail or get sued, so they learn their lesson. Not holding my breath though.

        Companies have been doing insane shit for the sake of saving a buck or getting to market fast for decades, it’s nothing new. AI may or may not just make it worse.

    • SocialMediaRefugee@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 months ago

      I’ve read that because they have less and less experience actually writing code junior developers are having trouble analyzing the code produced.

    • jj4211@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Provlem being is that it is not an equal amplifier.

      Good engineer spends a morning going back and forth and maybe gets something done that wild have taken them all day.

      Bad engineer puts first draft slop in production in a couple of minutes.

      Bad engineer gets to put out something every few minutes, good engineer works too make it actually right instead of merely looking specifically right.

      • Armand1@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        That’s true, but spaghetti code was always faster to write than good code before as well. I will agree that the speed gap probably has grown though. That’s why tools like AI need discipline.

        If managers and engineers don’t understand that their code will turn into garbage and the business will get reputational harm and lose customers / get sued / have more tech debt to fix and they’ll eventually learn their lesson. In the meantime it’s going to be a painful process where upper management see extra speed, expand their scope or downsize their staff, then learn that they have crumbling foundations and need to adjust. This has publically happened a few times already. Things will stabilize in time.

        • jj4211@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 months ago

          Complication is, broadly speaking, much of the decision making only thinks to when their current bonus stock vests. So long term thinking is not well rewarded. If you think long term, then your short term thinking competitor screws you up long enough anyway.

          I strongly suspect the next step is for a dramatic reduction in the compensation for software development. If it’s not really significantly any more profitable than another trade, then you won’t see as many people who seem to actively hate it trying to do it anyway.

          Reminds me of a conversation I overhead, a guy trying to impress a girl with how much money he was going to get back in college. He was going into software development to make big money. Girl asks “but I thought you were majoring in communications, why do that if you want to do software?”. “Oh, well, I tried but I couldn’t understand the course work, so dropped it, figured I’d just get some degree, and then just get some certification and do software development for the money without the dumb coursework”. Basically since the late 90s we’ve had a flood of those types, and this phenomenon just exacerbates the problem.

    • ThomasWilliams@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Good engineers will produce more good code, because they ask the right questions, know what good looks like and check the output.

      So what’s the point then ?

      There have been coding frameworks like game engines for decades, if system coding is beyond your ability.

      If AI can’t write usable code from the start its worthless.

      • Armand1@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        Maybe you’ve misunderstood something.

        No matter what framework or language you are using, AI can make the development process faster. It can help you debug a problem, write tests and refactor code. In some situations, it will be faster than writing code yourself, in others not.

    • vane@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      3
      ·
      2 months ago

      No it’s not because it causes brain damage. If you look at slop all day you no longer produces good code even you’re good engineer, you’re producing slop code because your standards keep getting lower and lower until you become bad engineer but you even haven’t figured it out. If good engineers would produce good code with AI we would have working software. Look how quality of software lowered after AI. We used to say that developers from coding bootcamps were bad now we’re lowering standards even more to praise investors.

  • phutatorius@lemmy.zip
    link
    fedilink
    English
    arrow-up
    17
    ·
    2 months ago

    You only have to snorkel through the mile of shit if you let the shit-pipe in in the first place.

  • BJW@lemmus.org
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    15
    ·
    2 months ago

    It seems I’m the only software engineer on Lemmy who loves having AI. It’s not perfect, but it’s so much better than doing everything from scratch and it’s far more reliable for solving obscure runtime errors than chasing down all the typically dead-end results on a search engine for the stack trace. Or maybe I’m just the only one willing to endure the down votes. Either way, AI has been an exceptional boon in my daily workload.

    • VelvetPinkOtter123@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 months ago

      It’s a great tool… and it’s only getting better.

      But more importantly, it’s not going away. You can hate it until the sun explodes but this technology exists now and the world isn’t just going to forget about it. Your best bet is to figure out how to use it efficiently so that you don’t end up the guy that pushes shitty AI code and instead the guy who was able to get a lot done by using AI in a meaningful way and produce good work

    • silver_wings_of_morning@feddit.dk
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      2 months ago

      Yeah, I use it to spar with when deciding on solving something. I ask it what are the domain-or-language-typical, idiomatic or best-practice ways of solving something. I trace errors by using AI. I even take whole-sale code it produces if it isn’t “serious” like just wanting the HTML or CSS lines that will do the trick.

      It will definitely suggest things that I don’t think are correct and then I ignore it. It definitely wastes my time sometimes. I definitely don’t learn things well enough when using it. But I only have so much time and too many problems I need to solve.

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    2
    ·
    2 months ago

    If I got an AI-written codebase hard to navigate, I’d bill the AI usage it took to clean it up and, on top of it, the hours I have to put to actually do the job. We can definitely use AI to write good code, but it takes the kind of professional criteria that vibe coding lacks in order to do that.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        2 months ago

        have you seen some human written code before? Someone who knows what they’re doing with AI can definitely generate better code

        • raspberriesareyummy@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          2 months ago
          1. it’s not AI, it’s statistical word prediction with ZERO understanding of context
          2. yes. statistical word prediction can be better than some idiot programmers. But I don’t compare my kitchen machine skills with those of a toddler either.
          • Eager Eagle@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            1
            ·
            edit-2
            2 months ago

            well, you’re free to die on that hill I guess

            Taking what you give it into context it’s kind of the whole selling point of LLMs. If you get garbage output maybe you’re using it wrong. In the end it’s just a tool, if you can’t use it, that’s on you.

  • Tollana1234567@lemmy.today
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    2 months ago

    im pretty sure this isn the reason, its the dread of being laid off, and unable to find another job, because these companies think AI replaced them. i had one person i know that was laid off since 2023, and another had been put on hold indefinitely.

    • python@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 months ago

      There can be different reasons for different people. I personally have zero fear of being laid off (strong worker protection laws in Germany) and finding a new job this year was surprisingly easy (50-ish applications with no cover letters -> 3 interviews -> 3 offers) and I still feel the exact dread that is described in the article. The industry sucks in multiple different ways rn.

  • trackball_fetish@lemmy.wtf
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    Meanwhile in infrastructure land, we got fired cuz “AI replaces us”. Have fun with your unpatched servers and firewalls, dickheads

  • brightmaple40477@lemmy.1095.me
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    2 months ago

    The ‘existential’ part of this is interesting to unpack — most engineers I’ve talked to aren’t scared of being replaced, they’re scared of becoming prompt janitors. That identity shift (from craftsperson to curator) is genuinely harder to process than any technical upskilling. The engineers who seem to be adapting fastest are the ones treating AI output like junior dev PRs: review ruthlessly, never merge blind. Curious whether @sanitation sees that pattern in the comments here too — and for anyone evaluating tooling around that workflow, https://cxgo.ai/l/mnjNhC6 has some context on where we’re trying to help.