Programmer's Book Review

C/C++ Users Journal June, 2005

By Gregory Lapouchnian

Gregory Lapouchnian is an undergraduate in the computer science department at the University of Toronto. He can be reached at greg.lapouchnian@utoronto.ca.

Head First Design Patterns
Eric Freeman, Elisabeth Freeman, with Kathy Sierra and Bert Bates
O'Reilly & Associates, 2004
638 pp., $44.95
ISBN 0596007124

Unit Test Frameworks
Paul Hamill
O'Reilly & Associates, 2005
198 pp., $29.95
ISBN 0596006896

High Performance Linux Clusters with OSCAR, Rocks, openMosix & MPI
Joseph D. Sloan
O'Reilly & Associates, 2005
350 pp., $39.95
ISBN 0596005709

Eric and Elisabeth Freeman, with Kathy Sierra and Bert Bates, have written Head First Design Patterns, which covers the same material as most other books on design patterns, but presents it in a different format. When I first saw the book, I was skeptical because of the diagrams and cartoon-like cover and inside pages. Text is at a minimum in Head First Design Patterns, with most of the book consisting of diagrams, pictures, Java code snippets, and just a bit of text scattered throughout. But by the time I finished reading three chapters, I was enjoying the visual approach the authors took. The book is written with a sense of humor and feels more like a conversation than a lecture. That's not to say the book doesn't have valuable content—it is just focused content presented in a nontraditional manner. In particular, the authors focus on patterns that seem to have been utilized the most in practice—Singleton, Factory, Decorator, Observer, Facade, State, Proxy, Adapter, and the like—since the publication of the Gang of Four's Design Patterns: Elements of Reusable Object-Oriented Software. All in all, Freeman et al., present 12 patterns in detail and briefly introduce another nine at the end. Overall, I enjoyed how Head First Design Patterns was written and found myself flipping pages and absorbing the combined visual and textual content on the new page and not missing the good old paragraph one bit.

Patterns tell you what code should look like, but you still need to make sure you've built it right. This is where the idea of test-driven development (TDD) comes in. Paul Hamill's Unit Test Frameworks presents an overview of the tools that let you follow this style of development. Hamill begins by explaining the basics of unit testing and the architecture behind the xUnit family of test frameworks. Five of those frameworks are covered in more detail. The original JUnit for Java, CppUnit for C++, NUnit for .NET, PyUnit for Python, and XMLUnit for XML. For each, Hamill provides an overview of the architecture, examples, and a list of available assert methods. The last third of the book is taken up by JUnit and CppUnit class references. To be truthful, I found Unit Test Frameworks to be light on real content. I was disappointed not to see mention of using unit tests in more complicated scenarios, where applications consist of more than just a couple of classes. Too many of the pages were taken up by reference material. In short, I don't know what a reader would gain from reading this book that isn't readily available online.

Joseph Sloan's High Performance Linux Clusters provides a wealth of information on the subject of Linux clusters. Sloan guides you through the decision-making process for building cluster computers, installing the right software, and writing the programs to solve a particular problem. After an introduction to the basics of cluster architecture, hardware, and environments, Sloan presents detailed instructions for installing openMosix, OSCAR, and Rocks. openMosix extends the Linux kernel to allow processes to migrate between the nodes in a cluster to balance the load. OSCAR and Rocks are cluster kits that help you install all the required software at once. The third part of the book contains detailed descriptions for various software packages used to maintain clusters, such as cloning new nodes, cluster management and scheduling, and parallel filesystems. In the last section of the book, Sloan covers cluster programming, including examples of using the Message Passing Interface (MPI) library.

Even as someone who is not planning to build a Linux cluster in the near future, I felt confident because of the detail of Sloan's installation instructions. I did not find myself feeling lost or unsure of how a particular package should be installed or used, as can be the case when some authors decide to mumble over important instructions. The number of topics covered in the book is also impressive. Someone new to the topic of clusters is given the information they need to get started and advice on how best to approach this rather complex undertaking.