Sunday 21 June 2009

New Toys

Over the last couple of days I've started to find my interest in technical geekery coming back. For a while now computers have been my day job and as such they ceased to be an interesting hobby. Well, after nine months away from working with them I'm starting to find green shoots of technical interest showing through again.

Over the last few days I've been playing with various new things, and for my own amusement I'm going to try to keep track of new things I play with with the newtoys tag on blog posts.

First up Awesome: A modern, fast, configurable window manager for X Windows based primarily around the tiling paradigm but with a Lua-based configuration engine which allows you to do pretty much whatever you want with it. It's certainly slick and small and I'm pleased with my initial set up of it and am looking forward to playing with it more.

Lua: An lightweight, extensible, embeddable scripting language designed for customising and extending the behaviour of applications and tools. You wouldn't (please) write an application in it from scratch, but if you expose the relevant parts of your internal API to it, users can cutomise things in ways that you didn't think of.

Asterisk Caller ID support: Finally got around to tracking down the problem that has left me without working Caller ID on my Asterisk PBX. It turns out it was a (known) bug in the Sipura-3102 firmware. Unfortunately Sipura got bought by Linksys who then got bought by Cisco. Cisco are the company I least like dealing with when it comes to bugs and firmware. Their procedure for downloading anything (including the release notes) makes signing up for a bank account look easy. I mean, really. And on top of that, their Web site is buggy. It took me over an hour to persuade it to give me the firmware which finally arrived as a Windows executable which refused to work in Wine. Luckily I eventually found some help on the 'net, extracted the firmware and uploaded it to the Sipura by hand. It was really easy once I had the information -- the firmware needs to be on an HTTP or TFTP server and you can type the address into the Sipura's http://device/upgrade?... URL.

Anyway. The upshot of that is that the nuisance calls we frequently got are now officially a thing of the past. The PBX answers the phone and plays a recording of the Monty On The Run theme music to our unwanted caller.

On the back of the Asterisk success I decided to put some code into the asterisk dial plan to notify my jabber account when people were calling. That was easy but still, it's not quite what I wanted. So I've coded up a multicast messaging service in python with a CLI tool to send a message and a libnotify based client for displaying the result. Now we're getting somewhere.

Well... with all this libnotify fun maybe I could get my Facebook notifications popping up there too, instead of requiring me to log in and clear them manually. So I've been playing with the Facebook API. Unfortunately that's lead to some grumbling because their Terms of Service aren't Open Source friendly (you are required to keep your application key secret, which you can't do with a freely distributable application, Open Source or not). It makes sense for a hosted app, but not for a "desktop" app. They also, I notice, don't open up access to your inbox and the much-vaunted Jabber-compatible Chat interface has gone silent too. It looks to me like they're trying to keep their crown jewels to themselves here for fear of losing visitors.

But all in all it does feel like my geek streak is starting to come back again.

Divorcing The GNOME

GNOME and I have got on quite well since it came into existence in the late '90s. I had always thought that an interface combining the best of the command line and GUI approaches ought to be possible and for a time it seemed to be going well.

Unfortunately, GNOME and I have separated over irreconcilable differences, summed up by this page:
"Once upon a time, Gnome provided a way to enable Emacs-style keyboard
shortcuts ... Unfortunately, in trying to simplify the Gnome interface (for better or worse), this option has been removed."

This is a story that comes up over and over again: GNOME removing configurability in the name of ease-of-use.

GNOME used to be a powerful GUI built around Unix-friendly principles such as configurability, but more and more it's tending to the One Size Fits All approach. Though you can still get at a lot of config by hacking around with gconf, knowing what you're doing is getting harder. That makes fewer people change the defaults, which makes fewer developers find problems caused by deviating from the defaults, which in turn makes it even less appealing to customise things.

For many years I was a happy sawfish user. I had a nicely customised set of window management rules, shortcuts and utility functions that helped make me very productive. A few months back an upgrade over-ruled my choice of window manager and attempts to change it back just unearthed a bunch of strange behaviours caused partly by assumption that other code was making. Compiz was pretty configurable so I stuck with it for a while, but I finally snapped when I ended up typing my GPG password into a dialogue that popped up and stole my keyboard focus. The problem of new windows stealing focus is one that I never solved in Compiz.

Yesterday I replaced the vast majority of my GNOME driven setup with one based on the Awesome window manager. In a few hours I learned the Lua language that Awesome uses for configuration, disabled the tiling features that I didn't want (even though Tiling is the number one feature on Awesome's list, you can just configure it out if you try), added some functions I missed from my Sawfish setup and I now have a slick and extensible setup which as an added benefit makes my computer feel significantly faster.

I understand the appeal of uniformity. I understand that if everyone does things the same way it makes many things easier. But diversity and flexibility need to be treasured too. I should be able to mould my desktop environment around how my mind works at its most efficient, not vice versa. We need tools that make dealing with diversity easy rather than tools that try to make it go away.

I still respect the work the GNOME team have done on many levels, but I feel that in their rush for mass acceptance they are being too eager to sacrifice some of the things that made their alternatives to Windows so appealing.