Recently in web design Category
I've just read Joshua Porter's book, designing for the social web, in under 1 day. I wish I had had it to hand 1 year ago. Porter manages to pack a huge amount of insight and great advice into under 180 pages. His style is easy to read and concise.
I've discovered quite a few new tricks which could be, and should have been, incorporated in Playyoo. I'm also relieved to say that I discovered a few things we've done right, or at least not too wrong.
In the whole book, I only found one thing I disagree with. Discussing user feedback, he says:
Actually, there is a third choice. If you really don't want to succeed, you can disagree with the feedback.
This, I think, is a little extreme. It also conflicts with the idea that any product, including a web application, benefits from a strong vision. Obviously, disagreeing with all feedback would be plain stupid, but I can't quite accept that all feedback is relevant.
Anyway, this is a minor point. Designing for the social web is a great little book, and deserves to become a classic. Highly recommended.
The brave new world of Web 2.0 ...

So when do we start seeing "This site optimized for AJAX" buttons ? "Bugger", as Unlucky Alf would eloquently put it.
I finally managed to track down a very elusive bug which was affecting the photo pages on this site. Basically, if a thumbnails page was called directly, from say a link in a gallery update blog post, or a link I sent to someone, the first time it loaded, the gallery was blank. The second time, it was fine. This seemed to be a PHP session issue: if I discarded all the session code, it worked fine - although obviously everything else that depended on sessions was broken. But when I tried to home in on a specific setting, I got nowhere.
Finally, I worked out what was happening - I guess if I'd been using a browser which was less "user-friendly" about JavaScript syntax errors I would have got there quicker, but maybe not.
I finally discovered that there was a small difference between the page code generated on first and subsequent entries - it is pretty hard to spot:
BEFORE

AFTER

One extra double-quote was breaking the JavaScript syntax, killing the onLoad event handler. So where did this come from ? Well it seems that if PHP session_start does not find a current session, it rewrites any links it finds in the page to include the new session ID. The problem is, it isn't so clever about what is and isn't a link, and since I am actually writing a JavaScript function on the fly, various escaped quotes and things were confusing it. First, I realised it was doing this elsewhere, although in those cases it was actually harmless. I managed to stop it by using single quotes instead of double quotes.
But the line above - where for some reason, no session ID was written, just a superfluous extra " inserted - was harder to fix. Finally, I had to break one string concatenation into several steps, and finally I got the code I was trying to get the page to write, instead of what the PHP interpreter thought I wanted.
That has got to be one of the most obscure bugs I've ever had to track down on a web site...