Code for a tutorial on the alastairgould.co.uk website.