Code style and standards guides

In working on large, long-running projects, with dozens of developers of differing specialities and abilities, it is important that we all work in a unified way in order to, among other things:

  • keep code maintainable
  • keep code transparent, sane, and readable
  • keep code scalable.

Where a project is governed by a style guide, this should be learned, understood, and implemented at all times; any deviation must be fully justified.

While consistency is important, equally important is knowing when to be inconsistent—sometimes the style guide just doesn’t apply.

The ground rule is simple: readability is preferential to strict adherence to rules.

Guides available

Style and standards guides are available for:

  • Cascading Stylesheets (CSS), including pre-processors such as Sass.
  • HTML
  • JavaScript, including frameworks such as jQuery
  • PHP
  • XML, including RSS and XSLT

as well as

  • Commit messages (for version control software such as Git)
  • Markdown (for writing documentation)
  • Sublime Text packages (standard packages for developing the DPL).

Digital code style and standards guides