DPC09: Looking forward to the Dutch PHP Conference

This time next week I’ll be full of new ideas and enthusiasm as the Dutch PHP Conference 2009 will have ended. Last year was the first time I attended the event and I have memories of a great crowd and some fabulous sessions, also my first experience speaking at a conference (yes really, a year ago!). This year it looks like the event will be better than ever with an extra day and a schedule absolutely rammed with fabulous content. And best of all, I work for Ibuildings, so I get to attend (I’m not speaking this time around).

Conferences are a great opportunity to meet some like-minded people, find a peer group to drink socialise with, and of course get to hear all the sessions that are around and chat to the speakers. Amsterdam is a great place to do this, its well connected and there are speakers and attendees from right across Europe and beyond. Since I know the PHP community quite well, I’m looking forward to getting to spend time with this cool crowd – and of course all my developer colleagues will be there as well so a party spirit is guaranteed :)

There’s a few other things going on around the main conference – with social events and add-ons like the Oracle Installfest. I hear there are still tickets remaining so if you’re feeling a bit left out – come and join us! If you’re there, do stop and say hi to me – I know more people this year than I did last but its always nice to meet new faces too. Next stop, Amsterdam!

PHPNW09 – PHP Conference in Manchester

Last night at the PHPNW user group we announced this year’s conference – PHPNW09. We don’t have a lot of detail but here is a run-down of all the information I have:

  • Date: Saturday 10th October 2009
  • Location: Manchester Conference Centre. It’s a new venue but just as central and actually easier to get to.
  • Website: http://conference.phpnw.org.uk which currently points at last year’s conference but feel free to click around to get a feel and we’ll update that soon.
  • Focus: PHP in the team – we’re having a real focus on PHP teams, tools and practices for them.
  • Price: We’re aiming for the Early Bird tickets at 50 GBP + VAT, similar to last year (OK so last year was inc VAT but hey, it’s still excellent value). This price will run until 10th September, a month before the conference, at which point they’ll become more expensive.
  • Speakers: Yes please! Like last year, we’ll be running a call for papers and we’ll be looking for some well-known speakers and some we haven’t heard of yet. Like last year the speaker’s package will include the speaker’s dinner, a conference pass and hotel accommodation, but won’t include travel expenses – if you are interested then look out for a CfP in August
  • Schedule: See previous point ;)

Did I miss anything? If so, drop me a comment.

The timescales (all subject to change for no apparent reason and without warning) are something along the lines of getting the site live in June, the tickets on sale in July, the CfP out in August, closing towards the end of that month, publishing the schedule at the start of September to give people chance to get tickets still on the early bird rates which expire on 10th September – then another month for people who like their tickets more expensive and finally the event itself on 10th October.

A few other things I would like to mention:

  1. We want sponsors, including some quite small ones! If that’s you, please contact us or just leave a comment with your details
  2. We will need some volunteers on the day, all of whom get free entry – again, let us know if you are up for that
  3. We’re considering running a “day 0”, probably a hands-on day on the Friday, currently we don’t have either venues or clear plans for this so if you have any thoughts or ideas, add a comment!

Top Tips from Linux-Fu

I have recently been giving a talk entitled “Linux-Fu for PHP Developers” (slides are here) and although it includes some really basic commands, even some quite experienced people have thanked me for particular bits that they picked up. I’m considering dropping some of the sections from this talk so here are the things people most tell me they learned:

cd –

If you pass a single minus as the argument to cd, you will change back into the directory you just came from. Ideal for those switching-between-two-deep-links situations.

pushd and popd

I didn’t include these in my talk formally but I mentioned them almost every time I gave it (or one of the attendees did!). I don’t actually use these commands, but they are like an extension to “cd -” – you can build up stacks of directories and then jump around between them. They sound pretty handy so do take a look.

ls -lrt

I got a lot of negative comments for including “cd” and “ls” in my talks – but I had quite a few people say that the -t (to sort by time) and the -r (to reserve the sort) switches were new to . I use these together for viewing which files are new in a directory, great for logfiles or upload directories.

Hope these are helpful to someone, let me know if you use these or have others you’d like to share!

Architecting Web Services – FOWA Tour

I spoke at the FOWA Tour event in Leeds yesterday, as their local speaker (they set aside a slot for each place they go). It was a great event, good atmosphere and I really enjoyed the both crowd and content. I can’t imagine what the logistics for something like this are like but it seemed like everything was going pretty smoothly.

My talk was “Architecting Web Services” – just a half-hour slot to give an overview of what services are and take a look at some things to bear in mind when designing them. The slides are on slideshare so feel free to take a look and let me know if you have any comments or questions.

I had a great time meeting up with so many friends – old and new – yesterday. Hope that I’ll see some of those again at future events or online. Anyone for Bar Camp Leeds?

php|tek 2009: Quick Round-Up

Last week I was at the php|tek 2009 conference in Chicago. This was a really exciting trip for me – only my second conference as a speaker and the first time I’d attended any of the MTA conferences. I was absolutely delighted to have three of my sessions accepted into the schedule – although it seemed like a lot of preparation, I actually headed out to the conference feeling relatively prepared.

Tutorial Day

I spent the morning finalising slides with my co-presenter Matthew Weier O’Phinney … well, we looked at the slides before we wandered off to Starbucks anyway :) The trouble with preparing talks with someone that is both on the other side of the world and has a wildly important job (and gets promoted in the middle) is that its sort of hard to get together and organise these things. Actually the material was in surprisingly good shape on the day and our session was well-received – the slides are available.

Matthew and I delivering our tutorial

Immediately after our session, Matthew and I were interviewed by Keithy Casey and the video is available if you’re interested.

Thursday

After a relaxing Wednesday where all I did was show up to sessions and get my picture taken with the phpwomen, Thursday was a pretty crazy day. I had two talks scheduled, and both were in rooms that turned out to be unbearably hot. First I gave a talk on a topic I’m actually really excited about – Linux-Fu for PHP Developers – which was an overview of the commands I type when I’m working with linux. You can see the slides but I’m considering splitting this talk into two sections if I want to give it again – one introductory and one all about the tools I used. It’s the tools that are most exciting and I think that came across when I was giving the talk.

A couple of hours later I gave a talk entitled “Using and Understanding the Community” with my Ibuildings colleague Stefan Koopmanschap. I was surprised how many people attended the talk – there was a great atmosphere in the room and best of all were the people who came up to me later to say we’d inspired them to get more involved. I was even more surprised to have Cal Evans inform me later in the day that we had a slot scheduled in the uncon for the following day to give the talk again for those who missed it! There are no slides for this talk, since we only had one slide with a few URLs on it, however the second edition of the talk was recorded so the audio I guess will get published at some point – I’ll post here when this happens.

Things got a bit more light-hearted at this point as we had a slot in the unconference for a PHPWomen Craft Hour. All sorts of people turned up and knitted, crocheted, made lace, dismantled novelty cars, made pipe cleaner animals, and all sorts of other things. We had a great laugh and it was cool to meet some new faces. Hope we do this again sometime!

phpwomen crafty uncon

Finally for this day I gave a more serious uncon slot (with the craft still going on at the back of the room!) entitled “Architecting Web Services” – this is a talk I’ll be giving in Leeds this week at the FOWA Tour so it was great to try out the session with such a qualified audience at php|tek. Many thanks to those to attended and gave their input, I’ve re-worked the slides and will post them after giving the talk tomorrow.

Conclusion

All in all it was a great week – meeting new friends and catching up with old ones, and getting some great technical content in terms of both talks and hallway discussions too. Thanks to everyone who helped me have such a great time there – hope to see you all in the future :)

Linux-Fu For PHP Developers

The slides from my talk at php|tek are now online – Linux-Fu for PHP Developers. Thanks to everyone who attended and left feed back for me on joind.in. Feel free to leave a comment if you were there or if you have any questions about the slides!*

* Unless the question is “why didn’t you include X?” in which case the answer is that an hour-long slot was nothing like enough :)

php|tek 2009: Tutorial Day

I’m currently attending the php|tek conference in Chicago. Today is tutorial day, and I delivered a half-day session with Matthew Weier O’Phinney of Zend. Our session was entitled “Practical SVN for PHP Developers” and the slides are online. The session seems to have gone over pretty well – this is my first time delivering a tutorial and overall it was a good experience.

Later in the week I’ll deliver two more talks – Linux-Fu for PHP Developers and A Guide to Using and Understanding the Community – plus another in the unconference entitled Architecting Web Services in the unconference. So far I’m meeting old friends and new ones, and having a blast :)

Error Feedback for Web Services

I have been thinking, writing and speaking a little bit about web services recently, starting with a few thoughts on authorisation mechanisms for services. Today we’ll look at another really important aspect of authoring web services, and one feature that will definitely get used – error handling and feedback! Having clear and robust error handling in your service will help those trying to consume it immeasurably. Nothing is more annoying that impenetrable errors, unclear responses, or a service which accepts your input but then turns out not to have done what you expected. And I say that from experience.

Stacks of Errors

What’s more annoying than getting an error from a web service? Getting another error from the service every time you fix the first one!

Most services have a few steps of checking incoming variables. Checking that the user has supplied all required fields, and that all incoming fields are of the required format, and that the data they refer to does actually exist – there’s a lot going on here. Too many systems take fright at the first sight of an error, and return straight to the user like a child reporting a sibling’s misdeeds to a parent. I mean something along these lines:

if(!isset($_POST['username'])) {
  return 'username is missing!';
}
if(!isset($_POST['password'])) {
  return 'password is missing!';
}
foreach($_POST as $key => $value) {
  $expected_fields = array(
    "username",
    "password"
  );
  if(!in_array($key,$expected_fields)) {
    return "unexpected field ".$key;
  }
}

What’s more useful is if the user can have a better overall view of everything that is going wrong, since often they might be caused by the same misunderstanding or perhaps be related to one another. So I’m considering code that looks more like this:

$messages = array();
$can_proceed = true;

if(!isset($_POST['username'])) {
  $messages[] = 'username is missing!';
  $can_proceed = false;
}
if(!isset($_POST['password'])) {
  $messages[] = 'password is missing!';
  $can_proceed = false;
}
foreach($_POST as $key => $value) {
  $expected_fields = array(
    "username",
    "password"
  );
  if(!in_array($key,$expected_fields)) {
    $messages[] = "unexpected field ".$key;
    $can_proceed = false;
  }
}

if(!$can_proceed) {
  return $messages;
}

The nice thing about something like this is you’ll see a series of messages where there are problems – so when you mis-spell a field name, you’ll see the “missing field” message for a field you know you are sending, but you’ll also see the “unexpected field” message and hopefully that will make it easier to spot what’s gone amiss.

Error format

Its tempting to return error information in a completely different format, after all it is quite different from the request that probably would have been returned from a correct request. Some web service protocols dictate how errors should be sent – SOAP has the soap-error response, for example. But for something where we have more control, such as an RPC style or REST service, we can choose. Usually I think its appropriate to return an appropriate status code (for REST) or wrapper (for RPC) and then include the error information in the same format as the response would have been. This is mostly for ease of consuming the response, saving clients from having to parse an additional format!

Approaching Errors

Having malformed input to services is inevitable – through misunderstandings, typos, and of course rubbish input by users. Making sure that all these eventualities are gracefully caught and information returned to the user means that the user stands a much better chance of being able to interact successfully. If only the success case works, but the service either doesn’t respond, returns nonsense (or worse, misleading information!), or appears to work but actually hasn’t, your users won’t hang out for long to work out why.

I’ve covered some really basic ideas here but I’m sure there are plenty of other nice ways to help guide users – feel free to add comments for the features you implement in your systems to help users when things aren’t going quite right!

By giving more information to users, it becomes much easier for them to develop against your service quickly and easily – and its not much more to add on the service side.

Speaking at FOWA Tour, Leeds, May 28th

I’m surprised and delighted to announce that I will be one of the speakers at the rather excellent FOWA Tour even in Leeds on 28th May (two weeks today!). The day is like a roadshow version of the famous FOWA conferences, with a morning of (free!) cloud workshops and an afternoon of excellent speakers. I had been hoping to attend this event anyway so to get the invite to speak is very exciting indeed!

My talk is entitled “Architecting Web Services” and will take a look at the types of service available, and identifying functions which would be useful as a service. I’ll run through how decisions about service and format can be taken and we’ll look at some examples of these while we’re at it. I’ve been building a few services lately for one thing and another and I’m pretty excited about the whole topic! Luckily I only have a half-hour on stage but rest assured I’ll probably still be talking about it over drinks later in the day!

Anyone going? Thinking of going? Let me know and make sure to come and say hi on the day :)

Leeds GirlGeek Dinner 27th May 2009

I’m delighted to hear that the date has been set for the next Leeds GirlGeek Dinner – Wednesday May 27th 2009! I’ve been really enjoying this series of events and always meet some really interesting ladies when I attend these events. The idea is to get geek girls together for some talks (and there have been some really good ones in Leeds), some food, some drinks and some networking – men are allowed but only as the invited guest of one of the girlgeeks. This enables us to keep the balance and actually makes for a brilliant atmosphere. Its not often the men in the room are horribly outnumbered :)

This month we have Reshma Sohoni from SeedCamp and Jennifer O’Grady from Democracy PR – and I can’t wait to hear both these women speak and hear their stories. The details are all on the website but in short the event starts at 6pm, its at The Loft Leeds, and I hope I’ll see you there!