Code Review

in GEMS4 years ago

Being a developer in a team we usually do code reviews as well as get our code reviewed from fellow developers. We usually have JIRA for issue tracking where we create issues and assign the number of days required for it to be completed. If the issue is more than 2 days, we usually create sub-tasks for every day, and thus the issue becomes very easy to track.


PC: Pexels.com

When we finish working on the issue assigned, the code gets reviewed by peer developer and checks things like logical error, requirements fully implemented, code follows existing guidelines, and are tests done. Along with that its always advisable for us to run lint before sending it to code review to remove any lint issues if exists which makes it easier for a code reviewer to review the code.

The importance of using the code review process is that knowledge is being shared between developers if a developer knows some best practices they can use code review sessions to share that knowledge with the team. Also by doing code review, you get to know certain style of fellow developer and thus it actually improves your knowledge about the same.

Since we follow that for every subtask which is like 1 day of work, there will be one code review and thus it helps to better estimate without the reviewer spending too much time on your code. We believe that the code reviewer should spend anywhere between half an hour to 1 hour doing code review and not more than that.

One good thing happens with our team is that not a single person doing code review and thus the code review is being shared between different people whether he is senior or junior in that way everyone gets the benefit of code reviewing as well as code gets reviewed. Everyone has knowledge about code quality and thus they can help their fellow developer to do the same.

A lot of people believe that code review is waste of time, yes though code review is time-consuming for new reviewers if you are a seasoned developer who knows the basic structure of the code, it does not take too much of the time to do code review. Code review though takes time now, but eventually, it saves a lot of time in the long run where all the code is written adheres to the coding guidelines.

image.png
PC: Pexels.com

The problem which I feel with the code review is that people take it on their heart if you try to do code review very strictly, which should not be the case. We all are a learner and thus even if you get comments its better to improve it next time you write code and thus eventually you will become a better programmer. Code reviewer also should not write all the comments in the public domain, if the comments can be viewed by their supervisors like if there is a typo it's better to inform the developer verbal rather than writing it while doing code review.

Do you do code review, what's your thoughts about it?

Sort:  

This post has been manually selected and voted by Indiaunited community. If you are still not in the Indiaunited discord, you can join the Discord Server.

Do you know that you can earn a passive income by delegating to @indiaunited. We share 80 % of the curation rewards with the delegators.

Here are some handy links for delegations: 100HP, 250HP, 500HP, 1000HP.

Read our latest announcement post to get more information.

image.png

Please contribute to the community by upvoting this comment and posts made by @indiaunited.

Reviewing the your code and improving it makes you a good programmer, as you are always trying to improve your thinking. Having clean and well-documented code is essential.
Hug from Portugal 🙏

That's absolutely true, sometimes your thinking is limited and thus code reviewing can help you give different perspective.

The importance of using the code review process is that knowledge is being shared between developers if a developer knows some best practices they can use code review sessions to share that knowledge with the team. Also by doing code review, you get to know certain style of fellow developer and thus it actually improves your knowledge about the same.

I really admire this part. Unfortunately, I don't get a lot of change to do code review in my full-time job. I don't have exposure to different styles of coding. And I have to be honest that code review is definitely time consuming and exhausting task. Sometimes when we look at our own code after several months, it can be breathtaking to read and understand. Reviewing someone else's code is even more difficult.

For people like me who do lots of community projects, this knowledge-gathering part happens only by watching different videos and tutorials from where I can grab different styles of coding. I don't have any peers in my team from whom I can learn best practices and coding skills. I sometimes lookup online or watch some tutorials to get hands-on that. But learning with the team is always great.

Yes, I was facing the same issue with my previous organization where I was the sole developer and I was writing on my own, but after changing the Job we are strictly following the code review and thus people who are doing it are really skilled in it. They do very fast like 1 hour or so, I am also doing the code review sometimes, though its taking time for me eventually I will be better.

Looking in the videos and tutorials is good, I sometimes create pull request in Github there also people do code reviews and thus it helps to learn something from them too.

That's great. I don't have any experience doing pull requests so far. I cannot switch job right now because this one is very comfortable for me. I will try to gain the knowledge and exposure from the external projects itself. So far I learnt it all by myself without anyone teaching me or guiding me. I guess that is going to be the case going forward as well. Let's see. 😀

Yes if you are having a comfortable job then no need to change, I did had comfortable job too but that was too comfortable and thus need to explore more that's why changed.

Lol same here as well. But I really want to do something unique and special to get a financial independence and passive income. So I will stick around in the same job for some time until I find a way for my goal.

I love your content! It is interesting for me how the developers are talking about those codes as something that it’s very easy and for those that are not familiar with them it looks that you are writing in Chinese. 😂

Hahaha, actually the content is all about reviewing other person's code just like reviewing the other person's content.

Everything fits well as a developer. When you are used to and skilled at review works, it's easy to find the missing lines comfortably.

For me it's not as regular as you guys. We are into operations and wont get much of the coding stuff on our plates. But the review things goes in our operational tasks too. Should admit its lot easier as there is nothing much to be creative and all we do is put the process in action.

We get to update codes for few legacy systems may be very few like 1 in a month. Today have a review walk through of small code changes. Being reviews by a 25yr experienced pure technical guy 😁 hope it will be quick and easy on me

Yes more than missing lines what we actually do is to find a flaw in our code if any. Operations is good but again dealing with legacy code is a challenge, you never know what is in store with you when you change something. 25 years experienced, wow I have never met someone who is 25 years experienced and still a developer.

He is our client manager from Brazil who is in same company for all these yrs. He use to write codes for all these legacy store applications then. He is a manager but, loves playing around the code.

Wow good to know