Tuesday, December 11, 2007

Mindblowing coding guidelines

In their simplest and most common incarnation, coding guidelines seem to be religious dogma about indentation and line spacing.

It's hard to generalise about the über-rational end of the spectrum, because I've only come across one instance. Guidance about choosing variable/function names might typically span a page or two, and discuss capitalisation, word length, etc. Derek M. Jones allocates 90 (out of 1600) to this topic, and discusses memory factors, auditory effects, typing mistaeks, adjective order, and even eye movement during searching vs detailed reading. (Scroll to what Acrobat calls the 712th page, which is near page 304, for a list.) Another interesting discussion about developers, human sciences, probability, decision making, expertise, etc can be found between (Acrobat) pages 90-157, with a particularly interesting "Thatcher Illusion" on page 120.

It's hard to decide whether seeing such a comprehensive discussion is motivating (showing that it can be done) or the opposite (enormous effort required to meet the standard demonstrated). Perhaps it's both.

And now, why not wind down with some programming wit.