Code reviews are - or they should be - an important part of any software creation process. They allow people get to know better the different code bases within their companies. Also, they learn from others and try to understand the reasoning, trade-offs and solutions about a somewhat complex problem. Moreover, people strive to improve each others’ code: “Hey, we should add some tests here”, “Shouldn’t we use a functional interface here? It would make the code more readable”, and a lot more comments like these are common in such process.
I’ve been doing a lot of code reviews lately. I must say that I really enjoy it, although it’s a very time-consuming and exhausting task. Why? Because you may need to change the context of your daily tasks to another different project; Then, you need to understand a solution proposed by someone and, most important of all, give feedback about it. If possible, you should try to find something that can be improved. The point here it’s not to be picky, but to set the bar really high within your organization.
No one achieved excellence when setting the bar low. Cristiano Ronaldo, Messi, Lewis Hamilton, Mohammed Ali and others didn’t achieve excellence aiming for mediocrity. We should try to follow their example. We won’t be inspired every day. Sometimes we will make mistakes or we won’t think about a better solution to a problem. That’s totally OK. Because your colleagues - your team - get your back covered in their code reviews. I usually say that we have two options in our career:
Of course, not all of us are Messi or Cristiano Ronaldo. I’m certainly not close to neither of them in my area. That’s fine. What really matters, at the end of the day, is to strive to improve and to learn everything you can from the people around you. It’s about attitude, not only skill.
After reviewing a lot of code, I’ve came up with some advice that I try to follow every day:
The list could keep going on, but I think the most relevant aspects are covered with these points. If you look at them, they are nothing more than a derivative of politeness, education and respect towards your pairs. A company is made of people. If you make them comfortable while trying to push their limits, you may end up with an excellence culture and a great workplace too. Go for it, try to improve yourself and make everyone better around you!