Tuesday, October 1, 2013

Language vs. Visualization

I've already outlined the aesthetical and nostalgic reasons for using a command-line. But, there's more to it. On an abstract level, I like to think of the command-line and the graphical user interface (i.e. what most people use without reflecting on it) as a language-visualization dichotomy. I love languages. Not that I'm particularly good at them, I've only ever grown somewhat comfortable with two (Swedish and English). My French is abysmal and while I can read a bit of German, I couldn't put together a grammatically acceptable phrase if my life depended on it. That doesn't prevent me from thoroughly enjoying all these languages. While I read 19th century English literature, say, Oscar Wilde's "The Picture of Dorian Gray", I marvel at the exquisite polish of every single sentence. When I pick up Strindberg's "Röda Rummet", I read and re-read the pages over and over again, just to taste the words over and over again in my mind. Well-crafted prose is a vice for me.

Now, when it comes to visualizations, things get a bit more complicated for me. I enjoy visual art, colors, shapes and designs as much as anyone (probably more than most, actually). I can visualize some things in my head, such as blueprints, but I often find myself unable to describe a route, even one that I've driven dozens of times. I just can't replay the memories that I should have. I'm able to find my way, but only by actually seeing the places again. In a similar manner, I find it very difficult to visualize people's faces. I'll recognize them when I see them, but that's all. I could probably never give an accurate description of a person I'd only seen briefly.

What does this have to do with command-lines and graphical user interfaces? For me personally, it means that I prefer the flawless precision of language over the annoyance of having to remember visual details by repeating them over and over again. If I use the command-line, I will type up a command, include the appropriate parameters, hit Enter and be done with it. It usually takes a few seconds, at most. When I use anything with a GUI, I usually have to navigate through menus, and frequently memorize more or less bizarre symbols that are somehow thought to be self-explanatory. Whenever I try to use Microsoft's abominable Office 2007, I usually end up with a boiling rage inside me within minutes, frantically clicking. To me, neither the menus nor the icons make any sense. I'm not particularly interested in learning them, any more than I am interested in learning anything else I perceive as being stupid and counter-intuitive. The worst part of it all is having to submit to interacting with something so inelegant and hideous.

The command-line, on the other hand, is like speaking a familiar language with an old friend over a glass of wine. I know exactly how to pronounce the sentences, and the computer responds immediately. If I do make a mistake, I usually get a response that politely informs me of my mistake and provides me with a few clues to correct it. Learning the commands is like learning words, you don't even have to know the grammar. A few hundred words down the road, you'll be able to do the most amazing things, and it always feel so simple. Most importantly, it has an air of elegance to it.

Perhaps you're thinking that this is still a moot point, because you're not a UNIX or Linux freak and consequently you don't think you have a command-line anyway. But that's where you're mistaken. I won't go into details about the Windows command-line, simply because I detest it, but Mac OS X has lovely UNIX-based interface called "Terminal", look in Utilities in the Applications folder. It's installed by default on every Mac OS X machine.

I'll provide you with my favorite command of all time to get you started: "shutdown". Note that you need to have admin privileges to execute this command. If you don't know what that is, you can just try it. If it works, you have those privileges, otherwise it will protest. If you type the following in your Terminal:

sudo shutdown -h now

You'll be prompted for your password, then the computer will shut down promptly. Now, the beauty of this command is in its parameters. If you replace "-h" with "-r", it will reboot ("h" is for "halt", "r" is for "reboot"). And instead of "now", you can delay the shutdown/reboot by a specified number of minutes. So for example:

sudo shutdown -h +15

Will shut down your computers after fifteen minutes. Just replace "15" with the number of your choosing. Or you could type the exact time, if you like:

sudo shutdown -h 21:00

The shutdown command help can be accessed by typing "--help" after the command instead of using the parameters described by me, good to know in case you forget the exact syntax. The same applies to most other commands, by the way.


So when is this useful? Perhaps you're using a program that takes a long time to execute and you want to go to sleep (for example downloading, encoding or the like). Perhaps you want the computer to stay on while you're getting ready to leave for a social function, in case you need to check something you've forgotten, but you don't want the hassle of having to shut down the machine later when you might be in a rush. Whatever your reason, this is a very useful command and quite easy to remember, I'd say.

That's really all there is to it. Learning words. The parameters are often identical or at least similar. The words are usually self-explanatory (as is evident in the above example). Start to talk to your computer instead of haphazardly prodding it with a mouse. You'll be surprised at how easy it actually is. And most importantly, how elegant.

No comments:

Post a Comment