DEV Community

Cover image for What is a code review?

Posted on

What is a code review?

Have you ever worked on a project and became so hyper focused the world around you could fall apart and you wouldn't notice? I love those moments and as a new web developer it's when I feel everything coming together and I make a significant amount of progress on a project or a piece of functionality. The downside is of course when something breaks or just doesn't work the way its intended and despite my best efforts of concentration my eyes can no longer decipher the difference between a comma and a period. That's when code review come into play!

Code review is the process of reviewing and approving code changes for collaborators, someone other than the author of the pushed changes. It's basically code inspections conducted by peers working on the same project with a protected master branch.

Code review needs to be taken seriously. Don't treated it like it's depicted in this cartoon!
Code Review

There are tremendous benefits of code reviews. For one, code reviews save time and help to streamline the development process up front. Ultimately the upfront time saved reduces the amount of work for the Quality Assurance teams later. A second set of eyes to review something you've stared at for days can quickly identify simple errors and even catch bugs that might have slipped undetected through testing or production. We all know time is money and time saved is money saved too.

In my opinion the code review process also fosters collaboration. The more I collaborate with others the more I learn too. To me, it's fascinating to watch someone code, troubleshoot and do a code review. It provides an opportunity to witness someone else's approach to coding and their thought process. It's a priceless opportunity for anyone to learn ways to identify common problems or write cleaner code along with useful shortcuts.

For more information checkout the posts in my Reference Guide series: Conducting a Code Review and Complete and Merge a Pull Request.

Top comments (1)

gsandec profile image
Gustavo Silva

I agree with the education perspective but there's more to add here especially when we deal with experienced developers. When this is the case we face a few challenges such as the ego of the developer.

I read in a study they consider Pull Requests (you can read more about this here) a step to validate the technical details they’re sure are correct and this is just an example of what we have to face in a team of skilled devs. The human behavior here already gives us a sense of the discussions we are about to have.