Skip to content

Code Review Guidelines

Julia Damerow edited this page Feb 23, 2022 · 2 revisions

Thanks to Jeffrey Carver for compiling the following guidelines!

For the Code Author

  • Realize that the goal of code review it to improve the overall code, not to evaluate the quality or worth of the developer.
  • Remove the fear of making mistakes and create an atmosphere where admitting and fixing is OK.
  • You are not your code.
  • Be humble.
    • You will make mistakes, we all do.
    • Someone else will always know more, its ok, learn from them.
    • People bring different perspectives, that’s a good thing.
  • Fight for what you believe, but gracefully accept defeat.

Checklist

  • My code compiles.
  • My code has been tested and has unit tests.
  • My code includes appropriate comments.
  • My code is tidy / follows coding standards.
  • I have documented corner cases.
  • I have documented workarounds.

For the Reviewer

  • Focus on the code not the author.
    • Use "I" statements rather than "you" statements.
    • Criticize the author's behavior, not their attributes.
    • Talk about the code, not the coder.
    • Ask questions rather than make statements – avoid "why" questions.
  • Accept that there are different solutions.
  • Choose carefully which battles to fight.
  • Remember to praise good code.
  • Take your time and do it well.

Checklist

  • Comments are understandable and appropriate.
  • Comments are neither too few nor too many.
  • Exceptions are appropriately handled.
  • Repetitive code has been factored out.
  • Frameworks have been used appropriately.
  • Functionality fits the design/architecture.
  • Code is testable.
  • Code compiles.

Clone this wiki locally