Code Reviews – Trust Factor in Code Review

code-reviewstrust

How much should a reviewer trust the coder who submits the code for review?

I always have that dilemma of whether I should go test of the changes proposed or should I trust the submitter that he would be knowing what he is doing? Mainly because at the end of the day its reviewers responsibility also.

Code-reviews are not fun always.

Best Answer

No, you don't need to trust them. You were asked to review the code do so, it is not the same as testing it:

  • Is the code clear and easy to understand? (This is my primary concern.)
  • Does it comply with site standards?
  • Does it comply with best practices?
  • Does it do what it needs to do, and only that?
  • Are there edge cases which are easily caught by code inspection? (Off by one, incorrect limits, missing default case, unintended or undocumented case fall-through, etc.)
  • Are there ways it could have been better written?
    • Can you enlighten the developer on better approaches to use on future work?
    • If the code works, it may not be appropriate to apply the changes to the current code?
  • Did they do anything that caught your eye as interesting?
  • Anything else covered by your review standards?
  • Do note things they did well in addition to problems?
Related Topic