You Need to Stop Defending Yourself in Code Reviews
And use them to grow your skills.
--
One of the behaviors I regret most from my newbie beginning as a software engineer was my reluctance to participate in code reviews. It’s not like I had much choice in the matter, but I didn’t like it. I felt judged.
Today I want to talk about why this is wrong and how you can make the most out of these reviews.
Tapping Into a Colleague’s knowledge
As time flew by and more and more code reviews happened with different people, I realized that code reviews are unique opportunities to tap into the vast knowledge someone else — probably more experienced than you — has on certain topics.
And those are opportunities that don’t happen often. For example, if you usually work on Python code and you have an opportunity to work on Kubernetes — the person in your company who is going to review that code is probably very knowledgeable, and you can ask them a lot of questions during the review — not necessarily about your code.
Your Code is ineffective Especially if You’re New
One of the reasons we don’t like Code Reviews when we’re “fresh” out of college or wherever we studied is for the same reason we don’t like it when people criticize us in other areas of life — we don’t like to feel weak or when people judge us. It’s a feeling that our minds don’t like — the same as being attacked.
But I had to learn that my code is pretty lame, and I could have done many things better. And that’s what code reviews are here for — to learn.
If someone is judging you personally during a code review, it’s wrong. The code should be the focus. And there’s a lot to judge about your code in your early days.
Also, sometimes you’ll find that your code is lacking planning for the broader picture — something that a team leader is usually more privy to.
Add Code Reviews to your Second Brain
Most Code Reviews happen on GitHub or some other git software. Your reviewer will leave notes on your code. You’ll often find that those comments are “lightbulb” moments…