No Accounting For Taste

Our birth announcement cards arrived in the post today. I’ll be posting some of those through neighbours’s letterboxes tomorrow and sending the rest out in the post at the start of next week.

If I were designing a birth announcement card for my friends, I’d probably choose something with a geek element, such as the following bit of Ruby code:

family << Child.new( { :name => 'Lucas Alexander Caspar Matthijs',

:sex => 'Male',

:dob => DateTime.parse( '2008-03-31T13:31:00+02:00' ),

:weight => 3500 } )

Clear enough, right?

Sarah would never allow it, though: far too sensible and traditional. Oh well.

Posted in Children | Leave a comment

Growing Boy

On Tuesday morning, we took Lucas out for the first time in the car. It was also his first trip outside of Amsterdam, but only as far as Amstelveen, so he’s not exactly a globe trekker just yet.

We all went to the Amsterdamse Bos, specifically to Boerderij Meerzicht and had pancakes for lunch. It was Sarah’s idea and she’d picked a gloriously fresh spring day for it. After pancakes, Eloïse played in the playground and I took some photos. Why don’t we do this every morning?

That first trip in the car was hopeful. Lucas was quiet and patient. Only on the return trip, when we were just around the corner from our house, did he begin to get restless and cry.

I still remember Eloïse’s first trip in the car, from Mountain View to Los Altos in California, to get a passport photo taken. The return trip was hellish, and that was even shorter than our trip to the Amsterdamse Bos on Tuesday.

Speaking of passports, we picked up Lucas’s passport yesterday afternoon from the mercifully bustle-free stadsdeelkantoor.

Getting a passport is a relatively efficient process in this country. Lucas isn’t yet three weeks old, but he already has his travel document. We’ll eventually have to get him a US passport, too, because of the silly rule there that you must travel in and out on an American passport if you’re a citizen (which he automatically is, thanks to his American mother). This can wait until he’s about to make his first trip, however.

A woman from the Consultatiebureau came to the house this afternoon to do a check-up on Lucas. He’s growing well and has now passed the four kilo mark at 4010g.

We had a good conversation with this woman about why we don’t have our children vaccinated. She wrongly assumed, as do many people, that we were selfishly choosing to reap the benefits of herd immunity, whilst not having our children contribute to the herd. Not so. The reasons we don’t have our children vaccinated are many, but can basically be summarised as follows: we don’t believe the vaccinations are effective. In fact, we believe they are actually detrimental to society.

I could fill many on this subject alone, but people far more knowledgeable on the subject than I have already done so. I can give pointers if you’re interested.

Finally, the new boy in town has also gone on the waiting list for Eloïse’s peuterspeelzaal. You can never enrol your children too soon for anything here.

Posted in Children | Leave a comment

Beta Books

Beta books are a great idea. Why don’t more technical publishers (or even publishers of any work of non-fiction) do this?

Take the Pragmatic Programmers, Dave Thomas and Andy Hunt, and their publishing company, the Pragmatic Bookshelf. Dave’s currently working on the third edition of Programming Ruby, updated for Ruby 1.9. The finished product will be in the shops a few months from now.

Nothing unusual about that, you might say, but rather unconventionally, the book is already available for sale. How is that possible?

Firstly, the Pragmatic Programmers have taken the entirely logical step of selling PDF copies of their books. If you buy the paper + PDF bundle, you get them for less than the sum of the two. A PDF of a technical book is a grand thing, because it’s a lot easier to use a computer to search a file than it is to use one’s fingers and eyes to search a stack of paper.

PDFs are also cheap to produce and not just user-friendly, but environmentally friendly, too. Extending the idea, why not produce PDFs of books that aren’t quite ready yet. Offer them to your readers and, as with a piece of beta software, you’ll get errata reports back. Reader feedback is important to an author, so why not get that feedback while you write the book, instead of after it’s published, by which point it’s only useful for the next edition, which is almost certainly a few years away. And that edition will have its own problems, too.

So, I already have my copy of the third edition of Programming Ruby and am happily using it. Whenever the manuscript is updated, I get an e-mail, which allows me to go to the Web site of the Pragmatic Programmers and regenerate the PDF for myself.

I think PDFs of technical books make perfect sense. Beta PDFs of not yet finished books make even more sense, if you can improve on perfect.

Posted in Ruby, Technology | Leave a comment

Tunturi C85

My new crosstrainer was finally delivered on Friday. It’s a 2008 model Tunturi C85, purchased locally.

I’m glad I bought it locally and had the guys bring it upstairs and assemble it. I couldn’t believe how many pieces it came in. There were a million little screws and washers. The assembly instructions are very complex.

I spent Friday and yesterday preparing a new release of Ruby/AWS, so I had no time to play with my new toy until today. This afternoon, however, I sat down and read the manual (yes, I’m the theoretical person about whom you always wondered whether he existed: the man who first reads the manual) and then climbed up for my first training session.

And what else would I choose but the Fat Burner 1 programme? Let’s face it, I have fat to burn, figuratively and literally.

I must say, the half an hour I spent on the machine, I really enjoyed myself. It did, indeed, bring back memories of my daily visit to the Google gym. One negative thing that reminded me of those visits was the annoyingly familiar numb feet by the end of it. I’m going to have to think of a way to avoid those.

Off the crosstrainer, a quick, refreshing drink, and then into the steam shower. Lovely! And all of that without even having to leave my own house. Wow.

I’m looking forward to literally putting the C85 through its paces in the days and weeks ahead. It has all kinds of amusing features. It even has a couple of USB ports for updating the firmware, storing programmes and music files, etc.

Posted in Technology | Leave a comment

Ruby/AWS Released

I’m coding again and it feels good.

The only serious coding I’d done since leaving Google was tv_grab_nl_upc, an XMLTV Dutch TV programme guide data grabber for use with MythTV. It’s a decent piece of code, but it hasn’t exactly found a wide audience.

One of my most popular projects of all time has undoubtedly been Ruby/Amazon, a Ruby interface to Amazon’s Associate Web Service. Ruby/Amazon was originally written and released in 2004 as an autodidactic exercise for me to gain experience with programming for Web services.

It was written for Amazon’s AWS v3 API. Amazon announced soon after the release of Ruby/Amazon that it would soon be launching AWS v4, but would continue to maintain the AWS v3 interface until further notice. That notice came in the first half of 2007, when Amazon announced that it would finally shut down access to the AWS v3 API on 31st March 2008.

Close to a year’s notice would have given a normal person ample time to work on upgrading his code to use the new API, but I’m no mere normal person, so the code predictably continued to gather moss under my custodianship.

I did finally do some significant work on rewriting the library for AWS v4 while Sarah and Eloïse were in Chicago for a few weeks last summer, but once they had returned, the code stagnated again. By the time I’d found my latent coding stride — something I can only work up to in relative solitude — the house became a hive of activity once more.

The unavailability of that state of solitude, a state I find essential in order to foster concentration deep enough to produce quality code, has, as far as I’m concerned, been the most debilitating aspect of parenthood. If I’d had an office five minutes’ walk from here, that would have been enough to solve the problem, but being in the same house has proved, for me, to be too big a distraction.

Nevertheless, for whatever reason, in the last ten days of March this year, I was suddenly gripped by the urge to get working on the library again and knock out a working version for AWS v4 before the AWS v3 shut-down deadline at the end of March.

Version 0.0.1 of Ruby/AWS, the sequel to Ruby/Amazon, finally saw the light of day on 24th March. The code was ugly — embarrassingly so — and was publicly released for the sole reason of providing Ruby/Amazon users with a migration path to the new API. Yes, I should have given people more than a week to migrate — I should have done this work two years ago — but at least I didn’t leave them completely in the lurch.

Why the name change to Ruby/AWS? At the time, AWS was the only Amazon Web API, so it made sense to call my Ruby interface to it Ruby/Amazon. In the intervening years, however, AWS has become just one of many Amazon Web APIs. Therefore, it’s more accurate to call the new library Ruby/AWS. An even better name might be Ruby/Amazon/AWS. Take your pick.

Ruby/Amazon has, in some ways, been my most successful piece of code to date. Not only was it downloaded and used by a lot of people, but it also scored me an opportunity to write about my own software for an issue of Dr. Dobbs’ Journal a few years ago. Writing an article for a serious publication is always great, but writing about your own code is even more enjoyable.

Over the last three years, I’ve had many questions about updating the library for AWS v4 and even an offer of paid contract work to do it, but the motivation has always sadly been lacking. Then, suddenly, with the arrival of Lucas mere days away, I was suddenly possessed by the urge to do the right thing and not just let the code fade into oblivion. I suppose I needed the boost to my self-esteem, because a decent amount of my self-respect is derived from my intellectual muscle, if you will; muscles that have atrophied and become a bit flabby in recent times.

I was also spurred on by the increasing number of mails I was receiving as the end of March deadline approached, most of which basically said, ‘Help, my code is about top stop working.’ I felt a certain obligation to my users not to leave them out in the cold. For whatever reason, people weren’t entirely content with the other projects that had sprung up to fill the vacuum in recent years.

Anyway, yesterday saw the release of version 0.1.0 of Ruby/AWS, a version that no longer causes me embarrassment. It doesn’t (yet) support the full v4 API, but it’s pretty good at what it does.

What it does is ItemSearch, ItemLookup, SellerListingSearch, BrowseNodeLookup and ListSearch. It also supports batch requests and (as of 0.1.0) multiple operations.

Conspicuous by its absence is support for remote shopping carts. This will come later.

Version 0.1.0 has a new recursive XML parser that dynamically creates classes and instantiates objects from them on demand. This is an improvement from versions 0.0.1 and 0.0.2, as well as from Ruby/Amazon, which were all only semi-dynamic in their class definition. This one change allowed me to ditch most of the work I did last summer, which involved manually defining a large number of classes to match the data sets that could be returned by the API.

Anyway, it does feel good to have produced a new piece of code. Almost no code from Ruby/Amazon was recycled in the process, because the v3 and v4 APIs are totally different.

This Web site is already running the new code to display links to Amazon products in the left sidebar and Ruby/AWS has already been placed in the Fedora distribution (releases 7 and later), replacing the now obsolete Ruby/Amazon.

If you need programmatic access to Amazon, Ruby/AWS may be your thing.

Posted in Ruby | 7 Comments