6 Nontechnical Best Practices for Better Code Reviews

6 Nontechnical Best Practices for Better Code Reviews

A list of little things you can do to make your code reviews smoother. Index Terms—Code review, non-technical factors, personal and ... aims to improve the quality of source code changes made ... practice the execution of this process can be affected by many different ... In this paper we considered the top five organizations con- ... for 18% of all developers and 6% of the patches in our data.

The code review is simply one of the best software development practices. It provides many benefits, such as finding bugs, improving the quality, and sharing the knowledge throughout the team.

Performing code reviews isn’t straightforward, though. As a reviewer, you need to put yourself in the author’s shoes by understanding the context, how things work, and the purpose of the changes introduced and then following the technical solution.

You may need to do even more than the author, like finding bugs, searching for alternative solutions, and comparing them. Coming up with a solution is one thing; seeking out more and comparing is another.

The difficulties of code review aren’t limited to only technical reasons. A code review involves communication between multiple persons, emphasizing the need for critical thinking.

And most humans don’t do well when it comes to coping with criticism. Therefore code review becomes a slippery slope. A comment can either ruin or brighten the day of the author. In this article, I want to list six tips that help establish a delightful code-review experience for both the author and the reviewer.

1. Use Emojis

Code reviews are often an asynchronous, textual communication process. But some aspects of communication, such as emotions and intentions, are often lost while writing. To cope with that, we use emojis in our daily lives, such as when chatting or tweeting. So why not use them for code reviews?

Here’s the emojis we use in our team. A Christmas tree(🎄) means the requested change is subjective and optional, such as personal preferences over variable names. More Christmas trees (🎄🎄) say that the comment is more subjective, and the author can omit them. We use an owl when we want to learn more about a change rather than interrogating: “🦉Why are you using this library here?” We scream (😱) when we notice silly mistakes, such as typos. We clap hands (👏) for the changes we like. And finally, when we complete the review, we celebrate it with 🍻.

We also use ad-hoc emojis to convey our intentions in a better way:

  • “I don’t think this line is correct. Are you sure that it works?”
  • I don’t think this line is correct. 🤔 Are you sure that it works?

It’s not easy to figure out the emotion in the first comment. The author can interpret it as rude or questioning, which can put him/her into a defensive position. But what you want from the author is to investigate and justify the functionality of the commented line. The second comment sets up a curious intention by just adding an emoji to the same sentence.

2. Comment Humbly

Submitting code changes for review can be stressful because someone else will inspect the author’s work to critique it. Developers tend to own the code they write, which can cause the feedback to be taken personally, causing stress. There’s a simple solution to avoid this: Comment with a humble attitude. Below are two variations of input for the same line:

Comment 1: “This is ugly! Why did you use an abstract class here? There’s no need to use it. You should use an interface instead.”

Comment 2: “Is there a specific reason that we use an abstract class here? Using an interface here might be better since there aren’t any default implementations, and it doesn’t extend from any other class.”

Can you spot the differences that make the second comment a better one? Let’s take a look:

Take responsibility for changes as a team

The first comment uses a you-statement. But the second comment uses a we-statement, emphasizing that everyone in a team owns the code and is responsible for the changes, even if one member writes it.

code-quality software-development code-review programming software-engineering

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Software Developer vs Software Engineer — Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

Developer or Engineer? Does It Make a Difference?

To summarise the main differences between the software developer and engineer: A developer executes. ... So the software developer is mainly focused on developing code that is a part of software development cycle. An engineer designs and plans applying the principles of engineering to software development.

Softagram - Making Code Reviews Humane

The story of Softagram is a long one and has many twists. Everything started in a small company long time ago, from the area of static analysis tools development. After many phases, Softagram is focusing on helping developers to get visual feedback on the code change: how is the software design evolving in the pull request under review.

How to tell if your code actually sucks...

There is no better moment for me than starting a brand new project. Everyone is afraid of adding or removing stuff. I guess we all have known at least one project that anyone wants to touch, or heard the phrase:.