CODE REVIEW
CODE REVIEW
CODE REVIEW DEFINITION:
Code review is systematic examination(sometimes referred to as peer review) of computer source
code. It is indented to find mistake overlooked in the initial development phase, improving the overall
quality of software.
Code reviewers primarily verify the following parameters:
•Design – Is the code well designed?
•Naming conventions – Did the developer use readable names for classes, variables, and methods for
easy of understanding?
•Comments – Are the comments meaningful and clear?
•Complexity – Can the code be made simpler? Will it be easy for future developers to understand the
code?
•Tests – Does the code include required and correctly crafted automated tests?
DIFFERENT APROACHES OF CODE REVIEW:
Formal code review
Light weight code review
FORMEL CODE REVIEW:
Formal code reviews are the traditional method of review, in which software developers attend a
series of meetings and review code line by line, usually using printed copies of the material.
Formal inspections are extremely thorough and have been proven effective at finding defects in
the code under review.
LIGHT WEIGHT CODE REVIEW:
Better code: cleaner, fewer errors, sensibly designed and it take less time than the formal method. Some
times still needed, negative emotion can also appear.
Why do we do code reviews?
One might think of code review as just another routine check for identifying common
bugs. However, that’s not true. Code review has many more benefits to offer than just the
identification of bugs. Listed below are key benefits achieved using the code review
process.
Benefits of Code Review
INCREASING CODE QUALITY:
We put a strong emphasis on the quality of our software. Some of our apps are used in the
medical sector by doctors and patients. They need to be 100% reliable, stable, maintainable,
testable and easily extendable. No developer is perfect, but everyone is different and has a
unique perspective. Code reviews enable us to discover possible bugs or architectural flaws early
on, before even manually testing and delivering the app.
LEARNING:
As developers, we never stop learning as our programming languages and concepts
constantly evolve. Code reviews are an important part of that learning process for both the
reviewer and the reviewee.
The reviewer often discovers new ways of solving a particular problem while reading through
the code or asking questions.
The review receives important feedback and valuable suggestions on how to write cleaner or
more efficient code.
KNOWLEDGE EXCHANGE:
Code reviews are also a great means of project- and company-specific knowledge exchange. When
developers get on boarded on a new project, code reviews help them to understand the structure of the
code faster. They implicitly learn how “things are done” in this project. While it’s always advisable to have
the most important guidelines written down in a Reade file or something similar, code reviews speed up
the process of “diving in”. Long-time developers benefit as well, because they become aware of the most
recent changes in the code base.
BENEFITS OF CODE REVIEW:
The code review process helps them gain the right feedback from the senior developers and
consequently helps them how their coding skill sets. Additionally, it also helps identify critical mistakes or
errors that can eventually lead to serious bugs.
DISADVANTAGE:
The first one is the process length because some people have to spend time reviewing the code while
others have to fix it. The other disadvantage is the increased project implementation cost since the
developers' time has to be paid.
Thank you !