Blog
A Book Baton
I think these "batons" are a pointless waste of time, but still can't resist joining in when invited. I'm late too. Not that any of that actually matters. Many thanks, Ben.
Number of books on the shelf
Around 600, at a guess (about a quarter of those belong to the missus). I tend not to keep books on a shelf - once I've read them, I don't see the point in keeping them to gather dust. I only keep books that either I'm likely to re-read or that friends of mine will probably want to borrow. The rest end up at charity shops (or soon released into the wild through BookCrossing).
Last book purchased
Ender's Game - Orson Scott Card (actually the first book I've bought in a while - since stopping commuting I've been spending much less time reading).
Book I'm reading right now
I'm halfway through Terry Pratchett's Going Postal, Michal Palin's Himalaya and Donna Tartt's Secret History. I have this annoying habit of reading several books at once, some more slowly than others.
Last 5 books read
- Incompetence - Rob Grant
- Want to Play? - P.J. Tracy
- The Devil in the White City - Erik Larson
- Life of Pi - Yann Martel
- Things My Girlfriend And I Have Argued Above - Mil Millington (for about the 90th time)
Books that mean a lot to me
The books that mean a lot to me now might not mean as much were I trapped on a desert island (where, much like Ardal O'Hanlon, I would make sure I had a giant inflatable book, and one entitled 'How to Make Oars Out of Sand'). Good books convey emotion, so the books that mean something to me are usually those I've read at a particularly emotional point in my life, and whose names I can rarely remember, but when (or if) I re-read them I come over all emotional.
Passing this along to
- Diane Vigil
- Kim Krause
- Brian Warren
- Adrian Lee
- ... and anyone else who wants to tell the World what books they've read (without an opportunity to list the books they actually like) as a thinly veiled excuse for reinforcing the ludicrous hierarchy of the blogosphere (I'm in a slightly cyincal mood today).
Happy Birthday PHP!
PHP is 10 years old today! Version 1 was announced to the World on June 8th 1995, and since then a huge community has built around the language, now one of the most widely used, powerful and flexible languages on the web. Long live PHP!
CSS Zen Garden - Impossible Designs?
I think CSS Zen Garden is an amazing idea, and it has been an inspiration to me ever since I first found it, despite how bad it makes me feel that I'm no good at graphic design (yet ... allegedly practice makes perfect).
I was wondering about CSS and the Zen Garden earlier, and it occurred to me that the XHTML file it all runs on may be one of the best examples of good markup out there. After all, there are several hundred designs for the site all using the same XHTML file, and they are all completely different. And what most of us are aiming for is to create XHTML and HTML files that will never, or extremely rarely, require change - even if the design is changed.
And that got me wondering if there have been designs that people have created that have turned out to be impossible to implement? That would mean that the CSS Zen Garden XHTML file could, maybe, be better - but the changes that would need to be made to that file would be a good indicator of what sort of forward-thinking additions we should be making to our markup to accomodate change later.
So my question is this - does anyone know of (or have they experienced this themselves) CSS Zen Garden designs that have been impossible to implement because of something missing from the XHTML of the site? And if so, what would have to be added to the XHTML to make realising that design possible?
PDF Cheat Sheets
As requested by everyone, PDF versions of the PHP, CSS and mod_rewrite cheat sheets are now online. Enjoy!
Block Prefetching
Mozilla and Google's prefetching functions are a nice addition to browser technology in many ways. Unsurprisingly, they are not very well thought through. The main two problems with the prefetching idea are that it messes with log files and it means every link on a page could potentially be followed despite the consequences (dangerous in a site administration context).
It appears from the FAQ that Google only intends their accelerator to prefetch specific pages, that have been specified with the <link> tag. However, many people are claiming that normal links have been prefetched.
To prevent prefetching of a page is simple: add the following PHP to the page you do not want prefetched:
if ((isset($_SERVER['HTTP_X_MOZ'])) && ($_SERVER['HTTP_X_MOZ'] == 'prefetch')) {// This is a prefetch request. Block it.header('HTTP/1.0 403 Forbidden');echo '403: Forbidden<br><br>Prefetching not allowed here.';die();}
This will serve a "forbidden" header to the prefetcher. Normal browsing should be unaffected.
Small Changes to Site
With the release of the amazing Opera 8 (the voice stuff is mindblowing), I can now upgrade my LiveSearch to use XMLHTTPRequest. I used Opera 7 before and it wasn't supported - but I still wanted LiveSearch - so I came up with a new way to do the same thing. XMLHTTPRequest is the better way though, and the upgrade was easy. All those with modern browsers should now see, if you type into the search box, results as you type. I've also introduced pagination in the results.
Technorati
Apparently in order to "claim" AddedBytes.com on Technorati, I need to link to my Technorati Profile. So here's my link.
Greasemonkey User Scripts
Greasemonkey is a truly impressive addition to Firefox and will be IS a nice addition to Opera 8. In simple terms, it allows you to write custom JavaScripts to run on any sites you like (or even all sites). There is a fairly healthy group of scripts already available, and many more surely on the way.
I've been writing a few small greasemonkey user scripts so far, and this list should serve as a nice simple way to find them on the site:
- Number Google Results
This script will automatically number all Google search results for you. - Number MSN Results
This script will automatically number all MSN search results for you. - Auto-Save Forms
This script saves all text in forms to a cookie for you as you type. If you any reason you lose the data in the form (eg your PC crashes, your session expires, etc), you can click the "Repopulate Form" button and your text will be restored.
Also highly recommended:
- CSS Signatures on Every Site
Page contains a script that will give every site a body id tag, allowing you to write site-specific stylesheets using the body id as a handle.
Strange Referrers
As most people who examine their log files every so often have also no doubt noticed, sometimes you find information in there that just doesn't make sense.
Take these two common referrer strings for example:
- "XXXX:++++++++++++++++++++"
- Field blocked by Outpost firewall (http://www.agnitum.com)"
The first - well, nobody appears to have yet been able to determine where that comes from. It certainly does a good job of hiding the authentic referrer though. My personal guess is that "XXXX" replaces "HTTP", and the +++ replaces the actual referral URL. It looks like a personal firewall product that simply hides the referrer.
The second is actually spam. Well, it is and it isn't. Anyone using the Outpost Personal Firewall from Agnitum can hide referrer URLs with the program. It unfortunately then replaces the referrer with what is essentially an advert. Unfortunately, blocking this referrer really isn't an option as it isn't the user at fault - it's the shortsighted company that produces the firewall.
What to do about these is the interesting question. Personally, I leave them alone. Both are easy to filter out of a referrer log, and as far as I know it is authentic users leaving these marks. Another option I've had suggested is to filter users with these referrers to a page explaining why they are being redirected, and what they can do to stop it happening again - explaining, of course, that it isn't their fault.
The only thing that we can do as users is to not use products that do this. Use ones that hide the referrer, by all means, if you want to. No problem there. Just don't use products that replace the referrer with rubbish data or an advert - all that does is make life harder unnecessarily for web developers.
sIFR and Forms
It struck me today, while working on a project, that sIFR (a way of dynamically replacing normal text titles with a Flash alternative for those users who have Flash available), while very useful for titles, could be put to good use to allow people to style forms as well.
I must confess, I've not used sIFR myself, so am not sure how easy this might be, technically. However, the premise is simple enough. With sIFR, you replace an normal HTML element with something visually improved, without losing out in terms of accessibility or semantics. Forms are still, despite the problem existing for some time, almost unstylable due to inconsistencies in browsers.
sIFR in forms should, in theory, allow people to create icons in flash for different element states. For example (this is what got me thinking about this) a checkbox has two main states - checked and unchecked. They look awful. It would be great if there was a way to replace the checked state with a decent tick icon and the unchecked state with a cross icon.
As I said, I don't know how tough this is to do. Managing disabled elements would be tricky. Text boxes could well present a problem. Radio boxes might require a couple of boxes to be changed at once. Selects don't look fun. But it should be possible. Does anyone know if this has already been attempted? Is anyone willing to give it a go? If it worked, it would make a massive difference to web designers everywhere, helping them to work around the inconsistencies in form styling and finally get some control.
Thanks, Poland!
That was damn close. Poland has asked for the text of the "Directive on the Patentability of Computer-Implemented Inventions" to be changed (see BBC article), so software cannot be patented. If it had not been blocked, the effects would have been almost unimaginable - had this been introduced twenty years ago, technology would now be at little more than 1984 levels. Thanks Poland!
Fun With Flickr
I've finally actually decided to check out Flickr, and am quite impressed. I still hate the way people combine their content feed with their Flickr feed, but that's what the unsubscribe button was invented for. Now I've found my digital camera, it's time I made use of it! I do have my own page up there, with a few photos from Twickenham at the time of writing. More will follow!
AddedBytes.com is the online playground of 