OSCON CfP

The OSCON Call for Participation is open for another couple of days and I’ve finally got over my nerves and submitted some talks to them. I haven’t been to this conference before, and couldn’t afford to send myself – but I took a look at last year’s schedule and knew I would kick myself if I didn’t even give myself a chance to get there. So I’ve submitted a few talks (one borrowed) and we’ll see what happens …

Speaking at php|tek

I’m delighted (and somewhat stunned) to announce that I’ll be speaking at php|tek in Chicago this May – you might also like to see the full timetable. This is one of the big events of the year and I was so desperate to attend that I gave the organisers a good choice of talks to choose from. The good news is, they accepted me. The slightly scary news is, I’ll be giving three sessions!

  • Practical SVN for PHP Developers – a half-day tutorial session I’ll be delivering jointly with Matthew Weier O’Phinney, Zend Framework’s Chief Architect, fellow subversion nut, and good friend
  • Linux-Fu for PHP Developers – tour of the command line tools I use
  • A Guide to Using and Understanding the Community – another joint session, this time with my colleague and friend Stefan Koopmanschap

If I survive that lot and the accompanying partying networking then I’ll be one happy girl. Wish me luck, and if you’re going – I’ll see you there :)

Published in php|architect

I’m very excited to be able to say that I was published in php|architect, in December’s issue. I had the /etc column, where I wrote a bit about phpwomen.org and what we’re up to these days. As I’ve wanted to write for them for ages, I was very chuffed to be asked and it was fun doing it :)

7 Things

It doesn’t seem like that long since the last time this happened, but apparently its been two years and the “tell us something new about yourself” meme has come around again. I was trying to ignore it but now I’ve been tagged by Matthew, Davey and Kathy I guess I can’t.

  1. People often mistake me for being younger than I am. This will be more fun when I’m older but right now I’m 28 and wishing people would take me seriously as a professional. (28!! Pay attention people)
  2. My family has a system called “Family Post” – if you want something transporting, you give it to someone who might see someone who might catch up with someone who has a family member in the same town as the person the item is intended for. Sometimes this system takes years but we can transport almost anything to anyone in the family, free of charge, including plants (and look after them on the way). There is no tracking system however, you just have to throw in your item and hope for the best
  3. My secondary education was at an all-girls grammar school (state-funded, examination entry). I even have a GCSE in Latin to go with it
  4. I have been dating the same man for over 8 years, which probably most people know. What I don’t usually mention is that when we met, he was already in a relationship and we’re now close friends with his then-girlfriend. In fact we’re just about to go to South America for 2 weeks to see her.
  5. I am terribly domesticated. I am a great cook and can feed varying numbers of people with relatively little stress or warning. I can knit and sew, so I can make clothes, soft furnishings, pretty much anything really. I am a competent gardner and an accomplished pianist.
  6. My boyfriend and I bought a 100+ year old house with 4 bedrooms over 4 floors which needed a lot of renovation. Its our first house and we’ve since discovered neither of us is great at or enjoys DIY. We’ll get through this experience but I wouldn’t recommend it
  7. I have no idea what I want to do when I grow up and I don’t have a 5 year plan. If I’d had a 5 year plan 5 years ago, I’d have had a much less interesting life so far.

Last time I did this I refused to tag anyone but this time I’m going to take the opportunity to introduce some of my blog readers to blogs I read myself.

EmmaJane – we have the same middle name and she’s also a geeky knitter
Girls Can’t What – Gretchen has a site full of brilliant female role models, and she’s an ace designer
dotjay – he tagged me last time, and he should blog more
Erik – a cool colleague who will be surprised by this tag
urbanwide – I joke that Deb is “the other girl developer in Leeds”! She’s a camera geek, ruby developer, and she helps me understand how “girl” goes with “geek”
Cally – the then-girlfriend in question
Mark Aitken – ex-colleague, mentor and friend

And now the rules:

  • Link your original tagger(s), and list these rules on your blog.
  • Share seven facts about yourself in the post – some random, some wierd.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

Book Review: RESTful PHP

I was recently contacted by the friendly people at Packt Publishing to ask if I’d like a copy of a new addition to their catalogue – RESTful PHP Web Services
, by Samisa Abeysinghe.

When I received and unpacked the book, it was a little lighter than I had expected, however REST really isn’t rocket science and can easily be covered in a tome this size. Overall it was well-written (with only as many spelling mistakes as any other PHP book) and clearly organised. The author begins by skating over why we don’t want to use SOAP, and shows his enthusiasm for REST as a replacement. However before the true elegance and concepts of REST are brought out and revered, we skip straight along and start to look at examples. Very few services that claim to be RESTful actually are, which makes writing anything along these lines very tricky, however I did feel the author could have been clearer about why having a single URL and a parameter for which action should be performed, doesn’t fit well. We do get a sense of excitement about services as ways to “glue together” bits of data on the net, and the possibilities of exposing and consuming information in this way.

Technical Content

Several frameworks are mentioned that can be used with REST, I’ve only heard of one (Zend Framework) – and this book works through a number of examples of working with Zend Framework to provide a REST service. The examples throughout are very thorough – starting with designing the service and getting the semantics of HTTP verbs sensibly applied. We are then taken through building the service using Zend Framework, creating a library class of functionality and then setting up the server to respond to incoming requests. For anyone using this book it is also worth checking for more up to date tutorials; Zend Framework has regular releases and some of the information in the book is already out of date – the dangers of the cutting edge!

Excess Baggage

On a personal level I’m not a big fan of frameworks; Zend Framework is a favourite but the use of it in this setting means that there is a large amount of the book dedicated to Zend Framework, the MVC pattern, and other things that aren’t really anything to do with REST. Call me old-fashioned but for me RESTful services need only HTTP and a data format of some kind, JSON or XML, and a good understanding of the grammar and structure of something that “smells” RESTful. In this book I got bogged down in the cookbook-style examples and lost sight of the bigger picture. The chapter summaries and best practice pointers though were great and I hope readers do take note of these.

Overview

If you need to build a RESTful service and you don’t mind Zend Framework, then this book will attempt to guide you through the process and explain plenty of useful stuff along the way. For a mid-level PHP programmer coming in to services for the first time, I consider this book a nice entry point. However if you were hoping to pick up the concepts behind RESTful services and look to apply them in your own work, then your $40 would be better spent on the RESTful Web Services from O’Reilly – you won’t be copying and pasting working PHP code, but you will come away with some great ideas.

Posted in php

PHP Advent Article Published

I was wildly excited a few weeks ago to receive an email inviting me to be one of the contributors to this year’s PHP Advent. Actually the biggest kick was seeing my name in a list of PHP luminaries! The article was published today, you can find it at http://phpadvent.org/2008/which-web-service-by-lorna-mitchell – its a short overview of various types of web services around with some pros and cons about when each is useful. To be included in the PHP Advent project has been huge fun, in fact I’m so delighted that I’ve broken one of my usual rules and blogged twice in one day :)

PHPNW Post-match Analysis

Last weekend saw a crowd descend on central Manchester in the UK for the first PHP North West conference. We had almost 180 attendees, 12 sessions, 16 speakers, and lots of fun. The day itself went off very smoothly and although I didn’t manage to see many of the sessions, the atmosphere both at the conference and at the socials was absolutely buzzing. I found myself doing the introductions which was a bit scary but apparently the audience were more scared than me when I laid down the law about not moving around during the talks!

On a personal level, I met up with lots of friends and also made several new ones – one of the best things about the conference for me was being able to meet “in real life” the friends I’ve made online, either on IRC or through my site or the phpwomen site. There were people there that I’ve met through my work and through attending other tech events – and to be able to shake hands and chat in person was great.

We also had a phpwomen stand at the event – which generated quite a bit of interest. For the record, we counted around 15 women in the 174 attendees, which is actually quite a lot – or rather, its more than usual – and it was great to see it. Also there were 2 female speakers out of 16 which was accidental but is also quite a good ratio so I’ll mention it (hi Steph, hi Zoe!)

All in all, it was a pretty stunning first conference – I’d like to personally thank Jeremy and the people from his family and company that he dragged in to help, and Jenny who also did a great job. The speakers were ace and the helpers on the day were also really excellent. The main sponsors were my employers, Ibuildings and it was great to have them around for this – and of course to catch up with my colleagues!

Locale-Sensitive Dates in PHP

I am working on a site at the moment whose front end is in Dutch – and for an English-only speaker, its an education! Most things default to English and I had no idea how to use PHP to work with other languages.

In particular I needed dates like “Donderdag 23 Oktober”, and I was sure PHP should know how to do this without me creating arrays for days of the week and months of the year. With some help from my friend (thanks Derick) I discovered that there is a date function in PHP that takes into account the locale of the script, called strftime. The machine needs to have the locale already installed, then you can just do:

         setlocale(LC_TIME, 'nl_NL.UTF-8');
         return ucwords(strftime('%A %e %B',$publish_date));

Setlocale() will return false if the language isn’t available on the host system, so its possible to check and maybe try a few likely ones or let the user know. This was useful to me and will work for other languages too – you just need the locale installed and then set with setlocale.