Coding standards are simply the rules and practices developers adhere to when writing code. They ensure the code is easily readable, maintainable, and extensible while reducing the risk of bugs. Since code represents the product’s building blocks, it’s critical everyone adheres to agreed-upon coding standards.
Zibtek’s Coding Standards Best Practices
After working with software development teams for over 20 years, coding standards practices remain one of the most hotly debated topics. Is there such a thing as “standard” when it comes to coding? In reality, there are many coding standards, and some of them conflict with each other. People often butt heads, as well. You can put the two smartest people in the room, but the process becomes a real challenge if they disagree on the standards.
Our Practical approach in Software Coding Standards
Because we believe arguing about coding standards is a waste of precious time, we’ve come up with a super practical solution based on a collective aesthetic that:
- Gets the team to come up with and commit to the coding standards.
- Tackles the “why,” i.e., why does it matter?
- Presents “before and after” scenarios so people can get a good idea of what the new code might look like.
This approach allows us to illustrate why we’re doing a particular feature and why it matters to the whole team. It’s also a great way to:
- Train new people.
- Create readable code.
- Create consistency around how to handle things like exceptions, debugging code, and when and where to log events.
Ensuring Adherence to Coding Standards
Here’s how our approach to coding standards ends up being so effective.
- We prioritize the top 5 current things that are most important to the product and the team.
- We do the training, let everyone know what the top 5 are, and then automate as many of them as possible.
- Those we can’t automate are moved into our peer review process, where everyone knows the things they need to look for.
The process runs smoothly because right inside of our tickets and stories, we have checklists going on to show we had peer reviews, and so on. With no one person in charge, everyone holds each other accountable. Eventually the team gets in the habit of identifying the “5 most important things.”
About once a quarter, when the team feels the product is developed, they sit down and look at the coding standards and discuss how things should proceed. You might hear, “Hey, this is what we’re doing right now, but maybe this or that is hurting the product. What other standards do we have that we could be doing, but we aren’t following enough?” The team can then agree on another four or five standards that impact performance and maintainability they want to use moving forward.
The beauty of doing things this way is that it adheres to the principles of the agile process where the team, not just the product, continuously improves.
All in all, we’ve found this to be a truly practical way to take a coding standard, implement it, get buy-in, and continue to improve. After three or four quarters, the code will be in a much better place, a much cleaner place, and the whole team is working to make it better. Then, every new person who joins the team can also be a part of the process, adding what they think is important and buying into it.To learn more about how Zibtek’s collaborative approach to coding standards ensures coding is consistent and easy to maintain, contact us online today to schedule a consultation.