Lost Among Notes

<< Newer Parnas on software project management
Older >> Programming aesthetics

Tabs, spaces, fonts

Spaces advantages:

  • read the same everywhere
  • high precision in character placement

Tabs advantages:

  • fewer keystrokes
  • users can tailor display to their liking

Either choice can be defended. They should not be mixed, however, as that destroys the advantages of both.

Note that if we use proportional fonts, the advantages of spaces disappear. Spaces still give us more precision, but it’s not enough to guarantee proper vertical alignment.
So, use tabs if you use proportional fonts. Therefore, always use tabs, in case others view your code with proportional fonts. Therefore, don’t do fancy vertical alignment. Indent code using tabs as hierarchical markers.

Precise vertical alignment:

  • will not work for proportional fonts
  • for fixed fonts, it requires editor/ide magic to work well

Be gone, fancy indentation. Be gone, auto-indent modes.
In a pinch, you can write code using any text editor.