Accessible UK Train Times

A very quick entry today to mention a site that I’ve been using a LOT lately and I know I will be relying on for large quantities of travelling right through November: Accessible UK Train Timetables. It has up-to-the-minute information, including platform numbers, and you can bookmark queries for the next train between two points along with some other very cool shortcuts.

A site like this, which presents information very cleanly and I can easily use off my phone, is an excellent example of a good use of published data and I’m very grateful to them for this resource which really helps me when I’m out and about!

Add a heartbeat method to your service

Over the summer months I wrote a series of posts about designing APIs in general, and web services in particular. This included posts on status codes for web services, error feedback for web services, auth mechanisms for web services, saving state in web services and using version parameters with web services. I thought my series was finished but I thought of something that should have been included – perhaps the series will keep growing as I learn more?

I’ve worked with a couple of services recently that have a rather excellent feature – a method which calls the service but doesn’t do anything useful but simply lets you know the service is alive and well and residing at the location you thought it was. These “heartbeat” methods just allow consumers to check for signs of life, verifying that the service exists.

The heartbeat shouldn’t require any particular parameters or any authentication, since formatting data and passing credentials can be a stumbling block for those integrating with a service for the first time or those debugging issues. The heartbeat method can return some known data, perhaps an “I’m here” message, and maybe some version information. Flickr has a nice method flickr.test.echo which will also echo back any parameters that were sent to it – which could be useful for debugging values which don’t arrive at the server as you expected.

Another use for a heartbeat method is to allow monitoring systems to call a simple method, needing no credentials, and always get the same response back. Its not uncommon for these monitoring systems to be pointed at a particular page, and for failures to be indicated if the contents of that page changes (because data in the system changes, for example).

So – build a heartbeat service, you might never use it but when you need it, you’ll be glad you did!

Stash-Busting Striped Ripple Crochet Baby Blanket

For a few month I’ve been working on a handmade blanket for a baby expected by a couple of my friends – and I’ve finally been to visit and deliver it so here’s some details of the project. (OK so baby Ethan is about a month old and I only just made it round but, meh, life’s been busy! On the plus side, he’s big enough to be alert and kick about on his mat and look at us so that was really cute!!)

Its a basic ripple pattern, I have the 7 Day Afghans book and I reduced one of the patterns in there to baby-size with fewer repeats. It was a 6ml hook and the wool was taken entirely from my existing stash, basically it was a stripe or two of each of the DK weight wool I had lying around. So it’s colourful, and it helped make space in my life for more wool, and it was very inexpensive (i.e. free!), so on the whole the perfect project. Here’s the finished article:

Ethan's Blanket

And a close-up of those ripples:

Ethan's Blanket closeup

I’ve made a round ripple before but never a straight one, although I kept looking at patterns for them. When I heard about Deb’s pregnancy, I knew this was exactly the blanket I wanted to make! So, welcome Ethan, and good health to all the family.

Speaking at Bradford LUG

Next week I’m taking the plunge and attending a LUG (Linux User Group) meeting for the first time when I attend the Bradford LUG meeting on Wednesday as a speaker. I’ll be giving my talk “Working With Web Services” which I’ll give at PHP Barcelona a mere 36 hours later (Wednesday is the dry-run, let’s hope it goes well!). I’m excited about this topic and looking forward to meeting a new group of geeks – if you are in the area then I hope you’ll pop in and join us.

Pigeon Print

Recently I was working (I work from home) and I heard a really loud impact noise, like a football being kicked really really hard against something. At the moment my desk is in the attic, I looked at the cat, but he was asleep in the same room as me and hadn’t even looked up at the noise. I set off down the house, wondering if I needed to shout at next door’s kids for kicking the ball against something … and then I saw this

Pidgeon imprint

I’m pretty sure that wasn’t there earlier – this is my landing window so you walk past it all the time. A pigeon (I’m guessing) must have flown right into the window. I got a fright – but I can’t imagine how the bird felt!

Book Review: PHP Team Development

I was recently contacted by Packt Publishing asking if I would review a copy of one of their new titles – PHP Team Development. I happily agreed and the book promptly arrived in the post (just in time for me to take it on holiday and read it by the pool!).

Overall I was quite disappointed by the book – although at least half of that was due to the poor written English contained there. Some sentences didn’t even make sense, I’m not accustomed to reading anything other than clear English (“Vendor Locking” confused me for a while), and the language in this publication made reading the whole thing rather slow going. That said, for a brand new team of PHP developers with no previous experience of working in a team, there were some useful points in this book. Its clear that the author’s experience lies in a large organisation building a single product, whereas I’d say the level of this book would apply well to web development shops with a handful of developers probably working on a series of different projects for clients.

There are some solid concepts introduced – few are explained in detail though and after a couple of chapters I think a less experienced developer would have had a list of terms to look up rather than new ideas to try! Still, there are good explanations of source control, MVC, templating, and OOP elsewhere on the web and in other books so it would be possible for someone to follow up on this. I was particularly alarmed at the concept where one team writes the model, another writes the view and yet another writes the controller to tie them all together. Perhaps in big enough development teams, with a lot of up-front specifications written, this can work. My on-the-ground experience though would lead me to group tasks together by feature rather than separate them by bits of implementation – I currently work in an organisation that uses agile projects though where features are the whole point of the exercise, so perhaps that influences me.

On the whole, a perfectly nice book for beginners (available from the publishers or from Amazon)
but if you are already working in a team then you probably won’t get a lot from this experience.

PHPNW09: In Conclusion

Last weekend was the second annual PHP North West Conference, held at Manchester Conference Centre and attended by 200 people. We kicked off our weekend on Friday night, with a pre-conference social in a pub near to the conference venue. There wasn’t really enough space but it contained geeky things and sold actual beer, which seemed appropriate. Saturday morning saw the delegates arriving bright and early, ready for our Keynote from Kevlin Henney “The Uncertainty Principle”. He had a whole room full of developers laughing along with him in the early morning – what a great session :)

Next up it was my turn to speak – speaking at a conference that you’re also organising and doing the paper selection for has been a bit of a strange experience, I’d never say “never again” but both things detracted from the other slightly. My talk was “Passing the Joel Test in the PHP World”, which is a re-take of the Joel Test, adapted for web development – its a nice opportunity for me to get some of my thoughts across on a range of best practices and the slides are available online. Once I began speaking and my nerves got out of the way, I almost enjoyed myself – I got some great questions from people in the bar in the evening as well, hopefully I’ll be giving that talk again some time. We used joind.in to allow our attendees to leave feedback – they were great and the comments are still coming in. I was blown away by the feedback on my own talk however – conference organisers please take note!

The rest of the day was a whirl of organisation, chatting with people in the hallway, and catching a few bits and pieces of talks – I did see more talks this year than last year though which I was very pleased about. At the end of the day we had a session with some content from our premier sponsor Microsoft, a whole bunch of giveaways, and I was able to take the microphone once more to thank the organisers, particularly Jeremy and his team from Solution Perspective Media – after which it was time to party. The food was excellent all day, and Sun had put money behind the bar which took us almost all night to drink, they definitely financed some sizeable hangovers!

This year for the first time we also had an informal day on the Sunday, this was something I was deeply involved with organising and I think it went pretty well. Arriving ten minutes before the start time to find speakers, attendees, and a venue with the cafe already open was a welcome surprise before 9am on a Sunday morning! The five speakers that morning were a mix of experienced speakers, new speakers, core PHP topics and a few allied technologies. Plenty of people dropped in to hear a session or two and explore MOSI through the morning, I think it was a nice addition to the schedule.

All that remains is to extend a huge thanks to our speakers, helpers, sponsors and of course the attendees – if you were there I hope you had a great time!

PHP Code Sniffer Tutorial on Techportal

I’m pleased to announce that a my tutorial on using PHP Code Sniffer is now available on techportal. I had the opportunity to work with PHPCS in a recent project and thought it was a great tool, and looked more closely into how it works and can be configured. I learned so much along the way that I’ve put my findings together into a tutorial designed to enable others to pick up and start using this tool in their projects – I hope it helps someone :)

Portugal and The Internet Cafe

Things may have seemed a bit quiet around here lately – that’s because I spent last week in the Algarve in southern Portugal. My sister is working in a hotel there as head nanny, I think she’s spent 8 days of 2009 in the UK so this is about the only way to get to visit her, a beach holiday!

Despite the holiday I still had a lot on my to-do list so I took my netbook with me, and got my sister to show me the local internet cafe – it was a great place and worthy of mention, so thanks very much to Hugo Beaty in Praia Da Luz for a stable connection and good coffee :) It was good enough to work from, I almost wished I’d gone for longer and not taken holiday (I telecommute, nobody would notice!)

If anyone is interested, there are a few photos in a flickr set of the trip.