Latest posts

Context switching in the 18th Century

Something we've been trying to cut down on at work is the amount of context switching that the development team have to do. Rather than working on multiple projects at once, we've been trying to get them onto one project that they can concentrate on all day.

The reason we do this is we think there's a cognitive cost of changing what you're doing. It's obvious, and it's not a new observation:

A man commonly saunters a little in turning his hand from one sort of employment to another. When he first begins the new work, he is seldom very keen and hearty; his mind, as they say, does not go to it, and for some time he rather trifles than applies to good purpose. The habit of sauntering, and of indolent careless application, which is naturally, or rather necessarily, acquired by every country workman who is obliged to change his work and his tools every half hour, and to apply his hand in twenty different ways almost every day of his life, renders him almost always slothful and lazy, and incapable of any vigorous application, even on the most pressing occasions. Independent, therefore, of his deficiency in point of dexterity, this cause alone must always reduce considerably the quantity of work which he is capable of performing.

Adam Smith - The Wealth of Nations (1776)

It amazes me when people say "Can't you just work on both things at once?" but it's very common in some workplaces. I guess some things take a few centuries to sink in.

Zend Framework bindings for Frontal

Having thought further about Frontal, Carl's JS library, I wrote a quick View Helper to make it easier to use it in Zend Framework projects.

It's available to download on Dropbox, it's available under the MIT licence. I'll bung it up on somewhere like GitHub once I work out how Git works.

Basic usage

Before you do anything you'll need to register the helpers in your application.ini:

Frontal - a new approach to triggering Javascript behaviour

My friend Carl has just released a really interesting Javascript library called Frontal. I've had a night to sleep on it and thought I'd share my thoughts.

The key problem Frontal addresses is 'some Javascript needs to be run only on some pages'. There are a few different approaches to this:

Per-page scripts

The first approach is to have lots of Javascripts that only apply for the current page, and insert them in the HEAD of the document:

Tether to iPhone with Ubuntu 9.10 Karmic Koala

I just did a fresh Ubuntu Karmic reinstall after an ill-conceived upgrade to a Lucid Alpha, so I had to try and retrace my fairly muddled steps in configuring iPhone tethering.

Because I had a fair idea what I was doing this time it was pretty easy, so I figured I'd best document the steps for the next unfortunate soul trying to do the same. I'd also be interested to hear if the same steps apply to Lucid once it's out of Beta.

iPhone tethering

The first thing to do is get tethering enabled by your operator. For some reason O2 can only enable it overnight so make sure you get it well before you'll need it. Once it's enabled, you'll find your phone has a new option under Settings->General->Network->Internet Tethering. Make sure you turn it on in here and then forget about it - it's only enabled for devices that are paired over Bluetooth or USB so there's not much of a security worry.

The next step is to get the Ubuntu side sorted. The best bet is to install the Bluetooth Manager widget Blueman, which will replace your existing Bluetooth widget. Blueman is much better than the default simple widget, but unfortunately either the way the iPhone exposes its network access point is non-standard or it's a bit advanced because the older version of Blueman in the Ubuntu Karmic sources is not capable of connecting - you'll need to install a newer version from Blueman directly.

The best way of doing this is to add the Blueman PPA and install it from them via apt:


$ sudo add-apt-repository ppa:blueman/ppa
$ sudo apt-get upgrade
$ sudo apt-get install blueman

I found after doing this the old bluetooth widget was hanging around, but restarting X fixed that.