A thing or two about style guides

A style guide should be chosen when working on a solo project or with a team. This keeps the code manageable when you or your peers come back to work on it in the future. It doesn’t matter which style guideline you choose as long as you stick with it. In a sense, writing clean code will also help reduce technical debt. Below is a collection of style guides that I collected over time. Some important rules are repeated in other styles. It’s nice to keep consistency (to a degree) if you are writing in multiple programming languages but ultimately it’s best to do what’s best for each language.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

Martin Fowler, Refactoring: Improving the Design of Existing Code

Last updated: Feb 8th, 2015.

General

C++

HTML/CSS

Java

JavaScript

Lisp

Objective C

PHP

Python

Ruby

Scala

Shell

Swift

Vim

Feb 8, 2015 Programming

Support this blog

Buy yourself ANYTHING!

That's right! Shop as you normally would using Amazon.com with my affiliate link and the commissions made go directly into keeping this blog healthy. It's that simple! The hardware and software costs used for this site comes out of my own pocket and it's expensive. Lets keep this site ad free :)

Start shopping on Amazon.com now!

Thank you!
Richard S.