Electoral Disobedience

February 19th, 2010

(also known as Adam has just done something really, really dumb)

So our good friends in Tasmania have an election looming. Good for them! Democracy’s awesome.

What’s not so good for them is that free speech is also awesome, and that’s no longer available to them in the political arena courtesy of section 191 of their Electoral Act, which means that all political statements during the election campaign must be authorised. This requires a full name and address, and effectively kills anonymous discourse dead. Digital Tasmania are talking a bit more about this, if you’re interested, and there’s plenty happening to Twitter, too.

As a result, I have decided to authorise anything Tasmanians want to say on-line. I mean, I don’t really care about Tasmanian politics, so I don’t mind authorising everyone and everything.

So, if you want to say something political in Tasmania in the next few weeks but don’t want to post your full address on-line, use my magical automatic authorisation Web site and I’ll authorise whatever you have to say. Promise.

(Side note: whatever you post is trivially publicly accessible. Bear that in mind.)

CineJS

January 19th, 2010

Yesterday at LCA 2010 I did a lightning talk in the Open Programming Languages Miniconf about a Javascript library I’ve been working on for a while called CineJS. CineJS provides a simple way to apply real-time filters to HTML5 video (and images) with only a few lines of Javascript and ships with nine pre-written filters that match the basic filters you would get from a simple image processing program.

There’s a simple example that applies a greyscale filter to a 30 second clip from the classic 1964 film Santa Claus Conquers the Martians. Check out the source code to look at how the filters are constructed and applied, or look at the more complicated stack demo to see how filters can be combined and altered.

This is pretty alpha, but it should work on current versions of Firefox, Safari and Chrome. I’d love to see some more complicated filters, and if you e-mail them to me, I’ll be very happy to include them in future versions.

The current version is 0.1.1 (and comes minified), and you can also clone the git tree.

(Unmoderated) manual notes are bad, mmkay?

October 30th, 2009

I’ve had a couple of whinges on IRC lately about why I’m not thrilled with having user notes in their current form in the PHP manual; we get entirely too many questions in ##php from people who’ve copied code out of a note and are then annoyed when it turns out the code is wrong, broken, horrible, or all of the above.

I present this example from the DateTime::getTimestamp() manual page. It’ll be disappearing from the mirrors over the next few hours, because I’ve deleted it (and posted a much simpler note in its place), so here was its content, for posterity:

If you are using PHP < 5.3.0 you can use this function instead:

<?php
function DateTime_getTimestamp(&$dt) {
$dtz_original = $dt -> getTimezone();
$dtz_utc = new DateTimeZone("UTC");
$dt -> setTimezone($dtz_utc);
$year = intval($dt -> format("Y"));
$month = intval($dt -> format("n"));
$day = intval($dt -> format("j"));
$hour = intval($dt -> format("G"));
$minute = intval($dt -> format("i"));
$second = intval($dt -> format("s"));
$dt -> setTimezone($dtz_original);
return gmmktime($hour,$minute,$second,$month,$day,$year);
}
?>

It’s fair to say that’s an interesting approach. The normal way of doing it would be:

<?php $timestamp = $dt->format('U'); ?>

I don’t know what the answer is — moderation has its own problems to do with workload, as PEAR can attest — but a system that’s letting that go up as recommended practice (and stay up for a month) has to be looked at.

Footsore

August 24th, 2009

Well, I’m back from the right hand side of the country. More on that if and when I can be bothered typing up my journal notes. It was fun.

I now have to deal with a giant backlog of e-mail, feeds and university work, so naturally I’m procrastinating and reading Slashdot instead. This story about parking meters in Chicago made me… do something that’s somewhere between raging and laughing. We’ve had those meters in Perth for years, and for all the many, many complaints Perth residents tend to have about City of Perth parking (and particularly their grey ghosts parking inspectors), the horror of having to walk a hundred metres or so to a ticket machine isn’t generally one of them.

It did remind me of working in the city last year, though. I usually parked at the Royal Street car park — even though it was a decent walk to iiNet’s offices on the Terrace, the day rate was cheap and there was usually parking still available at the hour I was getting there. In their infinite wisdom, the City of Perth decided to install new ticket machines last year which had apparently not gone through any sort of QC at all; the credit card functionality almost never worked, coin slots didn’t have enough clearance and kept getting jammed by 20 cent pieces, and it was generally a giant screw-up. As a result, you’d fairly often end up calling the City of Perth’s parking hotline, having a whinge at the completely disinterested person at the other end who’d promise someone would look at it someday (clearly not always the same day, since the same machines were often broken for several days at a time), and being given a reference number to write down and put on your dashboard to tell the parking inspectors that you’d at least tried to pay and that they should be merciful and not fine you. (That worked most of the time.)

Depressingly, the one time I got a decent response out of the City of Perth was when I got given $30 in change from a machine in the Goderich Street car park. (I was expecting about $2, from memory.) I called the hotline after a brief moral dilemma and got told by a rather surprised City of Perth staffer (after confirming not once but twice that yes, I really did want to give the money back) to wait there and one of the City’s contracted security people would be there shortly.

They arrived in two minutes flat. Amazing what happens to parking response times when money is involved.

Eee PC 701 and Ubuntu Netbook Remix 9.04

August 13th, 2009

I bought an Eee PC 701 a little while ago, when Catch of the Day had them as their daily special. Since I bought it mainly as a travel computer, rather than one I intended to use day-to-day, I’ve hardly touched it since it arrived and I dropped Ubuntu Netbook Remix onto it. At the time, I noticed some slowness to do with Wi-Fi and the special GUI, but since I flicked it over to the standard GNOME desktop almost straightaway anyway, I didn’t think much of it.

Fast forward to today, and I’m quickly setting up a guest account for my friends to use while we’re away on our Melbourne-Sydney road trip (since I’m apparently the designated laptop carrier for some reason). The slowness of both the GUI and Wi-Fi annoyed me, so I went and had a look around for solutions. For the benefit of anyone else having the same issues, here’s what I found:

Wireless: The 701 includes an Atheros chipset. Long-time Macbook users like myself will probably have to suppress an instinctive shudder at that. Launchpad bug 378156 is there to deal with this and, although it’s still open, hints at the best way to deal with this: installing the relevant linux-backports-modules package provides a newer version of the ath9k driver that resolves the flakiness and packet loss that the default version suffers from.

Netbook Launcher GUI: The main selling point of the Netbook Remix is its impressively slick launcher GUI, which wraps around GNOME to provide a better small-screen environment. It looks terrific and would work really well but for Launchpad bug 349314, which details a problem with the tiling support in the graphics chipset driver that makes the launcher unusably slow. The workaround for this is to enable the /apps/netbook-launcher/force_low_graphics option in GConf, but the real fix is in the pipeline, which is a new kernel version (2.6.28-15-generic) which is currently in the jaunty-proposed repository and makes everything work smoothly, just as your chosen deity or non-deity would have intended.

The Ubuntu Wiki has a useful page detailing these and other problems that affect the 701, but with those fixes above, I’m now very happy with Ubuntu Netbook Remix on the 701.

Strange days

August 12th, 2009

It has been a long, strange day full of sleep deprivation, coincidence, opportunity, drama and mostly self-inflicted angst. I might see if I can distill it into a blog post tomorrow.

At any rate, I’m off on a holiday as of tomorrow evening, and looking forward to my first real break since last July. (Conferences and uni trips are fun, but not exactly relaxing a lot of the time, and the Foundation Day long weekend I spent in Albany just wasn’t long enough.) The plan is for five of us to go to Melbourne for a few days (including taking in the battle for the priority draft picks, aka the Fremantle-Melbourne AFL game; and no, I’m not a Dockers or Demons supporter, so that’s going to hurt), drive very slowly through the snowfields in the general direction of Sydney, then catch a Bledisloe Cup game the weekend after next and return triumphant. And hopefully relaxed.

Obviously if you have open DB bugs, are breathlessly waiting for long-overdue action on the Dubnium front, or really want a new feature in wp-gopher, you may be waiting a bit longer.

I’d apologise for the above, but I’d be lying through my back teeth as I did it. I’ve been looking forward to this for months.

wp-gopher ₀.₂.₁

August 6th, 2009

Every time I release a version of wp-gopher I assume I’m done with it, since it’s a trivial little bit of Python that does one thing and does it well barely adequately. Neverthless, I got annoyed with the lack of character set support in it, so I’ve quickly hacked up a rudimentary fix — you can now define the character set in the configuration file and wp-gopher will insert an appropriate <meta> Content-Type tag to enforce it within blog posts (supporting non-Latin-1 text in the index would require character set support within the Gopher protocol, which doesn’t exist, as far as I know). The default is UTF-8, unsurprisingly.

To prove that it works, you can view this very blog post via Gopher (possibly even IPv6 Gopher, if you have IPv6 connectivity) and marvel at the following string of UTF-8 encoded Arabic, which Wikipedia claims is the Arabic name for Perth: بيرث.

A tarball is available: wp-gopher-0.2.1.tar.gz (SHA-1 sum: b9f9f1ced88464a1ff52cef5d088f2d046d7a20d), or you can git clone http://www.adamharvey.name/git/wp-gopher for the latest trunk.

Undesirable content

August 5th, 2009

Tried to access my home server from university (the same university that blocks access to everything except HTTP(S) via a proxy — not even outbound port 22, requires all wireless connections to go over an unsecured network then uses a PPTP VPN over that, rather than the more obvious 802.1x authentication, and other bits of IT bizarreness) and got this wonderful screen (URL and user name blanked out to protected the guilty):

ContentKeeper Fail

I’m not quite sure what’s malicious about a Mythweb interface, but hey, who am I to argue with the sensible people in university ITS.

Blogv6

July 27th, 2009

As I’ve mentioned a few times in the past, this blog is available over IPv6 as well as IPv4. Inspired by Dan Siemon, I thought I’d have a quick dig through my HTTP access logs and see how many requests come in over IPv6.

Type Unique IPs
IPv4 13,514 98.8%
IPv6 165 1.2%
Total 13,679 100%

That’s actually a bit more than I expected, since at best only four of the unique IPv6 IPs can be attributed to me. I wouldn’t say that IPv6 has hit the mainstream yet, but even 1% of traffic’s an interesting result.

On the overuse of parentheticals and their applications to high school reunions

July 23rd, 2009

Next weekend is my eleventh high school reunion. If it seems like an odd number for such a thing, well, there was a tenth last year, and presumably it went so well that they decided an eleventh was in order. Honestly, I did wonder briefly if it was just a reflection on the quality of our mathematics department. I didn’t go last year (in spite of some cajoling from one of my then-new friends, who basically suggested that I take her to prove… something that I wasn’t entirely clear on at the time, but which evidently would have been in the spirit of fuck you, I’m an anteater — suffice it to say that it only really started making sense once I found out more about her school experience), and I’m not going this year.

Oddly enough, I’ve had plans for next weekend since the start of the year, so I breathed a bit of a sigh of relief when the reunion was plonked on the same weekend; I mean, it saved an awkward excuse to cover not being very interested in seeing pretty much anyone from my high school. Broadly speaking, the (single digit figure of) people I want to be in touch with I’m still in touch with, with only one or two exceptions.

Still, it got me thinking back. I mean, what conversations would I realistically have given the shared experiences feel like a lifetime ago? Hell, I’m a pretty different person these days to the guy I was in 1998. Conversations? They’d be one liners at best; to whit:

  • The bully: So, hey, how about that ear thing you tried once outside science class? Did you ever stop breathing through your mouth?
  • The sort of friend of convenience I didn’t bother keeping in touch with: Yeah, sorry about the whole not calling thing. For, like, eleven years. How ’bout them Eagles?
  • The druggie (hell, which one?): Did you end up killing all your brain cells, or did you get lucky like me and manage to wise up before that point?
  • Most perilously of all, the first serious crush: Shit, you were all I wanted when I was thirteen. Subconsciously, I still compare every partner to you, no matter how unattainable you are living there almost fifteen years in the past (because really, I can only think about how you were then; I know nothing about you now). So, uh… how’s the food?

How the hell do you respond to any of that? And presumably I’d be getting similarly awkward conversational gambits my way (heard you got kicked out of a university less than twelve months out of high school — way to go, man!) which I’d have equally little interest in engaging with.

Maybe I’ll have more perspective in time for the twentieth. In the meantime, I’m going to enjoy my lost weekend next week with my friends.