[ale] O'Reilly Book Review: Pragmatic Project Automation

Michael D. Hirsch mhirsch at nubridges.com
Fri Oct 29 22:28:59 EDT 2004


Title: Pragmatic Project Automation
       How to Build, Deploy, and Monitor Java Applications
Author: Mike Clark

Pages: 176

ISBN: 0-9745140-3-9

http://www.pragmaticprogrammer.com/starter_kit/auto/index.html

One of the perks of being an ALE member is getting books from O'Reilly
books in exchange for writing a review of the book.  AFAIK, I am the
first ALE member to take advantage of this great opportunity.  I chose 
to read and review "Pragmatic Project Automation: How to Build, Deploy, 
and Monitor Java Applications" by Mike Clark.

"Pragmatic Project Automation" is actually published by the "Pragmatic
Programmers" Andy Hunt and Dave Thomas.  They are the authors of "The
Pragmatic Programmer".  If you haven't read this book, and are a
programmer, I recommend it very highly.  It provides the sort of
wisdom only years of practical experience can provide.

I read and greatly enjoyed the "Pragmatic Programmer," so when I heard
they were putting out a new series of pragmatic books, I couldn't wait
to read them.  "Pragmatic Project Automation" is the not the first of
the books, but it is the first that I've read.

"Pragmatic Project Automation" is all about how to automate the tasks
associated with building, testing, and deploying your application.  The
assumption is that your project is a Java project, and all the tools
are based around that.  Most of the automation is done with Ant, an
automation tool written in Java and primarily used for building Java
projects.  Since I do most of my work in java and ant, this is right 
down my alley.

"Pragmatic Project Automation" is one of the "Pragmatic Starter Kit"
series of books.  The words "Starter Kit" should be taken seriously. 
If you are acting as build master for your first project, this is a
great book.  It will have you up and running your one-step builds in no
time.  It provides numerous "best practices" for running automatic
builds, unit tests, and deployment.  Unlike the original "Pragmatic
Programmer," which was a collection of generally good ideas and
practices to follow, the Pragmatic Starter Kits are specific recipes to
follow for good results.

The book assumes that you are using Java; the ideas behind the
practices are universal and can be applied to any kind of project, but
the specific advice is for Java only.  The specific tools recommended
by the book are Ant for scripting, CVS for version control, and Cruise
Control for scheduling.  Obviously, other tools can be used instead,
but the recipes in the book will no longer work.  The ideas remain valid, 
however.

I wish this book had been around 5 years ago when I first started
building Java projects.  As it is, I had to learn much of this by trial
and error.  Most of it is just simple, good sense, like having all your
source in version control and having a script to check out your code
and build the finished application.  But like all good sense, it is not
as obvious and wide spread as it should be.  Every project I've been on
could have used a good dose of pragmatic project automation.

Though most of the book was already familiar to me, I did learn several
things. One of the great ideas was to make build failures publically 
obvious through the use of lava lamps! If the build, or build tests, 
failed, the suggestion is to turn on a red lava lamp which is in a 
publically visible location.  Ant does not actually have a lava lamp 
task, so they cleverly provide instructions on automating the lava lamp 
with the use of an X10 lamp module.  When the build succeeds again, turn 
off the red lamp and turn on a green one.  I haven't yet implemented 
this, but I'd like to.

Using ant for builds and CVS for version control is pretty standard,
nowadays.  I think most projects do this or something equivalent (though
the statistics on this show that statement to be hopelessly
optimistic). This book does move on to a more advanced, and less
standard tool.  They recommend performing builds automatically whenever
code is checked in, and their tool of choice is Cruise Control.

They provide nice recipes for setting up and running Cruise Control. 
In my job, inspired by the book, we decided to try it and found it
quite simple to set up and use.  It requires a little more
infrastructure than, say, CVS in that it runs inside a java container
like Tomcat, but if you are a Java shop you probably already know how
to manage Tomcat.  If you don't, maybe it is time to learn.

If you are a new build master on a Java project, read this book
immediately.  Even if you've been doing it for a while, you probably
won't be wasting your time if you read it.  The book is well written
and accurate.  It has a nice style that moves along nicely.  At 176
pages it is not a very long read, a welcome change in computer books. 
The author tells you what he has to say, then shuts up--there's no
padding here.

All in all, a good book.  I'm glad I read it.  I wish I'd read it 5
years ago.

Michael Hirsch



More information about the Ale mailing list