The Wonderful Unix Programming Environment 175 The Wonderful Unix Programming Environment The Unix zealots make much of the Unix “programming environment.” They claim Unix has a rich set of tools that makes programming easier. Here’s what Kernighan and Mashey have to say about it in their seminal article, “The Unix Programming Environment:” One of the most productive aspects of the Unix environment is its provision of a rich set of small, generally useful programs—tools— for helping with day-to-day programming tasks. The programs shown below are among the more useful. We will use them to illus- trate other points in later sections of the article. Much of any programmer’s work is merely running these and related programs. For example, wc *.c counts a set of C source files grep goto *.c finds all the GOTOs. These are “among the most useful”?!?! Yep. That’s what much of this programmer’s work consists of. In fact, today I spent so much time counting my C files that I didn’t really have time to do anything else. I think I’ll go count them again. Another article in the same issue of IEEE Computer is “The Interlisp Pro- gramming Environment” by Warren Teitelman and Larry Masinter. Inter- lisp is a very sophisticated programming environment. In 1981, Interlisp had tools that in 1994 Unix programmers can only salivate while thinking about. wc files Count lines, words, and characters in files. pr files Print files with headings, multiple columns, etc. lpr files Spool files onto line printer. grep pattern files Print all lines containing pattern.
176 Programming The designers of the Interlisp environment had a completely different approach. They decided to develop large sophisticated tools that took a long time to learn how to use. The payoff for investing the time to use the tools would be that the programmer who learned the tools would be more productive for it. That seems reasonable. Sadly, few programmers of today’s machines know what it is like to use such an environment, in all its glory. Programming in Plato’s Cave I got the impression that the objective [of computer language design and tool development] was to lift everyone to the highest productivity level, not the lowest or median. —From a posting to comp.lang.c++ This has not been true of other industries that have become exten- sively automated. When people walk into a modern automated fast- food restaurant, they expect consistency, not haute cuisine. Consis- tent mediocrity, delivered on a large scale, is much more profitable than anything on a small scale, no matter how efficient it might be. —Response to the netnews message by a member of the technical staff of an unnamed company.1 Unix is not the world’s best software environment—it is not even a good one. The Unix programming tools are meager and hard to use most PC debuggers put most Unix debuggers to shame interpreters remain the play toy of the very rich and change logs and audit trails are recorded at the whim of the person being audited. Yet somehow Unix maintains its reputa- tion as a programmer’s dream. Maybe it lets programmers dream about being productive, rather than letting them actually be productive. 1This person wrote to us saying: “Apparently a message I posted on comp.lang.c++ was relayed to the UNIX-HATERS mailing list. If I had known that, I would not have posted it in the first place. I definitely do not want my name, or anything I have written, associated with anything with the title ‘UNIX-HATERS.’ The risk that people will misuse it is just too large.… You may use the quote, but not my name or affiliation.”
Previous Page Next Page