Archive: August, 2004


                    5th                     10th                     15th                     20th                     25th                     30th     

Friday, August 27th, 2004


Now that I’m in the States, I’ve taken possession of my previously ordered iPod. Needless to say, I’m loving it.

Like just about everyone else, I’ve been making good use of the shuffle feature. It’s especially entertaining on really long car rides like driving from Key West to Saint Augustine. I don’t have any Fugazi in my music collection so I wasn’t able to test the Cederholm hypothesis.

Being the slob that I am, I’ve already managed to scuff up my iPod quite a bit. I guess I shouldn’t carry it in the same pocket as my loose change. Then again, it’ll help fool the customs officials into believing I’ve had it in my possesion for longer than the duration of my holiday.

Still, perhaps it’s time for me to consider accessorising.

Tuesday, August 24th, 2004

Wish you were here

I’m in the land of coral and sunshine: Key West, home to Hemingway, shipwrecks, six-toed cats, wild chickens and lots and lots of seafood,

Greetings from Key West

Saturday, August 21st, 2004

Sunshine state of mind

I’m taking a flight from Gatwick to Orlando first thing tomorrow. Jessica and I will be spending the next two weeks in Florida.

Apart from a brief foray to The Keys, we plan to spend most of the time in what is possibly the oldest settlement in the United States, Saint Augustine.

We’ll have WiFi at the beach house where we’re staying so you can expect plenty of updates about eating shrimp, swimming in the ocean and wrestling alligators.

Not waving but drowning

Looking at the unusually large waves being churned up on the shore of Brighton’s beach yesterday put me in mind of a particularly descriptive line from Joyce:

"Isn’t the sea what Algy calls it: a great sweet mother? The snotgreen sea. The scrotumtightening sea."

waves crashing on the beach with the palace pier in the background

Friday, August 20th, 2004

Don't worry, browse happy

The Web Standards Project has launched a new promotional website to encourage people to switch from Internet Explorer. It’s called Browse Happy.

The web developer in me is delighted. The pedant in me wishes they had called the site Browse Happily. It’s not too late to snap up the domain name, fellas.

Thursday, August 19th, 2004

Something well wicked this way comes

Here’s a wonderfully Goreyesque Flash game called A Murder Of Scarecrows.

I’m a sucker for any game with a title that’s a pun on the collective noun for crows. A murder of crows is right up there with a murmuration of starlings, a parliment of owls and a charm of hummingbirds.

I’ve often been tempted to make up my own collective nouns. How about…

an array of programmers,

a blanket of laptops,

a wall of clients.

Tuesday, August 17th, 2004

Fixed vs. Liquid... yet again

Quote of the day comes from Nick Finck:

"Finding a balance is the key to a true solution, fixing the width is only a temporary Band-Aid."

He also points to one of my favourite ever articles at A List Apart, A Dao Of Web Design:

"Make pages which are accessible, regardless of the browser, platform or screen that your reader chooses or must use to access your pages."

Cast off your fixed-width layouts; you have nothing to lose but your WYSIWYG mentality!

iChat Snap

Monday, August 16th, 2004

A gaggle of geeks

This weekend, Brighton was the setting for Geekend 2: Electric Boogaloo.

On Friday night, Jon and Dunstan came to town. Together with the Brighton residents, myself, Jessica, Richard and Andy, we almost had a complete reunion of the Dorset gang (Stuart sadly couldn’t make it). Beer and sushi was consumed and there was much nattering.

On Saturday, the ranks expanded even further with the arrival of Patrick along with Drew, Rachel and the charming Bethany. The day turned out to be gloriously sunny and after a little tour of the North Laine, we all ended up sitting on a terrace overlooking the beach, sipping drinks, soaking up the sun and planning world domination.

Patrick, Drew and Rachel were just down for the day and after our evening meal in a Thai restaurant, they made their way back home.

The next morning, Jon also bid farewell to Brighton. That left just Dunstan as the only non-Brightonian left. He’s heading back to San Francisco tomorrow morning. After that, the fellowship will be sundered and Brighton’s level of genius web developerdom will return to its pre-geekend levels.

It was great while it lasted. It’s always fun, weird and cool to finally meet people in the flesh having known them virtually through their blogs.

Thursday, August 12th, 2004

Multimappa Mundi

Richard has added a handy little feature to Multimap. By creating a category for blogs (along with hotels, restaurants, etc.) you can now link a blog to an address in the Multimap database.

Just last week I was updating my contact page and I decided to make the postcode a hyperlink through to Multimap. The timing of the new blog mapping feature is fortuitous.

Now I’ve expanded on the link by adding "&cat=blog&title=Adactio"… or should I say "&cat=blog&title=Adactio". Don’t forget to encode those ampersands if you want your pages to validate.

Sunday, August 8th, 2004

PDFs with PHP

Not all of the functionality I’ve been adding to this site recently involves JavaScript and the DOM. I’ve also added a new PHP script.

If you go to the permalink for any journal entry you’ll see a new link (after the old “email a friend” link) prompting a PDF download. This points to a PHP script that takes the content of the journal entry, formats it very simply (no links or images) and spits it back out as a PDF. Perhaps more usefully, the download option also appears on the index page of the articles section so you can download any article as a PDF.

The nice thing about having the PDF files generated on the fly like this, rather than creating them in some software and then uploading them, is that any changes I make to the source (XML for the journal, HTML for the articles) is automatically carried over to the generated PDF.

I’ve never played around much with making PDFs before and I had a lot of fun refining the PHP script and getting it to do just what I wanted.

Speaking of having fun with PHP, Mark Liyanage has released a nice one-click installer of PHP5 for OS X. It comes complete with the PDF library.

Saturday, August 7th, 2004


This collection of 1920s erotic photos features one flapper with a mandolin and another with a bouzouki.

Is it wrong that I notice these things?

Thanks to Ben Hammersley for the pointer.


If you’d like to make a difference in the ever-worsening situation in Darfur, please, please, please make a donation (via the secure WorldPay service) to the World Food Program. I’ve made a modest contribution which, by itself, won’t amount to much but, with your help, could make all the difference.

You can watch the tragedy unfold or you can do something about it. Once this crisis has passed, the recriminations can begin (and there are those who deserve to feel the full wrath of the international community) but in the meantime, let’s do what we can to end this intolerable situation.

Thanks to Tim Bray for giving me a good kick up the arse.


File this under "Now, why didn’t I think of that?".

Seth Green has come up with a great little piece of DOM scripting that enhances print stylesheets. Basically, once the page has loaded, it loops through all the links in a specified part of the page: if the text of the link isn’t the same as the "href" value of the link, it creates a <span> right right after the link with the class "printMe". Meanwhile, the screen stylesheet has the display value for that class set to "none" while the print stylesheet has the display set to "inline". Voila! The printed version of the page shows all the links written out.

Clever bastard.


I finally caved in and succumbed to the temptation of owning the style gadget de-siècle. I’ve ordered an iPod.

I was planning to get an iPod mini but then they brought out the lovely fourth generation iPod with that oh-so-nice scroll wheel (which is the bit I loved the most about the iPod mini). That clinched it for me: I just had to have one.

I saved myself a bit of money by ordering it through the US version of the Apple store. I’ll be in The States in a couple of weeks and hopefully my gadget will be waiting for me when I show up.


Richard points out that Jamie Oliver’s website is now written in XHTML and CSS.

I’ve had the site in my bookmarks for a while now but I’ve never actually viewed source. I’m usually too busy drooling over the recipes like the one for grilled marinated mozzarella. I might try making the suggested substitution of monkfish for mozzarella. Either way, it sure looks scrumptious.


When I really should be working, the last thing I need to read is this excellent article by Tom Hodgkinson in The Guardian entitled The Virtue Of Idleness, taken from his forthcoming book How To Be Idle:

"It is a sad fact that from early childhood we are tyrannised by the moral myth that it is right, proper and good to leap out of bed the moment we wake in order to set about some useful work as quickly and cheerfully as possible."

"I would argue not only that early rising is totally unnatural but also that lying in bed half awake - sleep researchers call this state ‘hypnagogic’ - is positively beneficial to health and happiness. A good morning doze of half an hour or more can, for example, help you to prepare mentally for the problems and tasks ahead."

So true.


It’s that time of year again. Brighton is party-central this weekend. Brighton Pride is an annual event celebrating the town—, sorry, city’s gay and lesbian community. It’s Fun with a capital F and it’s make me proud to live here.

Meanwhile in America, the president of Disney has to defend the company for allowing (though not encouraging) Gay Days at its theme parks. In a television interview that was supposed to be about a new computer for kids, a rabid Fox interviewer begins frothing at the mouth because Disney doesn’t actively discourage Gay Days:

“I mean, in June you have ‘Gay Days’ at your theme parks. You got any ‘Gay Days’ on the Mickey computer?”

“Well, this has built into it all kinds of protective devices that protects the kid, or the child from internet sites that a parent wouldn’t deem appropriate. Also, the fact…”

“Well, you don’t protect the kids from ‘Gay Days’ at the theme parks, do you? Why do you have to protect them in the computer?”

“No, we don’t sponsor… we don’t sponsor ‘Gay Days’. You know, we are a company that lets anyone who is willing to pay through our gates.”

Friday, August 6th, 2004

Definite article

I finally put together some of my slides from the SkillSwap talk I gave with Richard and turned them into an article.

With apologies to Elvis Costello, I’ve called it This Year’s Document Object Model.

At the end of the article, I mention a couple of ideas for enhancing web pages using JavaScript and the DOM. I’ve been putting some of those ideas (and more) into practice here at Adactio. I’ll talk about those in more detail over the next few days.

In the meantime, I hope you enjoy reading the article. I tell ya, unobtrusive JavaScript is going to be the height of fashion on all the web standards catwalks next season.

Wednesday, August 4th, 2004

:hover Considered Harmful

I was on iChat with Andy Clarke recently, shooting the breeze about CSS and accomplishing this or that cross-browser effect.

He asked about applying a change of style to a <p> element when the cursor hovers over it. That sounds like a job for JavaScript and the DOM, I said. You want to dynamically update the style of an element based on the user’s actions… a classic case of DHTML.

Ah, but what if it was an <a> element? Then the simple application of CSS pseudo-class :hover would take care of dynamically altering the style.

This prompted Andy to ask why it isn’t possible to apply the :hover to other tags (cross-browser, remember… IE for windows doesn’t want to play along).

The question that popped into my mind was quite the opposite: why are we allowed use the :hover pseudo-class at all?

When I was giving my SkillSwap presentation with Richard a while back, I kept hammering home the idea of applying layers to a document. Begin with a well-marked up, semantically correct document. Then apply a presentation layer using CSS. Then apply a behaviour layer using JavaScript and the DOM.

My main point was that one shouldn’t mix up mark-up with presentation (e.g. using <font> tags, inline styles, etc.) or mix up mark-up with behaviour (e.g. inline event handlers, <script> tags in the body, etc.). But an equally valid lesson would be that one shouldn’t mix up presentation with behaviour.

Over at A List Apart, there are many articles that show how to achieve behavioural effects using nothing but CSS. But why is this considered a good thing? Isn’t that like showing how to achieve styling using nothing but HTML (“by using the <font> tag, I can eliminate the need for CSS..”) or JavaScript?

For instance, it is possible to style a document entirely with JavaScript. Once the document loads you could loop through all the <p> tags for instance, and style them in a certain way:

window.onload = function() {

var paras = document.getElementsByTagName(‘p’);

for (i=0;i<paras.length;i++) {

paras[i].style.fontSize = ‘.8em’; paras[i].style.fontFamily = ‘serif’;



But that would not only be a very long-winded way of doing it, it would be abusing the DOM to do the work of CSS:

p { font-size: .8em; font-family: serif; }

And yet, when it comes to doing things the other way around, it would appear that the CSS spec has clearly stepped on the DOM’s toes in the case of :hover. Or should I say, in the case of onmouseover.

The reason why the JavaScript example given above is silly is that there’s no behaviours involved (well, apart from the completion of the loading of the page). In the case of hovering a cursor over a page element, however, it’s a clear cut case of attaching a certain behaviour to an element when an event is fired.

window.onload = function() {

var links = document.getElementsByTagName(‘a’);

for (i=0;i<links.length;i++) {

links[i].onmouseover = function() { = ‘red’;




That’s just the kind of thing that the DOM was born to handle (along with a corresponding onmouseout behaviour). Yet CSS comes in and offers a quicker, more seductive solution:

a:hover { background-color: red }

Presentation and behaviour… the twain have met, the waters are muddied, the issues are confused.

It’s a similar story with the :active pseudo-class. Why is that only applied to links? Why can’t I use it to add onmousedown behaviours to any element?

I do realise that :hover is extremely useful, albeit restricted in browser support. I’m mostly just surprised that it made it into the spec. Is that simply because, back when the specs were being drawn up, mouseover effects were about the only thing for which JavaScript was used? Was it a case of the theory of separation giving way to the practicalities of the day to day demands of designing web pages?

Similar justifications could be used for the re-introduction of the <font> tag or non-standard Document Object Models…. “Aw, c’mon, just this once. It’ll make life easier for the web designers, honest”.

The way that CSS has usurped the mouseover behaviour from the DOM sets a dangerous precedent. It’s a slippery slope to all-out anarchy.

Now, if you’ll excuse me, I need to extract my tongue from my cheek and do my best to ignore the sound of Edsger Dijkstra spinning in his grave as I add to the geek tradition of name-checking his seminal article.

Tuesday, August 3rd, 2004

Migratory patterns

I’ve mentioned before just how stressful and nerve-wracking it can be to move web hosts. That’s why I’ve been putting off the long-overdue migration of The Session from the hell that is WebServePro.

Meanwhile, the server problems continued to pile up: network connections going from slow to stop, tech support people giving me the brush off, etc.

Late Saturday night, I came back from playing a concert to find that the database on The Session was corrupted. I was getting no joy from the tech support people ("Oh yeah, that’s a really old server") but I managed to SSH in and repair the corrupted tables. It was the straw that broke the camel’s back: I immediately opened up a new account with Segment Publishing and began the big migration. I stayed up ‘till 4am doing MySQL dumps, FTPing files and configuring PHP scripts.

Luckily, Jeremy Bogan was on iChat to metaphorically hold my hand each step of the way.

The site was moved over and the DNS information was updated when I had to deal with the next obstacle in my path to server happiness. Segment Publishing upgraded to PHP5 today.

PHP5 would appear to be a bit less tolerant than its predecessors and some of my more sloppily coded include() statements needed to be rewritten. It also turned up some XML errors here and over at WordRidden.

I’ve spent most of the day tracking down and stomping on the bugs. I’ve also been rewriting the PHP I use for Google’s web services to take advantage of the native SoapClient support in PHP5. Overall, PHP5 looks like quite a leap in terms of Object Oriented Programming and the new XML functionality looks very promising indeed.

So it’s been a lot of work but it’s more than worth it to be finally free of WebServePro. Seeing the service deteriorate over the past few years has been like watching a slow train wreck. Avoid them at all costs.

Between moving web hosts and playing a concert, I haven’t had much to time to do anything else like, say, get any work done. I haven’t even had time to procrastinate properly.