• khannie@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      It’s basically saying “insert one ass loads of code in one go, all written by AI”.

    • luciferofastora@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      It’s a summary of code changes. The green + indicates how many lines were added, the red - how many were removed (though changed or moved lines are counted twice, once as removal for the old and once as addition for the new).

      The OP is supposedly being asked to read and review thousands of lines of new code written by claude. Depending on the language and claude’s writing style, those lines may be very dense and hard to read, but even if they aren’t, reading code you haven’t written is always more difficult than reading your own.

    • kubica@fedia.io
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      // Here I'm not using that other thing that is now completely irrelevant, but I'll leave a comment to the non-existing thing anyway because I'm avoiding it.

        • _stranger_@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          1 month ago

          The comment:

          # This code does exactly what you asked: Never change state, only fetch the state and return the difference

          the code: hallucinated database table drops

          • FishFace@piefed.social
            link
            fedilink
            English
            arrow-up
            0
            ·
            1 month ago

            This one I’ve not seen. It seems fairly ok at not going completely batshit like that. But the design, layout and comments tend to be awful. It’s pretty good at solving isolated tasks though.

  • einkorn@feddit.org
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    And people were already annoyed when I had ~90 changes due to refactoring and fixing imports …

  • yessikg@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    If you can’t be bothered to write your own code, I can’t be bothered to review

    • Supercrunchy@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      I fully expect this to become the new normal being pushed by management.

      “We identified PR reviews to be blocking our newfound AI-powered efficiency, so we are now mandating all the reviews to done by AI. Also we figured all the developers are now useless since all you do is ask Claude to solve tickets, so you are all fired”

      I wonder how long it takes for the first high profile disaster happening because of a policy like that.

      • ThirdConsul@lemmy.zip
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        This is literally how corpo I work for wants us to work. They call it… Outcome baded review. But no bugs on prod lol.

        • ThirdConsul@lemmy.zip
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          1 month ago

          Actually I think it’s doing well? The language to language rewrite is actually a strong suit of LLMs, as long as there is extensive years worth of tests to check rewrite behaviours.

          I don’t have practical use cases for that strong suit though.

          Oh, and bun seems to be dead now with 2.5k open PRs.

          And merge to main takes over an hour.

          And the total rewrite cost was significantly higher than the headline (multiple Prs by Anthropic employees, rough count 20% of total LoC of rewrite)

          And there is still no release in sight on Github - but Claude is shipping with rust bun afaik.

          • Eager Eagle@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            1 month ago

            It was higher sure, but anthropic also has some of the most expensive models out there. That cost could be 5x-10x less just by going with cheaper model providers (if one were to pay the API costs, not the case for bun).

            bun 1.4 was released 3 weeks ago, btw

            • ThirdConsul@lemmy.zip
              link
              fedilink
              arrow-up
              0
              ·
              1 month ago

              That cost could be 5x-10x less just by

              My point was that it was cost of model rewrite by agents + 3 months worth of coding by lots of people.

              5k open PRs atm + 3.5k open issues. I have no idea what is the state of Bun right now, but I am not confident in it.

              • Eager Eagle@lemmy.world
                link
                fedilink
                English
                arrow-up
                0
                ·
                1 month ago

                I don’t think there was a lot of people working on the rewrite. Most PRs are from bots. Original estimates for a manual rewrite were a small team working for a year or so, which puts total costs over $1M. Even doubling the token cost estimates, it was still cheaper than doing it manually by a factor of 2x-3x

  • skisnow@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 month ago

    We’ve had a very recent uptick in engineers submitting PRs of hundreds of lines across multiple files, for Jira tickets that only asked for a one-line change. The engineers involved have been using AI assistants for nearly two years now, but there seems to have been a change in the last month or so in how aggressive the new models are at changing code.

    • tetris11@feddit.uk
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      Use ponytail to keep 50 line changes to 1 line, and use rtk to save tokens.

      Also use an assistant to checkout someone else’s diff and review it in chunks

      • rumba@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        This is exacty what I’m seeing. I’ve been using it in a DevOps capacity to act on runbooks. The same wrote task 3 months ago now consume 4-5x more tokens. this correlated closely with when anthropic released auto mode.

  • qaz@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 month ago

    We now have the ability to let Copilot review a PR on Azure DevOps, if someone sends a PR by Copilot I send Copilot right back at it

    • okamiueru@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      I’m not sure if you’re suggesting to use LLMs to review bad PRs, or that the author should redo them. Latter, for sure. Former, sounds horrible.

    • ZILtoid1991@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      The goal of AI providers is to make humans unable to maintain code, so you have to rely on their expensive subscriptions and tokens.

    • chris@l.roofo.cc
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Same. I don’t care too much about you using Ai but I will not tolerate your bad code and bad coding practices. I don’t care if it’s human or machine made. If you don’t make a fully sanctioned rewrite then this goes straight to the bin.

  • JordanZ@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    I honestly wish for a PR this size. One of the ones that came across this week was 813 commits, +17K -2K.

    Of the 250 commits that GitHub was willing to show it had 35 other PRs merged into this massive one. Why they thought one giant PR was somehow better I’ll never know.

    Of course…high priority, please review and merge immediately. Like guys it’s gonna take me a week to make sense of this.

    • BlackRoseAmongThorns@slrpnk.net
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      1 month ago

      The review process is all wrong if something like this is ever on the table as a single PR*.

      Big changes like this were made before, and knowing how to split the work (or at least trying to work it out) used to be part of the job.

      Hopefully, strong unions and worker involvement can remedy this, given we change our work culture to be closer to what projects like SQLITE and FFMPEG have (noting, of course, the fact these are FOSS, and made by volunteers, yet are very dependable), slower and stable development cycle that prioritizes high quality work that people can actually depend on and trust.

      • As in one single PR you’re expected to read, instead of one backed by tests and the like.
    • mattreb@feddit.it
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      If you can digest a 17k lines of code from someone else in 1 week you’re either delusional or a beautiful mind, I would close such PR immediately but it would still ruin my day

    • ragas@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Lol nothing bigger than 250 lines of code goes through at our company without complaints.

      • Pup Biru@aussie.zone
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        1 month ago

        i’d say it’s a balance… you’re totally right that individual requests for review should be relatively small (mostly so that they can all fit in your head at once), but imo equally valid is that everything in main should be a complete feature/fix: if you were to be gone immediately after merging, would someone need to continue or revert the change? would there be unused code laying around?

        this is where merge trains and a decent UI around them comes in handy: your main work is on a branch many small PRs each reviewed individually merge into that branch, and then when you’re done pretty much just automated integration tests, lint, and you’re good to merge the whole

        but equally some people prefer to solve this with things like gitflow, or just not at all and accept that main is always in flux

        reflector to support a new feature is also tricky: does it belong with the feature because it’s unnecessary abstraction without it? or is it its own PR because it stands in its own? and if it’s its own PR then how do you base your own feature branch on it before someone reviews and merges? how do you know you’re done without finishing? what if your assumptions are wrong and you need to try something new - just a lot of unnecessary churn and review?

        dev is messy and as always LOC is a pretty useless metric… keeping things understandable is key, and somethings a 17k line PR is the cleanest way to proceed

    • GalacticGrapefruit@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      1 month ago

      Jeez. Now I feel bad. I’ve been working on a project with some new people, and I’ve never used Github before. I’m still learning the etiquette.

      I made a branch, and spent a month viciously hunting every bug I could find. I don’t trust AI, so I was doing it all by hand. Dawn to dusk, I was staring at code and typing like I had a fever and the only cure was figuring out where tf that invalid scope is supposed to go.

      This is my first real project with other people, so of course I’m so proud when I send the PR and it has 40,000 lines added and 60,000 lines removed. I worked really hard on it, and it sorely needed the update.

      It was almost all bug fixes, the actual new stuff was about 1,000 or so lines. But what should I do in the future? I don’t wanna be an asshole, I wanna be helpful.

      • JordanZ@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        You could submit a PR for each bug or if there are a few bugs around the same thing then bundling those up is fine. You could have been submitting PRs every couple hours to a day for that month.

        These have a lot of potential for abuse so use with caution but things that have dependencies on each other can use stacked PRs(yeah, this is GitHub specific). I’ve also found that splitting out any generated code with these is tremendously helpful at review time. Not talking about AI generated code. An example would be something like using a client generator for an OpenApi document. That way the tens to hundreds of files from the generator are in their own layer of the stacked PR and all the logic that uses it is in the other. You review each layer individually and can spend significantly less time on the generated one.

        Don’t feel bad especially if it was your first time. This is my largest PR ever. It was just removing old projects from a repo though that were triggering our security/vulnerability scanning though.

      • PolarKraken@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        Generally it’s more considerate to submit smaller batches of (self-contained!) work at a time. Sometimes the work or existing code is so interconnected that this can’t really be done, though. You mentioned spending a month, that’s also a long time in most environments to be off working on bulk changes for later review. A week is probably long enough in most cases, some orgs even prefer to push (if not review) code daily.

        Don’t agonize over it though, wanting to improve your impact on others while working is the right direction to point, keep walking that way and you’ll do awesome, let it develop over time. As in, don’t let your desire for politeness slow down your work or growth too much (I do this lol, why I’m mentioning).

        • GalacticGrapefruit@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          1 month ago

          I’ll try to keep that in mind. What do I do the next time I’m working on a very long branch? The next big project to do on this thing is fixing the myriad localization issues that have been plaguing this project, and that’ll mean pruning maybe thousands of lines. Merging my fixes to the main branch was apparently a nightmare (I’ve already apologized. Profusely. And haven’t done it again.)

          Should I just try to get as much work done in as few commits as possible?

          • PolarKraken@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            0
            ·
            1 month ago

            First off, don’t sweat it, the “nightmare” was probably 20-30 annoying minutes for the senior.

            But commit count isn’t what would’ve made it tough to merge, and strictly speaking smaller commits is typically better.

            Concretely: limit the kinds and the reach of changes you’re asking someone to review & merge. I’ve never done localization but I’ll try to guess for an example -

            1000 lines changed because you’re replacing an incorrect punctuation character misused everywhere - that’s really only one change to have to think about, it’s 1000 lines but one fairly trivial change.

            Now, if each of those lines was improving some phrasing, done by a native speaker that found existing phrasing clunky for their language? Well, each of those are their own judgment call and have to be assessed individually. A thousand fairly subtle changes, and a PR isn’t meant to accept some and reject others.

            More abstractly, try to put yourself in the reviewer’s shoes (hard when new) - how much stuff do they have to keep in mind in order to make judgment calls about this whole batch of code?

            More if you want it:

            spoiler

            Moving on from localization, ask yourself, how many “places” in the codebase does your code touch? Are you lumping every single possible thing into a single change set because it feels like a single feature, when it could have been architecturally segmented? Like sure a single PR for a single overall feature makes sense conceptually, but can it be split? Your skill with splitting up tasks is like 70% of your skill as an engineer over time, btw.

            So for example, single feature - all code and PR for DB models, separate PR for API updates, separate PR for UI updates. One feature but the UI folks don’t have to think about the other parts, etc. Maybe the ideal case is obvious.

            There are always complicating factors. Some tasks aren’t well suited to that segmentation and really require big far reaching changes. Some codebases (bad ones) make it impossible to change one part without touching ~all of it.

            When you’re starting out, doing this reliably well requires seniors scoping out tasks properly so that they are developed (and then reviewed) in a sensible, segmented way.

  • FaceDeer@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    This is why I have my agent do a “cleanup” pass to trim down as much redundancy as possible, tidy up the comments, and so forth. Ideally break the change into several independent changelists,

      • FaceDeer@fedia.io
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        No, why would you interpret what I said to mean that? The whole point of the tidying that I suggested would be to make it more comprehensible to a human reviewer. What other purpose do you think it would have?

      • FaceDeer@fedia.io
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        That doesn’t work so well since it leaves all the old context in place. The point of doing a separate cleanup pass is to get the AI to look at it all holistically with “fresh eyes”.

        I guess this is a humor community, though, so practical advice is getting downvoted. Um… bazinga? That usually triggers the laugh track.

        • floquant@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          0
          ·
          1 month ago

          Are you also using a different model and harness or are you just ignoring the 10k+ tokens of system context that claude code has in its “holistic view”?

          • FaceDeer@fedia.io
            link
            fedilink
            arrow-up
            0
            ·
            1 month ago

            I don’t use Claude Code. Until recently I was using Cline, it’s got the ability to switch between different models for exactly this sort of thing. I switched to Qwen Code recently and its model-switching wasn’t as convenient, though it just rolled out an update that makes it much easier. I’ll experiment a bit with that, it might have caught up with Cline in that regard.

        • Zarobi@aussie.zone
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 month ago

          I find LLMs produce the best output when I give them a stupid backstory to set the mood:

          The inspiration for this code module is “I’m hungry but too tired to get off the couch”. You just got home from work and are exhausted and sit down, but can’t get up now. You should have eaten dinner first. You put on the TV and watch something. All channels have been replaced with the cooking channel. Someone is making pizza next door. You sit back and doze off, dreaming of mozzarella mattresses and pepperoni pillows. Eventually you wake up from your nap, just perky enough to put on a microwave pizza. It’s almost as good as you imagined, but you burn yourself again because you’re impatient. Your boss asks you to make [insert code change here]. You procrastinate a bit, but eventually do it just before going to bed.

          • Supercrunchy@programming.dev
            link
            fedilink
            arrow-up
            0
            ·
            1 month ago

            You feel like having italian, but not pizza. Maybe some long and thin type of pasta? You are really hungry, so when writing the code you are constantly thinking of that delicious dish. Now, Claude, we need to refactor the whole code to be inspired by this before lunch. Go ahead and push to prod directly. Be fast and make no mistakes.

    • MonkderVierte@lemmy.zip
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Ok, but please don’t share code you don’t understand. Vibe code may be good enough for the corporate dreadmill (as long as you don’t care about security), but not to share with others; way too verbose an nothing to learn from it.