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 cs2cs
and p
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
So…
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.
And yet…
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.
Povray
is 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.
I expect that the command line will outlast me.
Me to. It’ll just become more and more difficult to access it.Report
GUIs are for casual users.
Command line interfaces (typing and keystrokes in general) are faster, generally, in the hands of a skilled user.
They’re a hell of a lot easier to write, too.
Inform is still around, and games are about the place where you want shiny graphics the most.Report
You can have my CLI when you pry it from my cold, dead hands.Report
You have read Neal Stephenson’s In the Beginning Was the Command Line I hope?
There’s a link at the Wikipedia page that will eventually let you download the whole text.
It’s well worth it, even if a bit out of date.Report
Yes, the first time back when Stephenson initially wrote it.Report
It’s a classic. In fact, I’m pretty sure I cribbed my statements below from it, the stuff about language and semantics.
There is a subtext to the whole thing, the “manly men use REAL TOOLZ GRRRR” stuff. Like his analogy with the big honking power drill, and how it compares to the wimpy Home Depot type drills. Also there was a thing about driving tanks versus sedans or something.
It’s almost like, don’t we already get enough gender anxiety from male nerds?
I AM BIG POWER TOOL MAN!
Which whatever. I have a drill somewhere in my apartment, which no doubt I bought at Home Depot. Likewise I do most of my computing these days on an Android tablet, cuz it does what I need. If I need a keyboard, I have a Macbook Air thingy. Anyway, blah blah blah.
I have this big ol’ workstation at work with two giant monitors. I run Emacs. I write Lisp. Like, that’s my job.
From time to time, when using a computer, I’ll end up with some dull, repetitive task. Like, back when I was writing short fiction, every story site to which I posted had it’s own dumb formatting system. So I have to munge my files “just so” to post them to each site. I would often edit shit, which would update the master copy. Then I’d have to reformat for all the sites. This was tedious.
Perl to the rescue!
Perl is awful in many ways, but it made reformatting my stories for each website a breeze.
It is to your advantage to learn some command line stuff, even some programming stuff. Computers are good at automating repetitive tasks. They are good at responding in fixed ways to events. You can program them to do these things, instead of only using what others provided for you. Simple GUIs can only provide what the designers guessed that you want. Do you want to be thus limited?
This is more about programmability and less about GUI-vs-command line. But at it’s root it is about language.
It is all of it about language.Report
The command line is about semantics, the communication of meaning. Certainly image is a lovely way to present information to a user, but there is a reason that human-to-human communication is largely verbal. Verbal expression is linear, logical, digital-esque rather than analog-esque, and it allows nested syntax. In other words, it is a good way to package structured meaning.
The command line is an obvious extension of this, just as the written word is our best non-face-to-face analog for spoken communication. We don’t use written language for every task. For example, when browsing a dating site, you wanna see pictures, not just words. Likewise a good diagram can make a math theorem significantly easier to follow. But all the same, words remain foundational.
If I want to say something to software, a mouse lets me “point and grunt.” I can only click on what I can see, thus we have nested menus and “right click” popup menus and more nested menus and “dialogs” and “wizards” and on and on. These are not simple interfaces. They are complex to create, and very hard to “get right.” Just trying to find that one screen with that one dialog with that one radio button that you can vaguely recall — and maybe that was the last version of the software! Do they still have that feature? WHERE?
GUI type interfaces are clearly better in the “learn by exploring” model, but for very complex software, they become unwieldy.
Learning to “computer well” still involves learning to “command line well,” just as to get along in the world you must learn to speak.Report
GUI type interfaces are clearly better in the “learn by exploring” model,
If there’s a good “Help” facility, CLIs are easier to explore thoroughly.Report
Guis make better mneumonics.Report
No, they don’t. Veronica’s description of “How do you get to that button and is it still in this version?” was perfect.Report
Microsoft’s shift to the “ribbon” interface for Office was entertaining. Within a few days, someone had a website up that contained a reproduction of the old nested-menus interface. You pulled down menus to find what you wanted to do in the old interface, and got back an image of where the same function was in the ribbon. It wasn’t a Microsoft website, but it was very popular.Report
Actually, they do (particularly for less used commands). But you do actually need someone talented at writing the GUI (video games tend to do a decent job, when they aren’t designed for consoles)
FIREFOX deliberately changes where things are in every version, which is just kinda dicky.Report
I finished up my working career in IT support. Much of my anti-malware work was done rebooting in safe mode and then using the CLI and regedit to start the cleanup process.Report
I love my command line. Some of the command line tools, however, need to die in a fire.Report
While the CLI can be more convenient for certain individual tasks, the key thing—the reason it will continue to be used for decades to come—is that it’s much easier to automatically generate text commands than it is to automatically generate GUI input. Tools exist to automate the operation of GUI applications, but they’re much more difficult to use due to the need to automate menu navigation and dialog boxes and such.
Not that I need to tell you that—this comment is for the people who don’t deal with this stuff on a daily basis.Report