If you are reading this post as a software developer, you might understand what I mean. Code reviews are integral part of any software development process. Any good professional develop will never say no to code reviews and unit tests. (I am an iOS developer and I am going to spare UI tests for the sake of this post)
Why code reviews matter?
- They help you uncover subtle bugs
- Help discover security flaws which otherwise might have gone unnoticed
- Give you the tip from fellow senior developers
- Make you more conscious before pushing the code on remote branch
- Reduce the sloppiness and carelessness that one might otherwise be victim of had code reviews been not so prevalent
- If things are hard to change, they can always be placed in the backlog of bugs to refactor later
- Fuel the discussion among developers on things everyone has dear to their hearts
- Enforce and ensure coding standards and best practices
- They let reviewer and reviewee take ownership of code going into the main repository
Long before I started development, neither I used git and nor the code reviews. Looking back at that now I feel how much loss I was at. There was one instance when I lost my whole day's worth of work due to lack of version control and countless number of things which shall not be named are still in my personal repository. Had it been code reviewed by someone senior to me, things might not have turned so bad.
However, speaking of code reviews, reviewer matters a lot. You do not want to get your code reviewed by someone who is lenient, ignorant, lazy or lacks the proper knowledge about the code being reviewed. Good reviewer should see things that ordinary developer will never see. They are not limited to standards, misspellings or conspicuous aspects of the code. He/She looks at the code from future point of view - if relevant change will be stable over the course of time or they break other parts of the app.
I have met a lot of reviewers who are too pushy on the insignificant issues. Just because they follow certain standards, other developers don't have to follow the same practice unless there is one global standard for said change or code is really bad. Rather than saying "Just do it", they should have reasoning why the change would serve good and plus it should make sense.
In my opinion, the only thing worse than un-reviewed code is code reviewed by the person who could not care less about code under review
As far as my experience goes, each full job I had so far I had at least two fellow developer who were best at reviewing code. I was surprised to see how they caught mistakes which I am certain majority of people wouldn't even pay heed to. This is one of the cases when I feel good when other people catch problems in my code or at least raise an alarm. If I am vying to be a better developer, I should be looking up to people who are great code reviewer
Not a surprise - people who are good reviewer are also great mentors. Their ability to understand things and explain it to others in lucid language makes them extraordinary and indispensable team resource.