Member-only story
My First Code Review Experience
This week, I had the opportunity to review my colleague’s code for the first time, and it turned out to be a valuable learning experience. I approached it with some guiding principles in mind, inspired by this video, and I’d love to share what worked for me!
🔹 Understanding the Context First
Before diving into the code, I made sure to read the PR description and the related ticket to understand the goal. Since this PR was about writing unit tests for a component, I first analyzed how the component worked and imagined how I would test it myself.
🔹 Comparing My Approach with the PR
I listed out the key test cases I would write and then cross-checked them with the ones in the PR. This helped me spot missing test cases while also learning about tests my colleague had written that I hadn’t thought of.
🔹 Looking Beyond the Details
It was tempting to focus on small things like variable names, but I also stepped back to see how the component connected with others. This broader perspective made the review more meaningful.
🔹 Asking More, Assuming Less
Instead of just pointing out issues, I mostly asked questions. This made the review a two-way learning experience, helping me understand the reasoning behind certain decisions.