I keep hearing how wonderful code reviews are to help improve the quality of code.  There is a lot of information about how code reviews can improve code design, reduce defects, and share knowledge.  I have participated in a number of code reviews, and I can definitely say they have the potential to be a powerful tool.  My problem with code reviews is not the concept, but the follow through.

I think it can be really easy to implement a code review process, but ultimately it takes discipline to make the process effective.  Like any good idea it is all about execution.  I believe there is a reason some are seeing true benefits from a code review while others are seeing very little in return.

Below are two lists of responsibilities for both the developer and the reviewer.  Of course this is not a list to end all lists, but it is definitely a sound starting point.  If your team can be disciplined to execute on these responsibilities you should start seeing consistent return from your code reviews.

Responsibilities of the reviewer:

  1. evaluate the code and not the developer
  2. understand the requirements and intent
  3. ask to see the tests
  4. review the design
  5. collaborate to find ways to make the code better
  6. be engaged

Responsibilities of the developer:

  1. Do not take feedback personally and be prepared to collaborate
  2. reduce the size and scope of the review by having frequent reviews
  3. communicate the requirements and intent
  4. being willing to talk about the “what” and the “why” you did something
  5. be willing to make adjustments based on feedback
  6. be engaged