Code Review, Is it worth spending time?

Code Review, Is it worth spending time?


Recently, I have been asked to check and deploy a process for Design and Code review in many different projects. All projects already have this process in place either officially or un-officially. When I said process some Engineering managers said, do we really need this as a process? We are already doing it on a need basis, and we have static code analysis tools in place. So, is it worth wasting two developers (Reviewer, Author) for Code review ?

What tools can do? 

  • Check the code follows conventions like lines of code/ per method
  • Variables or method naming conventions 
  • Unit test coverage %
  • Find Duplicate Code
  • Cyclomatic complexity [Some smart tools does this too…]

Then I thought what HUMAN brain can do, NOT any tool, 

  • Have the customer requirements met ? 
  • Possible use of a Design Pattern [ Strategy, Decorator or Observer ]?
  • or a Design principles like SRP, OCP or LSP ? 
  • Is it an Anti pattern ? 
  • Use of existing library [ gson, Jackson, etc]
  • Domain Knowledge
  • Project Experience [ very important to understand the implications and regressions of the code ]                                                                                                                                   last but not least 
  • Knowledge Sharing

Your list can grow much bigger than what I have written. I feel though you have Analysis tools of your code and they definitely help you improve your code, you need somebody who is senior to you in the project and technically sound to have a look at your code and give you a fair way to improve your code. 

Please share your thoughts and experiences. 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s