I need to write about all this before I forget it. I attended d.Construct last Friday, courtesy of work. I wrote all my notes down in a little pad, only to leave it in the car park at Asda on the day after (it got recycled for a shopping list). Thankfully, the Asda trolley people aren’t too quick, so when I went back 5 hours later my notepad was still there.

First off, the conference was superbly organised. It was held at Fabrica, which was a beautifully unusual venue (an old church). When you went in, the hall was partitioned neatly into the registration / laptop charging area and the main stage. Everything seemed well thought out and the registration was done well. They did ask to see a form of ID, which seems sensible. Considering it’s the first event that they’ve organised, it was all very smooth.

The speakers were mostly excellent. First up was Andy Budd, who did a lot to enlighten me as to what Web 2.0 actually was. Of the whole day, he came closest to getting the idea across. Yes, it’s a buzzword for a disparate set of ideas, but it’s probably a useful one.

The second speaker was Stuart Langridge, all about DOM Scripting. For something that wasn’t quite as technical as I would have hoped, this turned out to be greatly enjoyable. Stuart is a very fluent speaker and he was really getting his message across well—how to do JavaScript, gracefully. We’re really going to start using his idea of a “behaviour layer” at work. A rousing performance. I only wish he’d had the time to go into some more technical detail.

Simon Willison showed us all around the flickr API. This was a treat, because it was really showing off the advantages of a REST style API. All the interactive bits of Flickr use their own API for Ajax purposes, so the team really has to build the API before they can build new features into the site. Simon demoed the API Explorer, which is a helluva neat tool. I’d love to build one for work, but I don’t think that we have enough metadata… Simon also gave me a huge smile by showing the most awesome photo of Maccu Piccu, where I was only a few months ago. I’m looking forward to seeing him again at the web frameworks shootout on Thursday.

After Lunch, we came back to Ben Metcalfe from the BBC. He was all about how much the BBC is opening up and sharing its data (it’s mostly feeds right now, but more is promised in the future). It’s good to see that we’re getting value for money from our License fees. Of note is that he highlighted, a product of two people. He also showed off a new application, which is like IMDB, but for the BBC. Matt Biddulph will be showing this off on Thursday at the web frameworks shootout as a demo of Rails.

Next up was something I didn’t particularly enjoy: Tom Hume on the Mobile Internet. This talk could basically be summarised as “There are more mobile devices than PC’s, so watch out”. Yet it was done in a seemingly very arrogant manner. Whilst it offered lots of impressive statistics about mobile coverage, there was nothing in there to grab me and make want to develop for mobiles. In fact, it sounded like a minefield of incompatibilities and it was a miracle that mobile services work at all. Open standards are frequently ignored or implemented correctly. Not for me.

Aral Balkan’s talk on flash was probably the one I was least lookingo forward to. As an open source web developer, I’ve never really had much use for the proprietary flash stuff. Nonetheless, Aral showed how much the flash platform has developed. In particular, the flex stuff for building UIs looks great, and having all the development tools in Eclipse is a big win. It also looks like it integrates with Java really well through flash remoting. Not only that, there seems to be a good open source Flash community these days, with lots of free tools. Definitely worth a second look.

Finally, Cory Doctorow was on stage. His talk was titled “The Remix Economy,” but it ended up being mostly a rant about the DVB. Personally, I still don’t get why we need Digital TV at all. The only thing it seems to offer is a minor freeing up of spectrum so that it can be sold off to the highest bidder. Certainly not much in it for the consumer—more channels, more crap. Anyway, Cory is a hugely entertaining speaker. Well worth listening to when the mp3 is up.

Sadly, we had to all be out of the hall at 4pm, by which time it was nearly dark. So, in traditional English style, off to the pub. I had to leave early (about 5pm), but by the sound of things, the drinking went on till long afterwards.

But am I any clearer on what web 2.0 really is? Well, like Andy said at the beginning of the day, “It’s a Zen thing.” 🙂


Recalcitrant CGI problems

One of the most useful tools in my box of diagnstics is strace (aka ktrace on FreeBSD or truss on Solaris). Right now, I’ve got a Perl CGI script that’s failing and I don’t know why. It would be useful to see what it’s doing in terms of system calls that’s making it fail.

Unfortunately, that could potentially be problematic with strace. It needs to attach to a new process by starting the command line, or by attaching with the -p flag. But I don’t want to attach to Apache, it will have far too many child processes and I don’t know which one will handle my request. And there’s no convenient point for me to tell apache to run my CGI script with strace in front.

Thankfully, a small amount of Perl can make it all happen. Stick this as the first thing in the file.

    local $ENV{PATH} = '/bin:/usr/bin:/usr/local/bin';
    system "strace -o strace.out.$$ -p $$ &";
    sleep 1;

Now, any time that I run the script, I’ll get a log of exactly what it did.


Cycling Today

For today’s ride, I went down Mill road, under the bridge to Waterhall playing fields and turned right to go along the cycle lane by the A23. I followed along until I came to the bridge to cross over into Pyecombe. From there, I went down the hill to the road to Clayton. After a mile or so, I turned right into Underhill Lane. A few miles of twisty, narrow road ensued (although a van politely decided to stop and let me past!). Eventually, I came out at the road up to ditchling beacon.

Yesterday, whilst out walking, a friend had commented that cycling up to Ditchling Beacon was best done only once a year. And I realised that it had been over a year since I’d last attempted it. So off I went. ANd to my surprise, it was nowhere near as difficult as I expected it to be. I’ve obviously been cycling a lot more in recent times. To my mind, Bear Road in Brighton is far, far harder. I think I had this irrational fear of Ditchling Beacon. But now, that’s all over.

At the top, after a few minutes rest admiring the view, I set off home again. I went along the top of the downs towards Pyecombe, following the path from the beacon. At the third field, I turned left and downhill via the extremely stony path that leads towards the Chattri. Eventually I arrived at the Chattri after watching some cows chewing the cud on the way. Seeing as today is Remembrance Sunday, there were fresh wreaths from a variety of groups. I took a snap as it looked rather lovely (even though the Sun had long since passed over).

The Chattri with wreaths

By now it was getting quite chilly with the wind and lack of Sun, so heading home was the prudent thing to do. Thankfully, it’s only 20 minutes or so to get home from the Chattri. A quick ride down to the A27 interchange, along Braypool Lane, over the A23, along Waterhall road and finally back up Mill Hill, where I’d started from.


Recursive Rails

I’ve been ploughing through the examples in the Rails book. Until I got to the testing section. In particular, the test_checkout method. I started seeing core dumps. Inspecting the core dump with gdb showed that there was obviously something going wrong recursively.

I had a look in the test.log file and it showed that was calling display_cart continuously in a loop, with an empty set of options. Tracking down a nearby log message, I got looking at components.rb. It was obvious that component_logging was being called with an empty set of optipons. But at this point I was more or less out of my depth (I’ve only just started learning ruby). So I turned to the rails development site for help.

There, a quick search for render_component quickly led me to ticket#2695. Glad to see I’m not the only one having the same problem. It also revealed that it had been fixed in change#2829. I manually patched my installation to do the same thing and everything works fine now.

But what I find really odd is the fact that Ruby will core dump (SIGILL—illegal instruction) when it recurses too deeply. It’s a bit weird that it doesn’t protect against that. Perhaps its just my installation on FreeBSD? I’ll have to test Linux as well. Hmm, there it raises a SystemStackError instead, which is more reasonable. I’ll have to point this out on the freebsd-ports mailing list.


Wet & Windy Cycling

Today’s cycling was very wet and very windy. I set off around 3pm (after finally fixing the puncture from last week) and headed for Devils Dyke, along the cycling path. It was pretty clear which way the wind was blowing by the fact that I had to lean my bike to the left in order to move forwards in a straight line. Surprisingly, I wasn’t the only cyclist around. I cycled all the way to the dyke with another chap. He set off in a different direction when we got there though.

At the Dyke, I turned left and headed for Truleigh Hill. It’s a very up and down route, through lots of grass and chalk paths. The grass was completely sodden—it was like riding through a pond. And the chalk was immensely slippery because it was so wet. Add to this, the wind trying to push you off the path and down the escarpment, it was a challenging ride. Normally, I’d race down there in top gear, but I didn’t even get close this time. Everything had to be done slowly and carefully. I’m immensely grateful to the lovely lady hiker who held open a gate for me so I didn’t have to stop.

Finally, I got to Truleigh Hill and the YHA there. No time to stop though, I had to keep going in order to try and get back before the light went. The road turned into tarmac at this point, so I could go up a few gears. Plus it was all downhill to Shoreham. The main problem was still the driving rain, which was beginning to feel like bullets at this point. The wind was still troublesome. I turned a corner at some speed and almost stopped dead because of it. I met a couple of cars going that way. I have no idea why they would want to do such a thing.

From Shoreham, I cycled along the sea front road all the way back to Brighton. This was really quite pleasant after being so exposed on the top of the downs, despite there still being a strong breeze. Eventually I got to Hove, turned up First Avenue and carried on. Eventually, a sharp right up the Droveway (I had no idea there was a tennis club up there!) led me on to Dyke road and home once more to freshly cooked food. I’m exhausted, but I feel great.


Solaris Tip

When trying to compile stuff on Solaris, you have to have more than just gcc installed. You also need the gcc runtime. For some reason, the box I am working on at work has got SUNWgcc, but now SUNWgccruntime. Simple to fix when you know the problem. But it took 2½ days to find the problem…



Matt Biddulph has just had an article published on, REST on rails. It’s a really great way of working, and I encourage closer scrutiny. And it shows off Rails at its best. I really look forward to playing with Rails more. I would like to implement PUT for that rest_resource method as well…

It also happens to be very similar to a system I wrote at work a couple of years ago using Perl and Class::DBI. The system we have at work is a bit more complicated and has more edge cases in the generated XML, particularly with regards to nesting. Looking at that article makes me wonder if we couldn’t simplify the design our protocol… But it’s already in use by so many clients, I think that would be difficult at this point.