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.