When defined and known by most developers, coding practices help ensure source code uniformity and quality within an organization.
More globally, thanks to recent studies, we know that:
If many IT companies aim to make their coding standards known to everyone, this is not the only challenge to solve.
The first part of the process is to create those best coding practices. You may already lived experiences such as unproductive brainstorming sessions or being stuck in front of a blank wiki page. That’s mainly because our brain needs context, so it’s more relevant to raise your coding standards while you’re close to your source code.
But there’s an important thing to remember: to earn developers’ adhesion to some coding standards, it’s better if they were discussed and decided together. So we need collaboration.
Moreover, developers don’t have the same level of expertise and knowledge for a given source code (remember the intro above). So we need each other to get more expertise and familiarize ourselves with a project’s coding practices.
Let’s see a simple 2-steps process:
Let’s get started!
The following use case will be illustrated with the platform Promyze, designed for best coding practices sharing.
Promyze provides plugins for VS, VSCode, the JetBrains suite, and Eclipse. You can install them from your IDE’s marketplace of plugins.
Now imagine you meet a piece of code where:
Here is an example of how you can achieve this with Promyze; as an example, we consider a developer, Bob, who is wondering what’s the best way to use loggers in your project he just joined.
And that’s sent to the Promyze platform, waiting to be reviewed by your team!
With Promyze, your team sets a ritual to review all the contributions from developers once (or multiple times) per month. Note also that you can define some best practices directly from your IDE or during code reviews.
During this workshop, each contribution is reviewed one by one. In the following example, Bob will explain his question about how errors should be logged in your context.
After some discussions, assume that someone will indicate that a custom service called SuperLogger (don’t do that of course) has to be used. Directly from the Promyze UI, you will create a new coding standard that will enrich your repository in Promyze. Note that you can also add a correction for this example, and also configure the practice to be detected automatically in your IDE.
That’s it, folks! It’s a suggestion on how developers can raise new coding standards through collaboration.
Promyze, the collaborative platform dedicated to improve developers’ skills through best practices sharing and definition