Code Review Tips

#1: Review your own code

Before you ask someone else to review your code, make sure to review it yourself. Most likely, you'll find code remnants that you didn't intend to be included in the final production code.

#2: Remove spurious changes

In a typical code review, it is quite common to find that whitespace (spaces, tabs, carriage returns) has been added or removed in existing code, where those whitespace changes are strictly unrelated to the code changes required to fix a bug or implement a feature. Those whitespace changes should be removed, allowing the code changes to focus only on the task at hand.

Of course, there will be occasions when whitespace does need to be changed — for example, when modifying code to enforce standard coding conventions. In those cases, you should submit a code review that contains only whitespace changes.

In short: don't mix functional changes with aesthetic changes.

#3: Include an overview

When you submit your code review, make sure to include an overview that explains the changes and how they address the task at hand (fixing a bug or implementing a feature). Although it might be obvious to you, it might not be obvious to the reviewers. (And, it might not be obvious to you at a later date.)

Source: http://www.finitewisdom.com/people/joshua-...