Peer reviewing is torture now

632 points · 80 comments · view on lemmy.world

80 Comments

Aurenkin@sh.itjust.works · 90 pts · 14h (4 replies)

Don't worry half of those will be useless code comments

kubica@fedia.io · 93 pts · 13h (3 replies)

// 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.

FishFace@piefed.social · 11 pts · 12h (2 replies)

REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

_stranger_@lemmy.world · 8 pts · 6h (1 reply)

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 · 1 pts · 2h

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.

Solemarc@lemmy.world · 81 pts · 13h (8 replies)

I struggle to review a 1k line change. When people give me such big changes I normally don't believe they've reviewed them either.

roofuskit@lemmy.world · 47 pts · 12h (1 reply)

That's because they haven't.

marlowe221@lemmy.world · 15 pts · 11h

Mystery solved!

Jesus_666@lemmy.world · 11 pts · 10h (3 replies)

Try working on a codebase that's all event-driven hexagonal CQRS with hand-crafted SQL for persistence. Add additional buzzwordy methodologies to taste.

Adding a single property to your product means you now have to update an aggregate class, several DTOs, and several event classes and handlers before you can even think about touching the UI.

And that's in your main solution. There's also at least one facade service you'll need to make compatible and you also need to update the event simulator used for testing. The latter night involve having to touch every single line in a 2000 lines long SQL script.

Having to go though three separate 600-2000 LOC PRs for one PBI isn't that exotic.

bjc@scribe.disroot.org · 4 pts · 6h (1 reply)

forgive them lord, for they know not what they do

harmbugler@piefed.social · 2 pts · 1h

Lord, I wish they knew what they do

moodoovoodoo@lemmy.world · 1 pts · 9h
[ removed ]
Saganaki@lemmy.zip · 5 pts · 11h (1 reply)

Occasionally I do that…but only because 500 of those lines are my comments explaining everything.

MonkderVierte@lemmy.zip · 1 pts · 1h

Please don't explain that much, make your code easier to understand.

OwOarchist@pawb.social · 75 pts · 12h

Repeat after me: "Rejected. Reason: too large of a change for one PR."

SubArcticTundra@lemmy.ml · 65 pts · 13h (16 replies)

The problem with Claude is that it doesn't write code to be modular & reusable. Every tiny change requires a complete rewrite.

veryblandusername@fedinsfw.app · 58 pts · 12h (7 replies)

I've completely banned any code that can't be explained. I've had my CTO send me code at 3 AM to implement and when I ask him what I'm looking at he just says it doesn't need review, just push it.

Uhh, no sir, I'm not doing shit because you've handed me GCC and we're MSVC.

After I bitched endlessly to the CEO about that he said I have final say on what goes into the project.

noxypaws@pawb.social · 17 pts · 10h (4 replies)

I've had my CTO send me code at 3 AM

I hope you don't even respond until your next normal working hours!

veryblandusername@fedinsfw.app · 11 pts · 9h (3 replies)

I love my job, even when I have to deal with nonsense like that and I'm compensated very well to be on call 24/7.

NocturnalMorning@lemmy.world · 5 pts · 5h

No amount of money would make me put my health at risk like that. Been there at a job before where I was always working. No thanks.

noxypaws@pawb.social · 2 pts · 6h (1 reply)

that sets a really bad example. you shouldn't do that to yourself and you shouldn't allow it to happen to anyone else.

calcopiritus@lemmy.world · 5 pts · 6h

He knows best what's best for him. If he's explicitly paid extra to be on call 24/7, and he's happy with that extra. Let him be om-call 24/7.

There are situations and jobs where 24/7 availability is needed. Someone has to do it. And if that someone believes he's getting enough of a compensation for it, there's nothing wrong with it.

boonhet@lemmy.zip · 2 pts · 1h

we're msvc

Then switch to a real compiler on a real operating system, duh

MonkderVierte@lemmy.zip · 1 pts · 1h
[ removed ]
eager_eagle@lemmy.world · -2 pts · 11h (7 replies)

well, that depends entirely on your prompt/process, it can be done

Nalivai@lemmy.world · 8 pts · 9h

With enough seniour developer's time and dedication you can spend days and enough water to flood a town, so you can badly maybe do something that a junior dev can do already (your shit will still be worse). If that's not an achievement of a modern technology I don't know what is.

veryblandusername@fedinsfw.app · 4 pts · 9h

It can but I'm not looking to make things even more complicated. We have enough unexplained non-sense in the project as is, having to link it correctly is just endless pain that I don't want to deal with.

idriss@lemmy.ml · 2 pts · 4h (4 replies)

Just more prompting will do + make no mistake

eager_eagle@lemmy.world · -2 pts · 3h (3 replies)

unironically, a better prompt does yield better results - shocking, I know

Axolotl_cpp@feddit.it · 2 pts · 2h (2 replies)

Unironically Claude (or whatever you use) will almost always deliver code that is shit, it's just less shit if you prompt it better, LLMs are good to make short snippets if you get stuck; And remember to fucking check what the code is and rewrite bad shit

eager_eagle@lemmy.world · -1 pts · 2h (1 reply)

I've seen plenty of code in my life, from humans and AI.

For the past year or so, these agents can code just fine most of the time, as long as they are given enough context (or have the tools to get it). Regardless of how many downvotes I get here, they really are capable of generating decent code. I'm sorry you couldn't make it work yet.

Eheran@lemmy.world · 1 pts · 24m

But AI bad and human code is so awesome! Better downvote. But seriously, there are people here saying that LLMs can not add anything of value in any way. About as delusional as Republicans.

bdonvr@thelemmy.club · 39 pts · 10h (8 replies)

No

You ask your LLM of choice to look it over, completing the shit-cycle

Supercrunchy@programming.dev · 9 pts · 5h (7 replies)

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.

onlinepersona@programming.dev · 4 pts · 4h (5 replies)

How is bun doing btw after their "We used 60 agents and 200k in tokens to rewrite in Rust" ?

ThirdConsul@lemmy.zip · 5 pts · 4h (4 replies)

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.

MonkderVierte@lemmy.zip · 2 pts · 1h

Uh oh, new workaround against copyleft on zhe horizon?

eager_eagle@lemmy.world · 2 pts · 2h (2 replies)

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 · 1 pts · 2h (1 reply)

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 · 0 pts · 1h

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

ThirdConsul@lemmy.zip · 2 pts · 4h

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

rounding_error@lemmy.today · 34 pts · 14h (3 replies)

LGTM

Mac@mander.xyz · 30 pts · 13h

Let's Go Topple the Monarchy!

floquant@lemmy.dbzer0.com · 18 pts · 11h (1 reply)

Let's Gamble, Try Merging is my favourite

MountainVeil@slrpnk.net · 1 pts · 59m

Dung ahead, try madness

laurelraven@lemmy.blahaj.zone · 27 pts · 9h (1 reply)

That's an automatic reject from me, that's not a patch, it's an overhaul

chris@l.roofo.cc · 5 pts · 2h

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.

AdamBomb@lemmy.world · 26 pts · 10h

🛑 Changes requested

Too big. Break into smaller individual PRs.

floquant@lemmy.dbzer0.com · 26 pts · 13h

It is not even peer review anymore, unless we are pretending that claude is our peer.

yessikg@fedia.io · 26 pts · 11h

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

skisnow@lemmy.ca · 22 pts · 5h (3 replies)

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.

Blackmist@feddit.uk · 29 pts · 4h

Almost as if they're paid by the token...

tetris11@feddit.uk · 3 pts · 4h

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

onlinepersona@programming.dev · -5 pts · 4h

2 years and they still don't know how to prompt...

JordanZ@lemmy.world · 19 pts · 6h (7 replies)

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.

ragas@lemmy.ml · 5 pts · 5h (1 reply)

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

pupbiru@aussie.zone · 2 pts · 4h

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

BlackRoseAmongThorns@slrpnk.net · 3 pts · 5h

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.
onlinepersona@programming.dev · 2 pts · 4h (3 replies)

> 1k lines = LGTM

ThirdConsul@lemmy.zip · 3 pts · 4h (2 replies)

> 1k lines in internal tool = idc, do what you want.

> 1k lines in critical path = lol no.

onlinepersona@programming.dev · 8 pts · 4h (1 reply)

Who cares? It's company code. They want AI, they get AI 🤷

ThirdConsul@lemmy.zip · 4 pts · 3h

I get the blame and I have not lined a new remote job yet. So there.

einkorn@feddit.org · 10 pts · 12h

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

Psythik@lemmy.world · 9 pts · 8h (2 replies)

This is a joke I'm not college educated enough to understand.

khannie@lemmy.world · 19 pts · 7h

It's basically saying "insert one ass loads of code in one go, all written by AI".

luciferofastora@feddit.org · 7 pts · 4h

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.

CookieOfFortune@lemmy.world · 4 pts · 5h

If LLM can make big PR, LLM can split PRs

MousePotatoDoesStuff@piefed.social · 3 pts · 2h

LBTM, rejected instantly.

dylanTheDeveloper@lemmy.world · 3 pts · 2h

No Mr Bond, i expect you to approve

Daywim@lemmy.world · 2 pts · 20m

Merge that shit, watch it all collapse, enjoy your forever holiday

flb@reddthat.com · 1 pts · 8m

Our PR checks auto reject the PR if it has 1k changes

thesdev@feddit.org · -10 pts · 13h

Peer review? Aah you're referring to the Math proof Astra did the other day.

FaceDeer@fedia.io · -17 pts · 13h (9 replies)

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,

voidsignal@lemmy.world · 34 pts · 12h (6 replies)

This one weird trick will blow your mind: Just add "do it correctly" to your prompt!

FaceDeer@fedia.io · -4 pts · 12h (5 replies)

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.

Zarobi@aussie.zone · 8 pts · 12h (2 replies)

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 · 5 pts · 5h (1 reply)

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.

Zarobi@aussie.zone · 0 pts · 5h

We need a real "deep dish pepperoni special" refactor into Rust

floquant@lemmy.dbzer0.com · 2 pts · 11h (1 reply)

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 · 1 pts · 11h

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.

OwOarchist@pawb.social · 5 pts · 12h

Skip a step and have your agent reject the PR for you.

MonkderVierte@lemmy.zip · 2 pts · 1h

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.