Code review is like test-driven development, version control, and brushing your code, in short, it is a systematic examination of software source code. Everyone knows code review or peer code review is always a good idea yet not everyone does that. However, at Bacancy Technology, we review all code changes before they’re allowed anywhere near the master branch, our implicit assumption being that reviews result in better code quality.
In my earlier blog – All Code Is Not Equal: Good Code vs. Bad Code, I have already mentioned that we only follow quality code standards and develop only good codes. However, to maintain that good code, we follow an act of conscious and systematic code review, in the existing development workflow, to prevent the bugs and protect your end users from experiencing the same.
So, What is Code Review?
Code review is the process, by which developers examine source code in order to discover bugs, scrutinize coding conventions, and look for potential bottlenecks and resource leakage. The intent of a code review is to catch bugs/issues/defects before the offending code is deployed to a production environment and to transfer knowledge of implementation details to the rest of the team.
Why code review is performed?
As you might be aware that Agile teams are self-organizing with skill sets that span across the team. This is perfectly accomplished, in part, with code review. Code review helps peer developers to learn the code base, as well as help them learn new technologies and techniques to grow their skill sets. So, when a developer is finished working on an issue, scrum master or senior code developer looks over the code to ensure that violations of standards has not been overlooked.
Reviewing application, functionality, behavior, workflow, user interface, or any other application design issues is not part of the code review.
When Code Review Is Performed?
The Code Review is conducted and documented after every sprint or it is also performed when a developer finished his work on a particular issue. So, generally it is performed at the end of the construction, maintenance phases and before final user acceptance.
What Is The Standard Procedure To Perform Code Review?
When it comes to performing the code review procedure, I usually follow my own standard procedure. Let me introduce with my own technique.
I usually divide this procedure into 2 different parts
Part One, checklist of the things that automatically “fail” a review:
1. Is this code doing something that should be done? Is this code actually helping to solve the problem?
2. Is this code good enough? Is it readable, maintainable? If somebody else is going to look at this code in a month, will they be able to understand it?
3. Is it ruining anything? Did a programmer remove a feature that was needed?
4. Does this change has a significant risk of introducing a security/safety/privacy breach?
Point no. 2 and 4 and to some extent 1, help with the judgment in the definition of “should be done”, “good enough” and “significant”.
Implicitly, to answer above questions I simply go with “why” and the “how”
Part Two – I consider more things to reach on certain judgment and it is based on my personal taste.
5. Code style and conventions violations, etc.
6. Bug hunting – personally, I don’t think this is an important part of code review, but it’s a good place to stop one.
7. Unit test coverage
Benefits of code review
- Bug identification
- Thorough error handling
- Better quality code
- Wider project view
- Share the load
Just a like a book author wouldn’t publish a book without an editor’s review; a programmer should never release his/her work without reviewing it. Reviewing each other’s code is a necessary step in any modern development team’s workflow.
Code Review with Bacancy technology is built to make this process swift as well as encouraging. Here at Bacancy Technology, we ensure our team has a common goal to write great code and always ship our projects without bugs.
And, if you are looking for standard based web development tailored to your business needs, developing the good code and standard code review procedures then you have landed on the right page. To know more about you can even talk to our scrum master to now about further possibilities.