And this is a little video I made with animoto.
Rigidly defined areas of doubt and uncertainty.
Thursday, January 22, 2009
More old holiday snaps
The last of my old photos scanned into flickr. These are from my cycling trip from Bordeaux to Barcelona in 2001. Possibly the best time I've ever had.

And this is a little video I made with animoto.
And this is a little video I made with animoto.
Sunday, November 30, 2008
Camel spotting
On one of my shorter, hillier cycle routes I pass by Glyndebourne Farm, home to some of the more exotic animals in the Sussex Downs.

That's Mo, according wikipedia he's a Bactrian Camel (Camelus bactrianus).
Other members of the genus Camelus to be found roaming across the downs are at least one Llama (Lama glama) and a herd of Alpaca (Vicugna pacos).

The farm is run by EP Cambridge UK (Formerly Atlantic Alpacas). According to their website they have open days. Might be a fun day out.
That's Mo, according wikipedia he's a Bactrian Camel (Camelus bactrianus).
Other members of the genus Camelus to be found roaming across the downs are at least one Llama (Lama glama) and a herd of Alpaca (Vicugna pacos).
The farm is run by EP Cambridge UK (Formerly Atlantic Alpacas). According to their website they have open days. Might be a fun day out.
Thursday, October 23, 2008
Virtual Iraq
I crossed the river and made my way past the offices, warehouses and light industrial units to Unit 9, Phoenix. Security was light - a smile was all I needed to get in. The battered doorway opened just wide enough to let one person through at a time - Low light levels are an essential part of this operation. Inside the dusty concrete warehouse an empty grease stained plastic chair faced me across a table covered in glossy leaflets and magazines. I flicked through them before turning round to take in the scene.
Two Virtual Humans introduced themselves as Sergeant Star and Ra'id. Star was relaxed and jokey, he tried to persuade me to sign up, but I declined. Ra'id was not at all happy to be there and became agitated if I asked too many questions.
I moved on to the training area. Here 'Warriors' are immersed in the sights, sounds and smells of the front line to prepare them for their assignments. Sights like a severed foot, smells like burning rubber and sounds like screaming. All painstakingly reproduced from real life samples.
The line between training and rehabilitation is a blurred one. The same technologies are employed for both. It's all part of the same game. The head of the project, Skip Rizzo, explained to me that returning Warriors often had a hard time adapting to civilian life. A pothole in the road is the IED that killed their friends, crowds are dangerous so they stay at home, commercial Hummers are a cruel joke. To put these men back together Skip's lab has developed a high tech version of Prolonged Exposure Therapy. They found that their patients were better able to deal with their traumas in the familiar environment of a video game.
Projected onto the back wall of the warehouse a version of the game ran in a loop. A small boy stood in front of it, entranced. He waved back at the virtual Iraqi boy in the market.
I made my way round once more to try and assimilate everything I'd seen. Then out into the sunlight, said thanks and goodbye and returned to the world I live in every day.
That, more or less, was my experience of the Virtual Iraq exhibition by Lisa Barnard. It really is a bit of trip down the rabbit hole. It's on every saturday and sunday until November 15th at Unit 9 Phoenix Place, Lewes.
View Larger Map
Two Virtual Humans introduced themselves as Sergeant Star and Ra'id. Star was relaxed and jokey, he tried to persuade me to sign up, but I declined. Ra'id was not at all happy to be there and became agitated if I asked too many questions.
I moved on to the training area. Here 'Warriors' are immersed in the sights, sounds and smells of the front line to prepare them for their assignments. Sights like a severed foot, smells like burning rubber and sounds like screaming. All painstakingly reproduced from real life samples.
The line between training and rehabilitation is a blurred one. The same technologies are employed for both. It's all part of the same game. The head of the project, Skip Rizzo, explained to me that returning Warriors often had a hard time adapting to civilian life. A pothole in the road is the IED that killed their friends, crowds are dangerous so they stay at home, commercial Hummers are a cruel joke. To put these men back together Skip's lab has developed a high tech version of Prolonged Exposure Therapy. They found that their patients were better able to deal with their traumas in the familiar environment of a video game.
Projected onto the back wall of the warehouse a version of the game ran in a loop. A small boy stood in front of it, entranced. He waved back at the virtual Iraqi boy in the market.
I made my way round once more to try and assimilate everything I'd seen. Then out into the sunlight, said thanks and goodbye and returned to the world I live in every day.
That, more or less, was my experience of the Virtual Iraq exhibition by Lisa Barnard. It really is a bit of trip down the rabbit hole. It's on every saturday and sunday until November 15th at Unit 9 Phoenix Place, Lewes.
View Larger Map
Tuesday, October 14, 2008
Bonfire night is coming
This Friday (17th Oct) I'm going to the costume competition to get a better look at the characters that will be parading up and down the streets on the 5th.
Here's something I wrote about my experience of the 5th back in 2001, when it was still all new to me:
I got to the high street at around 7:00, just before the parade started. A very excitable Asian student was next to me in the crowd, sat on his friends shoulders filming everything with his camcorder. An old hippy with a guitar approached him and sang a short song about him and his camera. A little further up the road someone gave the international distress signal by releasing a rocket into the air, and was duly visited by one of the many policeman in the area.
After a couple of exchanges on mobile phones and some hand waving I met my friend Paul and soon the parade was underway. Flaming torches, beer, fancy dress, marching bands, crowds shifting like the tide as the parade came and went, while the tannoy shouted out instructions to move back. I didn't see many tableaux this year, just one of what looked like a cows head. The parade seemed to end rather suddenly just as it had got going. Apparently Cliffe burnt a giant effigy of Osama Bin Laden, but I didn't find out about that until I saw the review of tomorrow's papers on Newsnight.
On to the bonfire and the fireworks. The Waterloo society's site is close to my house and is free. One day I'll get tickets to see Cliffe's, but not this year. The parade must have finished early because they hadn't even set light to the bonfire yet. Paul was pleased to note that there was a big sign halfway up it saying "Hello Paul". How nice of them to wait for him to arrive before starting! We got a burger, hot dog and some chips from one of the vans - served by the most humungously fat red-faced man I've ever seen - and watched as the bonfire boys threw burning torches at the bonfire. The fireworks hadn't started yet, but plenty of people had brought their own. Eventually the Waterloo society procession marched in, led by a Bishop and three priests (wearing safety goggles) who started the fireworks display by standing on a scaffold pulpit flanked by two burning crosses. They set off bangers right where they were standing and to shouts of "Burn the Pope!" dodged rockets and bangers being hurled at them. Rather them than me! But I assume they knew what they were doing as it happens every year, and just couldn't help myself laughing.
The fireworks began with some of those floaty ones that drift down on parachutes. As the spent fireworks drifted into the crowd, eager hands reached up to grab them - and then pulled back suddenly when they touched the still hot firework. The smart people reached for the strings of the parachute. That's how Paul caught one. And so it continued into the night, with two other firework displays clearly visible through the one we were watching.
This morning as I cycled to the bus stop the fire was still burning, but by this evening the only reminders of what had happened were a pile of ashes and a few empty beer cans outside Tesco that the clean-up teams had missed.
Monday, October 06, 2008
Holiday snaps
Friday, June 27, 2008
Great support from unfuddle
I've recently started using unfuddle to manage my projects. It's very good, but nothing's perfect so I clicked their handy feedback button and sent this little message
The next morning I got a reply:
This brought to mind something that Jon said at the werks last week. He had a similar experience with FreeAgent. Without him even contacting them, they sent an email saying something like this 'We see that you've had a problem with our service. Could you let us know what you were doing at the time so we can fix it.'
This is the kind of service that the internet makes possible. Something that Paul Graham noted in The Other Road Ahead (scroll down to Support). Good to see that the idea is catching on.
When I have a lot of windows open in tabs it's hard to tell which is which because they all start with 'Unfuddling...'. It would be better for me if the more specific page name came first.
The next morning I got a reply:
Alex,
Thanks for your feedback.
I can understand how this could be annoying. As such, we have moved the "Unfuddling" portion to the end of the title so that browser tabs can be more easily distinguished from each other.
If you have any other comments or questions, please do not hesitate to let us know.
Best Regards,
David
This brought to mind something that Jon said at the werks last week. He had a similar experience with FreeAgent. Without him even contacting them, they sent an email saying something like this 'We see that you've had a problem with our service. Could you let us know what you were doing at the time so we can fix it.'
This is the kind of service that the internet makes possible. Something that Paul Graham noted in The Other Road Ahead (scroll down to Support). Good to see that the idea is catching on.
Sunday, December 09, 2007
The simplest template engine that could possibly work
In Templates Are Code, Too Hendrik explains in detail why the last thing the world needs is another template engine. So here's mine.
That's all you need to write a template engine in PHP, because PHP is a template engine. You write your templates like this:
And call them like this:
And you can combine them like this:
function template($template, $data) {
extract($data);
ob_start();
include $template;
return ob_get_clean();
}
That's all you need to write a template engine in PHP, because PHP is a template engine. You write your templates like this:
<html>
<head>
<title><?=$title?></title>
</head>
<body>
<h1><?=$title?></h1>
</body>
</html>
And call them like this:
<?php
echo template("template.tpl", array("title" => "Hello, world!"));
?>
And you can combine them like this:
<?php
$content = template("content.tpl",
array("heading" => "Content heading",
"body" => "content body"));
echo template("container.tpl",
array("title" => "Hello, world!",
"content" => $content));
?>
Sunday, August 05, 2007
Personality test
Personality tests, such as Myers Briggs, are a popular tool in the workplace. They replace vague subjective feelings with scientific measurements. But how far should we trust them? I recommend you try the Forer Personality Test. You'll probably learn something important.
Tuesday, July 24, 2007
If you're not using a framework, you're doing it wrong
I'm really enjoying learning Rails at the moment. One of the things that strikes me about it is how easily it meshes with my own ideas. This is what I would have written if I had the skill and the time. Suddenly a huge chunk of infrastructure code doesn't have to be written.
What Rails gives you is flexibility. Many people write their own libraries of code, or CMS systems from scratch, or use one of the major open source projects as a basis for their applications. Within the limited domain of these programs you can have pretty good productivity, but it's hard to adapt them to changing requirements without major rewrites or hacks. In Rails on the other hand, the infrastructure is cleanly separated from the application code. There is a lot less to change so refactoring is far cheaper.
For all but the simplest "Hello world" application I'd recommend using a good framework. It will have already solved your problems before you even knew they existed. Rails is my choice, but there are others.
What Rails gives you is flexibility. Many people write their own libraries of code, or CMS systems from scratch, or use one of the major open source projects as a basis for their applications. Within the limited domain of these programs you can have pretty good productivity, but it's hard to adapt them to changing requirements without major rewrites or hacks. In Rails on the other hand, the infrastructure is cleanly separated from the application code. There is a lot less to change so refactoring is far cheaper.
For all but the simplest "Hello world" application I'd recommend using a good framework. It will have already solved your problems before you even knew they existed. Rails is my choice, but there are others.
Monday, July 16, 2007
I've joined a gym
Five weeks ago I decided to visit a gym for the first time. My local leisure centre has a 'kickstart' programme of five weekly appointments with an instructor to get you started. For someone like me who's never used a gym before it's a real help to have someone to guide you.
The idea of going to a gym never appealed to me before, but I'm actually rather enjoying it. The great thing that a gym has to offer is variety. Everything you need is all in one place. That helps to keep it from getting boring too. I don't do more than ten minutes or two sets on any one exercise.
No measureable results yet, but I definitely feel fitter, and I'm able to exercise harder now than I could when I started, and that's the measurement that counts.
The idea of going to a gym never appealed to me before, but I'm actually rather enjoying it. The great thing that a gym has to offer is variety. Everything you need is all in one place. That helps to keep it from getting boring too. I don't do more than ten minutes or two sets on any one exercise.
No measureable results yet, but I definitely feel fitter, and I'm able to exercise harder now than I could when I started, and that's the measurement that counts.
Friday, March 23, 2007
How to herd cats
The Good Soldier Skat is a great essay in which I found much to sympathise with. In it Richard Hillesley contrasts a traditional regulated bureaucratic business with the freedom of open source projects. It's not so much a case for open source software as the idea of trusting and freeing your workers. Companies really should look to successful open source projects to see how to organise and motivate their own teams. It means letting go of some control, which is a risk, but the benefits could be much greater.
Via programming.reddit
See also The Success of Open Source and Innovation Happens Elsewhere
Via programming.reddit
See also The Success of Open Source and Innovation Happens Elsewhere
Monday, March 19, 2007
The Pyramids are crap
The Pyramids are crap. Egyptians should be embarrassed by these massive monuments to stupidity. They're a constant reminder of how utterly useless the ancient Egyptians were at architecture. What's the very simplest way to build a tall structure that won't fall over? Pile the bricks on top of each other. And that's essentially what the pyramids are. Big piles of bricks.
The only thing you should be impressed by is the fact that the Pharaohs had such resources and power at their command that they could be so wasteful with them. I'm sure the slaves worked as hard as any man can, and the pyramid building operation was run as fast as it possibly could be. All that hard work. What a waste. It only goes to show that hard work doesn't pay off.
I'm not going to build any pyramids.
The only thing you should be impressed by is the fact that the Pharaohs had such resources and power at their command that they could be so wasteful with them. I'm sure the slaves worked as hard as any man can, and the pyramid building operation was run as fast as it possibly could be. All that hard work. What a waste. It only goes to show that hard work doesn't pay off.
I'm not going to build any pyramids.
Thursday, March 01, 2007
Movie title fun
[From The Jay]
Looks like the Web 2.0 meme has drifted into the movie business. Surely this is the first movie with a minor version number? A good move in my view, much easier to keep track of than all re-remasterings and directors cuts of directors cuts.
Looks like the Web 2.0 meme has drifted into the movie business. Surely this is the first movie with a minor version number? A good move in my view, much easier to keep track of than all re-remasterings and directors cuts of directors cuts.
Sunday, February 25, 2007
Ubiquitous version control
The more I use it the more applications I find for version control, and each time I find a new application it alters the way I work.
In the first instance, version control is just a safe place to store your code and keep track of changes between revisions.
If you use a concurrent versioning system such as svn then it also becomes a tool for collaborative working. Two people can work on the same file and each time one of them commits their work to the repository the other can automatically incorporate the changes in their copy of the file.
I've started using the same functionality to manage staging and live versions of websites. The web server connects to svn just like any other user and can update its copy of the site to the latest version with a single update command. Bye bye ftp.
I sometimes work from home and it's very useful to be able to pick up the exact code that I've been working on at the office. Martin Fowler takes this even further in MultipleDesktops. In my latest project I've set up the repository with not just the code, but also the specification documents, the HTML pages I need to get started and my own notes and documentation.
One problem I have with using version control for remote working is that I don't want to commit broken code. Then I watched this screencast on Atomic Coding (BTW aren't screencasts great). It's very much in the spirit of agile and test driven development, and is made easier by using dynamic languages without a compilation cycle. The trick is to make small steps, where each step produces working code of some description. When the time between commits is no more than a couple of hours there's not much opportunity to leave code where I can't get at it remotely. Another benefit of atomic coding is that commits act as a kind of bookmark so I can keep track of where I am when I'm switching between several projects, which is often the case when your working on web site timescales.
I don't think I'll have hard time adapting to the atomic approach. The biggest change will be at the start of a project where I usually write a lot of code before running anything. To code atomically I'll have to make sure each class runs before I move on to the next one.
In the first instance, version control is just a safe place to store your code and keep track of changes between revisions.
If you use a concurrent versioning system such as svn then it also becomes a tool for collaborative working. Two people can work on the same file and each time one of them commits their work to the repository the other can automatically incorporate the changes in their copy of the file.
I've started using the same functionality to manage staging and live versions of websites. The web server connects to svn just like any other user and can update its copy of the site to the latest version with a single update command. Bye bye ftp.
I sometimes work from home and it's very useful to be able to pick up the exact code that I've been working on at the office. Martin Fowler takes this even further in MultipleDesktops. In my latest project I've set up the repository with not just the code, but also the specification documents, the HTML pages I need to get started and my own notes and documentation.
One problem I have with using version control for remote working is that I don't want to commit broken code. Then I watched this screencast on Atomic Coding (BTW aren't screencasts great). It's very much in the spirit of agile and test driven development, and is made easier by using dynamic languages without a compilation cycle. The trick is to make small steps, where each step produces working code of some description. When the time between commits is no more than a couple of hours there's not much opportunity to leave code where I can't get at it remotely. Another benefit of atomic coding is that commits act as a kind of bookmark so I can keep track of where I am when I'm switching between several projects, which is often the case when your working on web site timescales.
I don't think I'll have hard time adapting to the atomic approach. The biggest change will be at the start of a project where I usually write a lot of code before running anything. To code atomically I'll have to make sure each class runs before I move on to the next one.
Sunday, January 14, 2007
How not to advertise software
"If programmers built planes" shows a team of engineers working to finish a plane in mid flight. A rather unfortunate metaphor. I thought it was a parody, but apparently EDS paid for this.
It's true that requirements change and software grows and evolves with business, but good programmers make sure it never has to fly with gaping holes in it's hull, or an untested undercarriage. The plane metaphor states the problem very well, but doesn't show how EDS think they can solve it. How do you write an exciting advert around ideas like test driven design, encapsulation and refactoring? Something I should think about, because they're ideas I need clients and my non-technical colleagues to understand and appreciate.
It's true that requirements change and software grows and evolves with business, but good programmers make sure it never has to fly with gaping holes in it's hull, or an untested undercarriage. The plane metaphor states the problem very well, but doesn't show how EDS think they can solve it. How do you write an exciting advert around ideas like test driven design, encapsulation and refactoring? Something I should think about, because they're ideas I need clients and my non-technical colleagues to understand and appreciate.
Friday, August 04, 2006
It's just a ride
Today's XKCD comic is inspirational:

As I mentioned in my comment on Will's blog, the fact that anything I say or do on the internet can potentially come back to me is always at the back of my mind. I should probably not let that worry me so much and get on with enjoying this moment.
As I mentioned in my comment on Will's blog, the fact that anything I say or do on the internet can potentially come back to me is always at the back of my mind. I should probably not let that worry me so much and get on with enjoying this moment.
Tuesday, August 01, 2006
Fixing the back button in ajax
I didn't think this was possible, but thanks to Mike Stenhouse's article in the Content With Style blog and the accompanying demo I can now see how to overcome my biggest objection to ajax. The problem, as I mentioned in my last post, is that most ajax sites break the normal user interface conventions of the web by effectively disabling the back button. If you press it on an ajax page such as Google maps you don't undo the last step you made, you exit the application entirely and lose the history of all the clicks since you entered it. I thought this was impossible to fix because to make a new entry in the browser history you need to change the URL of the page, which loads a whole new page for the new URL.
The key insight of Mike's article is that it's possible to change the URL without reloading the page. How? With a page anchor: a link to a particular point in the same page. Changing the URL to point to a different part of the same page doesn't force a page reload, but it does add an entry to the history buffer. By adding '#1', '#2', '#3' etc to the end of the URL you can track every click in an ajax application.
Now, I'm very interested in continuation based web frameworks. The idea was pioneered by Paul Graham, and more recently implemented in Avi Bryant's Seaside framework. Continuation frameworks allow the creation of stateful web applications without using ajax. A continuation is a representation of the state of the whole application at a point in time. When you call a continuation it's like returning to that state. By encoding a reference to a continuation in a URL you can return your application to the state it was in at the time the page was generated. Pressing the back button becomes the equivalent of an undo operation.
My visualisation of a continuation based framework is one where a second dimension of time is added to the URL's first dimension of space. eg http://www.alexfarran.com/#2006-08-01-16:41:53. With ajax now able to track each click I could couple each ajax state to a continuation, and recreate it at any time on any machine. I think that would be cool.
The key insight of Mike's article is that it's possible to change the URL without reloading the page. How? With a page anchor: a link to a particular point in the same page. Changing the URL to point to a different part of the same page doesn't force a page reload, but it does add an entry to the history buffer. By adding '#1', '#2', '#3' etc to the end of the URL you can track every click in an ajax application.
Now, I'm very interested in continuation based web frameworks. The idea was pioneered by Paul Graham, and more recently implemented in Avi Bryant's Seaside framework. Continuation frameworks allow the creation of stateful web applications without using ajax. A continuation is a representation of the state of the whole application at a point in time. When you call a continuation it's like returning to that state. By encoding a reference to a continuation in a URL you can return your application to the state it was in at the time the page was generated. Pressing the back button becomes the equivalent of an undo operation.
My visualisation of a continuation based framework is one where a second dimension of time is added to the URL's first dimension of space. eg http://www.alexfarran.com/#2006-08-01-16:41:53. With ajax now able to track each click I could couple each ajax state to a continuation, and recreate it at any time on any machine. I think that would be cool.
Thursday, July 20, 2006
When ajax attacks
O'Reilly have done something stupid. They've rewritten their Safari online books site as an ajax application, now my back button works only intermittently and the forward button not at all. Plain old HTML is perfect for reading documents online - that's what it's for! Their new ajax based system is harder to use. To regain the usability of the old site they'll have to re-implement the browser history in javascript. And for what benefit? Faster page loads, apparently. Hardly a priority unless you're some kind of demon speed reader.
Really, there are one or two applications where ajax is very useful, but that doesn't mean you have to use it everywhere.
Update: It looks like they've de-ajaxed the chapter select navigation. It doesn't work without javascript turned on, so I think they must be encoding data in the URL that the page then uses to dynamically request it's content from the server.
I mailed O'Reilly support and they told me you can still access the original non-ajax site at http://access.safari.oreilly.com
Really, there are one or two applications where ajax is very useful, but that doesn't mean you have to use it everywhere.
Update: It looks like they've de-ajaxed the chapter select navigation. It doesn't work without javascript turned on, so I think they must be encoding data in the URL that the page then uses to dynamically request it's content from the server.
I mailed O'Reilly support and they told me you can still access the original non-ajax site at http://access.safari.oreilly.com
Monday, June 26, 2006
My wheel
After riding the London to Brighton ride last week my already slightly wobbly rear wheel was looking decidedly out of true. Truing a wheel is in my opinion the trickiest maintenance task you can do with a bike. Every one of the 36 spokes needs it tension minutely adjusted until the wheel is straight and round to millimetre accuracy. It took me a while. I don't have a truing stand, so I used the brakes and a piece of card taped to the frame to as a guide. The procedure is pretty simple:
- Rotate the wheel to a point where it's to far to the left or right, or a too far in or out.
- Find the mid point of the imperfection and mark it with a small piece of electrical tape attached to the nearest spoke.
- Adjust the tension of the surrounding spokes on either or both sides of the wheel.
- Repeat....
Friday, June 16, 2006
HOWTO: Add libtidy support to PHP5 in Ubuntu.
Oddly, the default PHP5 package on Ubuntu doesn't have support for the HTML tidying library, libtidy (bug #41690). I followed the instructions in the Debian APT Howto and the Ubuntu Document Storage Facility and replaced the installed package with one I compiled myself from the source. On the off chance someone else finds it useful I've posted the steps I took here:
Create a directory for compiling the source code in.
Get the source code package from the source repository. (Note you don't need root privileges for this step as you're not installing anything, just downloading the source to your personal directory).
Install the other packages needed by the source code to compile.
In the downloaded source code there is a file
and install the newly created packages.
Apache is automatically restarted as part of the build process, and a quick check with
UPDATE
When the package manager next downloads the latest version of php5, your changes will be overwritten. So be careful what boxes you tick when it asks you what to update. To get the latest version with your changes added to it repeat the above process. Easy enough for a simple one line change, but for bigger changes you should create a diff file, or manage your version in svn.
Create a directory for compiling the source code in.
$ mkdir source
$ mkdir source/php5
$ cd source/php5/
Get the source code package from the source repository. (Note you don't need root privileges for this step as you're not installing anything, just downloading the source to your personal directory).
$ apt-get source php5
Install the other packages needed by the source code to compile.
$ sudo apt-get build-dep php5
In the downloaded source code there is a file
php5-5.1.2/debian/rules. Add --with-tidy to the end of the list of options in COMMON_CONFIG. Now compile the modified source.
$ cd php5-5.1.2
$ dpkg-buildpackage -rfakeroot -uc -b
and install the newly created packages.
$ cd ..
$ sudo dpkg -i *.deb
Apache is automatically restarted as part of the build process, and a quick check with
phpinfo() shows the new compile date and lists the tidy module.UPDATE
When the package manager next downloads the latest version of php5, your changes will be overwritten. So be careful what boxes you tick when it asks you what to update. To get the latest version with your changes added to it repeat the above process. Easy enough for a simple one line change, but for bigger changes you should create a diff file, or manage your version in svn.
Subscribe to:
Posts (Atom)