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:
- knowledge sharing is one of the top factors that fuels business performance in the software industry;
- developers spend up to 50 % of their time answering questions and seeking answers;
- knowledge sharing is a common challenge faced by software developers.
The problem: how to boost the emergence of best coding practices?
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.
A possible solution to create new coding standards
Let’s see a simple 2-steps process:
- Developers raise questions or discussion topics from their IDE, asynchronously, without disturbing other developers.
- A team of developers books a dedicated time to review each question, discuss it, and state if it’s relevant to generate a new best practice.
Let’s get started! 🚀
The following use case will be illustrated with the platform Packmind, designed for best coding practices sharing.
#1 Submit questions and discussion topics in your IDE
Packmind 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:
- You'd like clarifications on what seems to be a coding standard, but is not explicit yet;
- You've got a question on the understanding of a pattern or a piece of code;
- You're convinced a best practice is not followed but can't really name it so far, and need your team's opinions.
Here is an example of how you can achieve this with Packmind; 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 Packmind platform, waiting to be reviewed by your team!
#2 Answer questions and discuss topics
With Packmind, 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 Packmind UI, you will create a new coding standard that will enrich your repository in Packmind. 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.
Top comments (0)