Happenings

Google, Disability And The French

Yep, it’s time for some more random links:

  • Inaccessible Website Demo – I’ve been going on about accessibility for long enough now. This site demonstrates exactly why you should care about creating accessible sites too. Give it a try.
  • Google: unix of the future – With the recent addition of calculator features to the pervasive Google, you can’t help but wonder if they’re heading in a command line direction.
  • Answer To Everything – Speaking of Google Calculator, it really does know everything.
  • French Military Victories – I think not.

And that’s enough for one day.

Permalinks And Data

There’s an old problem with permalinks: they have a tendency to end up not being permanent. You keep a record of articles (bookmarks/favourites) that you know you’ll want to refer back to later. When it comes time to actually use them, the links are broken for whatever reason and you’re left staring at a 404 screen. Not fun.

It’s happened to me once too many times, so I’m going to try to solve the problem for at least my site. My thinking is that servers are outwith the control of most people, even the owner of the site living on the server, thus making it the weakest link in the distribution chain. So, how do we remove reliance on servers to recall information?

The best answer is immediate addressing in the form of Data: URL‘s. For those who’ve never seen a data:url, it’s a way to store information (images, text, or pretty much anything else) as a link; that is, the link is the data, not just a pointer to it. It’s a great concept being used in various ways (not least as a way of beating DVD encryption).

When permalinks meet data:urls, we have a way of storing entries as links. That is, we have bookmarks that will never break.

Of course, this is not without it’s problems:

  1. Internet Explorer – Not unsurprisingly, IE does not support data: url’s and won’t do anytime soon. So, those users don’t get the added benefits unless they upgrade.
  2. Bandwidth – by providing the data on a page and as a link, bandwidth usage is effectively doubled. This is not good. To combat this, I only provide data: permalinks on individual item pages. You’ll have to click through to an entry to get the data permalink.
  3. Limited space – Although Mozilla and its derivatives offer data: urls of up to 2Gb, the recently added support in Opera is limited to 4kb. That’s not a lot of room for a full-on essay. Happily, though, it’s easily big enough for most entries around here. Those that are too long get automatically cut down to size and a real permalink added to the end, pointing to the full articale. This is very much a compromise, but one worth making.
  4. Unclosed Tags – Related to large essays getting cut down (above), permalinks on this site might have unclosed tags towards the end. This is entirely my fault. Eventually, I will work on a way to automatically close tags that are open, but until I do they’ll be broken. Sorry.

If you want to play with data: urls yourself, there are some good resources. Ian Hickson’s data: URI kitchen is the best place to generate them for experimentation. Or, if you’re feeling really fruity, there is Simon Willison’s self-contained data: URI kitchen; a reinvention of Ian’s kitchen as a data: uri (confusing yes, useless no).

Thanks to Ian Hickson for providing the numbers on URL lengths, and to Simon Willison for reworking the original kitchen and inadvertantly giving me a kick to get this done.

Commenting On Comments

I’ve been doing a lot of thinking about commenting systems lately (no prizes for guessing why.) It occurs to me that my biggest problem with allowing comments is the vulnerability that it gives the site. By letting others post (in reply to my entries), I allow them the opportunity to inject malicious or malformed code.

To bypass this, I could strip_tags(). But that rather limits the ability of people to express themselves fully; I know I’d hate to have most of my XHTML vocabularly pulled out from underneath me. I could allow a limited textile style pseudo-markup language (which I probably will), but many are set in writing proper HTML.

I’ve settled on my last option: processing comments with various regular expressions (to get rid of the dangerous) and then sending it through Simon Willison’s safe HTML checker class. Playing with it earlier, it works a treat.

Now, I just need to find the time to implement it and the rest of the commenting system.

I’m Wario

Now for something a little different: the Wario Ware website is eating my time. To sum it up as a series of 5 second microgames does not do it justice. Each game is a miniworld in itself, devouring time like peasant devours turnip.

The GBA version promises over 200 such games. Oh dear; I’m supposed to be working at some point within the next year.

Legally Blonde 2

No funny heading. It doesn’t deserve one. Things I learned whilst watching Legally Blonde 2:

  • You can’t will yourself into a coma,
  • You really can get away with passing off excrement as art (perhaps a bit strong),
  • I really need to trust my instincts when getting dragged to see films: if you think it looks dire before seeing it, chances are you’re right,
  • Maxibons are tasty.

Ok, so I’ve known the last one for quite some time, but the rest are true.