CodeNewbie Community 🌱

Cover image for How to get the most out of a code review
Cristina {πŸ’‘πŸ‘©πŸ»β€πŸ’»}
Cristina {πŸ’‘πŸ‘©πŸ»β€πŸ’»}

Posted on • Originally published at cristina-padilla.com

How to get the most out of a code review

During my time as a self-taught developer, one of the things that I always missed was interaction: someone I could discuss certain coding doubts with and someone who could give me feedback about my projects. My learning journey started to move much faster when I decided to get a mentor and participate at The Collab Lab, where I built an app in a team for 8 weeks.

This was my first coding experience collaborating with other developers in the same project and one of the things that helped me improve my coding and communication skills was not only pair programming but also doing code reviews.

We were a team of 4 developers and 3 mentors. Each week, 2 developers would pair to work on a task. By the end of the week the goal was not only having the task solved but also reviewing our colleague’s code.

We would start analyzing the task individually and doing some pair programming sessions. Once the task was solved, we would write a PR (Pull Request) with the following information:

  • Description: what kind of issue did we solve? What was the goal?
  • Link to the related issue
  • Acceptance criteria: main pain points to be solved
  • Type of changes: is this a bug fix, a new feature, etc.?
  • A before and after app preview or a short video showing the new functionality
  • A link to the app so that others can test it

Pull request example

See a complete PR example here

After that, our task would be reviewed by the other team and we would also start reviewing their task. The whole process would look like this:

Team code process

What is a code review?

It is an open conversation where everyone has the chance not only to share their knowledge but also to learn from each other.

A code review is also about collaboration: sharing your work and asking questions. It will not only help you become a better developer, but also help your team decentralize knowledge, share responsibility and improve code base quality.

How to get the most out of a code review?

✨ Be kind and empathetic. It is not about criticizing other people's work but helping them improve their code.
✨ Ask questions. It is also a chance for you to learn a different problem solving approach.
✨ Suggest other solutions that can help writing cleaner or more quality code.
✨ Don't focus too much on stylistic changes like β€œyou missed a semicolon or a space here”. There are tools like Prettier for that.
✨ Test the feature locally.
✨ Praise your colleagues!

πŸ‘€ Don't forget that everyone made an effort to solve the issue (even if the solution is not completely perfect), that you are part of the same team and are working together towards the same goal! πŸš€

Oldest comments (0)