Of bots and command lines

Of bots and command lines

I see little written about command-lines, despite them being very common user-interfaces. Here I will discuss what a command-line interface is, reflect a little on the trends, make a prediction or two, and end with a couple of guidelines. (For more on the history, I recommend the excellent essay “In the Beginning was
the Command Line” by Neal Stephenson.)

What is a command line

With a command-line interface the system provides a prompt. Usually this is a symbol on an otherwise blank area: $ and > are common ones. In response to the prompt the user provides a command. The command is structured as a verb that is often followed by a noun or two:

  • Copy “this file” “there”
  • Remove “this file”
  • Shut-down [this computer]

Each verb is a small program, which will do something to whatever are listed as nouns.

The huge advantage in command lines is that the interface is infinitely extensible. More programs can be added without changing the interface. With a graphical user interface each command needs to be represented by an icon, button, or menu item — and this can lead to very cluttered interfaces that are hard to extend. However, with command lines there is little to cue recall of the command names, which makes them harder to use.

Trends

I see three trends with commands: sub-commands, commands in applications, commands in search, and chatbots.

Sub-commands

Command line interfaces do change, despite dating back to some of the earliest computing systems. One trend I am seeing on Unix systems (perhaps the canonical example of a command line) is the rise of sub-commands. Normally command-line programs are very simple and do only one thing, such as remove a single file.

However, some programs are now so complex they contain commands. For example, the version control program git has a sub-command “clone”:
    $ git clone https://github.com/groupserver/buildout
Think of this as an imperative, but with a proper-noun at the start so the user is addressing a particular program: “Git, clone the repository for GroupServer”.

These Unix commands are now far more like the commands in VMS — which I find amusing because VMS was considered the rival to Unix for many years, and “lost”. I suspect that we will see sub-commands become even more like those on VMS, where the user can break into a completely different mode to issue a sequence of commands. For example, this hypothetical git-session:
  $ git
  git$ add --all
  git$ commit -m "Woops"
  git$ push

Applications

While usually associated with running entire systems, command-lines can appear in individual applications too, often supplementing a GUI. Perhaps the most famous examples are the text editors vi and GNU Emacs — but they have appeared in applications as diverse as Autodesk AutoCAD and the game Quake by id Software. (The programming language TCL was designed specifically to provide an in-application command line.)

The HUD in the Ubuntu Unity desktop tries to add command-lines to all desktop application by converting items from the pull-down menu into commands. 
It is an interesting idea, but I dislike it as it breaks the imperative-phrasing of commands.

I doubt that many applications will see the addition of command-lines. This is  because the large complex desktop applications that suit command lines are out of favour at the moment. However, those that have them will keep them, and developer-oriented tools may acquire them as command-line skills become more and more common with the rise of Linux. In the general case command lines may become part of applications via the back door of search…

Search

Search engines such as Google, Microsoft Bing, Woolfram Apha, and Yahoo! all provide a command line. They allow for much more natural phrasing, such as this recent command I issued to Google Now:

Remind me to buy some Italian books for my mother-in-law tomorrow morning

Note that the basic structure is the same verb-noun imperative phrase as has been used since the beginning. The big difference from the Unix command line is that the search engines usually stop and clarify what you mean before committing to the command:

 

It will be interesting to see how the adoption of these more natural-language commands progresses. In particular, applications made by other companies can integrate with the search engines, but I have seen little discussion of this. I suspect this integration will become increasingly important, especially as these search-based command lines are what power voice-commands under the hood.

I argue that voice-based systems are command-line interfaces, which includes  Apple Siri, Google Now, and Microsoft Cortana. Sophisticated ones, to be sure, but the elements are all there — from the chime as a prompt to the imperative-form of the command. What they fail to do is strike up a conversation about the task. But chatbots can.

Bots

There is a long history of simple programs responding to commands in messaging platforms such as IRC. For example, bots can quote passages of the Bible when asked.

With the rise of Facebook Messenger, Kik, and Microsoft Skype more people are engaging with real-time text-chat. This has lead to companies integrating commands into their chat programs, in much the same way that they are integrated with search, providing information such as the current weather forecast and movie times

I am unsure how this will work out. For a natural-language interface where does one program stop and another start? Will there be sub-commands for clarification, leading to a full dialogue? What are the security implications of this deep integration between programs? What are the usability guidelines?

Usability guidelines

I can think of two usability guidelines for command lines that date from the Dawn of Time (the 1970s):

  1. Make commands verbs, and
  2. Don't guess.

The first one is relatively easy, because that is how commands are formed in many natural languages, but I note that Ubuntu did not follow this guideline with its HUD. The second guideline is a dark hole of temptation.

Systems that guess what the user is doing have a poor reputation. They include the infamous Clippy in Microsoft Word and an awful system from the 1980s called “The Coordinator”. With command-lines, interfaces that guess are know as “Do what I mean” or DWIM. Sadly, with DWIM is impossible to stop the following sort of interaction from occurring:
  ― Delete all document files.
  ― No documents found; assuming you mean “Delete all files” 🔥

Such errors do not need to be destructive to be problematic. Consider a messaging application that interpreted a command poorly and sent a message to person that you have a protection order against. (You have their number so you can screen their calls, just in case.) Currently systems like Google Now are popping up dialog boxes for confirmation (like I showed above). However, natural language systems build into chat clients will need to avoid asking “are you sure?” all the time. There is no easy solution, especially considering people can interpret commands poorly.

To view or add a comment, sign in

More articles by Michael JasonSmith

  • The software for things

    I have been musing about the intersection of the internet of things and software maintenance. The internet of things…

    2 Comments
  • Culture and interface design

    I walked past a Nest thermostat the other day. It sensed me and showed 19•25.

    1 Comment
  • Daisy, Daisy…

    Today I pulled the plug on a site that I helped run for a long-standing client. I dropped tables, and deleted folders…

  • Gendered design

    I hate the main control knob on my washing machine. Its operation is fairly typical: you turn it in order to select the…

    3 Comments
  • Securing email

    Currently email is usually encrypted, but on a per-organisation basis. The organisation holds the key used to encrypt…

  • Inscrutable interfaces

    A recent 99% Invisible episode, Children of the Magenta, discusses the automation paradox, and in particular the loss…

  • Accessibility

    At OpenHack I was asked for some usability advice. The interface at issue was a confirmation pop-up that appeared when…

  • Wiki

    I dislike wikis. I fundamentally disagree with the conceit that their markup is easier to learn than HTML.

    2 Comments
  • Plus ça change…

    Plus ça change, plus c'est la même chose. — Jean-Baptiste Alphonse Karr IT seems cursed to have some debates every…

    2 Comments
  • Mobile web

    Three things have me thinking about the mobile web this week: Google changing their search results slightly, the Apple…

Explore content categories