Kernighan and Pike's book: a flame

ajs at hpfcla.UUCP ajs at hpfcla.UUCP
Thu Jul 5 23:58:00 AEST 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"



More information about the Comp.unix mailing list