Here comes the science bit

On this site, I try to emphasise a continuity between text and code. Does code really need to look different from other text? Do we really need to see the line numbers and colourisation, the indentation? Do we need to see it in a mono-spaced font against a black background?

It is useful to have this apparatus while editing a script. The indentation clarifies logical branching. Colourisation is most useful when it goes awry while you’re typing, immediately flagging any obvious syntax errors, and the mono-spaced font can similarly make certain anomalies self-evident. Line numbers are a handy reference when interpreting error messages. Ironically, the most characteristic aspects of what code looks like are all there for human eyes. The machine can very well do without the colours, line-numbers and mono-spacing. 1 But when it comes to merely presenting it, as I do on this site, there can be the temptation to make it look sciency. To present code for effect, like in a Hollywood hacker movie.

There is undoubtedly a certain amount of heritage to this presentation. A certain teletype aesthetic that suggests a pre-Mac time when you needed to know what you’re doing to work these things. When the black background seemed to suggest you were surgically operating on the dark brain matter of the machine, poking around ephemeral photons, speaking the machine’s own electric language. 2

Annotations

  1. 1Indentation has a syntactic value, replacing brackets and braces, in languages like Ruby.
  2. 2Apple and Github have both been pushing away from this.