The Secret of SwitchTower

(Tue Nov 29, 2005) [/Automation#

If you haven't heard of SwitchTower, then I'm afraid you're missing out. And if you thought it was only good for Rails applications, then I'd encourage you to think again. I explain why over on the automation site.

CruiseControl Action Movie

(Sun Jan 23, 2005) [/Automation#

Every time I have an opportunity to talk to a group about continuous integration, I just fire up CruiseControl and act out a project episode. It's more fun that way for me, but, more importantly, I think a live demo offers an information-rich experience for all types of learners. I doubt that the visual learners really hear anything I say---the on-screen demo speaks for itself to them. What I say is probably more valuable to the auditory learners, and they might even appreciate my humor. And the kinesthetic learners just can't wait to get their hands on the keyboard to try it for themselves. Not everyone ends up using CruiseControl on their project, but at least they walk away knowing what a continuous integration tool can do for them.

Inspired by Jon Udell's work, lately I've been experimenting a lot with how to bring this sort of see-hear-touch experience to your desktop in a medium that's progressively downloadable. The first fruits: a CruiseControl action movie (playing at pragmaticautomation.com).

Let me know what you think.

Automation Gear On Display

(Tue Dec 28, 2004) [/Automation#

Stop by and visit the good folks at Softpro Books in Denver and you'll get a first-hand look (and feel) at some of my project automation gear. You know you've arrived when you see the red and green lava lamps blazing through the storefront window.


Automation Gear

The X10 devices that conveniently power the lamps are also there on the table, ready to be poked and prodded. And, because you know you want to hook up lava lamps to your scheduled build, take a free copy of the instruction booklet back to your boss' office.

While you're in there, please support Softpro and your dear author by purchasing a copy of the book that gives you soup-to-nuts recipes for automating your software project. When you pay, don't forget to ask for a voucher to purchase the PDF version of the book for just 99 cents. (The PDF offer applies to any Pragmatic Bookshelf title you buy at a participating independent bookstore.)

Thanks, and have fun!

Yes, Even Shell Scripts

(Tue Dec 28, 2004) [/Automation#

I write a goodly number of shell scripts because, well, you can do a lot of automation with a low-tech shell script. So I have enough of these buggers now that I can't remember if they all work. In other words, I have more than two scripts. And I feel this twinge of fear every time I tweak one of them.

For example, just the other day I was fiddling with a script that tallies up the number of words in a file. The proper way to do that on Unix is with a wc -w command. The -w part is really, super important because that means "words". And this script was working great, until I tried to make it better. Somewhere in the making-it-better process I changed the -w to a -l. This means to count lines, not words. It turns out that makes a difference.

Darned if I know why I wanted to count lines at that moment, but I suspect it was a debugging aid of some sort. Trouble is, I left that change in there after the debugging frenzy. So for days on end the script happily produced a number. Unfortunately, it was the wrong number. And finally I noticed that this number wasn't increasing at the rate I expected. OK, so a problem like this only takes a few seconds to fix, but that's after I've realized that there is a problem.

Sigh. Yours truly forgot about his friend the self-checking test. So when Jim Weirich blogged about the Ruby Session module, I was all over it. Here's a test case that screams if I inadvertently change -w to -l again:

#!/usr/bin/env ruby

require 'test/unit'
require 'session'

class ScriptTests < Test::Unit::TestCase

  def test_countwords
    bash = Session::Bash.new
    out, err = bash.execute "./countwords.sh tenwords.txt"
    assert_equal 0, bash.exit_status
    assert_equal "", err
    assert_equal "10", out.chomp
  end

  def test_build
    bash = Session::Bash.new
    out, err = bash.execute "./build.sh compile"	
    assert_equal 0, bash.exit_status
    assert_equal "", err
    assert out =~ /BUILD SUCCESSFUL/
  end

end

That second test there checks my build script. See, the build script uses Ant and once in a while I insert my own brand of XML in the Ant build file. And XML parsers haven't figure out my brand yet. So that test checks that the build file gets parsed without error and that it actually runs the Ant target successfully.

So yes, even shell scripts want to be tested. Take my (ahem) word for it. Better yet, scripts can be tested with this handy Ruby module. And if I can test a script after it seems to be working, then why wouldn't I want to eat the dessert first?

Beyond The Book

(Tue Dec 28, 2004) [/Automation#

Dave says they'll be shipping Pragmatic Project Automation sometime next week. Your local bookstore and Amazon should have it a week or so after that. I'm really proud of this book and I look forward to hearing your thoughts on it.

A quick search through my text file journal shows that I started writing on February 25th. This was the first time the tool chain had been used to create a book. In that time, a total of 18 adept and patient reviewers were involved in the pre-publication review process, not counting the careful eyes of Dave and Andy. One very detailed editor went through every page with a fine-toothed comb. And I maintained my training and speaking schedules, and somehow managed to take three extended weekends to charge my batteries. Not too shabby. Indeed, this experience has taught me many things, not the least of which is that as an author this process works for you, not against you.

So now that the book is done, you might be wondering what I've been doing with all of my free time. (I've certainly not been blogging much here.) It has been a busy summer for sure, but with Dave's help I've also been cooking up one more goodie. I'm happy to announce that the new Pragmatic Automation site is now live and anxiously awaiting the company of your favorite RSS reader.

Pragmatic Automation isn't just a static site about the book, its source code, and (ahem) any errata. The book's home page has all that info. Instead, this new site picks up where the book left off. I'll be actively posting up-to-date news and articles related to all sorts of automation to help you and your project. Where will I get all this automation fodder, you ask? Well, I'll keep my ear to the ground and report on what I hear. (Oh, and I have a few no-assembly-required-comes-with-software entries already in the can as a surprise a bit later.) But the best stuff will undoubtedly come from you. You're in the trenches on some wonderful project and you're probably already using automation to make your life easier. So help your fellow programmers get off the treadmill by sharing your automation news, story, tool, tip, or trick. Please suggest content!

Pragmatic Project Automation Available

(Tue Dec 28, 2004) [/Automation#

I've just returned from 12 lovely, laptop-free days traveling around Ireland, Wales, England, and Scotland. If you're tuning in from one of those countries, thank you for your warm hospitality. Oh, and I'd love to make a return visit to help on your project. :-)

I'm sure I'll have more to say about the trip later. And even better than words, I have pictures galore that I'll sprinkle lightly in my upcoming talks. (You won't want to miss how I subtly weave pictures of sheep into stories about software.) But first, I'd like to rewind to July 15th at DIA airport. As I await the plane ride that kicks off the trip, I keep having the unsettling feeling that I've forgotten something important at home. And then I remember that I have no laptop in tow. But then I remind myself that I chose to leave it at home and go off the grid. Everybody needs to go dark once in a while to recharge. Oh, but the timing couldn't be worse because Pragmatic Project Automation will be coming off the presses the very next day. I won't be online to watch its maiden voyage and (here comes the really bad part) I'll be the last person on the planet to get a print copy.

All that bemoaning is interrupted by a chance meeting with Dave Thomas, right there in the airport with minutes to spare before my flight. And with a big toothy grin he extends a gift bag containing (surprise, surprise) two copies of the book literally hot off the press. In an amazing feat of logistics that you couldn't pull off again if you had to, Dave had obtained early prints. The first fruits of the harvest, as they say. He just happened to be flying through DIA and knew I'd be there all wrecked about not seeing the book until I came back a dozen days later. So I owe Dave and the folks at the print shop a big thank you for starting my vacation off right. Have I mentioned how much I like my publishers?

Here's the really exciting part: You too can get your very own bottled-at-the-source, lovingly hand-wrapped, delivered-straight-to-your-doorstep copy of Pragmatic Project Automation simply by placing an order.

Cheers!

Lava Lamp How-To

(Tue Dec 28, 2004) [/Automation#

A few folks have asked how to wire up red and green lava lamps to their continuous integration process, as referred to in the book. I've posted instructions, pictures, and software here.

What You See Is What You Get

(Tue Dec 28, 2004) [/Automation#

Pragmatic Project Automation has gone to the printers! I'm super happy with the way it turned out. Many thanks to all the reviewers and storytellers who graciously contributed their time and ideas. The outpouring of support on this book was incredible, and I appreciate all of your hard work.

I know I've gushed about this before, but I've truly been spoiled by my publishers, Dave and Andy, and their publishing process. As just one example, I'm still trying to believe what happened in the final days. I was working through comments from the copyeditor, linearly from front to back. Meanwhile, Dave was typesetting in my wake. Let me repeat that: The book was being typeset at the same time I was applying corrections from copyedit. This pipeline turned out to be very efficient as we finished up copyedit and typesetting in just a few days. Then we all proofed the work, of course. And then we proofed it again to make sure the things we caught in the first proof had been properly fixed. OK, we might have proofed one more time, but that's because of what happened next: the PDF was FTP'd to the printer.

See, the entire time we were applying copyedit corrections, typesetting, and proofing, we were actually working on the PDF that, in coming days, will get printed on lots of paper. There's no intermediate stage where the writer's format is transformed into the printer's format. OK, I take that back; there is a transformation process, but it's automated. That process is called make book.pdf, the result of which is the PDF we proofed and sent to the printer. What you see is what you get. And for me, WYSIWYG turned out to be a huge differentiator, both in terms of time to market and quality. We were able to work fast to get this book out to you in a timely manner, but because there's no intermediate re-entry of the content, we're less prone to transcription errors. And when it comes time to make changes, I'll work on the master copy directly, rather than asking someone to make the changes for me.

Andy and Dave talk more about publishing and other important things in their recent OnLamp interview. If you want to experience an effective and refreshing process, consider writing a book for the Pragmatic Bookshelf.

I'm off to San Francisco next week to hang out with friends I haven't seen in entirely too long. I'll be spending most of my time at that ultra-cool geekfest everybody is raving about: WWDC. :-) OK, so I might go to a session or two at the other conference.

Book Reviews

(Tue Dec 28, 2004) [/Automation#

If you've been holding off picking up a copy of Pragmatic Project Automation until some of the early adopters have weighed in, here's a compilation of reviews that I hope will help you take the plunge:

Many thanks to all the folks who took the time to read the book and write up their review. It brings me great joy to know that it has been a fun and informative read.

Where The Automation's At

(Tue Dec 28, 2004) [/Automation#

If it has to do with project automation in any form, I'm blogging it over here. (And yes, there's more going on over there right now than there is here.) You can tune in with your favorite RSS reader by pointing it here. Suggesting content is always welcome and appreciated.

Everything not related to project automation will continue to show up here. OK, I might cross-pollinate once in a while, but if you're here and not also there, then you're missing out.