I moved to Toronto last year with family. As it takes time to adjust to living in Canada, I do not have time to blog.

Apart from the Toronto move, I am spending more time working in C++. I spend 50% of my time in writing backend code with C++.

Code review is something that I do not enjoy. But it has a lot of benefits. As a team, everyone gets to know what the others are working on. We bring the code to a state that is agreeable to all with code reviews.

What do you check in code reviews? At a minimum, we check if the variable names are meaningful and whether there are adequate comments about the code. Some people comment about code indentation and formatting.

Then there are some reviews about code organisation. It is important there is maximum reusability in the code. If the same code is used in two places, it should be refactored to a common function and the code at both places should call the common function.

There is a point where the review may be wanting too much. Move the code from here to there. But why? I would move code around only when there is an improvement in performance. If code organisation request is not based on performance or reusability, then the review comment may not be appropriate.

However, there may be review comments that suggest something. These suggestions may be a way for team member to understand the code. Or it may be a good place to discuss things that are related to future work (technical debt).

As a summary, here are the different types of review comments:

  • Meaningful variable, function, class names
  • Adequate documentation
  • Indentation and formatting
  • Refactoring – reusability
  • Refactoring – performance
  • Understand code or technical debt

Related Posts

Leave a Reply

Your email address will not be published.