Get the latest tech news

Code review antipatterns


[Simon Tatham, 2024-08-21] Code review seems like a great idea, right? Two developers looking at the same code means two chances to spot problems; it spreads understanding of the way the project is evolving; the reviewer can learn useful tricks from reading the author’s code in detail, or spot opportunities to teach the author a useful trick that they didn’t know already. But that’s only for ‘light side’ code reviewers, who use it to try to improve the code base and the developers’ collective skills.

If you’re in a nearby time zone, or the same one, then to delay the patch properly, you’ll have to arrange to be busy with several other things, so you have a good excuse for it taking you a day or two to get round to looking at each new version. When the code reviewer is in this ‘gatekeeping’ role, it’s not always wrong to criticise the patch on the grounds that it violates an existing general design principle or requirement ( The Guessing Game), without suggesting how the same problem could be solved better. If you genuinely don’t want the patch in the code at all, and you’re in a gatekeeping role with the legitimate authority to make that decision, you can say so in words, so the submitter doesn’t waste any more time on it!

Get the Android app

Or read this on Hacker News