Use lowercase and keep it short

7.3 Use lowercase and keep it short

One thing people first notice about the Unix system is that everything is done in lower case. Instead of operating with the lock key on all the time, Unix users enter everything in lower case letters.

There are a couple of reasons for this. First, lowercase letters are much easier on the eyes. If a person must work with text for an extended period, it soon becomes apparent that viewing lower case text is much more pleasant than eyeing uppercase. Second, and perhaps more important, lowercase letters use ascenders and descenders, the tiny lines that extend above or below the baseline of text, such as those found on the letters "t," "g," and "p." They transmit intelligible cues that your eyes pick up on when you read. They make reading easier.

Case is also significant in Unix. For example, "MYFILE.TXT" and "MyFile.txt" do not represent the same file. Unix employs lowercase letters for frequently used commands and file names. The upper case is normally used to grab someone's attention. For example, naming a file "README" in a directory is a visual cue inviting the user to read the contents of the file before proceeding. Also, file names in directories are usually sorted alphabetically by the ls command, with capitalized names appearing before lowercase ones in a file list. This draws additional attention to the file.

While case sensitivity often causes much frustration for people who come to Unix after having used a case-insensitive operating system for a long time, they eventually adapt to it. Many even learn to like it.

Another quirk about Unix is that file names tend to be very short. Most frequently used command names are no more than two or three letters long. Terseness is golden here, and you will find such cryptic names as ls, mv, cp, and so on. Very long, multiword command names are often abbreviated to just the first letters of the words. For example, "parabolic anaerobic statistical table analyzer" reduces simply to "pasta."

The use of terse names is historical. Unix was originally developed on systems that had teletypes instead of CRT terminals. Typing on teletypes was accompanied by bzzzt-clunk sounds whenever one struck a key, and a fast teletypist could do about fifteen to twenty words per minute. Hence, shorter names for things were quite in vogue. The fact that most computer programmers back then didn't know how to type had nothing to do with it. (Well, maybe a little.)

Why do Linux users persist in using the shorter names today? Certainly today's PC keyboards can handle much higher speeds, so such brevity is no longer necessary. The reason is that shorter names allow you to cram much more on a command line. Remember that Linux shells have a pipe mechanism that allows you to string the output of one command into another on the command line.

This powerful feature is very popular with Linux users. They often string so many commands together on a single line that, if longer names were used, they would exceed the width of the window they're using. One solution to the problem is to keep the lengths of individual commands short so more of them will fit within smaller windows when you have several adjacent windows open on the screen.

Of course, you may be thinking "why bother?" Why not just click with the mouse and execute the commands directly? That works if you're using a command repeatedly. Remember, though, that a lot of the power of Unix and Linux comes from the ability to combine multiple commands dynamically to form new ones. This is not possible with most popular desktop environments today. The term WYSIWYG (what you see is what you get) is also WYSIATI (what you see is all there is). What you can click on is what you get and not much else. Attempts to provide graphical shells have produced cumbersome, inflexible user interfaces at best. And the use of "shortcuts" usually only shortens the time it takes to access a single command. [1]

[1]Various desktop environments available on Linux allow you to execute multiple commands from a single shortcut. However, it's still a static capability without the ability to easily combine multiple commands dynamically. Whether it will continue to be static remains to be seen. One never knows what lurks in the minds of creative Linux people.



Linux and the Unix Philosophy
Linux and the Unix Philosophy
ISBN: 1555582737
EAN: 2147483647
Year: 2005
Pages: 92
Authors: Mike Gancarz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net