Code Layout Matters
From WikiContent
(New page: 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. Presumabl...) |
|||
| Line 1: | Line 1: | ||
| - | 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 | + | 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 | ||
Revision as of 13:44, 22 November 2008
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
