Consistently Inconsistent 25 was reported in those messages, most of those very same sysadmins came to Unix’s defense when it was attacked as not being “user-friendly.” Not user friendly? Unix isn’t even “sysadmin friendly”! For example: Date: Wed, 14 Sep 88 01:39 EDT From: Matthew P Wiener weemba@garnet.berkeley.edu To: RISKS-LIST@kl.sri.com4 Subject: Re: “Single keystroke” On Unix, even experienced users can do a lot of damage with “rm.” I had never bothered writing a safe rm script since I did not remove files by mistake. Then one day I had the bad luck of typing “!r” to repeat some command or other from the history list, and to my horror saw the screen echo “rm -r *” I had run in some other directory, hav- ing taken time to clean things up. Maybe the C shell could use a nohistclobber option? This remains the only time I have ever rm’ed or overwritten any files by mistake and it was a pure and simple gotcha! of the lowest kind. Coincidentally, just the other day I listened to a naive user’s horror at running “rm *” to remove the file “*” he had just incorrectly created from within mail. Luckily for him, a file low in alphabetic order did not have write permission, so the removal of everything stopped early. The author of this message suggests further hacking the shell (by adding a “nohistclobber option”) to make up for underlying failing of the operating system’s expansion of star-names. Unfortunately, this “fix” is about as effective as repairing a water-damaged wall with a new coat of paint. Consistently Inconsistent Predictable commands share option names, take arguments in roughly the same order, and, where possible, produce similar output. Consistency requires a concentrated effort on the part of some central body that promul- gates standards. Applications on the Macintosh are consistent because they follow a guidebook published by Apple. No such body has ever existed for 4Forwarded to UNIX-HATERS by Michael Travers.
26 Welcome, New User! Unix utilities. As a result, some utilities take their options preceded by a dash, some don’t. Some read standard input, some don’t. Some write stan- dard output, some don’t. Some create files world writable, some don’t. Some report errors, some don’t. Some put a space between an option and a filename, some don’t. Unix was an experiment to build an operating system as clean and simple as possible. As an experiment, it worked, but as a production system the researchers at AT&T overshot their goal. In order to be usable by a wide number of people, an operating system must be rich. If the system does not provide that fundamental richness itself, users will graft functionality onto the underlying framework. The real problem of consistency and predict- ability, suggests Dave Mankins, may be that Unix provided programmers outside AT&T with no intellectual framework for making these additions. Date: Sat, 04 Mar 89 19:25:58 EST From: dm@think.com To: UNIX-HATERS Subject: Unix weenies at their own game Unix weenies like to boast about the conceptual simplicity of each command. What most people might think of as a subroutine, Unix weenies wrap up as a whole command, with its own argument syntax and options. This isn’t such a bad idea, since, in the absence of any other inter- preters, one can write pretty powerful programs by linking together these little subroutines. Too bad it never occurred to anyone to make these commands into real subroutines, so you could link them into your own program, instead of having to write your own regular expression parser (which is why ed, sed, grep, and the shells all have similar, but slightly different understandings of what a regular expression is).5 The highest achievement of the Unix-aesthetic is to have a command that does precisely one function, and does it well. Purists object that, after freshman programmers at Berkeley got through with it, the pro- gram “cat” which concatenates multiple files to its output6 now has 5Well, it did occur to someone, actually. Unfortunately, that someone worked on a version of Unix that became an evolutionary dead-end.
Previous Page Next Page