Code Review? Who has the time for that?

Bikash Paneru
5 min readNov 27, 2018
Reviewing code the old school way (https://www.flickr.com/photos/bike/29326444782)

Pull Requests (PRs) are a major part of any software development team that involves multiple developers. They help us better compare and track changes in the code. However, I have seen that a lot of software development teams completely ignore one of the most important advantages of PRs: Code Review!

But who even has time for Code Review right? Merging your PR as soon as you push it and continuing on with the development process is so much easier! This is exactly what I used to think when I first entered the world of Software Development. I would just push changes to GitHub and merge. I just didn’t have the patience to request a review from someone else because I was eager to just get my work done.

What I didn’t realize then is that the troubles of not doing code review far outweigh the time saved by it!

Your solution gets validated

There are often multiple solutions to a problem. Sometimes we might think of an easy and robust solution and sometimes, we may just be troubled by our regular battles with life (#developersAreHumansToo) and come up with a so-so solution. When the later case happens, your fellow code reviewer could give you insights on easier and efficient ways to solve the problem or you might get some praise for your easy and robust solution. Either way, it’s a win-win! Also, sometimes, you might have misunderstood the task at hand and done something different. This could also be pointed out by the reviewer.

Bugs and edge cases are caught

When you send an API request but there is a typo in the URL (https://www.flickr.com/photos/girliemac/6508022985/)

This one should be pretty obvious. When someone else reviews your code, they might find some bugs in your code which you may have missed. You may have also missed some edge cases that someone else could point out. If the code you are working on is pretty complex then you can ask someone who has experience with that part of the code to review it. This way you can be even more confident about the changes that you make.

You don’t have to go back to finished tasks again

Have you ever had those days where you are working on a task and suddenly some task that you worked on previously gets declined by QA, or worse, causes a bug on production? Well, you can minimize those cases if you do code review. This is actually one of the direct side effects of the above point. Your code will easily breeze through QA if your code is free of bugs and looks out for edge cases. Your team does QA right? If you don’t then I guess you should wait for my article titled, ‘QA? Who has the time for that?’

You get to know the part of the code you are not currently working on

Remember those times when you have to work on a new part of the code base and you have to spend hours trying to figure out what that code is doing? Well, code review can even minimize that. If you previously reviewed code from a part of this new code then you will have an easier time understanding it. Also, you can go back to the PR that last changed that part of the code and see the discussions there and get a better understanding of the code. Say bye-bye to all the time spent on figuring out what the code is doing!

You get to learn from fellow developers

This is one of the major advantages of doing code review. You actually get to see other people’s coding practices and also get suggestions from your fellow programmers on what you could do better. Maybe someone knows a shorter and more efficient way of doing something. Maybe someone writes extremely readable code, to the point that it looks like poetry. Maybe someone is a healthy combination of the two. You get to learn from all of them and also get to teach new tricks to your fellow developers.

You actually work as a team

(https://pixabay.com/en/save-piggy-bank-teamwork-together-3451075/)

I cannot stress this part enough. A team is supposed to work together. But often, what happens is that each developer is assigned a task and one developer does not know what the other is working on and how they are actually working to complete their tasks. Code review will get you working as a team. It will give you insights onto what other fellow developers are doing and also let you get to know their work process better. This will lead to all the developers growing together, as a team!

I believe that code review is pretty important to delivering quality software, in terms of a better user experience, development process and code maintainability.

Also, if you practice code review then be sure not to just point out the mistakes in someone’s code. Try to also commend them if they saw something you did not see or if you learned something new from their code. Spread the joy! :D

Say YES to Code Review!

This story is published in Noteworthy, where 10,000+ readers come every day to learn about the people & ideas shaping the products we love.

Follow our publication to see more product & design stories featured by the Journal team.

--

--