Some hate it and some love it. It depends on style and intent of code review done by reviewer or understanding of reviewee.
A great code review can reduce overall development cycle by minimizing bug leaks to higher environments and lead to a high-quality final product. On the other hand, poor code reviewing strategy can add unnecessary latencies in development cycle without mitigating any bugs.
What is code review?
A manual process of reviewing source code developed by a fellow programmer of a team. It can be performed by multiple people or be performed multiple times by the same person for a thorough analysis. Fews steps can be automated using code analysis tools available.
Why do we need code review?
The most apparent benefit is making sure bad code is not leaked to production. Other benefits of good code reviews are standardization, knowledge sharing, security checks, and building a sense of teamwork and collaboration.
How-to do-good code reviews?
- Do I understand what the code is supposed to do?
- Does the code do what it’s supposed to do?
- Can this source code be simplified? Are there any redundancies?
- Are the names easy to understand and descriptive?
- Do the names follow our conventions?
- Can I quickly discern the role of functions, classes, and methods?
- Does the source code use encapsulation and modularization?
- Is it reliant on old functionality or code?
- Does it introduce vulnerabilities? How could I potentially exploit this code?
- Does the code require any documentation?
- Does it meet coding and style standards?
Stick to small PR
How to become better Reviewer
Be Humble -
Critique the Code
No comments:
Post a Comment