The Command Line Lives On
Over the last three years or so, I’ve been building up a collection of software for producing thematic maps of the US using state- and county-level data. The effort originally started because I wanted to produce one cartogram in particular, but the household research budget wouldn’t stretch far enough to license one of the commercial map software packages that supported those. I was in a position to swap time for money. And being lazy, I tried to find free software that someone else had already written to do the hard parts. I just wanted to be in the “gluing it all together” business. Eventually, extending the capabilities became something of a minor obsession.
One of the things that surprised me as I assembled the bits and pieces of software I needed was just how much of it was currently supported command line programs. Command line in the sense of the computer providing a prompt for instructions and the user typing out text. No graphics whatsoever, just bare-bones simple text, like that shown in the front page picture. Currently supported in the sense that you can send in bug reports or requests for new capabilities and there are people who make such changes and periodically issue new releases.
Recently I’ve added the beginnings of a prism map capability. A prism map is a two-dimensional rendering of a three-dimensional object. In the example here, showing the counties of New Mexico and Texas, prisms are used instead of polygons to represent counties, with the height of the prism representing a theme variable. Here the height of the prism represents population density and the volume represents the county population. (Yes, most of the people in New Mexico and Texas live in a handful of metropolitan areas.) Several steps are involved in producing the prism map: obtaining an accurate two-dimensional map, using additional data to covert that map to a “scene” with prisms in various places, and rendering the scene from a particular viewpoint. The software I use to generate this map is strictly command line: one piece that I wrote to extract the map polygons in latitude and longitude, a program named
cs2cs that converts those to a more useful representation, another bit of my own software to convert that to prisms, and a program named
povray that renders the three-dimensional scene. Both
ovray go back to code originally written in the 1980s.
Povray is kind of overkill for something as simple as this map: the program was intended for rendering more complex scenes, like the next one. 1
Part of me wants to think about craftsmen building tools.
Cs2cs does one thing and does it really, really well. Why should anyone reinvent that particular tool? It also works almost everywhere, because from the programmer’s perspective, command line interfaces are remarkably consistent from one operating system to another. Another part of me says, “Geez, what a bunch of Luddites!” I include myself in that, of course, since my “glue” program has no spiffy user interface: it accepts its instructions from the command-line alone. (Or from a text file full of command-line options, because typing it all out every time is a pain.) A bunch of old geeks hanging on to the past. Get with it, people! Write real applications, with a real user interface.
The mainstream vision these days is even farther away from the command-line. Consider any of the recent Iron Man or Avengers movies. Three-dimensional holographic displays with users shoving pieces of the display out of the way or dragging them into the center. Hand gestures in free space. Even when a keyboard does make an occasional appearance, it’s part of those holograms rather than something physical. Perhaps, at some point, there will be a brief appearance by a rectangular window filled with scrolling text, more as a nod to “that’s how computers used to be” than anything else.
A few weeks ago I was reading an article about another piece of Windows malware. The malware didn’t do anything particularly nasty, but it was very difficult to get rid of. The author offered a solution that could be used until the various malware-removal tools catch up. The solution involved pulling up the Windows command-line interface and typing a sequence of commands, the last one being quite cryptic and complex.
I’m not singling out Microsoft here. There are occasionally times when I want to change some aspect of my Mac’s configuration that requires resorting to the command line. Apple’s technical support site openly – if not exactly cheerfully – tells you that there’s no way to make that particular change through the graphical user interface. You have to type instructions in a text window.
I’m an old guy and worked with computers back in the day when the command line was almost all there was for interactive computing, 2 so command lines don’t bother me. It does surprise me, though, that after all these years both Windows and Mac OSX still have occasional chores that can only be done from the command-line. After all, both Apple and Microsoft have poured enormous amounts of money and time into reproducing the basic functions of the command line and command line scripting while hiding those things from their users.
None of radio, or movies, or television has killed off books. You’re reading this on a medium that is basically smarter paper. There are some things where text is simply the superior medium. There are always going to be chores where the easy way to tell the computer what to do is simple text. I expect that the command line will outlast me.
Image credits: Front page and the Texas/New Mexico prism map by the author. The glasses scene from Wikimedia Commons.
Povrayis available for most operating systems, including the source code if you’re inclined that way. The description of the “glasses” scene is available for download (large .zip file). On an old clunky dual-core Linux laptop, with all the rendering bells and whistles enabled, generating a somewhat larger version of this image takes about five days.
- Even then, not the only way. Sometime around 1973 the University of Nebraska where I was studying acquired a PLATO IV terminal. The PLATO IVs, connected to a mainframe at the University of Illinois, provided a graphical user interface for educational software. Also Empire, generally acknowledged as the first real-time multi-player shoot-em-up graphics-based space-battle game. Xerox PARC borrowed some of their ideas from the PLATO system.