In this series of blogs, we will discuss Code Reviews (CR) and their benefits for your development team. We will discuss various review methods and describe the advantages and disadvantages of each one. If you already do code reviews within your team, we have some tips on making them more effective.
Read our Whole Series: 2. Types of Code Reviews / 3. Performing Better Code Reviews
Table of Contents:
- What are Code Reviews?
- Why do Code Reviews?
- Introduction to the Four Types of Code Reviews
- Download the complete Code Review Guide E-Book for Free
What are Code Reviews?
Let’s start with the definition of a Code Review. It is a systematic examination of project source code. The intention of the review is to fix mistakes and improve the quality of the codebase.
The process is undertaken between two parties, the Author, and the Reviewer. We define them as follows:
Code Author Defined
The developer of the code. Typically, the developer is assigned the task of creating or modifying code and then requests a Reviewer to examine it.
Code Reviewer Defined
A person or persons that possess knowledge of the task, and acceptable standards set by the team. The Reviewer evaluates whether the standards have been met. The CR process is also known as Peer Review or Pull Request Review (GitHub).
Why Do Code Reviews?
There are many reasons to implement a solid CR strategy for your organization. Let’s look at some of the advantages of implementing a robust CR process:
- Increased Code Quality by adhering to industry standards and best practices.
- Maintainability – Well tested and reviewed code is easier to hand over to the client or team and troubleshoot
- Accountability – When you are accountable for your code, you gain trust with your team and your client
- Visibility – CRs serve as a tool for the transfer of knowledge as the code changes are visible to every team member.
- Mentorship – Reviews are an excellent learning tool for Junior developers and new team members.
Conversely, ineffectual code reviews can lead to:
- code anomalies
- a reduction in productivity
- alienate your developers
The Four Types of Code Reviews
- Instant Review – This method is also called Pair Programming where both Developers have the same relative level of expertise. In this case, both are coding and reviewing simultaneously.
- Synchronous – In this scenario, the Author would complete a task and ask the Reviewer to examine the code, while the Author walks the Reviewer through it, and describes it. This works well when numerous changes have been made.
- Asynchronous – This is the most common type of CR, particularly when using Version Control software like GitHub. The Reviewer examines the code and makes comments and suggestions within the software. These are directed back to the Author.
- Ad hoc Team Review – Typically, the team would gather for a meeting and review the Author’s code. This allows knowledge transfer to the whole team and can identify possible anomalies that would not have been thought of by a single team member.
Next Steps: Choosing the Right Type of Code Review
In this piece, we discussed the importance of code reviews and introduced the different types of code reviews. For the next piece, we will go into more depth on the 4 different types of code reviews: When to use which and the benefits or setbacks of each.
Performing Better Code Reviews: Free E-Book
We have turned our series of blogs on Code Reviews into a free downloadable E-Book:
- Introducing Code Reviews
- Choosing the Right Type of Code Review
- Performing a Better Code Review
- Code Review in Practice (Only in the E-Book)
- Conclusion and References
More About Indellient
Indellient provides IT Services with expertise in Cloud Services, Application Development, Data & Analytics Solutions, DevOps Services and Training, and Cloud Managed Services. Contact our team for a no-obligation conversation on planning, executing, and maintaining your technical projects.