Star Trek Programming

Whenever I think about the future of software I always think about Star Trek. What does software look like in 200 years or more? Here is something I would not expect to find in the software world of Star Trek: Writing programs using ASCII text into files.

For us today the act of programming is:

  • Write some characters into an ASCII (or UTF-8 if your picky) text file.
  • Run some other software over that file to either directly execute it, and/or.
  • Translate it into a "binary" that is executed by a machine (hard or soft).

From that pattern emerges several artifacts that we take for granted must exist:

  • We have text-based version control (git) for our source files (text).
  • Where we write the software and where we run it are different places (machines).
  • Writing the software and running it are completely separate acts.

And the last point is key: I would go out on a limb and make the (completely unsubstantiated) claim that 99% of software bugs are caused by the fact that every programmer is expected to simulate in their mind the act of running the software while they are in the process of writing it. I will go further: Because writing software is a serial event (characters are placed one after the other in a source file) and running software is traversing a tree in a non-serial fashion, there is a huge mental disconnect in the mind of the software programmer as they are writing the software.

There exists an edit-compile-run-observe loop, manually executed by the programmer as they write the software. In environments like the Javascript console.

There are some powerful advantages to using text to represent software source code:

Data Input

In data input there are two factors at play:

  • Baud rate - how fast the data can be transmitted.
  • Cardinality - how much useful/unique data can be transmitted.

The keyboard is an excellent input device with a relatively low baud rate, but a very high cardinality. A mouse has a relatively high baud rate but a very low cardinality. Programming using a mouse produces a lot of input data but not much of it is useful. Take for example clicking a button on the screen: There are hundreds (or thousands) of X+Y combinations that land inside the button, meaning the mouse can produce far more data than can actually be used. If every button was 1 pixel wide then every movement of the mouse would have some unique meaning to the computer and the cardinality would increase - but obviously the system would become unusable.

Voice input has some interesting characteristics: high baud rate, high cardinality. I don't mean speaking a human language into a computer. A phonetic language. Now imagine a programmer cubicle farm with voice input! Perhaps sensors on the neck can detect tiny motions in our larynx as we think the code.