Code review is a necessity, never just a nice to have. Why do I say that? Because it has helped me grow a lot as a programmer. When I started as a junior programmer, I’ve had my code reviewed by many senior colleagues, and I have learnt so much from them. As my experience grew, I took on the role of reviewing the junior programmers, and imparted my knowledge and good practices unto them. There are many benefits to be gained from code reviews, such as:
- Code reviewers help junior programmers learn and grow, as well as enforce good programming habits. If you don’t review their code, you will most probably end up fixing / refactoring their code if quality is bad.
- Getting another pair of eyes looking at your code helps to find bugs. Sometimes explaining what your code does to another person helps you realize you did something VERY wrong.
- It’s a great form of knowledge exchange, not only just in terms of programming, but also business rules and functionality.
- Good form of team bonding and interaction with peers.
- Quality control…nuff said.
Having been through my fair share of reviewing and being reviewed, I thought I would share some of the common pitfalls I have encountered and also been guilty of.