Sunday, October 28, 2007

Considerations of Errors

I've been having some issues(again) with bittorrent programs. I only have these issues on Linux it seems(Ubuntu specifically). However, its the way they blow up that illustrates one of the key sources of bugs in code: error handling.

In the first place, there is Deluge, primarily a python bittorrent client. A very nice one... but it fails in a pretty mundane way. Right now, it will not add nor remove any more torrents. Rather frustrating when I wanted to download the Open Disc. I finally found what had happened. It appears that when I upgraded from Ubuntu 7.06 to Ubuntu 7.01, that deluge's behaviour breaks. It was quite silent on any errors in fact, because they were not handled. And here's the kicker, it will still have errors even after uninstalling, and reinstalling deluge.

The reason for this behaviour is that something the developers did not think could happen did, and therefore, unpredictable behaviour happened. Because they did not have anything in place in case there was an error they did not envision, the program is literally unusable. So, there goes my favourite torrent program.

I turn then, to Azureus... and it crashes too! This one was likely out of the reach of the developers of Azureus... as I believe it is an issue with Java itself. However, I'm still annoyed at the lack of good bittorrent programs for Linux. Well, good and stable programs.

The lesson though, is communicate with your users what happened. No matter the mistake, the bug, whatever, the users should still see something telling them something went wrong, instead of seeing the program start and behave wrongly. That is bad behavior.

2 comments:

Unknown said...

Yeah, I gave up on using Linux for my torrent server. Azureus worked, but I couldn't access the Web interface.

I've been using Transmission on OS X, and it's pretty good. Of course, installing OS X onto the old Dell box was a bit of hard work, though.

The simplest torrent interface I had was on my NSLU2 - I used enhanced-ctorrent, and an associated web interface (CTCS). This was actually pretty good, and it ran on a machine that just whirred away in the corner, making no sound, and not much heat.

µTorrent was okay, on Win32 - but I had to run it via VMWare on Linux, which was hard work to get going too, since it wouldn't run on the original Linux distro I had installed. Nor would the extras compile... eventually it worked, after a reinstall of an older linux.

Zeroth said...

Heh, its almost too much work for that much effort. I found out what was causing my crashes since my upgrade, and it appears to be when the internet is used at the same time as the ALSA layer. It results in a very hard to reproduce race condition that freezes my computer. So as long as I don't leave any videos open or Amarok, I haven't had any issues with Deluge.