Code reviews plays an important role to keep code consistent and readable. Code reviews are conducted to maintain quality and simplicity. The bugs should be taken care by automated tests. Code reviews are the best way to learn coding skills from your team members.

In this post, I want to share my opinion on how to write code reviews comments. I read a document Google code review. This document is really helpful to write code reviews comments and how to fix, reply on code review comments.

The variable name, function name or class name style formatting

This type of comments should be taken care by compile time code validation. For example, Android has checkstyle.

Rename class or variable names

When we are suggesting someone to rename something in our code, maybe we can express or thoughts by: why to change name? what are the suggested names?

Code Refactoring

This is especially important part of code review. When you request someone to change approach, please always share the benefits of suggested approach. What is new approach? How new approach benefits over existing approach?