How Flooded Is Bangkok?

On a Saturday night, when I really should have been watching football, I noticed Vanalli and thai101 discussing the Bangkok floods on Twitter…
Continue reading

Linode Kernel Check

[Update: Linode changed their data format on 3 August 2011 which broke this script - it has now been amended.]

[Update 2: And again on 22 August 2011. Amended again.]

I host this site on a Linode, because it’s like having my own dedicated server, running whatever distro I like (Debian, in my case), for twenty bucks a month.

One of the many advantages of Debian is its insanely awesome package management. However, one of the very few disadvantages of running a Linode as opposed to a real dedicated server, is that your kernel package is managed from outside the VM, rather than within.
Continue reading

Reconstruction

The thing about backups is everyone knows they are critically important. It is like your lungs. You don’t sit around and think about your lungs everyday, all day. Yet, if you loose them, it is pretty much game over #

The quote, ironically, refers to Ma.gnolia, for whom I once created and maintained a wordpress plugin. Pure serendipity – I just searched Google for “the thing about backups” until I found a quote I liked…

But to get to the point, this website was first registered in 1999. Ten years ago. Since then, it’s hosted at various times a static site, a defunct mess, a Movable Type install, WordPress, a Bloxsom install, an Habari blog, and then finally a return to WordPress as I realised that it’s very obviously the least-bad blogging engine around at the moment. Even if it is written in PHP.
Continue reading

Eschew Obfuscation!

Sometimes Perl gets a bit of a bad rap for being a language in which it is trivially simple to write utterly unmaintainable code.

Today Slashdot even reviewed a book, Perl Medic, aimed at helping people to demystify the inner workings of their colleagues’ incomprehensible apparent line noise, posing as a supposedly high-level language.

I personally think Perl’s a great tool for getting the simple things done simply, and getting even the most complex of tasks done without too much in the way of hassle. Whatever you want to do, there is almost certainly a module freely available on CPAN to help you in doing so.

And yes, I generally make sure that my code uses both the strict and warnings pragmas, and try to use sane variable and sub naming schemes in anything more than a couple of lines long.

But it’s still always a bonus to be able to use such a behemoth of mind-bleedingly insane code as the gorgeous Mail::RFC822::Address module, as I did today. Yes, there are perhaps more reasonable ways to verify the integrity of a supplied email address, but I’m afraid I just rather like the idea of passing my input through this.

Y2K +38

Something I found myself writing earlier:

# Convert the 2-digit year into the 4-digit year
$y = '20' . $y;
# nb. this breaks for years after 2099.
# however, this server will have been broken for over 60 years by then anyway.

Having survived The Millennium Bug, will your systems die in the early hours of Jan 19 2038? Mine will…