World Traveler

One of the cool things about this job is that every once in a while I get an email like this:

From: one of my training company clients
To: Me
Subject: Want to go to Europe next week for us?
Would you like to go to Amsterdam next week to teach an Ajax class for us?


How cool is that?

If you can’t blog something nice…

… I suppose you shouldn’t blog anything at all.  That means I won’t be discussing anything here about my latest airline experiences, especially my trip through Chicago with the flight delayed 5 1/2 hours and then ultimately cancelling without telling me.  Nope, I’m SO not going there.

(Other than to say I feel so much safer knowing that no potential terrorist can smuggle aboard an unopened can of Diet Coke.  Or toothpaste.  Wouldn’t want them to attack the plane with toothpaste — think of all the deadly combinations that could lead to.  But I digress.)

I also clearly can’t address the current Red Sox lineup, with its almost complete lack of high on-base percentage hitters.  I can’t talk about our pitching, either, especially the rubble that is the relief corps (or is that corpse?  Other than Jonathan Papelbon, of course, who’s looking awfully tired out there).
Back to work on the Hibernate materials.


Baseball Tour 2006

Normally here I’d rather spend time talking about technologies I’m working with and the process I’m going through learning them, but I thought I’d take a small moment as an aside to mention the baseball tour I just finished with my son Xander, 14.

A week ago Sunday (8/6) we went to McCoy Stadium to see the Pawtucket Red Sox, the Boston AAA affliate, generally known as the PawSox. We were very fortunate to get two tickets. The stadium was packed and enthusiastic. We had a great time, even though the PawSox lost 12 to 2.

We originally planned to spend the following weekend checking out the Lowell Spinners (the Sox’s A league affliate) and the Portland Sea Dogs (AA for the Sox), but both were sold out. That came as quite a surprise to me — I’m not used to minor league teams being sold out, but there it was. Instead we decided at the last minute Friday morning (8/11) to make a trip south. I was able to get tickets to the Philadelphia Phillies in Citizens Bank Park. We drove all the way to Philadelphia, which I now realize is not an easy thing to do on a Friday afternoon. We left at about 12:30 pm and made it to the part at 6:30 pm for a 7 pm game. Whew. Then the game (against Cincinnatti) went 14 innings (!) before the Phillies won.

We spent the night at my sister’s, then traveled to Reading on Saturday (8/12) to see the Reading Phillies take on the Harrisburg Senators. That game, too, went extra innings, but Reading won in the 10th. That stadium was rocking, too. It was practically full and loud. Probably the fact that it was Harley night didn’t hurt.

On Sunday we then went to see the Scranton-Wilkes Barre Red Barons, who were playing, interestingly enough, Pawtucket. That was the first place we went where the crowds were small and not really involved, but we had a good time anyway. That was also the first stadium Xander had ever been to that had artificial turf. After the game the Red Barons let kids run around the bases for five minutes, so we were able to see how spongy the turf was first hand.

A long drive later we were home. That ended that particular trip, but on Tuesday we went down to see the Connecticut Defenders (the former Norwich Navigators) defeat Altoona 2 to 1. I splurged at that game, paying the extra $5 for sky box seats, which were great. They even had fireworks after the game, which were very good, except for the fact that the smoke was thick and hovered over the field, making it hard to see the fireworks after a while.

So in the end it was five games in about a week and a half, including the Phillies and their AA and AAA affliates, the AA affliate for Boston (once home and once away), and the San Francisco AA affliate (the Defenders). Most amazing, in every case the weather was absolutely perfect. Hopefully we’ll be able to say the same next year.

I’m trying not to think about the fact that the Red Sox are two games behind the Yankees, who are coming into town for five games in four days.  Jason Veritek is still on the DL, as are Trot Nixon and Tim Wakefield.  The pitching is very shaky these days.  This could be an ugly, ugly weekend.  Or maybe not.

Ruby web service clients

Yesterday I was in a Barnes and Noble bookstore and I started browsing through the Ruby Cookbook by Carlson and Richardson.

Quick aside: I still can’t believe how quickly Barnes and Noble has descended from a decent bookstore into practically garbage, especially as far as software development is concerned. The number of development books is down to a tiny fraction of that a few years ago, certainly no more than 5%. I was so happy when a BN opened in Glastonbury near my (old) house and unfortunately it’s still the closest bookstore to me, but now it’s just depressing. Even leaving aside the drop in selection, as Malcolm Gladwell points out in The Tipping Point, context matters. If nothing else, the managers of the store in Glastonbury could help themselves considerably if they would just oil the stupid door hinges (it’s been literally years since this was done) and clean the bathrooms every once in a while. If there was a Borders anywhere near them I’d never go in that store again.

Bruce Tate in his book Beyond Java points out that Java developers rarely look outside of Java because the field keeps moving so quickly they feel they have to run as fast as they can just to keep up. I really understand that feeling. At the end of December of 2005 I decided I was going to learn Ruby and Rails. I spent the next couple of months really digging into them and made a lot of progress. Ruby is sufficiently different from Java that it’s not at all an easy transition, though, despite what Rubyists say, and I learned just enough to get stuck on a regular basis.

Eventually I had to go back to Java, partly because I understand it and partly because it’s still paying the bills. I really need to become good at Hibernate, Spring, JSF, Tapestry, etc, and they all take time. Consequently, around the middle of March I switched gears and began really digging into Hibernate again, as I’ve mentioned here on several occasions.

Still, the allure of Ruby is strong. I think I may be past the newbie stage, but I’m hardly any good at it yet. On a scale from 1 to 10, I’d give myself about a 4, and that mostly based on reading rather than experience. I did read the pickaxe book (Programming Ruby by Dave Thomas) and R4R (Ruby for Rails by David Black) as well as the RoR books Agile Web Development with Rails (Dave Thomas again, among others) and a couple of the O’Reilly Rough Cuts. In other words, I’ve read the background material but haven’t yet gone through more than a couple of the Ten Canonical Errors in each technology.

Anyway, I mentioned here that about a week ago I decided to write a quick web service client for my Rensselaer students. I used the Amazon web service, connected with the URL class in Java, and parsed the resulting DOM tree (not fun). So yesterday I was browsing through the Ruby Cookbook, as I said, and found this code from Recipe 16.1:

require 'amazon/search'

$AWS_KEY = 'Your AWS key goes here' # See below.
def price_books(keyword)
  req =$AWS_KEY)
  req.keyword_search(keyword, 'books', Amazon::Search::LIGHT) do |product|
    newp = product.our_price || 'Not available'
    usedp = product.used_price || 'not available'
    puts "#{product.product_name}: #{newp} new, #{usedp} used."

price_books(‘ruby cookbook’)Wow. It depends on a third party library, but I found that easy to download and install. I tested it out using my RadRails editor and it worked like a charm, with all the product information already converted into a Product class.

Even more amazing is this little snippet from Recipe 16.7, Using a WSDL File to Make SOAP Calls Easier:

require 'soap/wsdlDriver'
wsdl = ''
driver =

puts "Stock price: %.2f" % driver.getQuote('TR')

Holy cow. That’s three lines, really, and you can invoke a web service without even having to download the WSDL file. I wrapped it in a class and tried various web services at and it worked without a problem. Not only that, but the “soap/wsdlDriver” library is built into Ruby 1.8.4.

I don’t even need a comment here. I simply have to find time to build up some experience with Ruby, and then go back to Rails, definitely by the time the next version of the AWDR book comes out. I purchase the “beta book” version from the Pragmatic Programmers already, but I think the hard copy becomes available in the Fall.