Where I’ve been.

Spoiler: France.

If anyone has been wondering where I’ve been over the last fortnight, the answer is France. Hence my lack of coverage of events as significant as Steve Jobs’ don’t-call-it-a-departure from Apple.

Upcoming over the next few weeks is my (delayed) coverage of all these events, plus articles as significant as reviews of French road signs, trains, and an upcoming Thing I’m involved with that I’m very excited about.


Preferences.

No, not that kind.

Some settings designed to make the experience of reading this World Wide Web publication more pleasurable on an individual basis are now available.

For instance, if you find the ever-changing season-based colour scheme to be too gaudy or esoteric, you might like the Night or Plain styles, the latter of which is more true to the grid underlying this site’s design.

(Submissions of new themes are of course accepted; they consist of at least a standard background colour, a colour for the above header and left sidebar text, and optionally any other transfigurations of this site’s CSS styles.)

And if, upon clicking the headers of this site’s link posts, you would prefer that the links open in a new window rather than in this same one, then so be it: you now have that option

Where are these new preferences? Down at the bottom of each page, at the little gear icon. Or just give this handy preferences link a visit now.

And of course it would be two weeks after I completed my redesign of this site that I discover the Semantic Grid system, which appears to offer ‘pre-rolled’ the exact set of tools I had to invent on my own for this purpose.




How to load Typekit fonts asynchronously.

While designing this site’s preferences system, I encountered a problem related to the loading of the site’s themes. To wit:

The alterations to the default style which constitute a ‘theme’ are performed entirely by JavaScript. These alterations must be performed at a certain time during the loading of the page, lest they come to nothing because the necessary DOM elements have not yet been created. It turns out that this was not until after my Typekit fonts had loaded, which is quite slow. This means there’s a long delay between the loading of the page (such that it is visible to the reader) and the application of the theme — a very jarring flash of the default style on every page load.

The solution, I found, is to load the fonts asynchronously using the HTML5 async attribute.

The script Typekit tells you to install on your website is something like this:

<script type="text/javascript" src="http://use.typekit.com/YOUR-KIT-ID.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

In other words, it loads a pre-roll script then uses JavaScript to initialise and load the fonts. I placed this at the bottom of the page source because my body-font is not a web font, so nothing will get re-aligned after the Flash of Unstyled Text to disturb the reading of articles.

The trick to load them asynchronously is to replace this with:

<script async type="text/javascript" src="http://use.typekit.com/YOUR-KIT-ID.js" onload="try{Typekit.load();}catch(e){}"></script>

Replacing YOUR-KIT-ID, obviously, with your Kit’s ID. This way, jQuery’s $(document).ready will fire before the fonts are loaded, ready to apply the styles before the page appears on-screen.

Using this will result in the fonts being loaded in Internet Explorer 10, Safari 5, Chrome 11, or Firefox 3.6 or later. On earlier browsers, the fonts will be loaded in the normal, synchronous manner — the magic of backwards-compatibility and graceful degradation.

Precisely 14 people will be interested in this.




Artificial Heart.

A brief review of Jonathan Coulton’s new album.

To paraphrase Stephen King: There is a time in every artist’s life where he chooses either to carry on doing things exactly as he always has, or to try to do it even better.

Artificial Heart is Jonathan Coulton, doing it better.

Highly recommended.






1st January, 2008.

A retrospective. A message from the past.

I recently dug up a piece of paper dated New Year’s Day, 2008. I started a diary that day, but didn’t have a book to put it in, so I wrote my musings on a piece of spare paper. (I did later move it to a book, which lasted about two weeks.)

It’s quite a long diary entry. Here are the edited highlights, or what a 14-year-old idiot thought of the turn of a new year.

Bored, bored, bored, bored, bored! New Year’s Day is so depressing. I suppose 1st of January is a traditional enough day to start a diary.- even if its [sic]1 not in a book at the moment! It isn’t particularly modern of me to start a diary — far better to start a blog, but I couldn’t put up with the publicity.2

I don’t generally make New Year’s resolutions, but for this year I’ve decided to set ‘targets’ for myself.

  • Turn 15 (easy enough)
  • Have epiphany moment.
  • Make good choices for GCSE.
  • Do well at school.
  • Stop being so boring.[^2]

I’ll let you be the judge of the extent to which I’ve succeeded at the latter.

And let’s cast an eye on how well the predictive powers of David were working in 2008:

  • Gordon Brown has a vote of no confidence, an election, something that takes him out of power.
  • Even more action on climate change.
  • 2012 Olympics does one of the following: finally finds its feet or falls flat on its face.

I don’t know what I meant by the last one. But I give myself a score of 0/0 for predictions in the year 2008.

That said, things were not a complete disaster for me with regards to this diary entry. I turned 15 and I think I made pretty good GCSE choices. I also changed considerably as a result of an ‘epiphany moment,’ though it was less of a moment and more of the entire year as I spent most of it depressed at how little I was achieving and how little respect I got from my peers, and most of 2009 happily sulking in this realisation. I do think that I’m a less boring person overall because of this.3


  1. I don’t know why I missed the apostrophe there. Even at that age, I was somewhat pernickety about correct grammar/etc. Perhaps I had read somewhere that you shouldn’t bother with correct language in your diary. I don’t know. 

  2. Ha. 

  3. If you think I’m a nerdy social recluse now, you should have seen me 3 years ago. It’s not healthy for a 14-year-old to be that way. (Probably not that healthy for an 18-year-old to be this way, either.)