Code review is great for ensuring best practices and educating developers. If you follow a basic set of principles, such as:
then you’ll likely enjoy the benefits of code reviews.
People practicing code review sometimes feel it gets time-consuming. This can be due to an inappropriate work distribution if one developer is assigned to review all the Pull/Merge Requests (PR/MR).
But it can also be explained by the frequent repetitions of explanations on best practices and coding standards. If a developer did not follow a best practice, you would write a comment in the PR. The PR author will then fix the problem, and finally, you’ll merge and close it.
However, you can’t be sure that another developer won’t make the same mistake later, and you’ll have to write down the same comment again. This happens because most of the code reviews remain within the scope of 2 persons: the author et the reviewer.
I’m sure you already thought:
“This comment I’m writing would be insightful for everyone in my team.”
However, developers not involved in a PR don’t get through it.
Let’s find out a simple way to overcome that problem. First, you can just install the Promyze web browser plugin for Chrome, Opera, Edge, or Firefox. Once the plugin is ready, you’ll see this new button during a PR review:
In the Promyze terminology, a “best practice” is a coding principle that should be followed in your context regarding either language/framework usage, an architectural principle, any rules regarding performance, security, green-IT, testing. Thus, it could be any relevant knowledge in the context of your project or your organization.
In our example below, we highlighted that using the framework “moment.js” is not a bad practice, but we should use a dedicated service that manipulates dates in our context.
This simple action you’ve made will send the best practice proposal to the Promyze platform. Then, you’ll gather with your team for a workshop (1-hour max), usually happening twice per month (but of course, you decide on it), to review all contributions made by you or anyone in your team. Each contributor will explain their point of view, and in case this best practice is new in your Promyze workspace, you’ll have to either validate it or not. Such discussions are beneficial for learning from each other and making sure knowledge is spread across people.
Bonus: Promyze also offers plugins for IDEs (VS Code, JetBrains suite, Visual Studio, and Eclipse) to do the same job 😉
Thanks to this workshop, you made everyone in your team benefit from your knowledge and code review comments. For the following PRs, you’ll save because:
Simply create your workspace on Promyze and start your trial with your team. If you have different teams in your company, you should know that Promyze has been designed to share best practices within a team and a whole organization.
Promyze, the collaborative platform dedicated to improve developers’ skills through best practices sharing and definition.
Crafted from Bordeaux, France.