DEV Community

Mengjia L
Mengjia L

Posted on • Updated on

Code Reviews

Looking back on my two-year journey as a software engineer, one of the areas where I experienced most growth is code review šŸ”. I knew next to nothing about code reviews when I started my current job in 2022. Thanks to my supportive team members and online resources, Iā€™ve adopted a personal mantra on code review: I Choose the Intent to Learn šŸŒ»

One of the biggest challenges I faced during my early days is my own insecurity. When I was assigned as a reviewer, I would think to myself I donā€™t really think I have anything useful to add because I am still new to everything! Iā€™d have the urge to automatically approve when the pull request creator is a senior engineer, since I believed that I had nothing to comment on a PR of a senior developer.

During a one-on-one meeting with my manager, I shared my feelings about code reviews and he kindly pointed out that I donā€™t need to provide constructive feedback for every pull request, and it is absolutely okay for me to ask clarifying questions if I donā€™t understand a particular line of the code šŸ’›

It was then that I realized that my intention was a bit off when code reviewing. I had the intention of trying my best to spot any potential flaw and therefore providing a useful review. However, code reviewing is not limited to a one-directional activity where one side purely gives and the other side purely receives. It can be a two-directional activity if you set the intention to learn while you review othersā€™ code.

This mindset shift drastically reduced my anxiety around code reviews and also taught me the power of our mindset and intention āœØ. When I choose the intent to learn, I also find it easier to give constructive feedback since my mind is open and calm.

Iā€™ll keep updating this post as I move along in my career šŸ˜Š

Resources for Code Reviews:

  1. Google Code Review Guide
  2. Code Review: Best Practices -- Course

Top comments (0)