The vast majority of our software applications are driven by graphical user interfaces. There is a certain charm, however, to doing, or driving, things using a text file. I’m not talking about things like computer code, or software configurations being written in text files. I’m talking about using text files to drive an application that most people think should be done, or are used to doing, via point and click, drag and drop visual metaphors.
“Charm” of course, is a very subjective word, and nostalgia and Stockholm syndrome are dangerously closely related. However, if you are a child of the age of LaTeX and the pine (or elm) email client, let me regale you with a short list of fairly new software (and some old ones) that still let you use text files to do a task the young people would associate first with a graphical user interface.
Lets start with some age old ones
LaTeX + picture environment.
Many of us, of a certain age, spent hours getting that drawing just right in the LaTeX picture environment. It was built into LaTeX and produced graphics with a certain retro charm. It got the job done, but was a bit of a horror, to be honest.
I was happy to find that there is a new modern package called TikZ that has taken up the baton
You only ran into this if you were an EE. I used Pspice, which is a commercial implementation of the SPICE concept. This is a circuit simulator. Current students are probably exposed only to the point and click interface, that allows you to drag and drop resistors and transistors and chips onto a canvas and then hook them up by drawing wires, but the original was driven by a text file. Your wrote down all your components and their values in the text file and then created a “net”, a list of all the connections between the elements. Then you ran the simulation.
Now lets do two recent ones:
I fell completely in love with this recently. It’s a text driven CAD tool. A lot of us have used CAD, and CAD is the poster child use case for graphical interfaces. There are many grainy videos of amazing computer demos from the 1960s. Some historical guy is demonstrating this amazing thing they’ve built that pushes the ancient computer technology to it’s limit, and it is almost always about how no one is going to use keyboards any more. They will be using mice, or light pens or haptic gloves. And the poster child application is often a CAD. Look how we can design this rocket by drawing three dimensional cylinders! So it is all the more breathtaking to find a modern CAD application that is text driven.
UML diagrams are the mainstay of stodgy, conservative, software engineering houses. I kid, I kid. But UML diagrams, you say, are drawn using Word (shudder!), or perhaps some specialized UML drawing software. I like to draw them using PlantUML, which even has a VSCode plugin that allows you to preview the UML diagram live.
Updates, after feedback from my colleagues on lobste.rs:
POVray creates photorealistic scene renderings. To have POVray ender a scene, the user describes the scene in a text file using the POVray scene description language and then passes it to POVray to do the rendering.
LilyPond enables the user to generate musical scores using textual notation. It is spiritually similar to LaTeX. There is an online editor here where you can play around with creating scores.
The Graphviz layout programs take descriptions of graphs in a simple text language, and print them as diagrams in different output formats. The simplest format I know of is the dot format.
Mermaid is a bit like PlantUML+. It lets you create UML diagrams and more using text descriptions. Interestingly, gitlab seems to support mermaid out of the box, which means that markdown documents can include mermaid diagrams.
This is a subset of PlantUML/mermaid. It only generates message sequence charts from it’s scripting language.
Why use such an archaic modality?
I know I talked about charm, but there are some concrete reasons why I prefer the text file driven mode for many things. The primary one is that I can focus on the fundamental content of the diagram or task instead of being distracted by font sizes, or milimeter level adjustments of components. This was true of LaTeX, and it is true of PlantUML. In most cases the tool taking in the text file as input makes some layout decisions automatically. In most cases, this is good enough, and in many cases is actually better than what I could achieve manually.
The next advantage is that I can version control my source file and can make semantically meaningful diffs. I can’t do this with the save files of GUI programs which are often just memory dumps of RAM.
I can copy and paste components much more easily that I can with purely GUI driven tools. I can add comments. I can comment out sections and then uncomment them later.
Often, I can type and create a diagram faster than I can drag and draw with my mouse. If I have a live preview, I’m a whole lot more productive with text file based software than I am with GUI based software.
What tools would YOU like to add to this list of awesome text file based applications?