TobyInkster.co.uk

Blog for May 2007

31/05/2007: URLs in demiblog

URL design is important. For this reason I’ve put a lot of thought into the URLs used by demiblog.

demiblog has a PHP object SiteURLSpace that maps between URLs and data queries. This means that demiblog’s URLs don’t necessarily have to bear much resemblence to its code structure. It’s also pretty easy to completely replace the object, and thus restructure demiblog’s URL space. (Except for a few cases like feeds and enclosures.)

Front Page

Firstly, demiblog can be installed anywhere on your server. If your domain name is example.com, then you could theoretically give demiblog URLs like any of these:

  • http://example.com/
  • http://www.example.com/
  • http://example.com/demiblog/
  • http://example.com/anything/you/like/

This makes it easy to have demiblog power your whole site, or just a part of it.

Now let’s look at some of the URLs within demiblog…

Tags

demiblog articles may be tagged. This is a loose form of…

Filed under: , , .

25/05/2007: Non-Intuitive Surnames

Below is a non-comprehensive list of surnames which are pronounced non-intuitively. (Or one could argue that they are pronounced perfectly sensibly but the spelling is non-intuitive.)

I’ve also included a count of how many times each surname applies in the 2006/07 Brighton telephone directory, to give you an idea of the relative importance of learning to pronounce each name correctly.

Filed under: , .

22/05/2007: The Great Wi-Fi Controversy

Last night, Panorama broadcast Wi-Fi: a warning signal unmasking the “controversy” over Wi-Fi health risks.

This is one of those many controversies in science that are not really controversies as far as the vast majority of scientists are concerned, such as the “controversy” over whether global warming is caused by changes in solar output.

Panorama quotes Sir William Stewart as stating that there is a lack of evidence as to the safety of Wi-Fi. However, the difficulty of proving a negative is well acknowledged within scientific circles. As an example, to prove that there is extraterrestrial life is easy — you just need to find an alien. To prove that there is no extraterrestrial life anywhere, you need to travel to every single planet in the universe and check in every crater, under every rock and behind every hill that there is nothing living — this is virtually impossible, and…

Filed under: , , , , , .

21/05/2007: The Tao of HTML 5 - Part II

Part of the problem with the WHATWG HTML 5 specification is that it’s primarily written by browser makers. (Hixie, its editor, is the exception, as he currently works for Google, though in the past was employed by the Mozilla Foundation and Opera.)

This has steered the focus of the specification towards browser manufacturers — the specification includes such things as algorithms for parsing markup. To expect a typical document author to care about such details, let alone understand them is a triumph of optimism over sanity.

Understanding Motivations

The aim of most browser makers is to increase their market share — to attract users, the browser must enable them to view any documents they could in their old browser, plus tempt the user with an array of new features and improvements. Naturally this leads to a situation where browsers are…

Filed under: , .

10/05/2007: EXIF is Cool

If you’re not aware of EXIF, here’s what it is:

EXIF stands for Exchangeable Image File Format, and is a standard for storing interchange information in image files, especially those using JPEG compression. Most digital cameras now use the EXIF format.

That is, many images, including most of the JPEGs you get off modern digital cameras include a huge barrage of interesting information about the picture, such as:

  • the date and time the photo was taken;
  • the longitude and latitude where it was taken;
  • whether or not the flash was fired; and
  • what model of camera was used.

Pretty nifty, eh? But how to get all this information out? Well, PHP offers some fairly good EXIF functions. I rather like Masahide Kanzaki’s EXIF2RDF tool and am happy to announce that version 0.2.0 of demiblog will include a version of this for its photoblogging functionality. demiblog is very focused on providing good metadata, and EXIF2RDF will help the photoblogging parts to keep their end of the bargain!

Filed under: , , , , .

04/05/2007: Meet the Head of Anaesthesia

OK… Clavin Centre for Plastic & Cosmetic Surgery… click through to Meet our Doctors & Staff. Ignore the really awful web page design.

Scroll down to the second doctor — the Head of Anaesthesia. Yes, he is related.

Filed under: , , .

03/05/2007: MySQL WTF?!

I’m currently in the process of extending demiblog’s database support. Version 0.1.0 only supports PostgreSQL, but I plan on also supporting MySQL in the next release, and a few other databases further down the line.

Because this cross-database support had always been planned, I’ve been very careful in writing my SQL to make sure that only standards-compliant syntax is used, and there are no proprietary PostgreSQL extensions.

I always knew that I’d have to adjust my SQL slightly to get it to run on other databases, but the amount of changes needed to port a seemingly simple SQL script with less than 300 lines to MySQL was astounding! Although a few of the adjustments were needed to account for SQL features that MySQL simply doesn’t yet support, the majority were to take into account several of MySQL’s seemingly-gratuitous bastardisations of the standard SQL syntax.

MySQL, how do I hate you, let me count the…

Filed under: , , .

02/05/2007: Shooting in Lewes

About five minutes’ walk from our house:

A man has been seriously injured in a shooting in Lewes town centre, Sussex Police have said.

Officers said they were called to Southover High Street in the East Sussex town by a member of the public on Tuesday evening.

(From BBC News)

Part of the reason we moved out of London was to get away from this sort of thing.

Filed under: , , .

01/05/2007: demiblog 0.1.0 Released!

I’ve been working on it all evening, putting on the finishing touches, and finally demiblog 0.1.0 is ready for the world. I wouldn’t recommend it for use on live, production sites at the moment (although I have been using it here for nearly 4 weeks).

Features:

  • Supported backend databases: PostgreSQL 8.x. (PostgreSQL 7.x may also work, but has not been tested.)
  • Content may be published in HTML 4, HTML 4.01, XHTML 1.0 or HTML 1.1, with experimental support for ISO HTML, HTML 5 and XHTML 2.
  • Normal pages of content (Articles).
  • Blog entries (BlogArticles).
  • Yearly, monthly and daily archives of BlogArticles.
  • Categorisation (Tags) of Articles and BlogArticles.
  • Visitor comments (Comments) on Articles and BlogArticles.
  • User signups visitors can sign up to the website for various extra features. (Though these extra features dont exist yet!)
  • Feeds provided in RSS 0.91, RSS 1.0 (RDF), RSS 2.0, Atom, iCalendar, hCalendar (HTML), Text (CSV), JSON and PHP Serialised Object formats.
  • Feeds of…