July 10, 2008
Running the Numbers
Big numbers are really hard to visualize.
Charles and Ray Eames showed us how quickly they scale beyond human scope with their powers of 10 video
Now Chris Jordan uses art pieces made up of thousands of photographs to scale some large statistics down into a more human understandable form. Take a look at Running the Numbers on his website.

Depicts 1.14 million brown paper supermarket bags, the number used in the US every hour.
June 25, 2008
Lilly's Birthday Weekend
Lilly's 13th birthday celebration was a long, drawn out, affair. The night before her Birthday (Friday) she returned from a 2 day school hiking trip so we had a relatively quiet evening with just Maike spending the night. We ate Pizza and watched France vs Holland. The two girls were so exhausted they fell asleep before the end of the game! On Saturday we went to Dan and Sam's wonderful house near Blaye for a double celebration at as it was their wedding anniversary too. We all spent the night there and the following day we went to Lake Carcans and did some windsurfing with the Nutzels...
Guess what Lilly got for her Birthday?
The view from Dan and Sam's Lawn:
Cake on the lawn:
Dinner scene:
Some really good wine was drunk:
See the album for lots more photos...
June 12, 2008
Getting Rails and Prototype to talk XML
Another Ajax programming with Prototype tip. This one is aimed at Rails developers.I wanted to use Ajax.Request to communicate with my Rails application via XML. Turns out this was fairly straightforward apart from one major gotcha!
Receiving XML with prototype is easy but not very well documented. You simply set up your Ajax.Request as per the documentation then as long as your application returns a response of application/xml the XML body can be found in the responseXML property of the Ajax.Response object passed to your request callbacks.
For me this looked something like:
The other side, sending XML to the Rails app, is where I started to run into problems.
I wanted to Post the XML to the Rails app and have rails parse it with it's built in XML paramter parser. If you read the Ajax.Options documentation it would seem you just set the contentType to application/xml, set the method to post and put the XML in the postBody, right? Wrong! I couldn't get it to work. My rails app kept seeing the post args as form-encoded. It wasn't until I looked at the request headers in firebug that I realized what was happing. Prototype was appending the encoding string to the content-type header - "application/xml; charset=utf8". This is correct but Rails (1.8 anyway) doesn't recognize this as XML.
To fix it I found if I set the encoding option to be blank Prototype leaves the encoding string out. If you don't do this is defaults to "utf8". I'm sure you can also use content-type synonyms in rails but this seemed a way simpler fix.
My code:
BTW. Don't forget another caveat with posting XML to rails is your XML document must have only one root.
Anyway, you can see this in action on Bossa Live. I use it for loading music in the flash player and updating user profiles while they are playing music with the player.






