Controlling Coding Standards

A middle-sized outsourcing company QArea from Eastern Europe decided to use Duecode in several areas to fix with a coding standards initiative. These areas are:

  • Low maintainability of the code.
  • Developer lock-in.
  • Manager blind spots of what’s happening on the project.
  • Hard-to-measure coding skill sets of developers.
  • Certain surprises come to light too late (usually at the time of the delivery).

QArea’s primary purpose was to start a company-wide initiative for better project control and accountability. It will result in a calmer work process, transparency and early issue identification, less negative risks associated with delivery.

Here are three rules we were starting with:

Meaningful description in the commit comment

Rule

Each comment to a commit should have a short description of what has been done. The amount of symbols >= 30.

Failed

Less than 30 symbols

Coding Standards | duecode.io

This comment doesn’t add any value by having a meaningful description:

Coding Standards | duecode.io

Passed

30 symbols and more

Coding Standards | duecode.io

This comment is OK as it describes what developer worked on:

Coding Standards | duecode.io

Business Value

Without the mentioned ticket, it’s hard-to-impossible to understand what the developer worked on, looking at, and his commits.

It could be that the ticket was not created, so the working developer is doing isn’t tracked at all. As a consequence, it’s impossible to negotiate this work with the client or understand what the developer is working on and how to check his delivery.

Mentioning ticket in the commit comment

Rule

Each comment to a commit should have a short description of what has been done.

Failed

The ticket is not mentioned

Coding Standards | duecode.io

Passed

Ticket is mentioned

Coding Standards | duecode.io

Overview

Coding Standards Overview | duecode.io

Business Value

If a ticket isn’t mentioned, it’s impossible to attribute a code (delivery) to the issue in a tracking system (request). Thus traceability fails. It creates a wide array of issues that attribute to black-boxing the work. Less transparency = more risks = less control = less certain delivery.

Code quality threshold

Rule

The code quality of each commit deployed should have at least B code quality rating.

Failed

Code quality is C+ and lower (yellow, orange, and red zones)

Passed

Code quality is B, B+, A, A+ (green zone)

Overview

Coding Standards Overview | duecode.io

Business Value

Standardized code quality is what we offer to clients. It helps developers that lack experience and skill, get feedback and correct issues.

Code quality is a cornerstone of high-quality delivery as less technical debt = less time spent on fixes = more value delivered to the client.

Conclusion

Duecode helped QArea to bring transparency into their workflow and develop a work habit for engineers. These lead to increased efficiency and productivity. Moreover, now the development process becomes visible for managers, helps them to see what happens with their codebase, and get valuable insights on each developer.

FURTHER READING

- Complete Code Quality Guide

- Code Quality Tools

- Code Quality Metrics

- Code Quality Standards

- How to measure, check and improve code quality:

-- How To Check Code Quality?

-- How To Measure Code Quality

-- How To Build A Website With Good Quality Code?

Updated on April 21, 2021