Coding Standards

Welcome to the place that describes our coding standards in detail, with the intent of highlighting all macroscopic and microscopic components to arrangement and placement of code and text. This is a guideline that is strictly adhered to in our repositories, with the intent of being as consistent as possible.

Because of the time wasted following (and being confused by and/or clashing between) multiple standards, this coding standard is made to apply as consistently as possible to a variety of languages. The idea is that following similarities takes much less thought, enabling you to produce code with fewer distractions.

Ranging from best practices to just getting the whitespace and language sorted out, this should serve as a proper rail to roll on for your C++ projects.

Be warned: the coding standard is C/C++ biased, but is written in the hopes being generalised enough to apply to any C-influenced language (e.g.: Java, Objective-C).

Although we supply our coding standards with a free license, we would love it if you could let us know that you're using our standards!

Feel free to drop feedback by simply contacting us!

Tip: Getting Started

On your first read of the coding standards, it is suggested to get the overall feel of the style by going through the following sections firstly, in the order listed.

Basic Principles

We try to err on the philosophy that a coding standard applies to layout and formatting.

For code design you should read up on best practices and generally follow the project's conventions.

That being said, your code should prioritise the following under the umbrella of consistency:

  • Simplicity
  • Usability
  • Maintainability
  • Dependability
  • Cross-platform compatibility

Note that efficiency is explicitly not part of the list. Only make changes for efficiency after measuring the performance with A/B Testing - don't just guess at it, prove it! And focus on not sacrificing anything from the list above, or at least do it in a tasteful and scoped way that makes it well communicated.

Some Best Practices

Outside of the scope of this coding standard are some concepts better described by external sources.

Influences