I've decided to retire this blog — I don't really see myself updating it any time soon, and haven't for over two years anyway. I intend to leave the content on-line for the forseeable future, but have converted it to a static site. As a result, dynamic things like search and comments aren't really going to work.

You can find me on Twitter or on Google+ if you like. Alternatively, I'm usually on IRC as LawnGnome on Freenode.

Thanks for reading!

Archive for the 'Tech Geekery' Category

Bizarre life triangle

Saturday, June 26th, 2010

(This post was written on Thursday afternoon while flying over some barren-looking bit of far western New South Wales. Evidently recycled air stimulates my blogging neurons.)

Once again, it’s conference time. This time, I find myself winging my way to Sydney for a rare winter conference — specifically, the first edition of Pycon AU. As usual, I’m not presenting, but merely attending, although I hope (with the co-operation of the papers committee) to finally fix that at next year’s LCA. (Of course, if Silvia talks about HTML5 video, I’ll probably get knocked back!)

It’s been a busy month. Few months, really. I don’t tend to talk about my actual day jobs much on my blog, but I might as well mention a project I worked on earlier in the year — a prototype system for visualising the family trees of wheat strains, which is quite nifty if you like HTML5 canvas based goodies, although it’s far from a complete system. (If you work in agricultural or biological research, have a bit of spare budget lying around, and would like to see it become a complete pedigree traversal and analysis system, get in touch. We’d love to hear from you! Yes, this will be open source; in fact, it would be already if I’d had some spare time at work to sort that out.) Massive props to Nicolas Garcia Belmonte and his Javascript InfoVis Toolkit, which made the tree handling easy. It’s fair to say that the initial code that I wrote before deciding to use JIT was… ugly.

The project I wrapped up a couple of weeks ago was also rather interesting, and will be open source as well, but sadly I can’t yet talk about it. I’ll try to remember to blog about it when I can.

On a personal level, things have also been a little hectic. As per previous years, a group of my friends and I traipsed down to Albany for the Foundation Day long weekend, which was typically filled with wine and laughter, and I spent last Saturday taking part in the 15/15 Film Festival, which gives its participants an object and a quote (this year, a newspaper and "there is beauty in randomness", respectively) to put in a film and asks them to make a <15 minute film in 15 hours. We had an interesting time on that one, partly thanks to the loss of half of our raw footage due to technical issues (OK, NTFS not handling a dirty shutdown very gracefully, if we’re going to point fingers, and I am), which resulted in a very quick redefinition of the film in the editing process. I’ve yet to see the final cut (we were so pressed for time that we had to submit it without actually viewing it start to finish), and I don’t think the competition rules will allow us to put it on Youtube until the judging is complete, but it was a great experience and it doesn’t sound like the end product was that bad.

Admittedly, it didn’t sound that great, either.

All in all, I’m looking forward to a couple of days off. The conference proper is on Saturday and Sunday, so I’ve got tomorrow completely off, along with today and Monday as travel days. At this stage, the plan is pretty much sleep, broken up with the odd social engagement: with any luck, I’ll be having dinner with Noogz tonight, which is always fun, and will be off to the SLUG meeting tomorrow night — having never attended a proper LUG meeting, I’m looking forward to it! (Yes, this means I’ve lived in the city of PLUG for over fifteen years without ever actually going to a meeting.)

You gits

Wednesday, April 28th, 2010

I’ve been looking at GitHub more and more of late. Initially, it was just because lots of people were using it, but since I’ve been using Git on my own server for my own projects for a while anyway, it started making sense to upload some bits and pieces to it to save me worrying quite so much about trivial things like backups. Plus, GitHub seems like a pretty good home for those random bits of code that you tend to churn out from time to time as a developer.

So, I’ve spent the last couple of days pushing a few things up. It’s not going to completely replace my need to have some Git repositories on my own server (there are things that aren’t open source or aren’t for public consumption, like my resume — although making that open source could be entertaining), but it’s definitely handy for other things.

Obviously, my user page is going to cover the full list of things at any given time, but the projects I’ve uploaded so far include:

  • CineJS — the Javascript video processing library originally introduced at LCA 2010 and in an earlier blog post. There are a couple of releases probably coming for this in the next few months: an interim release to work around what looks like a bug in Mobile Safari on the iPad, and a more featureful release which will hopefully have the first steps towards WebGL support. I’ll probably get rid of the Google Code site for CineJS in the near future, since there’s no point having two issue trackers.
  • Dubnium — long time readers will remember this as my Google Summer of Code project back in 2007, and it’s been neglected far too long. It is, in essence, a cross-platform GUI debugger for PHP code. It’s gotten a bit of love in the last few months and I really just need to spend a day or two cleaning it up for a release. Unfortunately, part of that process involves getting a Windows build environment set up, and that’s rather killed my motivation so far.
  • A couple of little Gopher related things: the source tree for wp-gopher, my Python-driven Gopher interface to WordPress (which you can see in action on this very blog) and a Gopher stream wrapper for PHP that I knocked up on my lunch break today just for the hell of it, which I’m currently imaginatively calling php-gopher. Let’s face it: these are obviously Important Projects.

So, yay GitHub, helping me procrastinate from doing actual development work in my spare time for two days now. (Yay may not be the right word.)


Tuesday, 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.

Eee PC 701 and Ubuntu Netbook Remix 9.04

Thursday, 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.

wp-gopher ₀.₂.₁

Thursday, 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.


Monday, 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.

Let me fire up the DeLorean

Friday, July 3rd, 2009

Found and reported a couple of PHP 5.3 bugs yesterday. That isn’t such a surprise; it’s a new release, after all, and we’re currently in the midst of developing code for the first time against 5.3 here at work. One of them is a crasher, but an obscure one reliant on the new-in-5.3 INI_SCANNER_RAW mode in parse_ini_file and a rather odd configuration file, so as these things go, it’s pretty minor, and scottmac has jumped on it very promptly indeed (thanks!). The response from Jani was interesting, though:

Thanks for not reporting this before release..

Now, Jani does a tremendous amount of work triaging PHP bugs and I — and every other PHP developer (particularly those of us who does this for a living) — owe him a huge debt for that. But frankly, I resent the implication that I’ve somehow sat on a crasher since before 5.3.0 was released and only submitted it now as some sort of weird vendetta against the PHP internals team. Funnily enough, I only found it while I was reducing the other, more trivial bug down to a minimal test case.

I get far worse things implied in my direction when I’m out on a Saturday night in Northbridge, so really, I’m not that fussed. (I’m obviously a bit fussed, though, since I’m writing this.) I do wonder how somebody new to the PHP community would feel, though — my guess is that you could forget about future bug reports in some cases, and that just isn’t a win for anyone.

Tarnished, Old, Boring

Thursday, June 18th, 2009

As is all over the Web, our good friends at Microsoft Australia have decided to give away some money1 to try and shore up IE 8′s market share. They’ve done this by setting up a Web site that tells you to use IE 82, and when you do, you get a little box that includes the tweets they’re popping on the competition Twitter account.

That’s all well and good — it’s Microsoft’s money, after all, and they can spend it however they like. That said, there are a couple of things I find rather odd about the whole shebang. The first is technical: thus far, the landing page they have only uses some remarkably simple server-side User Agent sniffing to decide which image to show and whether to show the box of tweets. It would be nice if they actually used the competition to showcase some nifty technology that IE 8 actually brings to the Web that the other browsers don’t have, but presumably ActiveX and VML3 don’t count these days, and that pesky Silverlight team actually get things working on other browsers, damn them. (The fact that the competition page detects a default IE 8 install as IE 7 is particularly hilarious, but well documented elsewhere, so I won’t go into that.)

The bigger thing I find strange is the verbiage. There are at least seven versions of the welcome image that get served up depending on your browser: Tarnished Chrome, Old Firefox, Boring Safari, IE 6, IE 7, a generic message for other browsers, and the IE 8 version that talks about the competition a bit.

The first thing that leaps out at me is the rather negative language used — if IE 8′s so much better that people are going to love it just as soon as they give it a shot (encouraged by the chance to win $10,000), surely there’s no particular need to pluck out some negative adjectives before the names of the non-Microsoft browsers. (Presumably Microsoft’s marketing department isn’t too keen on talking down IE 6 and 7, so no adjectives and no ditching of the browsers in those cases. Feel free to suggest appropriate adjectives for IE 6 in particular in the comments.) Talk up your own product, Microsoft!

The So get rid of it, or get lost line is a bit odd, too. It seems to be an attempt to be cool, hip and edgy, but it’s dangerously close to actually telling your prospective customers to get bent, which is the sort of marketing tactic that doesn’t work out very often. Particularly for people on non-Windows platforms, surely it might have been better from a brand image point of view to say something nice (Sorry, but to take part in this competition, you have to be running the sheer awesomeness of Windows?) rather than that rather strange, out of place comment.

From my point of view, the idea of a marketing campaign for a new browser version seems reasonable — the last thing Microsoft wants from a brand and technological point of view is a world dominated by alternative browsers — but this seems like a remarkably wrong-headed, badly thought out way of going about it.

(Legalities: the marketing images and copy linked above are © Microsoft Australia and are reproduced unmodified apart from the addition of a background colour for legibility. Fair dealing is asserted under section 41 of the Copyright Act 1968 for the purposes of review and criticism.)

1 Link appropriately nofollowed. I did debate whether to post this at all, given it’s an obvious attempt at a viral marketing campaign and Microsoft would want people to talk about it, but I felt the need to vent a bit, so I feel nofollow links are an appropriate compromise.
2 For what it’s worth, I don’t mind IE 8 anywhere near as much as 6 or 7 as a developer. Sure, it’s still horribly slow at executing Javascript — sorry, JScript — and lacks support for a whole bunch of useful features everyone else has had for years, but it’s not actively broken any more, which is nice.
3 I don’t know whether to laugh or cry at the continued support for VML in lieu of SVG in IE. There has to be some sort of stubborn as a mule award on that front.

Tethering iPhone 3.0 to Ubuntu 9.04

Wednesday, June 17th, 2009

So, I found myself with a copy of iPhone OS 3.0 a little ahead of the general release and felt the urge to get tethering working properly. (People who jailbreak have previously had the option of a few third-party products, the best known and easiest to use being PdaNet, also known as that software that wrought havoc upon the LCA 2009 wireless.) It turns out to be pretty seamless on OS X (and apparently also on Windows), but of course, that doesn’t do an awful lot for me as an Ubuntu user.

iPhone Internet TetheringThe iPhone provides two options for tethering: USB and Bluetooth. The USB option looks promising, but is a bit beyond my knowledge of the USB subsystem: lsusb provides information on a configuration called PTP + Apple Mobile Device + Apple USB Ethernet with a couple of interfaces labelled Vendor Specific Class; someone with crazy USB hacking skills will probably get that turned into a network device in due course, I suspect.

That leaves Bluetooth. The iPhone uses Bluetooth Personal Area Networking The good news for lazy people like me is that NetworkManager support is in the works, but until then, it’s still not too painful, as people have been tethering to mobile devices using PAN for a while.

The tutorials I found generally covered other distributions or older versions of Ubuntu, so here’s the process for Jaunty. First the one-time configuration:

  1. Install the bluez-compat package.
  2. Edit /etc/default/bluetooth to add the following lines:

  3. Restart the Bluetooth service: /etc/init.d/bluetooth restart
  4. Add the BNEP network adapter to the /etc/network/interfaces file by appending the following line: iface bnep0 inet dhcp
  5. Get the Bluetooth address of your phone by running hcitool scan and jotting down the address next to your phone’s name.

Now the bits and pieces that need to be done each time:

  1. Pair your computer with your iPhone. If you’re using GNOME, the standard Bluetooth applet can handle that; presumably that’s true of the other flavours of Ubuntu as well.
  2. To connect, run these commands in your favourite shell, replacing 00:aa:bb:cc:dd:ee with the Bluetooth address you jotted down earlier:
    sudo pand --connect 00:aa:bb:cc:dd:ee -n
    sudo ifup bnep0
  3. At that point, life should be good and you should be connected. To disconnect later:
    sudo ifdown bnep0
    sudo pand -K

This seems to work rather well. The speed test results were noticeably better than they had been previously using the various ad-hoc network + jailbreak based solutions that I tried with iPhone 2.x; here at the office in sunny Osborne Park, I got about 850 kilobits down and 350 kilobits up (and a ping around 250 ms) on the notoriously crummy Optus 3G network, which is enough to actually be genuinely useful.

Thanks to InfoSec812 and wilbur.harvey (no relation!) for writing rather good tutorial posts on the Ubuntu Forums, which this howto is based on.

Sure, Why Not?

Thursday, April 23rd, 2009

Seen on the Facebook home page….

I love that guy!

Ronnie and I have been friends for a long time, of course, but I’d just never been able to find him on Facebook. Thanks, anonymous PHP coders!

(Yeah, I know what they’re really getting at, but if you’re going to repurpose the people you might know field to handle fan pages and the like, it might be time to rethink the name.)