Monday, June 27, 2005

BBC Cult site to close.

The BBC's excellent Cult TV site is to close on July 15. Damn shame, get it while it's still there. [via Whedonesque]

Monday, June 20, 2005

Wild Flowers


Alaska state flower
Originally uploaded by GalleyWench.
Between my office and the nearest supermarket, there is nothing. Just busy roads, lined with pothole-filled pavements and grass verges peppered with rubbish thrown from passing cars.

Until today. Thanks to the weekend's sunshine the road to lunch is now splashed liberally with colour. Wild flowers have moved in. Marguerites are hiding the rubbish. Forget-me-nots are distracting people from the stubbly bald patches on the verges. Wild rose bushes leap out and point to the sky, yelling "Look, over there!" as you walk past the now-unnoticed steel crash barriers.

The trip to Tesco's has been transformed from a trudge to a pleasant stroll. As usual, I saw lots of things to photograph but didn't have my camera, so a quick tag search of flickr returned the beautiful flowers you see here.

I used to know the names of very nearly all the flowers I saw today. When I was little, maybe 6 or 7, I used to have a copy of the Observer's Book of Wild Flowers. I found it in a box in the attic, amongst my older siblings' discarded toys. I started collecting flowers with the obsession known only to little boys, pressing them carefully between the pages of this battered little book. For a couple of weeks in the 1970s I could have told you anything about any flowers in the UK.

Then I moved on to the next obsession (probably fuelled by my discovery of the Observer's Book of Aircraft), and all that knowledge got pushed out to make room. It went to join my Rubik's Cube solving expertise and long division ability.

Thursday, June 16, 2005

Poster Update

The wedding poster was a success. It didn't arrive in time for the weekend, my wife was presented with an empty frame and was duly confused. It turned up yesterday, and the missus was pleased, but it was too big for the frame we'd bought. So she nipped to the shops and now it's being framed. Which means I won't get to see it for another week or so.

The only drawback is that now I've set a high standard for wedding anniversary gifts. This one was made by me, was very personal and she liked it a lot. If I'd been thinking long-term I should have started off small - like the books from amazon. Sure, she'd have been disappointed, but not as disappointed as she'll be next year when she gets crappy books from Amazon.

ID Cards Bad.

eclectech : the very model of a modern labour minister : a tribute to charles clarke and his id cards. Very funny.

Friday, June 10, 2005

The Dress

The Dress, winner of the Orange Prize for Fiction short story competition. Really good, I'd read it if I were you. Go on. There's nothing anywhere near as good here, and probably never will be. [via bookslut].

Thursday, June 09, 2005

Wedding Poster


Wedding Poster
Originally uploaded by No Middle Name.
It's our first wedding anniversary this weekend, and I finally came up with a gift idea yesterday.

The first year's gift is supposed to be paper, and at first I thought of a book from Amazon. But that didn't really seem right, even to a man of limited romantic sensibilities like me. Then I remembered reading about this guy making a poster out of pictures from iPhoto. A quick google later and I was convinced. It's a nice way of making sure the wedding pictures don't stay in an album on a shelf, or tucked away on the computer never to be viewed.

The only problem was getting it printed. There are a couple of photo shops nearby that will print photos from CDs or memory sticks, but the largest they do is 15" by 10". I wanted to go for the big one: 30" by 20". More googling came up with photobox who seem quite good, and will do the big sizes. They'll even print it out on canvas stretched over a frame, but that was outside my budget.

I'll be lucky if it turns up before Sunday though, so it looks like my wife will be confused by the gift of an empty frame.

Tuesday, June 07, 2005

Geeked out.

I spent the weekend up to my nuts in XML-RPC shenanigans. It took me about 4 hours to add a web service interface to the dodgy content management system I knocked up for my wife to use on our family website. The php xml-rpc library is great, and made the whole thing really straightforward.

Then I knocked up an applescript to allow us to upload an album of photos from iPhoto in one go. Previously we'd been uploading them one-by-one via a web page. Tedious. All was going well, until I got to the part where I needed to attach the image data to the xml-rpc request. In the php test client I'd written it was easy; read in the image as a string, and the php library would convert it to base64 and tag it as such in the xml. Bingo, Bob's yer uncle.

Applescript's xml-rpc support is provided through the Apple Event Manager which performs the translation between applescript data types and the xml equivalent. It should convert binary data into base64, same as the php library. I couldn't find any documentation that covered this, and even the internets were silent on the matter. So, I thought I'd better handle the conversion myself, via do shell script "openssl -enc base64". Which worked fine, but when the rpc call was made, the base64 data was passed as a string type, which the server wasn't happy with.

So, I tried coercing the base64 encoded data to the type class of "data". This was better. The server didn't complain about getting a string where it was expecting base64, but it didn't actually work. The base 64 element of the request looked like this <base64>++++++++++++</base64>. That's a bit wrong. For a 50k jpeg there should be about 100k's worth of base64 data, not a few '+' symbols. But I was on the right track - the type class of data was being tagged as base64.

Next step: maybe the AEM is trying to convert the already base64 encoded data to base64 for me, and ending up with rubbish. So I removed the step which called openssl, and replaced it with a open for access... read ... as data call, to get the raw image data to pass. Again the base64 tag was just a line of plusses. I tried reading in the image file as a type of "JPEG picture". No good. Passed as a parameter the JPEG picture's name gets passed as a string, instead of the image data as base64. Coerced to "data" and you get the line of plusses again.

So, I've learned that the AEM will pass objects of type class "data" tagged as base64 in the xml-rpc request. But I don't have a clue what it's actually converting them to. In the end I went back to encoding the image using openssl and passing it as a string. I changed the server-side php to take the data parameter as a string instead of base64, and handled the decoding by hand (via php's base64_decode function, which was handy).

It's a shame applescript's xml-rpc is broken in this regard, or at least not documented properly, because the rest of the xml-rpc support is excellent. It's pretty nifty that I managed to write in a few hours what I'd not managed to accomplish in weeks using a combination of applescript and the curl command.

That's enough geekery. My brain dump is complete. Hopefully that will save someone a lot of time when they try to base64-ify something in applescript. (Assuming google finds it here).

Friday, June 03, 2005

Curmudgeon

I wish I could be as grumpy as Harlan Ellison:
What annoys me is that Spielberg is such an egomaniac these days that it has to be "Steven Spielberg's War of the Worlds". No, you puss-bag. It's "H.G. Wells' War of the Worlds", and it wouldn't kill you to put his f--king name on it.


I have this image of Harlan Ellison zooming around on a wave of burning bile, like Iceman or Frozone but with flames, looking for fights instead of helping people. He's my hero. Kicking ass and taking names. No, just kicking ass and slapping H.G. Wells' name on things.

I have no idea what a puss-bag is, but I'm going to make a point of calling somebody it today.