Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!hplabs!hp-pcd!hpfcla!ajs From: ajs@hpfcla.UUCP Newsgroups: net.unix Subject: Kernighan and Pike's book: a flame Message-ID: <43800011@hpfcla.UUCP> Date: Thu, 5-Jul-84 09:58:00 EDT Article-I.D.: hpfcla.43800011 Posted: Thu Jul 5 09:58:00 1984 Date-Received: Thu, 12-Jul-84 00:32:27 EDT Organization: Hewlett-Packard Fort Collins Systems Division - Fort Collins, CO Lines: 28 Nf-ID: #N:hpfcla:43800011:000:1521 Nf-From: hpfcla!ajs Jul 5 08:58:00 1984 Seeing it praised here on the Net, I rushed right out and borrowed a copy of Kernighan and Pike's book, "The Unix Programming Environment". Well, it's not bad, and if you're not a wizard yet, it will point you in some new directions. BUT... As long as they took the trouble to build a soapbox, why the hell didn't they use it to maximum effectiveness? Throughout the book they suggest better ways of writing shell scripts and programs, and make subtle digs at existing commands. Then they turn around and show off their own efforts, which are sadly lacking. Hardly any comments; typical terse styles; not enough bulletproofing. They don't even measure up to the Indian Hill Style Sheet! (Now, the IHSS has some problems too, but they're so far advanced that I'd willingly admit they are religious issues. Meanwhile, I suspect that 90% of the readers of K&P's book could dramatically improve the authors' coding style, if they tried.) In summary: Read, or at least skim, this book if you get a chance. But remember that you can do much better when writing programs of your own. Use lots of comments, including big block headers! Declare every variable on a separate line, and explain it. Break your source up into lots of small sections of only a few lines -- don't run it all together. Give a damn! Thanks for listening, Alan Silverstein, Hewlett-Packard Fort Collins Systems Division, Colorado {ihnp4 | hplabs}!hpfcla!ajs, 303-226-3800 x3053, N 40 31'31" W 105 00'43"