Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 1.43 KB

README.md

File metadata and controls

21 lines (12 loc) · 1.43 KB

Style Guide

What exactly is a style guide?

Before we begin, let us remind ourselves exactly what a code style guide is:

A style guide or style manual is a set of standards for the writing and design of code. The implementation of a style guide provides uniformity in code style and formatting, often covering guidelines regarding indentation, variable and function naming conventions, where best to apply whitespace and so on.

Why is consistent code style important?

They say that good code is its own documentation. We don't completely agree with this (docs are important!), the fact is, the more readable our source code is, the easier it is to maintain.

Following a consistent style guide both helps enforce this concept and improves the overall quality of the code we write. This facilitates other developers stepping in to assist with maintenance more easily and can certainly save time in the long haul.

Readable source code is arguably easier to understand as well. It's easier to browse, locate and fix bugs in and easier to optimize. It can also give us a clearer picture of how the code fits into a larger body of work.

Consistently styled code can:

  • Reduce the lead time required to understand an implementation
  • Make it easier to establish what code can be reused
  • Clarify how updates to an implementation should be styled or structured (remember that consistent code, even when written by a team, should look like one person wrote it).