ColourisedHere codecomes the science bit v5

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 colourisation and

Ironically, all the apparatus, the decoration of line-numbers and colourisation, its distinguishing features, are all there for human eyes.

And maybe showing it in the way it’s familiar helps.

On the command line, these decorations are at their most prevalent, even though it’s in a context where much of it is unnecessary.

The black background, as if to suggest we are surgically operating on 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 void brain matter of the machine, poking around ephemeral photons, speaking the machine’s own electric language. a few ephemeral photons here and there. href="#annotation- 2” id=“annotation-mark-2”>2

Annotations

  1. 1

Annotations

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