Our Blog

The Coding Compliance Imperative

Oct 11, 2019 Tan Rahman

If you’re a coder, then you most likely know what technical debt is. It’s sometimes known as design debt or code debt. It’s a concept that reflects the implied cost of additional ‘rework’ created later by choosing a quick and easy (sloppy) solution now, instead of a better one that takes more time with the future in mind. This debt is not just caused by the work that is being done now by yourself, but also the code prepared by developers who worked on the same software application before you.

Imagine this. You’re working on a six-year old project which at least twenty different developers have worked on at different times of its evolution. There is a ton of legacy code with different naming conventions and programming styles which makes it difficult to read. This lack of consistency often makes it too hard for new team members to learn which is especially true for fresh graduates and interns.

So how do you tackle this? One way of helping is by applying coding standards and enforcing strict compliance to them. At its core, a standard is a programming style designed to make sure that all developers work a certain way to create code that is easily understood by others. Examples of this are naming conventions, formatting, indentation, comments, documentation, error handling, testing etc. The lines will be properly spaced out and you’ll always know which brackets belong to which function.

‘Consistency has a positive impact on quality!’

With coding standards, a team creates code that has high maintainability and high portability. The readability of the code makes it easier to understand which translates into time savings. This time saving equates to dollars being saved which works towards reducing the technical debt. The new code can be created with compatibility being addressed at the outset.

The day to day benefits are clear for example, easier debugging, manageable code reviews and everyone using the same efficient code. Companies create coding standards for internal use which can help all programming teams to create clean code. Sometimes, the coding standards need to be recognized by the industry that your company is in which is particularly true for security and safety requirements. A good example of this is MISRA where in the case for C and C++ were written specifically for the automotive industry to develop safety-critical applications. Companies will turn to external resources and combine these standards with their own practices. Another good example that can be industry independent is CERT for C, C++ and Java which focus on best practice and eliminating vulnerabilities. The advantage of using these types of global standards is that they have been compiled by academic and/ or industry bodies with input from developers all over the world.

The need for creating code that is vulnerability free is of paramount importance in the digital age and adhering to compliance standards is critical in ensuring the security of your business and of the data that you hold. With consumer data becoming the focus of legislative actions, the security of your applications is of even greater importance to avoid damaging your company’s reputation, and losing untold millions of dollars from data breaches. Imagine how high your technical debt will be if you face a lawsuit in the tens of millions of dollars. Don’t forget, at the heart of many malicious attacks is an error in the source code.

At Xcalibyte, we firmly believe in coders having a quality-first mindset and taking a security by design approach. Compliance to coding standards is crucial for high quality and secure code!