There are three main reasons why everyone should start doing code reviews today in my opinion:
1) Improves your code's efficiency and performance. ⚡
First of all, when you're writing codes, you tend to always chose the simplest and fastest way. For example, I'm currently writing a new search engine for the site Anime Twist because the one we have right now is running on the browser side and has really bad performance which leads to users with bad devices to have freeze. And I chose to do this task with Elasticsearch, so while I while I was working on the migration function, I was adding each entry by sending a new insert request to the database until my team mate gave me a code review and told me that I should use bulk instead, I knew it but I didn't apply it until someone else told me about it.
2) Enhances your code's quality. 👌
Generally, when we're writing code alone, we don't care much about the quality of the code as long as it works, no tests and no documentation. That's how I always end up doing which is terribly bad especially when you're a back-end engineer like me, you don't know if your code works right without tests. But, when I ask for code reviews and they compliment my code, It gives me a lot of motivation and makes me want to write the best code I've ever written.
3) Security. 🛡
Usually, when you write your code, you think about how it should work but never how it shouldn't work which leads to more vulnerabilities. I'd advice for this one, getting code reviews from the opposite field of development that is going to use your work. For example, back-end developers may not know exactly how their API is going to be used on the front-end so they end up most of the time, making huge mistakes for cause of lack of experience.
Top comments (1)
Yes. Solid. The positive results from this kind of communication are, I think, what motivated DevOps research in the first place.