Classics of Software Engineering: “Software Tools”
(One of a series of short reviews on books which have profoundly affected my own programming style, and which have made me a better Software Engineer)
Software Tools
Brian W. Kernighan and P. J. Plaugher
Addison-Wesley Professional, 1976
When I was getting my B.S. in Computer Science the first time, 26 years ago, I was one of an exceedingly small number students at Georgia Tech who were using this brand-new tiny little operating system called UNIX, out of Bell Labs, which ran on DEC PDP-11 minicomputers (about as powerful as a 25 MHz 80386). Within this group, and all across the country, this book set off detonations like little neutron bombs. My old friend Michael “Bobby” Tague still calls it “The Most Important Software Book I Ever Read” — for my own part, it held that title until being unseated by “Design Patterns” in the mid-1990’s.
Continuously in print for 26 years, Software Tools teaches Structured Programming, example by glorious example. To quote the front cover:
“Good Programming is not learned from generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify, human-engineered, efficient, and reliable, by the application of common sense and good programming practices. Careful study and imitation of good programs leads to better writing.”
[That’s outstanding prose right there.]
The authors, who had already written an exceptional book, The Elements of Programming Style, reached in Software Tools a level of greatness which we students had not even previously conceived, much less experienced. They started out the book mired in the hell of FORTRAN, an environment which many programmers of that day, including even the bulk of the Computer Science Majors at Georgia Tech, were stuck in. They then said [paraphrasing now], “but why would we limit ourselves to that horrible programming environment as the primary tool we use in our everyday work, when we can easily improve it?” They described a new language, Ratfor (for Rational Fortran), which was little more than FORTRAN with C flow-of-control structures, improved comment support and C-like libraries of functions, and wrote a simple little preprocessor which converted Ratfor to FORTRAN. They then rewrote the Ratfor preprocessor in Ratfor, and ran it through the original FORTRAN version, and had bootstrapped themselves a programming environment that, while not UNIX, was (literally) an order of magnitude better than the one they had been stuck with previously.
And they shared their work with the world, by making all of the programs in the book available by nine-track tape, letting computer centers the world over bootstrap themselves into a dramatically better environment in a matter of hours.
In this slim volume, they consider the design of at least a dozen significant programs, designing and writing each while you watch. Topics such as top-down design, structured programming, egoless programming, pseudo-code, testing stubs, etc., were all taught by example. Most amazing was the collection of complete, significant, highly-readable programs that had been written by the end of the book, including a text editor, a word processor, and the Ratfor preprocessor itself. Topics such as sorting and parsing were covered as by-products along the way.
If you like to read books about programming, or want to be a better programmer, pick up this little book. Even if you don’t know FORTRAN, you’ll find the programs a breeze to read, as long as you know C, C++, or Java.
Post a Comment