A pragmatic methodology book for programmers of any level and language

If you ever thought it would be great to have a veteran developer answer all your methodology questions, take a look at this book. Appropriate for all experience levels, this book explains the development process from a language-neutral perspective.

As a developer who did not learn programming formally in school, I have had to pick up on important ideas and techniques on my own. While I may know that a certain idea or technique is important, I don’t always know why. I decided not long ago that I needed to find a veteran programmer willing to answer all my oddball questions, or as a cheaper alternative, I needed to find a good book. I think I’ve found just the book I need in The Pragmatic Programmer: From Journeyman to Master.

The Pragmatic Programmer: From Journeyman to Master
By Andrew Hunt and David Thomas
Addison Wesley Longman
September 2000
321 pages
ISBN: 0-201-61622-X
Cover Price: $37.99

— Distills a large amount of programming best practices into a tight, readable format
—Well organized into discreet units, with cross-references to related topics
—Well thought out and entertainingly written
—A bit pricey for a 321-page book
—Some of the ideas are so big and abstract that they can be hard to grasp

This book is a language-neutral, development process book from which virtually any programmer, regardless of experience level, platform, or language can benefit. It looks at the core of the software development process, exploring all those ideas that you might have picked up on through the course of your career, but never had explicitly defined. Having a copy of it at hand is like having that veteran programmer available to share all the important tips and knowledge he or she has accumulated, usually in great detail.

Authors seem to care about software development
I was delighted to see many of the ideas that I had known were important more fully explained and other topics I was unfamiliar with brought to light. The authors, Hunt and Thomas, genuinely seem to want to help their readers improve as developers and build better software, regardless of language or platform.

The authors emphasize and repeat a handful of basic themes throughout the book, such as the importance of testing, documenting, planning, communicating, and taking pride in good craftsmanship. For example, if a time constraint is going to cause you to cut corners, don’t hide it, the authors say. Instead, make sure the decision makers understand the issues, and that the schedule has to change and the feature list needs to be altered, or the end result will not meet requirements.

This book seems to be specifically designed for the lazy developer: Someone who cuts corners, doesn’t test, or generally isn’t trying to write the best software that he or she can, either through deliberate laziness or because of time constraints. The book constantly reminds the reader that being a good programmer is not simply writing a program that runs; it is writing an efficient and easily maintained program that lets users complete real tasks.

Pragmatically organized
The book is divided into eight units, each of which contains five to seven chapters. Each chapter ends with summary tips and exercises for you to complete. Some of these exercises are theoretical, but many are practical, challenging you to solve problems with C++, Java, and even shell scripts. Distributed throughout the text are challenges and questions meant to underscore the current topic.

The first unit is “A Pragmatic Philosophy,” which discusses software development as a discipline and why it is important to care about building good software. Here, the book urges you to constantly improve your skills and think about new ideas and techniques so that you can continue to grow as a programmer.

Unit two is “A Pragmatic Approach,” where some big ideas are discussed, such as the evils of duplication. Hunt and Thomas also explain the importance of building reversible systems that don’t just cope with change, but have mechanisms for handling change built into them. This unit is where I discovered the lion’s share of those ideas that I picked up over the course of my career, but had never heard described very clearly.

In unit three, “The Basic Tools,” important topics are covered, such as version control, debugging, and the appropriate use of code generators. The big advice given here is to learn the full power of your chosen IDE and the fastest and most efficient ways to use your file systems and operating system.

Unit four is called “Pragmatic Paranoia.” The authors discuss assertions and resource balancing and what they call "designing by contract"—a concept that involves documenting code preconditions (i.e., what must be true for a piece of code to execute properly) and postconditions (i.e., the results of the code having run). This discussion segues nicely into unit five, titled “Bend or Break,” which offers solutions for building robust software and addresses topics like the model-view-controller design pattern and decoupling.

The sixth unit, “While You Were Coding,” points out sound ways to judge algorithm speed, how to refactor, and the importance of writing code that is easy to test. The dangers of what the authors call "programming by coincidence," are also discussed. It becomes obvious that Hunt and Thomas advocate deliberate programming—where you code from a plan and document your assumptions.

Units seven and eight discuss project management and team development, respectively. Topics you’ll find here include discovering requirements, use cases, and the importance of understanding what you need to build before you start building it. The authors urge you not to blindly accept formal methodologies, but keep your head and judge when a formal method is a benefit or a hindrance. They explain why pragmatic teams frequently use automation to ensure that tasks are always documented, verifiable, and easy to repeat. In the end, the authors urge you to gently exceed your users' expectations and to sign your work, or take ownership and responsibility for your code, showing that as a craftsman, you are proud of what you have created.

Invaluable resource
Overall, I found this book to be an invaluable resource. It emphasizes the importance of looking at the other programs that you interact with and other developers’ code with a very critical eye, because no one writes perfect software. As it turns out, I’ve wound up turning this critical eye to my own code, as well. Whether you are a beginner or an experienced developer, by instilling a sense of the big ideas in software development along with healthy doses of critical thinking and modesty, this book will make you a better developer. I highly recommend that you read it.


Editor's Picks