3 ms·
In most places I worked recently reviewing PRs was a requirement that came with some sort of certification. The certification usually also imposes some restric
by crabbone 3y ago
In most places I worked recently reviewing PRs was a requirement that came with some sort of certification. The certification usually also imposes some restrictions on how many developers have to review the code, maybe some other aspects too, I didn't really dig deeper into this aspect.
From my understanding of the rationale behind the requirement: it's one more mechanism to ensure better code quality. A mechanism to try to catch errors that aren't "visible" to tests, linters and so on. So, I wouldn't put learning as the central point of PR reviews. Maybe in an organization that cycles through a lot of junior developers that might make sense, but if the team has been working on a project for some years, that doesn't really happen. Not in the quantity that would make a difference.
Now, as to how well it works... In my experience, it can both improve and worsen code quality. I've often been in a situation where PR reviews were made into some sort of tug-of-war power games, where less competent but more senior programmer tried to impose their will on someone less senior. Or just boggle down the whole process by asking to do unnecessary changes to the code to the point of confusing the PR author, which would then lead to a messy code that lacked uniformity and the original intention was obscured by the changes requested by the reviewer.
Essentially, it all boils down to there being no universally acceptable code quality metrics and no formal process that can vet the code. PRs are kind of like mathematical proofs -- they just have to be "convincing enough" for others to believe you, but there's no systematic / formal approach to accomplish this. So, at best, the rules around PRs are the "etiquette", but will ultimately depend on what the team working on the project believes to be the proper manners... Do they like it if you say "hi" in the PR comments? -- it's up to them. Do they want you to be nice, or do they want you to be brief and to the point? -- again, the team decides. There's no higher authority. None that I've ever heard of or would defer to.