Trailing Whitespace

Command Lines for Everyone

A large part of the typical Linux workflow revolves around terminals. A terminal receives commands typed by the user, executes the meaning of those commands, and reports the result. In the early days of computing (before my lifetime), the terminal filled the entire screen; there were no windows to drag around - all you could do was have a single command-response conversation with the computer. However, now that computers possess colossal power, sophisticated graphics abilities, and ages of man-hours in refined software, users can have as many windows, tabs, and monitors as their hearts desire. Why would anyone willingly submit themselves to a text-based conversation with the computer? It’s so inefficient!

Consider the illustrious pen and paper; they are the tools which nearly everyone masters as a child, and from which many swear they will never part. People love them because they completely understand them. They may be poor at drawing, but the blame always rests on the wielder of the instruments and not on the instruments themselves. The uses of the pen and paper are manifold:

  1. Art through drawings
  2. Task management with todo lists
  3. Expressing affection with letters
  4. Recreation through games like tic-tac-toe and hangman
  5. More esoteric uses for paper, such as origami, or even as a spacer to lift one leg of a table to just the right height.

The point is that pen and paper are so well-understood that people feel confident using them even for things they have never seen someone else use them for. Their simplicity empowers the users’s ingenuity.

Every tool should aim to be as simple and useful as the pen and paper, including computers. Computers have begun to dominate the world in a similar manner to pen and paper. However, computer hardware lacks all semblance of simplicity and is unfit for common consumption. Thus, the usefulness and versatility of computers for lay users is hugely dependent on the base set of software interceding with the hardware on the user’s behalf. Therefore, it is this software’s responsibility to empower the user’s ingenuity, just like pen and paper.

This set of base software I shall refer to as the Operating Environment, or OE for short; every OE should aim to provide tools that work together to unlock the potential of the computer. Computers excel at skills that involve repetition, and large scale:

  1. The information from entire libraries fits in a fraction of the typical hard drive.
  2. Calculations that would take years for humans complete in seconds.
  3. Messages that take days to deliver at significant cost get sent and received for a trivial price.
  4. Boring processes with many steps finish without supervision.

Operating Environments like Windows, MacOS, iPhones, and Androids encourage using specific software for specific tasks. This bent is a bad thing because users can then only do things that the software creators anticipated. For example, if you want to write an email now, but have it automatically sent in an hour, your email program must have this feature, even though you already have a stopwatch program that can trigger an alarm sound in an hour. Why can’t you have the stopwatch program trigger the email to send? If, instead, your OE provided more general tools, you would write all emails with a simple text editor, and send them with the sendmail program; to send the email after an hour, use the sleep program to construct a single command like this:

sleep 3600 && sendmail --file email-file.txt --to

The && part of this command means that what is on its right will not begin to execute until whatever is on the left completes. Terminal commands are the most natural means of combining small, general programs because they only encapsulate the essential parts of each step of the task. If the sendmail program used an open-file dialog instead of receiving the filename as part of the command, then the user would have to be present at the end of the hour to select the file to send. In other words, graphical programs do not allow precise communication of intent, and thus cannot be combined easily. Suppose that I want to send the email after a whole day, but I don’t remember how many seconds a day contains. I could use the calculator program to send the result of 24×60×60 to the sleep program.

Although I could argue more comprehensively for why terminal commands are easier to combine than graphical programs, I believe the conclusion is fairly self-evident, and more examples would prove laborious. In my opinion the more difficult task is to convince people that general, combinable programs are better than what they are using today. However, even those who concede the point continue in their folly by complaining that using the command line is difficult to learn. This complaint is ill-founded because those who raise it have already spent years subconsciously learning the far subtler user interface of the “modern” desktop.

While special-purpose programs often increase the efficiency of specific tasks, they do not fulfill the same role that a paper and pen play in ordinay life. General purpose, well-understood programs that empower the user’s ingenuity are the way to properly defeat frustration with computers. While I would not claim that terminal commands are the perfect digital embodiment of pen and paper, I think they are the closest thing we have at present.