Last updated · 29 October 2024

Code reviews

We assume you’ve already checked out Technical elements of quality so you know that code reviews are a vital part of achieving resilient and maintainable software.

According to our Maximum freedom, maximum responsibility motto, you should know when a review is necessary. If you’re unsure, it’s always a good idea to ask a peer to review your code. However, there are times when reviewing your own code is sufficient. That’s why we don’t enforce a strict review policy across the company; some repositories may require at least one reviewer for a pull request to be merged. We trust you to make the best decisions based on the project’s conditions, requirements, and risks.

Let’s be clear: we advocate for best practices but steer clear of unnecessary bureaucracy that hinders the project process. We believe in your ability to make informed choices.

Bug catching

Code reviews are essential for catching bugs. While you should always review your own code — a practice that offers immense benefits — it’s invaluable to have someone else look at your work. A fresh set of eyes can provide a different perspective and help identify potential edge cases you may have overlooked.

Knowledge sharing

Code reviews foster knowledge sharing, which we genuinely value. When your peers review your code, they gain insight into the features you’ve developed and how they function. This process also facilitates mentoring and enhances expertise in the relevant language and technology. For junior developers, reviewing code — even without contributing to changes — can be an invaluable learning experience, allowing them to learn from others and grow their skills.

Maintainability

Code reviews are crucial not only for ensuring code resilience but also for making sure it’s readable and maintainable in the long term. If someone struggles to read your code, it’s likely that you’ll find it challenging to revisit it later as well.

Bottom line: we love code reviews. Requesting and performing them benefits both you and the project.

How we carry out code reviews

As always, we’re flexible (surprise!) and our approach depends on the project. When two or more developers are involved, coordinating reviews is straightforward, as everyone is engaged and can easily support one another.

If you’re the sole Front-end Developer, it can naturally be harder to get reviews done, so don’t hesitate to reach out to colleagues from other projects for reviews. At the start of the project, consider assigning yourself a buddy who can stay familiar with your work throughout its duration.

While code reviews often happen in text—leading to feedback that can sometimes feel harsh or cold—we find that a more effective approach is to jump on a call or sit down together for a discussion. This method helps to avoid awkward misunderstandings and makes it easier to communicate, especially for new starters who are getting to know their teammates. Building those relationships early on makes the process smoother and more enjoyable for everyone involved.

All clear? We hope so! Now it’s time to head over to Software documentation (we can hear the groans, but trust us, it’s not as bad as you might think!).