Skip to content

Code Reviews

Jayshua edited this page Feb 3, 2018 · 3 revisions

Guidelines

Code Reviews give us an opportunity to ensure that our code is high-quality. It also familiarizes everyone else on the team with other parts of the game.

Code reviews are conducted once a week on Saturdays, and take no more than an hour (probably less).

  • Each pair should select between 50-200 lines of code for us to go over as a group.
  • Be prepared to explain the flow of the code provided, in detail. (Good comments will help with this.)
  • All of us should have an opportunity to present code. If someone explained the code last review, the other person should explain the next review. Alternatively, a pair can explain the code together.

Checklist

General

  • Can any of the code be replaced with library functions, either C# or Unity?
  • Does the code work? Does it perform its intended function, the logic is correct etc.
  • Is all of the code easily understood?
  • Was the code formatted with MonoDevelop?
  • Is there any redundant or duplicate code?
  • Are there any global variables? (Even member variables could be considered global if they are used that way.)
  • Is there any commented out code?
  • Do loops have a set length and correct termination conditions? Could any for loops be replaced with for-in or LINQ and be clearer?
  • Can any logging or debugging code be removed?

Comments

  • Do comments exist and describe the intent of the code?
  • Are all functions commented?
  • Is any unusual behavior or edge-case handling described?
  • Are all data structures and classes explained?
  • Is there any incomplete code? If so, should it be removed or flagged with a suitable marker like "TODO"?
Clone this wiki locally