Blog

Momentary Reminiscence

Tuesday, March 9th, 2010

Four years ago, what dominated my mind most was that I was running out of time. The end of my time at University loomed large in front of me. I didn’t have a job to go to, my final year project was dead in the water and my relationship was painfully long-distance, but those weren’t the most weighty issues. I was troubled far more by the fact that three months from then, I’d be leaving the city that defined my transition from childhood to adulthood, losing that constant contact with friends that defines University life.

And come June, the inevitable happened, and off we all went.

There’s a lot I don’t miss about that time — the pressure of coursework and exams, the phone calls every night until my head felt ready to burst, the having very little money — but there’s one thing I really, really do.

I miss the drama.

At the time, I was pretty conflicted about the giant morass of drama that got dropped on us in what was my third year — I hated it, but it was almost enjoyable in a weird ironic sort of way. And now I miss it.

I miss the burning feeling and the anguish of developing crushes on completely inappropriate people. I miss all the knowledge of other people’s lives that comes from being so regularly in contact with them. I miss trying to fix other people’s bad situations, I miss succeeding, and I miss failing. I miss having breakfast at KFC, though only two people know why. I miss baring the contents of our hearts until deep into the night. I miss the secrets and the gossip. I miss friends becoming lovers, and I miss friends becoming enemies. I miss finding the right things to say to the right people, and I miss failing at that too. I miss falling in love for the first time.

None of that is coming back, and perhaps I should be glad of that. After all, I just confessed to hating it. Absence makes the heart grow fonder, after all (or was it Absinthe?), so it’s probably for the best that it’s all safely confined to the past. But once every so often, just like now, I’ll reminisce about those times long ago.


Film Review by the Numbers: The Incredible Hulk (2008)

Friday, March 5th, 2010

The Incredible Hulk (2008) (not to be confused with Hulk (2003), the Incredible Hulk (1987) or the Pretty Good, I Guess Hulk (2013).)

BRUCE BANNER blah blah blah SCIENCE blah blah BLOOD blah blah GREEN blah HULK SMASH. Blah blah ANGST. Some STUFF happens, and it was generally a bit better than the PREVIOUS ALMOST INDISTINGUISHABLE HULK MOVIE.

Punches thrown by Giant Mutant Things: Over 9000
Purple stretchy pants: 1
Armoured vehicles exploded: 7
Abominations that involve bacon: 0
Abominations that do not involve bacon: 1
Guatemala: 1
Guatepeor: 1
Lolphysics moments: 2 (excluding the premise itself)
HULK SMASH: 1
Robert Downey Jrs: 1
Samuel L. Jacksons: 0
Movies with almost identical endings we still have to put up with before they finally make the damn SHIELD movie: 3?

Overall: 3/5


HOWTO: Use an XBox 360 Dance Mat on Ubuntu Karmic

Wednesday, March 3rd, 2010

Normal XBox 360 wired controllers are supported out of the box on Ubuntu Karmic (9.10). However, it seems that dance mats such as the one that comes bundled with Dancing Stage Universe behave a little differently. Here’s how I got mine to work.

This HOWTO is in the public domain. You are free to re-post it wherever and however you like, though a link back here would be appreciated.

Be warned, this is not for the faint of heart – we will be spending most of our time in a terminal window, and we’ll be compiling drivers ourselves. Read the instructions carefully, and follow what I did line by line. If you have problems, leave a comment and I’ll see if I can help you out. Running commands as the root user is potentially dangerous; I am not responsible if your computer is damaged by incorrectly following these instructions.

First of all, check that you have the same device as I do. If not, proceed with caution! To find out, plug your dance mat into a USB port, open up a terminal window and run

lsusb

You should see a line which looks like:

Bus 002 Device 002: ID 12ab:0004 Honey Bee Electronic International Ltd.

Your ‘Bus’ and ‘Device’ numbers will probably be different, but the rest of the line should be the same.

The xpad driver, which is already baked into the kernel, does not work for these dance mats. We will have to instead install xboxdrv, which does support dance mats.

The first thing we need to do is download the source code for xboxdrv. Their website provides downloads (at time of writing, the latest was 0.4.10), but I chose to grab the very latest code from their git repository. To do that, first install git if you don’t already have it:

sudo apt-get install git-core

Then find a space to download xboxdrv to – I just chose my home directory, which should be the location you’re at when you first run the terminal anyway. Download their latest source using git, then go into the downloaded directory:

git clone git://github.com/Grumbel/xboxdrv.git
cd xboxdrv

Now you’ll need to compile the driver from the source code you’ve just downloaded. These following instructions are largely from the README file included with xboxdrv. You’ll need a bunch of things installed so that you can compile the code. To make sure you have everything, run:

sudo apt-get install g++ libboost1.40-dev libboost-thread1.40-dev scons libusb-dev libx11-dev x11proto-core-dev python-dbus

Now compile by simply running:

scons

Make a cup of tea, this will take a few minutes.

Assuming you don’t see any errors, you now have a driver that will support the dance mat. However, this is a ‘user-space’ driver, which means we don’t actually bake it into the kernel — instead, we need to make sure that the kernel supports user-space input drivers, then we run xboxdrv as if it were a normal application.

First of all, though, we should check it’s actually working. To start with, we’ll remove the xpad driver from the kernel, and add the user-space driver support. Note that if you have any other joysticks, removing xpad could stop them working. I’m not sure if there’s any way around this at the moment. Run the following commands:

sudo rmmod xpad
sudo modprobe uinput
sudo modprobe joydev

Now we can run xboxdrv and check it’s working. Type:

sudo ./xboxdrv

You should see something like the following:

xboxdrv 0.4.8
Copyright (C) 2008 Ingo Ruhnke 
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

USB Device:        002:002
Controller:        "DDR Universe 2 Mat" (idVendor: 0x12ab, idProduct: 0x0004)
Controller Type:   Xbox360
Deadzone:          0
Trigger Deadzone:  0
Rumble Debug:      off
Rumble Speed:      left: -1 right: -1
LED Status:        auto
Square Axis:       no
ButtonMap:         none
AxisMap:           none
RelativeAxisMap:   none
AutoFireMap:       none
RumbleGain:        255
ForceFeedback:     disabled

Starting with uinput... Error: /dev/input/uinput: No such file or directory
done

Your Xbox/Xbox360 controller should now be available as:
  /dev/input/js0
  /dev/input/event7

Press Ctrl-c to quit

X1:     0 Y1:     0  X2:     0 Y2:     0  du:0 dd:0 dl:0 dr:0  back:0 guide:0 start:0
TL:0 TR:0  A:0 B:0 X:0 Y:0  LB:0 RB:0  LT:  0 RT:  0

Press some of the pads on your dance mat. You should see extra lines appearing at the end indicating the buttons that have been pressed. The arrows on the mat match up to D-pad directions, so for example if you press Down, you should see dd:1 on the line that appears.

Once you’re satisfied that it’s working, hit Ctrl+C to quit.

Before we’re finished, we should make those changes to the kernel modules permanent. To do this, run:

sudo -i
echo "blacklist xpad" >> /etc/modprobe.d/blacklist.conf
echo "uinput" >> /etc/modules
echo "joydev" >> /etc/modules
exit

You can now reboot if you want to, and all your kernel module changes will stick.

There’s one more step. At the moment before using your dance mat, you’ll still have to run xboxdrv manually. We can fix this with an ‘init script’ that will run xboxdrv automatically on startup.

First, let’s put xboxdrv somewhere sensible on your filesystem, rather than in your home directory:

sudo mkdir /usr/local/bin/xboxdrv
sudo cp xboxdrv /usr/local/bin/xboxdrv/xboxdrv
sudo cp tools/xboxdrv-daemon.py /usr/local/bin/xboxdrv/xboxdrv-daemon.py

Now we’ll set up the init script. The script itself is a few dozen lines, so rather than pasting it here, here’s a download link instead: xboxdrv init script. Download this, then copy it to /etc/init.d. That requires root access, so from your terminal, if you downloaded it to your “Downloads” folder, run:

sudo cp ~/Downloads/xboxdrv /etc/init.d/xboxdrv

Now we have to make sure that’s executable and that it runs on startup:

sudo chmod +x /etc/init.d/xboxdrv
sudo update-rc.d xboxdrv start 51 S .

(don’t forget the dot on the end!)

Aaaand at long last, you should be done. Reboot, and your dance mat should work properly with no extra configuration. If you’re using StepMania, remember to map the mat’s controls before playing. If you’ve not drunk that cup of tea yet, it’s probably cold!

If you’re looking for a similar guide for OpenSuSE, I’ve just discovered this post which is similar to this post, but with OpenSuSE-specific init script instructions.


All Bugs Are Shallow… Except This One

Wednesday, February 24th, 2010

In his essay “The Cathedral and the Bazaar”, Eric S. Raymond coins the phrase “given enough eyeballs, all bugs are shallow” — meaning that with enough testers and enough programmers, it is possible to diagnose and fix any software bug.

So why can’t my computer suspend and resume properly?

The concept of ’suspend’ — or ’sleep’, or ’standby’ — mode, whereby the computer dumps its internal state to RAM then enters a low-power state with its processor and other hardware turned off, is not new. The ACPI standard has been kicking around for 14 years now, a very long time compared to the life cycle of an operating system. These days, with laptop use on the rise, it’s a very common thing for users to want to do. And yet resuming from suspend is still hit-and-miss.

Why do I find it more reliable in Ubuntu than openSUSE for the same base kernel? Why does GNOME fare better than KDE? Why does my WiFi sometimes not come back? Why, with Microsoft’s million- if not billion-dollar operating system budgets, with Intel and AMD and nVidia’s decades’ of driver experience, is suspend and resume still frequently an issue even on Windows?

Only Apple, with its closed hardware / software ecosystem, seems to have cracked it.

I’d hate to think of that as the only way to a bug-free existence — I’m very fond of the idea of an open ecosystem where I can run whatever software I want on whatever hardware I want. But I’m worried. Is the range of (IBM-compatible, ACPI-supporting) hardware out there just too diverse and too widely different in its support for suspend-and-resume? Is it just infeasible for software to perfectly implement it on all devices?

Has hardware created the one software bug that, for any reasonable number of eyeballs, isn’t shallow?


The Web’s Syntax Problem

Tuesday, February 23rd, 2010

As @aefaradien notes, the web has a syntax problem. It’s this: A user wishes to post something complicated – text with links, formatting, even inline graphics. They go to a website and are faced with a text box and a flashing cursor. What do they type? What syntax will help them achieve their goal?

It depends entirely on which website they’re on and what powers it. With any luck the text box itself might have an area below explaining how to use it, but chances are, the user won’t read it. The knowledgable user has a whole bunch of questions:

  • Can I use HTML? The internet is made of HTML (and cats). Once the post is submitted, it’ll be sent to everyone else’s browser as HTML, so can I just write in HTML anyway? But HTML is complex, am I restricted to a certain subset? Do I have to worry about breaking the website’s formatting? Is the site using some weird CSS that’s going to distort my post? Could I introduce security vulnerabilities?
  • Is the syntax HTML-like? Am I using a phpBB-powered forum, or others that support its syntax? Something else HTML-like but not true HTML? To make something bold, do I write <b> or [b]?
  • Is the syntax Wiki-like? And what even is Wiki-like? MediaWiki, which powers Wikipedia, probably has the most popular syntax out there, but each wiki is subtly different. If I CamelCase words, will they become links? If I surround a word with *asterisks*, will it become bold? What about apostrophes? Forward-slashes?
  • Is it something much stranger? Could it be something like Markdown, which could interpret some unintentional meaning from my text because I don’t know its syntax?

To my mind, there’s no simple solution to this problem. Each has its own strengths and weaknesses, and developers of each web platform, blog or forum app have their own preferences. BBcode has some traction, but it’s so close to HTML — why not just use HTML? Wiki markup’s great for linking to internal wiki pages, not so great for anything else. And Markdown and its cohort of technically superior solutions just don’t have any traction in the real (non-geek) world.

I think if this problem were to ever be solved — and I must say I don’t think it’s likely — we have no option but to pick the lowest common denominator, because nothing else will ever have enough traction.

And here’s where I make myself unpopular: the common denominator is HTML. But HTML used with some intelligence:

  • Auto-link URLs, but deal with it if users want to use <a> tags. Nothing’s more annoying than having to copy-paste a URL into your location bar because it’s not actually a hyperlink. Also, it breaks the web.
  • Deal gracefully with special characters. If a user doesn’t know HTML, they should be penalised as little as possible for using triangular brackets in their text.
  • Limit HTML as little as possible. Sure, don’t allow <IFRAME> or <SCRIPT>, but if there’s no way a user’s HTML could be harmful (including to layout and design), let them use it.
  • Don’t use weird CSS. If you don’t want users to use <h3> because your <h3> is 72px high, change your CSS. You design a website for its users, and that includes giving them what they expect when they use their own HTML in their posts.

And that’s that. By auto-linking URLs and gracefully dealing with triangular brackets, we’re giving users that don’t know the syntax what they expect. For users that know HTML, we’re not making them learn some other new syntax that offers a slight improvement. And for users that want to learn the syntax so that they can do more complex things, they’ll be learning HTML, and that opens up far more of the internet to them than knowing BBcode or Markdown syntax.

Thoughts, as always, appreciated!


The Public Human

Thursday, February 18th, 2010

One of the greatest trends in technology over the last decade seems to have been the erosion of privacy, and I don’t see this changing in the decade to come. Our greater dependence on the internet, social networking, blogging, sharing, status updates — they are all leading us towards a world where nothing is private anymore.

And I think that’s great.

By and large it’s not some insidious corporation or government that’s doing it — the NSA may have their wiretaps and Google may datamine your search history, but aside from targeted ads and somewhat dubious “protection from terrorism” neither has had any real impact on our lives. There’s no scapegoat for most of our loss of privacy, because we’re doing it to ourselves.

Everything interesting we do, we tweet. Everything we feel, we post a status update. Everything we think, we blog. Everywhere we go, we check in. Everything we listen to, we scrobble. Every minute of every day, half the world is shouting at the internet, “this is who I am, this is where I am, this is what I’m doing, this is what I think about it”.

Why do we do it? We don’t really achieve anything by it; there’s very little to gain for the amount of privacy we lose.

We do it because it feels good and because privacy isn’t worth anything.

We put our thoughts and our statuses and our locations out there because they’re essentially inconsequential. It’s spoken about in some circles as if it’s some great risk to your personal privacy if the internet knows that you’re in McDonalds and you don’t think much of the fries today. But no-one’s going to exploit your Twittered fondness for Starbucks or John Meyer. No-one’s going to wait until you check in on Foursquare before breaking into your house. 99.99999% of the world isn’t listening and doesn’t give a damn.

But the tiny fraction that is listening, and the even smaller fraction that has something to say on the subject, gives us all the impetus we need to post. There’s that little endorphin rush that comes with every comment on your blog, every retweet of your amusing status, that spurs us on. Even though it’s trivial interaction, often with people we don’t know, it’s compelling enough.

And that’s why our loss of privacy will continue unabated — most people just don’t value it that highly compared to the increased level of human interaction we gain by sacrificing it.

When it’s put like that, does it seem that bad? Human interaction, knowledge of our existence within society, makes us feel more fulfilled and ultimately happier. If that’s the net result of this trend — if the constantly-connected, sharing-everything Public Human is a happy one, why fight it?

(At this point I should probably apologise to the more privacy-conscious of my friends, to whom this post will seem awfully like I’m trolling. That’s certainly not my intention, though you are of course welcome to reply and lay into it nonetheless! Rest assured, I get my comment-buzz when I’m being disagreed with too. :P)


Film Review by the Numbers: Beowulf

Monday, February 15th, 2010

Synopsis:

SOME DANISH BLOKE is tormented by 90s Industrial/EBM band GRENDEL. From across the seas comes BEOWULF and GIMLI to save the day. And get pissed. Occasionally, they kill STUFF. In the nude, ‘cos that’s just how BEOWULF rolls. Then BEOWULF fights he and ANGELINA JOLIE’s LIZARD-BABY and the LAWS OF PHYSICS at the same time. Totally unexpectedly, he wins.

By the Numbers:

Uncanny Valleys reached: 1
Uncanny Valleys crossed: 0
Convincingly-delivered lines of dialogue: 0
Accents effected by Beowulf: 6 (by my count, Cockney, Pirate, Australian, Scottish, English and South African)
Incidences of Realistic Boob Physics ™: 0
MIGHTY LUST LIMB: 1
Nekkid Beowulf Power Level: Over 9000
Angelina Jolie’s Golden Minge: 1

Overall: 1/5. This made it to cinemas?!


Multitasking, the new “Doing Things”

Sunday, February 7th, 2010

I am beginning to wonder if it is possible for me to single-task anymore.

Breakfast occurs to the backdrop of Twitter, Facebook and the most important overnight events as synthesised into Google Reader. Conversations occur against a background of web-surfing and social networking, and most often these days, these conversations themselves take place on the internet. There’s always time to check Twitter while something compiles. My phone sits next to me as I cook, flicking through the net as saucepans bubble away.

And then there’s the evening, a dozen tabs open, some of them are playing video which seeps slowly into my brain as a background process while I blog; Twitter and Facebook on 5-minute refresh, push e-mail, Reader on “1000+ items unread”. I’m on the net if I’m watching TV. When reading a book, the ping of a new e-mail distracts me immediately. And there’s always background music.

Every time I try for some reason to single-task, it’s as if the System Idle Process of my brain pokes my consciousness every so often and says “isn’t there something I could be doing?” I realise that many people, on discovering this, have the urge to ‘internet detox’, to cut down their online activities or try and go cold turkey and do without the internet for as long as possible.

But I don’t. I like this feeling. I love filling my bloodstream with caffeine, opening my eyes wide, becoming one with my code and with the background buzz of the internet like some cyberpunk hacker kid. I don’t know what it’s doing to my head in the long run, but I don’t think it’s damaging – it feels just like it’s optimising itself differently. I’m by no means the first person to have encountered this, and with the increasing pace of technology and pervasiveness of the net, I am a long long way from being the last. In 20 years, or maybe 120, we might discover what happens to society when everyone’s brains parallel-process in a way that ours are only just beginning to grasp.


Breaking Out of Twitter

Saturday, February 6th, 2010

Earlier this evening, @HolyHaddock linked to an entry on Brian Hurt’s blog entitled “Why I Quit Twitter”. In it, he argues for his leaving Twitter on the grounds that it is not a good place for debate and extended discussion:

If you want to debate me, I’m open to it. But for the debate to not be pointless, that means it has to be held somewhere where ideas can be explored and complex arguments can be presented. In email, in blog posts, in comments, somewhere where there is room.

Twitter Conversation Thread

Figure 1. The Problem

Which is fair enough. I would argue that Twitter has every right to be bad at conversation — that’s not what it was created for. Once upon a time, it asked a simple question: “What are you doing?”. The user base has shaped Twitter over the years, most notably in the formalisation of @usernames and #tags which began simply as trends among users. But it has stuck resolutely to its 140-character limit, without which I think the service would change for the poorer.

I have no real argument with Brian Hurt here — his reason for leaving is a fine one, and he’s certainly not suggesting anyone else should necessarily leave for that reason. Personally, I didn’t come to Twitter for extended conversation, and I won’t be leaving for the lack of it.

But ironically @HolyHaddock and I did discuss this problem on Twitter, and it was probably not long before the conversation became annoying to those that follow us both. (To double up the irony, I was also using a pastebin to reply in more than 140 characters.)

I think the real issue here is that although Twitter does not well support conversations, people tweet things that are likely to start conversations, and there is no real way to break out of Twitter once the conversation has started. If we assume that Twitter has no intention of allowing long — even infinite-length — replies, then if there is to be any way to ‘break out’, it must be through another service.

Now the friendliness of the Twitter API makes it very easy for other sites to integrate with Twitter, allow users to sign in with their Twitter credentials, and pull tweets across for display. But as I see it, there are a few issues that would need to be resolved with a potential service:

  • Pulling Across. If a conversation starts across multiple tweets, these would need to be pulled across to a ‘break out’ conversation so that things already said don’t have to be re-said. It’s easy to identify the tweet that started it all, but no way in the API to find all replies to it. Starting from the most recent reply, one can find what it is in reply to and follow the thread all the way up, but if the conversation has branched, you wouldn’t capture it all.
  • Branching vs Single-Threading. Multiply-branching threads aren’t too much of a problem on Twitter, but displaying them properly may become an issue on the ‘break out’ service. Reducing everything to a single thread — blog comment style — is the alternative, but this could lead to some very confusing conversations, not least if some users’ tweets are protected and thus not visible to certain other users.
  • Reporting Back. Should anything be passed back to Twitter to let other users know where the conversation is continuing? How would we do that in a way that’s informative but not spammy? Should we instead rely on the user that ‘broke out’ to let the others know?
  • Permanence. Would there be a slight mistrust of the ‘break out’ service, meaning that users would prefer not to use it in case it disappears from the face of the ‘net tomorrow? How would we overcome this, and how would we allow users to create some permanent archive (e.g. download) of the ‘broken out’ thread in case they have discussed something meaningful and worth keeping?
  • Wave. Someone must have already done a Google Wave bot that will pull in tweets and let people do this, surely?
  • Popularity. How would we let people know that this service exists, and how popular would it be — how many people want this kind of service? (Many could be as much of a problem as few.)

Tagging onto the Google Wave point, is there a service like this that already exists, in Wave or otherwise? Any thoughts, oh great interweb hive-mind?


The Perils of Gas Supply

Friday, February 5th, 2010

So, I got home today to discover a nice polite letter put under our flat door. This enlightened us to the fact that representatives of the energy company E-on had tried to visit today “to discuss any problems [I] may have paying”, and that I should contact them as soon as possible, otherwise they would obtain a Warrant for Entry and return with Police and a locksmith if necessary.

Ohhhhhkay. Nice introduction to your service there, E-on.

Background time. When we moved into the flat, we were told that our gas and electricity supply was with Powergen. We were already with Southern Electric for both supplies in our previous house, so we called Southern Electric to let them know, and they moved over the account. Problem solved! They billed us by direct debit, without paper statements, and we payed what we thought was a reasonable amount every quarter for a year and seven months. Back in December, a British Gas rep reckoned they could beat what I thought we were paying for gas, about £30 a month, so I arranged to switch suppliers.

Back to the present. We called E-on, and apparently, they were our gas (but not electric) supplier. For nineteen months. Without sending us a bill. They were supposedly billing Swaythling Housing, the housing association who own half our flat under a first-time-buyer’s initiative. And Swaythling had no information on who lives here, despite us paying them £200 a month in rent, and so weren’t forwarding the bills to us.

The point at which E-on finally decide to visit the actual property is apparently Bailiff Time, not before.

Next complication, the question of who the heck is currently supplying our gas – could be E-on, could be Southern Electric, could be British Gas. And the answer is… nobody knows. Because we don’t exist.

E-on looked up our address, and our meter ID, on the central UK database, and we’re not on there. Our meter doesn’t exist and our property doesn’t receive gas, apparently. I’ve been having a lot of fake showers! E-on recommended that we call Southern Electric Gas, which we do. And guess what, we’re not in their database, and they can’t see us in the central database either. Their suggestion: call Northern Gas, who are apparently the Uber Energy Company.

And naturally, they’re only open 9am-5pm, Monday to Friday.

Also, they’re now apparently called Fulcrum. Wait, Fulcrum?!

So in a delightful start to the weekend: we’ve just paid £280 to avoid the bailiffs coming round, we live in a house part-owned by an incompetent company, and our gas supply may be provided by any one of four separate companies — or maybe no-one at all. And we get to wait until Monday to figure out if Fulcrum can help us. If they can’t, er… who knows? Campaign for the re-nationalisation of the gas industry?

Oh hey, does this mean I get to blame the Tories for this mess as well? Good-oh, I’ll stick them on the list too.