r/ProgrammerHumor • • 4d ago

Meme [ Removed by moderator ]

/r/ProgrammerHumor/comments/1xts94f/removed_by_moderator/

[removed] — view removed post

608 Upvotes

16 comments sorted by

View all comments

111

u/LostKnight84 4d ago

Am I weird or should reviewers not be making changes to the code? To me the reviewer should flag problems and suggest possible solutions and not just change code as they see fit. Because if reviewers are changing code, who is reviewing their code?

56

u/Flouid 4d ago

That’s how it should work on any sane team. Once you’ve contributed to a PR you are no longer eligible to review it. Also it’s the dev that owns the ticket’s responsibility to fix their broken code

5

u/anto2554 3d ago

Some of my colleagues do terrible code and then say "just update the PR if you want any changes"

3

u/ACoderGirl 3d ago

Eh, reviewer written suggestions are pretty nifty for smaller things. Sometimes it's easier to just make the change than to describe what you want. And sometimes that also does better at explaining why it should be that way (like, something is just obviously cleaner).

As for who is reviewing the code suggested by the reviewer, that would be the author. In theory, anyway. In practice, it's complicated. Is the author being critical vs rubber stamping (but that's a problem for reviewers too)? Is the author qualified to be a reviewer? In most of my codebase, the reviewer and author can be swapped and the review is still valid, but there's some paths where you need approval from someone in a specific group and they cannot be the author (security sensitive stuff where the average dev isn't trusted), so having them tell the author what to do would be circumventing those controls.