Programming on Purpose: Essays on Software Design
Post date: Oct 08, 2011 4:40:8 PM
Why is software design so hard? Maybe because there aren't any guidelines for developing successful working systems. And although many design methods have been proposed, most too often teach us nothing more than their proponents' methodology and not how to make the best use of them.
Most classical analysis and design books fall short of telling us when to use the methods and techniques they advocate. Since there are no silver bullets (that is, no "one-size-fits-all" method in software engineering) and, as P.J. Plauger says in Programming on Purpose: Essays on Programming Design, "we often cannot articulate why we do what we do when we do it," our experience ends up being the only guide we have when facing new projects. This leads many software projects to failure, rather than repeatable successes.
The patterns movement has filled a niche by cataloging well-crafted solutions to many analysis and design problems (see, for example, Erich Gamma et al.'s Design Patterns: Elements of Reusable Object-Oriented Software or Martin Fowler's Analysis Patterns: Reusable Object Models). But even before the patterns fad, P.J. Plauger disseminated simple but powerful ideas in dozens of magazine articles and a column, mainly in late Computer Language magazine. In some sense, Programming on Purpose complements the pattern approach because patterns are usually employed to describe solutions at the architectural level, while the principles Plauger describes are focused on detailed design and coding.
Programming on Purpose is the keystone of a three-volume collection of essays he wrote between 1986 and 1993. This volume focuses on software design while the others collect articles on people and technology. In spite of its somewhat dated context (part of it was written before the widespread use of object-oriented techniques, WIMP interfaces, and other prevailing practices), the ideas and principles in this book are surprisingly fresh. In fact, Plauger's observations are timeless and will be always relevant to software professionals because they tackle the problem of mastering complexity that lies at the heart of software development.
Programming on Purpose presents excellent discussions on a wide range of design methods and techniques, from the stepwise refinement used in top-down design to the use of grammars to parse input data (left-to-right design) or a structure approach to build programs that model the structure of the output data (right-to-left design). A total of 12 design methods are presented, along with their strengths and weaknesses. Although Plauger's design methods categorization technique is somewhat artificial, the book's value is in no way diluted since all methods are put into a context of guiding you using analogies and advice.
Apart from his survey of software design methods, Plauger provides some interesting nuggets such as three essays on demystifying object-oriented programming (a novel trend when the essays were written), some ideas on software development that could seem to be counterintuitive ("software design heresies," as Plauger calls them), and a curious approach to teaching software engineering that could be an eye-opener for many instructors.
A couple of chapters with interesting references to further reading and Plauger's view on landmark software design publications complete this superb book. Programming on Purpose is a must have book for anyone involved in professional software development.
-- Fernando Berzal, Dr. Dobb's Journal ERCB, 2002