Code Layout Matters

From WikiContent

Revision as of 19:16, 22 November 2008 by Sf105 (Talk | contribs)
Jump to: navigation, search

An infeasible number of years ago I worked on a Cobol system where staff weren't allowed to change the indentation unless they already had a functional reason to change the code. Presumably, this was because someone once broke something by letting a line slip into the special columns at the beginning of the line. Unfortunately, this applied even if the layout was misleading, which it sometimes was, so we had to tread very carefully when reading the code because we couldn't trust it. The policy must have cost a fortune in programmer drag.

This is a nice example of why code layout matters. I spend much more of my programming time navigating and reading code than typing in anything new. In a system of any complexity, the hard part is often finding where to make the change, so that's what I want to optimise--the change itself is often trivial.

People are really good at visual pattern matching, if the team can keep some kind of

Personal tools