What is it:
- It is a process of making source code available for other developers to review with an intention of catching bugs and design errors, consistency with overall program design and quality of comments adherence to coding standards before the code becomes a part of the Product.
- It is to review code before releasing software to QA, identifies bugs, discuss changes, share knowledge, encourages collaboration and keeps code more maintainable.
- It is to find and fix mistakes overlooked during the development phase and Improving the overall quality of software and the developer skills.
- A lot of problems can be avoided in a product by catching mistakes early.
- Various forms of code review are pair programming, informal walk through and formal inspections.
- Code reviews can often find and remove common vulnerabilities such as format string exploits, race conditions, memory leaks and buffer overflows, thereby improving software security.
Types of code review:
There are mainly three type code review are present: pair programming, formal code review and lightweight code review.
- Over-the-shoulder: One developer walks through the code written by other developers and provide feedback.
- Pair programming: A type of code review where two persons develop code together at the same workstation.
- Inspection: A very formal type of peer review where the reviewers are following a well-defined process to find defects.
- Walkthrough: A form of peer review where the author leads members of the development team and other interested parties through a software product and the participants ask questions and make comments about defects.
- Technical review: A form of peer review in which a team of qualified personnel examines the suitability of the software product for its intended use and identifies discrepancies from specifications and standards.
- Email pass-around: Here team members can email code each other once developed and send comments back and forth. Source code management system emails code to reviewers automatically after check-in is made.
- Tool-assisted code review: Developers and reviewers use specialized tools designed for peer code review.
Why it is required:
- It dramatically helps in the quality of products but the downside is that development may take longer.
- It saves time, streamlining the development process upfront and reducing the amount of work required later of Quality Assurance teams.
- It can also save money, particularly by catching the types of bugs that might slip undetected through testing, through production, and into the end-users’ machine.
- It creates work environments that encourage programmers to talk with each other about their code tend to foster greater communication and team spirit.
- Distribute the sense of ownership for a piece of code.
- Provide an invaluable educational context for other developers as colleagues demonstrate, through real instances, better ways to write clean code, solve common problems with useful shortcuts and visually identify any number of potential trouble spots such as memory leaks, buffer overflows, or scalability issues.
- It is required to inspire development team to consider implementing a smart, strategic code review process.