Pragmatic Project Automation 69
Pragmatic Project Automation | |
author | Mike Clark |
pages | http://www.pragmaticprogrammer.com/bookshelf/index.html |
publisher | Pragmatic Bookshelf |
rating | 9 |
reviewer | Alan Francis |
ISBN | 0974514039 |
summary | Learn to use common, freely available tools to automate build, test, and release procedures. |
The first 2 (or possibly 3) books are Pragmatic Version Control with CVS and Pragmatic Unit Testing (which is available in Java and .NET flavours).
Pragmatic Project Automation is the latest book in the series and, interestingly, this book wasn't actually written by either Dave Thomas or Andy Hunt, but by Mike Clark (contributor to the 'Bitter EJB' book, editor of the JUnit FAQ, and responsible for the JUnitPerf and JDepend tools). Mike does a great job of ensuring this book fits in with the overall style of the other books in the series.
Up front, in case you're a "cut to the chase kind of guy," this book (and the others in the series) are must-haves and as a consultant with ThoughtWorks I'll have a set ready to distribute whenever I start working with a new client team.
Content
The book helps the reader build a Java project slowly over the chapters, starting with a manual build-and-deploy process and automating a new aspect of it, chapter by chapter, until by the end of the book the software compiles, archives, deploys and configures itself multiple times a day. In addition, the build tools notify you of success or failure in a variety of interesting ways including email, SMS messages and different colored lava lamps.The first chapter provides a good introduction to the different types of automation available to projects. It also introduces the acronym 'CRISP' to help the reader remember the desirable characteristics of an ideal build process: Complete, Repeatable, Informative, Scheduled and Portable.
Chapter 2 gets you Repeatable by using ANT to bring together all the various steps you currently perform on your project into a single, one-click build. Chapter 3 works to turn the one-click build into a no-click build using tools as simple as cron as well as more complicated tools like the ANT scheduling tool CruiseControl. By the end of these two chapters your software can be compiling and testing itself automatically each time changes are checked into the version control system. But this is only the beginning.
Chapters 4 and 5 address the "Complete" and "Portable" portions of the CRISP model discussing how to include packaging, release management and deployment into your scheduled build. The last chapter addresses "Informative." How to monitor the build for success or failure, how to notify members of the project team using email, SMS, RSS or even the red and green Lava Lamps I mentioned above.
Summary
This book, and the others in the series, provide a much needed set of manuals for getting a good set of basic practices up and running at the start of a project. Unlike the Unit Testing book, there's not a lot of programming in this one, but it's a worthwhile read for any programmer, regardless of experience level.Many people are becoming interested in eXtreme Programming and Agile methods for software development. These books help to support some of the key ideas of those methods - extensive unit testing and continuous integration.
The main flaw in the book doesn't affect its usefulness, only its readability. Of all the files used in the sample project, the only one covered in any detail is the build file. The source and manifest files that we're writing the ANT file to build are never discussed or described - we are left to guess at what the sample project might contain (unless we download the code from the website). While this didn't change what I was learning (how to manipulate the project files with ANT), I like to understand all the details and this omission did occasionally leave me a little irritated.
You can purchase Pragmatic Project Automation from bn.com. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page. If you are interested in the Pragmatic Programmers, see also this interview linked earlier from Slashdot.
What if your an idealist?? (Score:1, Funny)
Re:What if your an idealist?? (Score:5, Funny)
You write emacs.
KFG
Re:What if your an idealist?? (Score:1)
or worse, HURD.
I'm not sure what 'Fark' is, but what about ... (Score:1)
Re:What if your an idealist?? (Score:4, Insightful)
Re:What if your an idealist?? (Score:5, Funny)
Seen outside space ship: (Score:2, Funny)
Props to Mike for JDepend... (Score:5, Interesting)
Re:Props to Mike for JDepend... (Score:3, Interesting)
The pragmatic bookshelf (Score:5, Informative)
I can't wait for their upcoming Ruby [pragmaticprogrammer.com] book.
Re:The pragmatic bookshelf (Score:2)
Re:The pragmatic bookshelf (Score:3, Informative)
It's a great book and I can't wait for the second edition.
P.S. Send an email to mando.escamilla@gmail.com if you want some gmail invites.
--
Mando
nice book (Score:5, Interesting)
I'm not a Java programmer (mostly Ruby and Perl) but I found a lot of stuff in this book inspiring. After reading this book I got bitten by the automation bug and did stuff like this:
* gave my big deployed apps RSS feed logging for errors (i.e., now I can track recent warnings and errors in apps deployed across the country, just in NetNewsWire)
* wrote a ruby script to automatically run unit tests whenever the files change.. based on a script on the web site. this is really cool! You edit your source file, save it, and pause to glance at the unit test window. again, why on earth didn't I think of this before!
* wrote an automated test framework using WWW::Mechanize to log into web apps and check for errors or anything else and send out emails
* use a nightly cron to check latest code out of CVS, run all tests, and run web tests..
Anyway "project automation" is like unit testing
So even if you don't do Java you can find a lot of ideas in this book (like the lava lamps showing build status!)
Re:nice book (Score:1, Insightful)
Simple tools for nearly everything you mentioned already exist.
Best companion book to Pragmatic Programmer... (Score:1, Troll)
Re:Best companion book to Pragmatic Programmer... (Score:1, Offtopic)
Re:Best companion book to Pragmatic Programmer... (Score:1, Insightful)
Re:Best companion book to Pragmatic Programmer... (Score:2)
Re:Best companion book to Pragmatic Programmer... (Score:3, Insightful)
Two books from 30 years ago on computer hardware and one is on Signal Theory?
Unless I'm doing assembly, could you explain why these books would be good for me, a programmer?
Re:Best companion book to Pragmatic Programmer... (Score:3, Insightful)
Re:Best companion book to Pragmatic Programmer... (Score:3, Insightful)
The fact that it got modded up is alarming.
Re:Best companion book to Pragmatic Programmer... (Score:3)
Re:Best companion book to Pragmatic Programmer... (Score:1)
Re:Best companion book to Pragmatic Programmer... (Score:3, Interesting)
Use Java Language (cleaner syntax than C), with the Java Virtual Machine (abstraction layer) and the Java libraries (API that works on different architectures) and problem solved.
Re:Best companion book to Pragmatic Programmer... (Score:4, Insightful)
Comparing Pragmatic Programmer to The Art of Computer Programming is like saying that raisins are just like prunes because they both make you go to the bathroom if you eat enough of them.
Don't get me wrong, I absolutely love Pragmatic Programmer and would consider it a classic, but TAOCP clearly has more, ummm, fiber.
The lava lamp automation software... (Score:5, Informative)
It uses Java to talk to the serial port... seems like a good application for ruby-serial [rubyforge.org], too...
Re:Wrong Link (Score:1, Offtopic)
Oh, *automation*. (Score:3, Funny)
--Rob
Helpful links (Score:1, Informative)
Probably most of us already know what these are, but for those who don't:
Extreme Programming [wikipedia.org].
Agile software development [wikipedia.org].
Buy direct from the Pragmatic Bookshelf (Score:5, Informative)
That's also the home page for the book with downloaded code samples and so on.
thanks!
Re:Buy direct from the Pragmatic Bookshelf (Score:2)
Why are the PDF version and the dead tree version the same price (excluding $2.82 for shipping)?
I expected there to be a cost savings for buying the electronic version.
No matter really though, I'm going to buy it just the same.
Gailin
Re:Buy direct from the Pragmatic Bookshelf (Score:3, Informative)
thanks for your support!
Good Start (Score:3, Insightful)
The big thing that jumps out at me is that he promotes how cool CruiseControl is for automating builds, but uses cron for his release builds. Generally, I would want to use the same tool to create my continuous integration, nightly and production release builds. I was under the impression that there were ways to make that happen in CruiseControl.
disclaimer: I help write a product that does do this, so maybe I'm just projecting biases.
The section on diagnostics also looks quite interesting, but I'm not that far yet.
Re:Good Start (Score:3, Informative)
Re:Good Start (Score:1)
Re:Good Start (Score:1)
In other news... (Score:1, Funny)
In this tell all exposee of beefly manufacturing processes, he teaches the enthralled reader how to use common, freely available tools to automate build, test, and release highly beeftacular burgers at a fraction of the current cost!
Way to go, Dave Thomas!
What if I program in C++ ? (Score:3, Interesting)
On the other hand, there is Test Environment Toolkit [opengroup.org] that noone seems to use. And STAF [sourceforge.net] which requires a huge investment of time just to comprehend.
So, question: what tools do people find useful for build/test automation with C++ ?
Re:What if I program in C++ ? (Score:2)
Making that happen repeatedly on a controled server is the domain of Anthill [urbancode.com], CruiseControl [sourceforge.net] and a handful [google.com] of for money tools.
Re:What if I program in C++ ? (Score:5, Informative)
I'm not especially satisfied with the currently available C++ unit testing frameworks. CppUnit and Boost's both have trade-offs. I suspect they'll both get better, though.
The Ant-Contrib [sourceforge.net] project's cc task works pretty well, in my limited experience. I was playing around with it just this weekend. I've yet to set up a tinderbox build process, but I don't see why this wouldn't be easy with either Cruise Control or good ol' cron.
In my mind, the two biggest hurdles with doing XP in C++ are build speed and developer prejudice. You can tackle build speed with a combination of ccache [samba.org], distcc [samba.org], good [www.gotw.ca] programming [att.com] principles [hillside.net], and cash [dell.com]. Tackling developer prejudice is harder. A lot of C++ programmers like to write low-level, unsafe, old school C++ code. Modern C++ mostly lets you discard unsafe coding practices without sacrificing efficiency. Whether you can convince an old C++ programmer of this is another matter; it depends on the person. I've had decent success taking Java programmers and teaching them modern C++ via pair programming.
Using Boost helps, indirectly. You write safer code, which gives you a faster development cycle. All in all, I think the basic tools are there. It might be a little harder to get fancy lava lamp integration going with C++, but there's no reason why you can't have a good build process. It's just that a lot of C++ projects haven't evolved (I think this is due, in part, to the fact that the C++ community is late to the internet; a lot of C++ programmers just don't know what's [apache.org], out [apache.org] there [c2.com].
cheers,
Jon
Re:What if I program in C++ ? (Score:1)
It's a great unit testing framework that's VERY flexible.
Re:What if I program in C++ ? (Score:2, Interesting)
It's not 1.0 yet but it's been building most of the projects at Codehaus for half a year now.
http://damagecontrol.codehaus.org
Another tip: Use something like Ruby/Perl/Python for your automation needs. Not only are they platform-agnostic, they are also waaay more powerful than Ant
Grab Bag (Score:1)
So, the PragProg is a grab bag. Who knew.
Hooray for PragProg! (Score:2, Funny)
(or 'PragProg' as it is usually referred to)
I'm a huge fan of PragProg. Oh Yes, we Rushed though development of our last application. Only once did we lose Focus, but you Can easily avoid these issues. Since its Genesis, we've got nearly a Marillion hits a day. I can't wait Tull I pick up this book.
Re:Hooray for PragProg! (Score:2)
Sorry. Good joke, just. . .a bit rich. :)
Re:Hooray for PragProg! (Score:2)
Cross platform, ant independant dashboard (Score:2)
Here [kitware.com] are some example dartboards.
Here [ohio-state.edu] is my dart board for the Mobius Project [projectmobius.org] I work on.
Interesting (Score:2, Informative)
Re:Interesting (Score:1)
It starts by suggesting the good review is supect because I have a vested interest in CruiseControl, and then goes on to say the review is good because the book is good.
For the record, yes I work for TW. I don't however have a vested interest in Cruise. I joined TW well after Cruise became an open source project soI don't view it any differently than ANT - it's an OSS tool I use, rather than a TW tool.
Again, for the record, I'd never really set a cruise intance up before a