The primary purpose of code review is to find code that will be hard to maintain
41–50 of 193 posts
Re: The primary purpose of code review is to find code that will be hard to maintain
#42I think that the for the person who accepts suggestions, it's made me wonder if they accept them in part to share ownership with me. I feel like we both maintain and understand the code, and are on the same page.
For the person who rejects PR suggestions, it makes me less inclined to participate in those PRs. Why spend the time doing a thorough review if it's going to get rejected anyways.
Re: The primary purpose of code review is to find code that will be hard to maintain
#43My attitude has always been that code review is best thought of as the gate where code goes from being owned by the author to being owned by the team or project. The code I'm reviewing is not your code, it is code that is about to become our code. Maintainability is a major factor in that, of course.
Our team started using AI, so I switched to a simple method: no comments, and a binary "is this batshit crazy or passable" approval decision rule.
Saving myself time and sanity.
Re: The primary purpose of code review is to find code that will be hard to maintain
#44Re: The primary purpose of code review is to find code that will be hard to maintain
#45Well kinda - code review needs to identify any missing tests? And without the tests more likely a bug could exist.
Re: The primary purpose of code review is to find code that will be hard to maintain
#46If the primary purpose of code review is to assess maintainability, there is no need for review, that can be done by automated tooling (formatting, bad naming, cyclomatic complexity etc.)
Re: The primary purpose of code review is to find code that will be hard to maintain
#47Re: The primary purpose of code review is to find code that will be hard to maintain
#48The author is a mathematician, so when he says “it is not in general possible to find bugs by examining the code” he does not mean it is completely impossible to find bugs. He means only that it is not possible to find all bugs or even any particular bug.
I would add that (related to your "maintainability" point) ensuring the code is as simple as possible, and thus much more likely to be "debuggable by review", is a goal of review. Even that won't prevent bugs in the absolute sense, as you rightly say, but it boosts your probabilities.
Re: The primary purpose of code review is to find code that will be hard to maintain
#49Re: The primary purpose of code review is to find code that will be hard to maintain
#50What if I told you that understanding what it is doing and finding bugs is actually the same problem?
Though I do think there is value in the original post. Re-framing is a powerful creative tool when you hit a mental dead end. And the responses let people share the other benefits that change management can bring.