Peer reviewing is torture now

a month ago by vathecka to c/programmer_humor

Aurenkin 118 points a month ago

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

path: 0 25782151, hotness: undefined, score: 118, children: 4
kubica 128 points a 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.

path: 0 25782151 25782396, hotness: undefined, score: 128, children: 3
FishFace 18 points a month ago

REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

path: 0 25782151 25782396 25784063, hotness: undefined, score: 18, children: 2
_stranger_ 24 points a 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

path: 0 25782151 25782396 25784063 25786951, hotness: undefined, score: 24, children: 1
FishFace 4 points a 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.

path: 0 25782151 25782396 25784063 25786951 25789102, hotness: undefined, score: 4, children: 0
OwOarchist 97 points a month ago

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

path: 0 25783668, hotness: undefined, score: 97, children: 0
Solemarc 95 points a month ago

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.

path: 0 25782458, hotness: undefined, score: 95, children: 13
roofuskit 64 points a month ago

That's because they haven't.

path: 0 25782458 25783967, hotness: undefined, score: 64, children: 1
marlowe221 20 points a month ago

Mystery solved!

path: 0 25782458 25783967 25784361, hotness: undefined, score: 20, children: 0
Jesus_666 19 points a month ago

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.

path: 0 25782458 25784791, hotness: undefined, score: 19, children: 3
bjc 10 points a month ago

forgive them lord, for they know not what they do

path: 0 25782458 25784791 25786877, hotness: undefined, score: 10, children: 1
harmbugler 8 points a month ago

Lord, I wish they knew what they do

path: 0 25782458 25784791 25786877 25789790, hotness: undefined, score: 8, children: 0
moodoovoodoo 1 point a month ago
path: 0 25782458 25784791 25785341, hotness: undefined, score: 1, children: 0
Saganaki 5 points a month ago

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

path: 0 25782458 25784432, hotness: undefined, score: 5, children: 6
MonkderVierte 6 points a month ago

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

path: 0 25782458 25784432 25789504, hotness: undefined, score: 6, children: 5
Saganaki 5 points a month ago

I’m aware. Not always feasible. For example, had to add a custom video capture solution that captures the last 30 seconds of a process for crash handling purposes.

You most definitely need to do add that much comments explaining the mp4 box format along with the box “hierarchy” of what is being written. Add to that MFT (h264 encode) code…

Basically, if anything, the comments are for me for when I look back at that code.

path: 0 25782458 25784432 25789504 25791233, hotness: undefined, score: 5, children: 4
MonkderVierte 1 point a month ago

had to add a custom video capture solution that captures the last 30 seconds of a process for crash handling purposes.

Commanded from above? This smells like a noob idea.

path: 0 25782458 25784432 25789504 25791233 25792133, hotness: undefined, score: 1, children: 3
SubArcticTundra 86 points a month ago

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

path: 0 25783307, hotness: undefined, score: 86, children: 28
veryblandusername 66 points a month ago

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.

path: 0 25783307 25783482, hotness: undefined, score: 66, children: 10
noxypaws 26 points a month ago

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

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

path: 0 25783307 25783482 25784956, hotness: undefined, score: 26, children: 7
veryblandusername 14 points a month ago

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.

path: 0 25783307 25783482 25784956 25785566, hotness: undefined, score: 14, children: 6
NocturnalMorning 11 points a month ago

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.

path: 0 25783307 25783482 25784956 25785566 25787438, hotness: undefined, score: 11, children: 0
noxypaws 6 points a month ago

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

path: 0 25783307 25783482 25784956 25785566 25787237, hotness: undefined, score: 6, children: 4
boonhet 10 points a month ago

we're msvc

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

path: 0 25783307 25783482 25789570, hotness: undefined, score: 10, children: 0
MonkderVierte 1 point a month ago
path: 0 25783307 25783482 25789597, hotness: undefined, score: 1, children: 0
eager_eagle -3 points a month ago

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

path: 0 25783307 25784134, hotness: undefined, score: -3, children: 16
Nalivai 13 points a month ago

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.

path: 0 25783307 25784134 25785588, hotness: undefined, score: 13, children: 0
veryblandusername 4 points a month ago

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.

path: 0 25783307 25784134 25785544, hotness: undefined, score: 4, children: 0
idriss 3 points a month ago

Just more prompting will do + make no mistake

path: 0 25783307 25784134 25788162, hotness: undefined, score: 3, children: 13
eager_eagle -9 points a month ago

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

path: 0 25783307 25784134 25788162 25788831, hotness: undefined, score: -9, children: 12
Axolotl_cpp 8 points a month ago

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 tho; And remember to fucking check what the code is and rewrite bad shit

path: 0 25783307 25784134 25788162 25788831 25789031, hotness: undefined, score: 8, children: 11
bdonvr 55 points a month ago

No

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

path: 0 25784944, hotness: undefined, score: 55, children: 8
Supercrunchy 15 points a 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.

path: 0 25784944 25787762, hotness: undefined, score: 15, children: 7
onlinepersona 6 points a month ago

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

path: 0 25784944 25787762 25788192, hotness: undefined, score: 6, children: 5
ThirdConsul 7 points a 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.

path: 0 25784944 25787762 25788192 25788279, hotness: undefined, score: 7, children: 4
eager_eagle 2 points a 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

path: 0 25784944 25787762 25788192 25788279 25788987, hotness: undefined, score: 2, children: 2
MonkderVierte 2 points a month ago

Uh oh, new workaround against copyleft on zhe horizon?

path: 0 25784944 25787762 25788192 25788279 25789429, hotness: undefined, score: 2, children: 0
ThirdConsul 2 points a 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.

path: 0 25784944 25787762 25788254, hotness: undefined, score: 2, children: 0
rounding_error 41 points a month ago

LGTM

path: 0 25782277, hotness: undefined, score: 41, children: 3
Mac 36 points a month ago

Let's Go Topple the Monarchy!

path: 0 25782277 25783028, hotness: undefined, score: 36, children: 0
floquant 30 points a month ago

Let's Gamble, Try Merging is my favourite

path: 0 25782277 25784284, hotness: undefined, score: 30, children: 1
MountainVeil 1 point a month ago

Dung ahead, try madness

path: 0 25782277 25784284 25789854, hotness: undefined, score: 1, children: 0
skisnow 40 points a 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.

path: 0 25787738, hotness: undefined, score: 40, children: 5
Blackmist 56 points a month ago

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

path: 0 25787738 25787930, hotness: undefined, score: 56, children: 1
rumba 5 points a 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.

path: 0 25787738 25787930 25798835, hotness: undefined, score: 5, children: 0
tetris11 4 points a 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

path: 0 25787738 25788370, hotness: undefined, score: 4, children: 0
onlinepersona -11 points a month ago

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

path: 0 25787738 25788170, hotness: undefined, score: -11, children: 1
GalacticGrapefruit 8 points a month ago

I mean, I don't know how to prompt. Mostly because I don't use AI to code.

path: 0 25787738 25788170 25792914, hotness: undefined, score: 8, children: 0
laurelraven 36 points a month ago

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

path: 0 25785409, hotness: undefined, score: 36, children: 1
chris 8 points a 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.

path: 0 25785409 25789360, hotness: undefined, score: 8, children: 0
AdamBomb 36 points a month ago

🛑 Changes requested

Too big. Break into smaller individual PRs.

path: 0 25784859, hotness: undefined, score: 36, children: 0
JordanZ 35 points a month ago
path: 0 25787140, hotness: undefined, score: 35, children: 18
ragas 8 points a month ago

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

path: 0 25787140 25787554, hotness: undefined, score: 8, children: 2
pupbiru 6 points a 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

refactor 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

path: 0 25787140 25787554 25787997, hotness: undefined, score: 6, children: 1
ragas 1 point a month ago

Oh I totally agree with you. However I tried pitching the whole integration branch idea to my team and they didn't really like it that much for whatever reason. We now just stack small feature branches on top of each other (to build the whole feature) and integrate the parts directly to master.

path: 0 25787140 25787554 25787997 25790628, hotness: undefined, score: 1, children: 0
GalacticGrapefruit 6 points a 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.

path: 0 25787140 25792802, hotness: undefined, score: 6, children: 7
JordanZ 8 points a month ago
path: 0 25787140 25792802 25794889, hotness: undefined, score: 8, children: 1
GalacticGrapefruit 2 points a month ago

Jesus Keyboard, that's a lot.

path: 0 25787140 25792802 25794889 25807505, hotness: undefined, score: 2, children: 0
EowynCarter 7 points a month ago

pro tip for next time : make multiple smaller PR.

path: 0 25787140 25792802 25794864, hotness: undefined, score: 7, children: 0
PolarKraken 5 points a 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).

path: 0 25787140 25792802 25793070, hotness: undefined, score: 5, children: 3
GalacticGrapefruit 2 points a 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?

path: 0 25787140 25792802 25793070 25807721, hotness: undefined, score: 2, children: 2
PolarKraken 4 points a 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.

path: 0 25787140 25792802 25793070 25807721 25809030, hotness: undefined, score: 4, children: 1
BlackRoseAmongThorns 5 points a 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.
path: 0 25787140 25787801, hotness: undefined, score: 5, children: 0
mattreb 3 points a 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

path: 0 25787140 25807799, hotness: undefined, score: 3, children: 0
onlinepersona 2 points a month ago

> 1k lines = LGTM

path: 0 25787140 25788174, hotness: undefined, score: 2, children: 4
ThirdConsul 6 points a month ago

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

> 1k lines in critical path = lol no.

path: 0 25787140 25788174 25788235, hotness: undefined, score: 6, children: 3
onlinepersona 11 points a month ago

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

path: 0 25787140 25788174 25788235 25788274, hotness: undefined, score: 11, children: 2
ThirdConsul 6 points a month ago

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

path: 0 25787140 25788174 25788235 25788274 25788814, hotness: undefined, score: 6, children: 0
SleeplessCityLights 1 point a month ago

When you have ownership of the project you care.

We go by description of the PR. If you can briefly describe the changes you want to merge, We will consider accepting it. If you have two paragraph or more, insta close. If someone has made large changes, there is no way they can have a short description, either break it down to smaller PRs or admit you don't know what you are doing and are trying to merge garbage.

path: 0 25787140 25788174 25788235 25788274 25792352, hotness: undefined, score: 1, children: 0
yessikg 30 points a month ago

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

path: 0 25784551, hotness: undefined, score: 30, children: 1
explodicle 2 points a month ago

Those ethnic slurs in the middle of your PR crossed a line.

path: 0 25784551 25794299, hotness: undefined, score: 2, children: 0
Daywim 29 points a month ago

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

path: 0 25790129, hotness: undefined, score: 29, children: 10
einkorn 13 points a month ago

"So, Daywim. Why did you let this obviously aweful PR pass your desk causing so much trouble for our company? I'm afraid we have to let you go because of this questionable performance." - Corporate

path: 0 25790129 25791040, hotness: undefined, score: 13, children: 9
EffortlessEffluvium 25 points a month ago

What part of forever holiday did you miss?

path: 0 25790129 25791040 25791338, hotness: undefined, score: 25, children: 2
einkorn 9 points a month ago

I interpreted it as "Holiday that lasts forever because the company can't work anymore" but I guess it is meant to mean "Holiday that lasts forever cause you got fired"?

path: 0 25790129 25791040 25791338 25791368, hotness: undefined, score: 9, children: 1
Daywim 9 points a month ago

Yes it was meant to mean fired

path: 0 25790129 25791040 25791338 25791368 25794703, hotness: undefined, score: 9, children: 0
ATPA9 8 points a month ago

"Looks like I overlooked something in this 6k PR full of im meaningless dribble. Why don't you ask the person who comitted the code how he overlooked this bug. Its his respinsibility"

Just throw the the slop creator under the bus.

path: 0 25790129 25791040 25791717, hotness: undefined, score: 8, children: 5
rethnor 9 points a month ago

Throw them under the bus by rejecting their PR. Integrity is your responsibility, the gesture is theirs. They'll get shit for not getting their stuff done.

path: 0 25790129 25791040 25791717 25794421, hotness: undefined, score: 9, children: 0
notabot 8 points a month ago

If you're the reviewer you share responsibility if there's an issue with the PR. Hopefully your teams culture is such that issues like that are treated as a learning experience, rather than a reason to pile on the individuals involved.

path: 0 25790129 25791040 25791717 25793136, hotness: undefined, score: 8, children: 3
ATPA9 5 points a month ago

If you have someone on your team that creates 6k PRs with AI then you are in a loose-loose situation anyways. If you do a thorough review you will be done just in time for the next one and you will get in trouble for not getting your own shit done. So gambling on the PR is probably your best shot at survival.

path: 0 25790129 25791040 25791717 25793136 25793616, hotness: undefined, score: 5, children: 2
floquant 29 points a month ago

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

path: 0 25782882, hotness: undefined, score: 29, children: 0
flb 25 points a month ago

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

path: 0 25790219, hotness: undefined, score: 25, children: 8
Pika 11 points a month ago

is it auto reject, or just doesn't auto approve and leaves it open for manual review

It seems weird that you can't do a pr at all with 1000 line changes, any moderate size feature addition could hit that mark

path: 0 25790219 25790978, hotness: undefined, score: 11, children: 4
theolodis 6 points a month ago

You know, you could just chunk it up in a way to keep it readable.

path: 0 25790219 25790978 25791109, hotness: undefined, score: 6, children: 2
Pika 9 points a month ago

for a new feature request? a PR isn't a commit, it's a set of commits which would add to the line change amount.

Like even if you spread it out across 20 or 30 commits that's still going to be the same line count.

I guess you could push not yet functional or used code to lessen the line count change, but that seems in bad taste. I've always gone off the working repo should always be in build or clean state and a push or commit shouldn't break that.

path: 0 25790219 25790978 25791109 25791228, hotness: undefined, score: 9, children: 1
theolodis 5 points a month ago

I work in a Scrum team and we implement features iteratively, so we start with the minimal feature, merge it, get feedback, and go on from there.

At work there's no excuse to keep a feature in a stale branch until you accumulate 1000 lines of code change.

path: 0 25790219 25790978 25791109 25791228 25798735, hotness: undefined, score: 5, children: 0
kuhli 2 points a month ago

Yeah, 1k is kinda a small limit but I get the logic, you can almost always break changes into smaller increments and not mass merge a mega PR that's hard to review

path: 0 25790219 25790978 25794098, hotness: undefined, score: 2, children: 0
getFrog 4 points a month ago

Stupid question, but what happens to a rejected PR? Because features get built for a reason (there's usually a Ticket/Story for the feature that the PR adds) so do those just get closed? Or does the person have to re-write the code entirely?

I know in my team, the most I could do is tell the coworker to self-review while keeping the PR open until they change some stuff. I have never rejected a PR before because no matter how bad a PR is, it always is technically necessary for the feature.

path: 0 25790219 25790573, hotness: undefined, score: 4, children: 1
einkorn 5 points a month ago

If a feature request requires changes of such a magnitude it is important to break them down into smaller chunks that can be reviewed either independently or sequentially.

I have never rejected a PR before because no matter how bad a PR is, it always is technically necessary for the feature.

Define bad? If the PR contains lots of unnecessary changes such as formatting or renaming simply tell the person to roll them back and come again unless they have very good reason to do so.

If the code quality is bad, well, that's why you are doing the review. If all that matters was "Does it do what it is supposed to do most of the time?" some simple unit tests would be enough. Reviewing code means making sure it does what is supposed to do and does so in an acceptable manner. Criteria can be amongst others speed, security, ease of use or maintainability.

  • Insecure handling of inputs? Add sanitisation and resubmit.
  • Overusage of resource intensive features such as database queries? Group and optimize queries and resubmit.
  • The codes formatting is not according to the internal style guide? Configure your damn linter and resubmit.
  • ...

If you don't want to close PRs outright you can request new commits that fix the issues you identified, reevaluate the PR and decide again.

path: 0 25790219 25790573 25791016, hotness: undefined, score: 5, children: 0
victorz 2 points a month ago

What if you remove some files? 🙃

path: 0 25790219 25791592, hotness: undefined, score: 2, children: 0
EowynCarter 22 points a month ago

Yep.

We have one PR still blocked. Last change is a simple comment from me “Why ?”

path: 0 25794820, hotness: undefined, score: 22, children: 1
grrgyle 8 points a month ago

The most important question that every change must answer.

path: 0 25794820 25810971, hotness: undefined, score: 8, children: 0
dylanTheDeveloper 14 points a month ago

No Mr Bond, i expect you to approve

path: 0 25789076, hotness: undefined, score: 14, children: 0
CookieOfFortune 11 points a month ago

If LLM can make big PR, LLM can split PRs

path: 0 25787485, hotness: undefined, score: 11, children: 2
ZILtoid1991 12 points a 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.

path: 0 25787485 25791436, hotness: undefined, score: 12, children: 0
okamiueru 1 point a 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.

path: 0 25787485 25791140, hotness: undefined, score: 1, children: 0
einkorn 11 points a month ago

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

path: 0 25783699, hotness: undefined, score: 11, children: 0
Psythik 10 points a month ago

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

path: 0 25786245, hotness: undefined, score: 10, children: 2
khannie 22 points a month ago

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

path: 0 25786245 25786453, hotness: undefined, score: 22, children: 0
luciferofastora 8 points a 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.

path: 0 25786245 25788074, hotness: undefined, score: 8, children: 0
MousePotatoDoesStuff 6 points a month ago

LBTM, rejected instantly.

path: 0 25789221, hotness: undefined, score: 6, children: 0
qaz 4 points a 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

path: 0 25809255, hotness: undefined, score: 4, children: 0
verstra 1 point a month ago

Guss Fring used to be a scientist? That a parallel to Walter White! Bravo vince, you've done it again

path: 0 25834312, hotness: undefined, score: 1, children: 0
thesdev -11 points a month ago

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

path: 0 25782616, hotness: undefined, score: -11, children: 0
FaceDeer -17 points a 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,

path: 0 25782524, hotness: undefined, score: -17, children: 11
voidsignal 37 points a month ago

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

path: 0 25782524 25783369, hotness: undefined, score: 37, children: 6
FaceDeer -6 points a 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.

path: 0 25782524 25783369 25783890, hotness: undefined, score: -6, children: 5
Zarobi 9 points a 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.

path: 0 25782524 25783369 25783890 25784052, hotness: undefined, score: 9, children: 2
Supercrunchy 6 points a 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.

path: 0 25782524 25783369 25783890 25784052 25787637, hotness: undefined, score: 6, children: 1
floquant 3 points a 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"?

path: 0 25782524 25783369 25783890 25784312, hotness: undefined, score: 3, children: 1
FaceDeer 1 point a 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.

path: 0 25782524 25783369 25783890 25784312 25784515, hotness: undefined, score: 1, children: 0
OwOarchist 5 points a month ago

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

path: 0 25782524 25783698, hotness: undefined, score: 5, children: 0
MonkderVierte 4 points a 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.

path: 0 25782524 25789456, hotness: undefined, score: 4, children: 0
mabeledo -1 points a month ago
path: 0 25782524 25791130, hotness: undefined, score: -1, children: 1
FaceDeer 1 point a 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?

path: 0 25782524 25791130 25794933, hotness: undefined, score: 1, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
33571
2550
7101

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.

go to feed...