Code review advice for the senior reviewers.

Code review advice for the senior reviewers.

A minor vent and a few pointers from a junior.

I understand...

Granted, code reviews are time demanding, add to process(nobody like process, right?) and can cause some tension.. we do not want that. And, code reviews are implemented differently, depending on the company/team size, company policy, if it is a code review for an open-source project or a private company, and defect tolerance. But surely, we can do better... we can do better.

I once came across a code review from a senior to an intern that read

Hello You write very nice and complicated code. If this was a competition on who writes the most complex code, you would win.

defeated.gif

I like code reviews...

There are huge benefits to code reviews, especially for juniors. Code reviews allow us to:

  • Be part of a team. When I get a review, I actually feel like I am being seen and mentored. It feels like progress, an opportunity to grow.
  • Share knowledge. I get to know what you know, you get to know what I know. I get to see how you would do things and why. Seeing in my code, what someone is thinking is FUN.
  • Share code. It becomes our code, the team's code. "We" are responsible for finding bugs and code quality.

Now that I put that out there, I ask of senior reviewers...

My asks...

  • Please remember, code needs to fit company style and guidelines, not your personal style and preference.
  • Help me write better code, not code that you would write.
  • Can my mistakes please not get me in trouble? Code reviews should not be brought up in performance reviews.
  • Make them positive. When code reviews are positive, juniors look forward to them, we want them.

Okay, I am done with the vent. Allow me to give a few pointers.

Hear me out...

  • Please be nice. Be kind. Yes, it is a review, can it be a nice review.
  • Be objective. Leave "You" out of it. Rather "This method", "Doing it this way" etc etc.
  • Ask questions, don't give answers and give suggestions. Ask questions that will require thought and research. I learn along the way and may come back and ask more questions. Then there is a constructive conversation.
  • Please do not say "obviously", that is obviously not nice. If I knew better, I could have done better.
  • Give clear feedback. How can I improve? Any links or prior work? Where did I miss the mark?
  • Please respond within 24-72 hours, if you can. The code is still fresh in my mind. The momentum is still there.

With that said my fellow juniors, please have necessary conversations with your seniors, or contact HR or another team member if you have grievances. Raise your issues respectively. And find the right time to do so.

To my seniors, please consider having a conversation with your juniors about what you are doing right and wrong. It is an opportunity to grow. I am sure you were once a junior at some point, be relatable. Also, be approachable and create a safe space for juniors to voice out matters.

Cheers... till next time.

Did you find this article valuable?

Support Thandiwe Khalaki by becoming a sponsor. Any amount is appreciated!