TEK-X: Conference Report

Its been quiet around here recently, partly because I have been really busy and partly because I was in Chicago last week for the wonderful TEK-X conference. It would be very cool to get to go skipping around the world to conferences, however people paying for my airfares do seem to like me to perform some useful function while I am there and this was no exception with one tutorial and two talks to deliver, plus an appearance on a panel. I’ve attended this conference in previous years however so I knew it would be well worth it :) My sessions and an overview are outlined below:

PHP Best Practices

I was privileged to get a tutorial slot alongside my good friend Matthew Weier O’Phinney for a second consecutive year. This year we presented “PHP Best Practices” which was a lot of fun. We squabbled over topics and took turns presenting them from our own point of view. A description of the session and a link to the slides are on the joind.in page if you are interested.

Subversion in a Distributed World

Now that this talk is finally over, I don’t mind admitting that this was the one that I regretted submitting pretty much from the day it was accepted until the day I delivered it, including some rather sleepless nights. It was an adaptation of my “git folks are fanbois” bar rant but I got so concerned that I wasn’t supporting my accusations with facts that it evolved into a very coherent evaluation of what I consider to be the four main version control tools around at the moment: Subversion, Mercurial, Bazaar and Git. The talk went over better than I could ever have dreamed, and again you can find description, feedback and slides on the relevant joind.in page. If someone could please stop me next time I submit a talk that needs as much work as this, that would be awesome!

Open Source Your Career

I almost didn’t submit this talk, since its so very difficult to get a community talk accepted at the big conferences. They usually have one, at most, and I wasn’t sure I was in the top one of submitters on this topic. But, I had a transatlantic airfare to justify and I figured it might make a good second talk – I also know Cal well enough to know he likes a slightly contraversial take on these things. When he accepted it I was fairly surprised and actually quite nervous about spending an hour talking about myself in a conference session! I spoke without slides, so there aren’t any, but you can read the outline and feedback on joind.in. In a nutshell: get out and do things, you will reap the benefits one day.

In Conclusion

I had a great time in Chicago, and also managed some touristy outings into Chicago:

Garden in the City The Bean

The conference itself was quite a rollercoaster, not least because every session I delivered was written from scratch for this conference and I spoke at two other big events this year already – 4 sessions over 4 days is a tall order however you look at it and I had pushed my own boundaries a bit with the talks I submitted (for the record, I submitted plenty of perfectly nice, ordinary, technical talks that somehow didn’t make the cut!) On the final morning I delivered the career talk and then immediately sat on the community panel. I was aware of people saying to me “have you seen twitter?” but I had to turn around between sessions so I just nodded, smiled, and got settled for the next session. The upshot of that was that I sat in Marco’s closing remarks and read 2 hours worth of tweets about me, plus all the joind.in feedback on both sessions, all in one go.

At the risk of understatement, the feedback was totally out of this world, I couldn’t believe how well the sessions had gone over and it took me about 3 days to get over the shock … which is another reason it took me so long to write this post.

I’d like to say thanks to everyone who was there, left feedback, helped me prepare or just showed up to the conference and joined in the event as a whole. Stay in touch and I’ll see you all next year :)

A “new” Netbook for Conferences

A couple of years ago, I attended ZendCon for the first time. At that time, the only laptop I had was a work machine weighing 5kg, and I was staying in a different hotel from the main conference – so I hastily bought pretty much the first non-ee netbook on the market (which was released about a week before my trip) and took that with me to the event. There were lots of limitations of it but I didn’t have a whole lot of choice … since then I’ve improved it significantly!

More than 512 MB RAM

I’ve now had the machine more than 18 months and I’ve been using it for events and keeping it by the bed pretty much ever since. However this year I’m speaking at TEK-X in Chicago and found myself wondering if I should get a new little machine to take with me. A few months back I upgraded the RAM in the machine (it had 512 MB originally!), and I came to the conclusion that actually, I didn’t need to splash out for a new netbook since with a bit more memory, its pretty usable.

Bigger Battery Life

Instead of replacing the machine, I bought the extended battery for the aspireone, taking me from about 2 hours to about 6 (I think, haven’t tried this battery life in anger yet). Its chunky, but not offensive:

DSCF1476

It is quite a bit heavier than the old one – my original post about getting the aspireone weighed it with its original battery at 971g and with the extended battery, its 1274g, which is still only half the weight of my current work laptop.

DSCF1480

Kubuntu Netbook Edition

Reading back to that original post about the netbook it was pretty obvious that I was hating that operating system. A couple of years ago, the support for aspireone in Ubuntu Netbook Remix became usable, and I installed that. Its been fabulous and I had no intention to do anything more than upgrade … until someone at OggCamp showed me they had the Kubuntu Netbook edition on their netbook.

DSCF1486

It is shiny and blue, and since I use KDE on my laptop I couldn’t resist and I upgraded it with a week to go before I take it as my only machine as a speaker at a conference!

In Summary

I haven’t spent a lot of money on the upgrades, the battery was about 50 GBP and the RAM came out of something else. I did have a large capacity SD card in the expansion slot since I only have 8GB hard drive. Then there was a problem with the machine suspending with the expansion slot in use and at around the same time I got a camera that takes SD … so I put my big card into there instead :) I don’t keep data on the netbook so its not an issue for me. I’ll be flying to Chicago for Tek in a few days, and presenting off my netbook as usual. For a budget machine with a little bit of love and attention added in, “Merry” (short for Merope) the netbook has been quite a fabulous investment!

Podcast: How and Why to Become a Speaker

This is a podcast version of my rant-in-the-bar advice to anyone thinking about speaking, or wondering how to begin. Personally I think many more people could be sharing their expertise at events than actually do so, and I would really like anyone who wants to get involved to have a starting point. So if that’s you, and you have a spare ten minutes to listen to my thoughts on the subject, then the mp3 is here.

Let me know what you think, and if you have any other advice you’d give to someone who isn’t yet speaking.

Thoughts on OggCamp in Liverpool

Last weekend I went to Liverpool (my first visit there!) to attend OggCamp for the second year in a row. This isn’t a part of the software community I normally interact with, but I accidentally went to a LUGRadio event once a couple of years ago and have been hooked ever since!! OggCamp went to 2 days for the first time this year and was a triumph of organisation, with a great venue and a wonderful feel to the whole event. I was particularly impressed (as an event organiser myself) that for an event with no registration, they had the right number of chairs, the venue was the right size, but in fact they didn’t have that information so a very well done to whoever made that call :)

I spoke again this year, it seemed to me like since there was voting on the talks, if my talk wouldn’t be a good fit then I wouldn’t get a slot! So I did put in a talk about source control; a topic that I’ll be speaking on in a couple of weeks at TEK-X in Chicago and one that I still feel a little bit wobbly about. Taking the main stage to give a hastily-reduced version of the talk to such a well qualified audience and coming off the stage to feel like it went OK was an excellent preparation for my next speaking event and I got chatting to all sorts of people while I was there. I’m not really a linux nut but I do have ubuntu or kubuntu installed on everything, and it was great to hear a bit more about so many aspects of technology that I use but don’t know much about.

The event ended in the traditional live podcast with all the presenters of Linux Outlaws and the Ubuntu UK Podcast all on stage at once. This is always good fun and there were some laughs from the crowd as always.

OggCamp Live Podcast

All in all, a great event, and I’m very much looking forward to next year’s!

Accessing the Magento Web API

I’ve been working with the Magento Web API lately, and the first problem I ran into was actually getting access to it. Contrary to its reputation, I found some perfectly good documentation outlining how to connect to the service and use it. I thought I was on to a winner but I kept seeing:

Fatal error: Uncaught SoapFault exception: [2] Access denied.

Further investigation led me to this forum post – web services are separate users and you must first set them up through the admin screens – and make sure also to allocate roles to them.

The slight pitfall at this point is that you create a username and an API key – these then become the apiUser and apiKey variables mentioned in the documentation. The key is basically a password, its starred out in the settings and you have to enter it twice. Now I know that, I can log in to my service! Hope this helps someone else get to the point faster than I did.

Speaking at PHPNW May

Next week I’m speaking at the PHPNW User Group in Manchester on Tuesday Evening, 4th May – full details of the event are on upcoming.org. The talk isn’t directly about PHP though; I’ll be giving my “Open Source Your Career” talk, discussing how contributing to the community can really help your professional rise. I’ll be giving the this talk at the TEK-X conference in Chicago a few weeks later as well, hope to see you at either one event or the other!

Bzr-svn: Preserving Commits and Rebasing

Recently I’ve been using bzr-svn when I’m working with subversion repositories; its a bridge between a local bzr repository and a remote subversion one. I travel fairly frequently and the pain of being disconnected from the server, unable to diff or log, and then either unpicking everything I’ve done or sending a monster commit with the message “Things Lorna did in the last 2 days” is just tedious and annoying. Possibly more tedious and annoying for the rest of the team than me even, so a better solution is more than welcome!

Some time ago I blogged about starting to use bzr-svn but its taken me a while to get past those first steps. Having the repo locally is so fast to use, and the speedy diff and log functionality had me completely sold straight away. I’ve been mildly annoyed by bzr squashing my commits though, meaning that I’m still doing a single monster commit to subversion when I come back online after being gone for a few days.

Today, with some help from the very lovely people in the channel on freenode, I found out how to preserve my commit history when sending the changes back to subversion from bzr-svn. The bzr-svn user guide recommends a particular set of commands, but this includes merging your changes into the mirror of SVN. Even in a standard bzr branch, this would show in the logs as a single, combined commit.

Push, Don’t Merge

The key to retaining the commit history is to push changes from the branch, rather than merging into the trunk mirror. To make this clearer, I’ve shown an example. The SVN is checked out into lorna-trunk and I’m making changes in the lorna-branch directory, including adding the db directory and the hello.php file.

$ bzr commit -m "initialising database files and hello.php"
Committing to: /home/lorna/data/personal/publish/tek10/svn_vs_distributed/bzr-svn-example/lorna-repo/lorna-branch/
added db
added hello.php
added db/setup.sql
Committed revision 2.
$ bzr push ../lorna-trunk/
All changes applied successfully.
Pushed up to revision 2.

No matter how many times you commit, when you push, all your changes will be sent to subversion as individual commits in the same way. This will really help me next time I’m offline for a little while!

When There Are Changes In Subversion

Charmingly, while answering my questions to get me this far, the channel inhabitants then immediately explained to me that to handle changes in subversion, I’d have to rebase my branch before I could push my changes. This is because you can only push to a branch that is in sync with where yours was when you started making changes. If you try to push to subversion when there are changes in it, you will see this error:

bzr: ERROR: These branches have diverged.  See "bzr help diverged-branches" for more information.

All I needed to do was to run bzr update in the mirror, and then rebase my branch onto that. At first my system didn’t recognise the rebase command, but this was because I needed to install the bzr-rebase package (called bzr-rewrite in newer versions but bzr-rebase in mine, Ubuntu 9.10 Karmic Koala). Rebasing was easy to do and brings the changes from the repo into your working branch. Here are the commands and how the output looked for me (with shortened paths to make this more readable):

lorna@taygete:~/.../lorna-branch$ cd ../lorna-trunk/
lorna@taygete:~/.../lorna-trunk$ bzr update
+N  readme
All changes applied successfully.
Updated to revision 3.
lorna@taygete:~/.../lorna-trunk$ cd ../lorna-branch/
lorna@taygete:~/.../lorna-branch$ bzr rebase ../lorna-trunk/
All changes applied successfully.
Committing to: /home/lorna/.../lorna-branch/
modified hello.php
Committed revision 4.
lorna@taygete:~/.../lorna-branch$ bzr push ../lorna-trunk/
All changes applied successfully.
Pushed up to revision 4.

I haven’t had a lot of experience with using this in difficult situations with complex branching or conflicts yet, if you have any tips to add though, a comment would be excellent :)

svn+ssh with specific identity file

Here is a quick howto on using a config file to associate an SSH connection with a particular identity file. When I ssh directly from the command line, I can specify the port, identity file to use, and a whole raft of other options. However these options aren’t available when checking out from subversion using svn+ssh, and I needed to specify a particular private key to use. These instructions are for my kubuntu 9.10 installation but should work on every flavour of *nix as far as I know.

I was trying to check out using something like this:

svn co svn+ssh://[email protected]/desired/path

To do this, I created this file: ~/.ssh/config and in it I put the following:

host lornajane
HostName svn.example.com
IdentifyFile /path/to/private_key

Now I update my checkout syntax to make use of my alias rather than specifying the host directly, like this:

svn co svn+ssh://lorna@lornajane/desired/path

SSH realises that it should pull the host information from your local config file, and uses your HostName, IdentityFile and any other settings you specify (there are many options, see this reference for more information. For example I often use this for port numbers if I’m tunnelling my SSH between places, the possibilities are endless.

Hope this helps, if you’ve got anything to add then I’d be delighted to see a comment from you.

Book Review: Making it Big in Software

Recently the kind folks at Prentice Hall contacted me to ask if I’d like to read a new publication of theirs , “Making it Big in Software“. It sounded like something I’d be interested in and the copy duly arrived. My first impressions were of a wordy book, very much aimed at large organisations, or those working in academia. And although I’m 20-something myself, the advice in the first sections of the book is aimed more at students or recent graduates than, I felt , at me.

Moving on into the book I found more that applied to me, including some great advice on communicating in different settings and with different types of people. I was also interested to find some thoughts on debugging as a skill to be used instead of, or before, launching a built-in debugger. This makes sense to me because my first programming languages weren’t the kind that have IDEs or other advanced tools.

The chapter on time management starts with the words “if you only read one chapter in this book, this should probably be the one” – and I must say I agree. I consider myself to be organised but there were some great strategies outlined in that particular chapter. Also running through the book like a thread is a series of interviews with software luminaries, each of whom were asked mostly the same questions, including how they manage their time and work-life balance. So there were some real-life stories in there too – I was encouraged that almost all of the people interviewed said they didn’t think they found balance, because personally I know I haven’t.

The interviews provided a great structure on which to hang a book full of good advice. One chapter advises how to identify and avoid “career killers” – those dead-end projects that will hold up your progression. Later on the focus moves away from the big organisation that the author and interviewees have most experience of, to look at starting software companies and the skills and attitude needed for this. Certainly once I got past the first third of the book I was much more drawn in; maybe because that dealt with an early stage of career that I felt I had already mudddled through?

Overall this is quite a dense book to read over a short period of time, but an excellent one to keep around and dip into or read another chapter every few weeks perhaps. Certainly its one that will be going on my bookshelf for me to look back at and refresh my thoughts on various topics covered for some time to come.

WordPress Plugin for Joind.In

In case anyone thinks I’ve gone joind.in crazy after already writing about its import functionality this week, I really haven’t. Its just that some months of pulling a few things together have finally bourne fruit and so I can actually write about them now they are done! The good news is that this includes a plugin for wordpress, which pulls data from the joind.in website. You can find its official page on the wordpress plugin directory here: http://wordpress.org/extend/plugins/joindin-sidebar-widget/

Plugin Features

At the moment the plugin can display one of two data sets: The hot events on joind.in; or the talks from an event on joind.in. You can change the title on the block, limit the maximum number of records returned, specify which event the talks should come from and also indicate if you’d like the order randomised. You can see the plugin in action on techPortal, where it is picking a few sessions at this year’s Dutch PHP Conference to tempt you with!

Technical Information

I hadn’t written a wordpress plugin before although I was very familiar with the joind.in API and how to work with it from PHP. The plugin was relatively easy to write, there are plenty of tutorials on the web and I didn’t need to do anything particularly clever. I looked at a twitter plugin, tweetblend, which was a similar sort of idea in that it had settings, talked over an API, and stored data, and used that when I got stuck. My plugin is much simpler but that’s OK (and probably makes it a good example for me next time I want to write one of these things!!)

The plugin creates a database table when it is activated (and drops it when deactivated) which caches the data pulled from joind.in for a few minutes. This helps avoid lots of users having to wait for the data to load and also hopefully stops the plugin from pushing too much load to the joind.in servers. Since there is no limit or pagination on the joind.in API, even though only a few records are shown the whole result is cached. This means that if you turn on the randomise then the cache is still useful! The “random” is a bit contrived in that it just picks elements out of the array that haven’t been used but it looks fine to me.

Initially I was just going to put something together and upload it to the techportal site but I was persuaded that it would be a useful thing to share – so there it is. Comments and suggestions are all welcome – and if you are using it to publicise your event, let me know!