Recent blog entries for purcell

In April I am co-hosting a German-language Ruby on Rails workshop in Munich, Germany. If you're interested in coming along, now's your chance to book a place before it's too late.

In keeping with my tradition of posting here approximately once per year, I'm going to note for posterity what I've been up to in recent months.

In the last year I have divided my time between lucrative consulting clients and unpaid work on my own business. My clients often hire me to help out on projects built primarily in Java; my theory is that rates for Java-related work outstrip those for other languages because they include "mental health danger money" that is required to compensate for loss of brain cells and pulled-out hair.

The greatest danger to a highly pragmatic consultant is the presence of Enterprise-minded "Architect" types. The cult of Deep Knowledge surrounding - and cultivated by - these over-serious individuals hinders the consultant's goal of just doing what is most appropriate. These types are characterised by the monotonically increasing complexity of their codebases, and their stressed response to requests for business-driven changes.

In contrast, bootstrapping my own business pays poorly but affords me the luxury of freely choosing and optimising my toolset, along with the satisfaction of moving faster and getting feedback sooner. Powered by a heady cocktail of Darcs, Rails, PostgreSQL, Debian, Trac and coffee, I have single-handedly built and launched a commercial baby web log site in a matter of months.

I expect to soon be blogging on my own site about what has worked for me, in the hope that other enterprising programmers will be encouraged to step up to their obligation to maximise their creative output.

13 Jan 2005 (updated 13 Jan 2005 at 01:25 UTC) »

I have now moved on from ThoughtWorks, after making a great many wonderful friends. In recent months I have experienced a vigorously renewed interest in small projects built on open source and common sense, presumably in a reaction to a cumulative overdose of enterprise projects built on Java and waffle.

A state of acute fatherhood has turned my mailbox into a black hole for communication about existing projects (PyUnit in particular), but a good friend and I have still managed to write some useful open-source code. As yet unreleased and unlicenced, Airspeed is an uncomplicated template library whose templates are compatible with those written for Velocity.

(Oh, and I also recently fixed up dbdoc to generate Oracle schema documentation with Jython + zxJDBC -- this plugs nicely into Ant builds. Column comments are read directly from the schema when they are available. Code available on request, until I get time to cut a release.)

A colleague pointed me at Thinlets, and I'm thoroughly impressed. Looks like a nice technology for those that can't decide between a web application and a 'traditional' GUI app. Compare heavyweight Swing and middleweight SWT with this demo.

Today I tip my hat to Jonathan Ribbens, whose jonpy project is a breath of fresh air for Python web programming.

I found Zope to be overblown, and the likes of Quixote to be too focused on page templating. Jon's work gives me what I need; servlet-style building blocks for crafting my own MVC web applications. He defines a common Request object that encapsulates the request/response data and logic, conveniently presenting query parameters, uploaded files and cookies. Adaptors for the disparate deployment models of FCGI, straight CGI and mod_python present the exact same Request interface to the developer's code. Wonderful.

As if that weren't enough, Jon throws in a web templating solution and an ingenious database connection pooling module.

The appearance of such a necessary and well-executed package in such a low-key form is typical of the no-nonsense Python world, though I can't help thinking that more of a song and dance is warranted in this case.

PHP is getting serious. For a long time it required a great deal of work to structure a large PHP application into a maintainable form, and every developer did it in his own 'special' way. Projects like phpGroupWare produced frameworks for plugging applications into an assembly but apparently failed to evolve the definitive pattern for writing a generic PHP site.

Now Smarty has arrived and has quickly become the definitive templating solution. This is a good thing, more because of the pattern it presents rather than the specific solution (since with discipline plain PHP can make a good templating language). Smarty nicely covers the V of MVC, and a good C comes in the form of Phrame, which is a PHP port of Java's popular struts framework. A nice simple M is left as an exercise for the reader, but plain objects and arrays work well for the majority of PHP applications.

I'm embarrassed to admit that the last time I took a serious look at CSS was in 1999, when I worked alongside two of the top DHTML/Javascript guys in the world -- Peter Belesis and Giorgio Braga. At that time of Netscape 4 and IE 3/4, support for CSS was patchy and much sneakiness was necessary in order to get the right effect. (Somehow, Peter and Giorgio managed to construct an entire javascript-based presentation rendering engine, replete with animations and shared whiteboard conferencing.) As a bystander, I learnt to avoid CSS and instead rely on the old-fashioned HTML layout tricks of <table>-ing and transparent-pixeling pages to death.

So call me slow, but yesterday I decided to catch up and give CSS another chance. What did I discover? The little kid grew up, browser support is now widespread and generally excellent, and I can finally cast aside my table and transparent pixel baggage. At the end of the day, it boils down to throwing away unnecessary code, and that's one of the best things that can happen to a hacker.

What I'm wondering now, though, is how to avoid delaying this kind of enlightenment in future. At some hard-to-define point, using a particular technology flips from being a liability to a superability. I want to define that point for myself.

The Coolest Software Ever Award, for today at least, goes to x2vnc (that's Win2vnc for you Windows people). Now I can use my debianised ThinkPad's wonderful keyboard and trackpoint to control its nasty Windows desktop neighbour without needing to do the keyboard shuffle every 10 seconds. Very civilised.

I've been hacking on gaim to add a Yahoo-IM-style display of status messages. No other open source IM client has that, but Yahoo IM users often end up changing their status messages for entertainment value.

Alongside that, I've set up to cover my Python-related consulting work; if you're looking for a Python expert, I might be able to find time for you.

(Linux weenies take note: I'm hosting a number of sites on a User Mode Linux virtual machine at Bytemark -- I can't recommend them highly enough for their fast, personal and expert service.)

20 Apr 2003 (updated 29 May 2003 at 21:33 UTC) »

My photography website is now live, at, for those who may care to take a look. This has been an exercise in discovering why the PHP/MySQL combination is so popular. Developing the site has been a breeze in comparison to the equivalent task using Java, but I'm shocked by the limitations of PHP; I particularly miss exceptions.

33 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!