Alternative Vote – If you vote No, you’re answering the wrong question

On the 5th of May there’s a referendum. The question posed is thus:

At present, the UK uses the “first past the post” system to elect MPs to the House of Commons. Should the “alternative vote” system be used instead?

The campaigns for and against are currently in full swing, and there’s something quite striking about the “No” campaign: it’s saying No to the wrong question. The question is answers is this:

Is the Alternative Vote the best system we could have to elect MPs to the House of Commons.

The answer to that is clearly No. The Alternative vote isn’t a great system at all. It has it’s merits, but it’s certainly not a a good example of Proportional Representation. Even Nick Clegg called it “a miserable little compromise” and he’s the one pushing the damn thing. The No campaign has focused on this and are demonising AV like it’ll herald the end of democracy, while neglecting to defend the system they’re trying to make us stick with for all eternity.

However, read the question being posed again. It’s not “Should we use the Alternative Vote?”, it’s “Should we use the Alternative vote instead of First Past The Post?”. Both systems are, broadly speaking, majoritarian systems (that is, they’re designed to give the winning party a significant majority). Neither system is ideal when you’re considering fair representation of the people’s views across the whole country, but in a >2 party system (like we have in the UK), First Past the Post (FPTP from now on) simply doesn’t make sense.
The key difference between to 2 systems is this: Under FPTP, a candidate can win without the support of the majority of voters in their constituency. In fact, the more candidates who stand, the less support they need to win due to the vote being split (see, the BNP winning council seats, which is why they’re against the change). Under AV, 50% of voters must vote for a candidate in some capacity for them to win. With only 2 parties, FPTP is fine as one candidate will always have a majority (unless its a dead heat). With more than 2, AV is the clear choice to keep voting fair and results meaningful.

Until a better option comes along, let’s snap it up. Vote yes.

Come to OggCamp… Oh.

So, this was going to be my blog post to promote OggCamp and tell everyone to come. However, just 5 days after the event was announced, the 200 tickets have sold out.

So what the hell is OggCamp?

OggCamp is an annual celebration of Open Technology, including Creative Commons music, art, literature, Open Source software, open data, and anything else that’s generally geeky and hackable. It’s organised by The Ubuntu UK Podcast and Linux Outlaws. This year will be the third that the event has run, and the first one I’m involved in organising, and it looks like it’s going to be a blast.

When/Where is it?

The event’s being held at the Farnham Maltings in Farnham, Surrey on the 13th and 14th of August. The “official” hotel is the Aldershot Premier Inn, which is a short drive, train ride or a very long drunken stumble away.

It sounds amazing, but I don’t have a ticket! What do I do now?

As I mentioned, the event is now sold out. All ticket registrations are handled through EventBrite. I’d suggest watching the page like a hawk for any cancellations, and snap up the tickets. Did I mention that the event is free for all attendees?

Ubuntu UK Podcast Season 4

Last September I recieved a Tweet from my friend/former boss and LUGmaster Tony Whitmore asking me if I was free that evening. Tony is one of the founding presenters of the Ubuntu UK Podcast and it was recording night. 3 out of 5 members of the team weren’t available, leaving just him and Laura, his girlfriend and co-presenter. Suffice to say “The Laura and Tony Show” wasn’t the sound they were after, so they asked me if I’d be up for popping down the road and joining it.

Being a fan of the show, I jumped at the chance.

After what must only have been 6 or 7 episodes (although it was so much fun it felt like a lot more), it was Christmas and time to call and end to season 3 of the show. However, after a couple of months off we’re rested and we’re back, this time doing things a little differently…

The big change we’re making is the move to an official live stream of the show. There’ll be details of how to listen on the Live page with links to how you can get involved during and after the show, via IRC, Twitter or Identica. Of course, if you want to get in touch in between shows you can still use email and voicemail, just like before.
The show will go live on Tuesday evenings, from about 8.30 until 9.30 PM UK time, which is another change for us. We used to record on Monday, edit on Tuesday, and release on Wednesday. Now the plan is to stream and record on Tuesday, and release a relatively un-edited recording on the Wednesday as before. The first show is this tuesday, 1st of March.

The other major change is the website. We had a brilliant theme designed for us by Andrew Higginson, the man responsible for the Kazam Screencasting tool among other things. He even designed us a cool new logo, what a nice guy! If you see him, buy him a beer.

So tune in to us at about 8.30 this tuesday. All details will be on The Website. And if you’ve not listened before, well this is the perfect time to give it a go! Even if you’re not an Ubuntu user, it’s certainly not all we talk about – if you’re at all interested in computers and technology, have a listen. Go on, if you’ve read this far, you totally want to.

Using Dropbox as a DNS server

So at Dev8D we had a session on sharing handy hints and tips to save time and effort. The subject of Dropbox came up, so here’s one of my favourite Dropbox hacks.

At home I have about 4 devices on my network. I like to refer to each by hostname rather than IP address (I SSH a lot), but I dont want to have to run my own DNS server.

The solution to this is pretty simple (and very hacky). On one machine, I configured /etc/hosts to map each hostname to their IP address. Once I had it all set up correctly, I moved hosts to my Dropbox folder, and created a symlink in it’s place (so /etc/hosts points to /home/mark/Dropbox/hosts). I then set up the same symlink on my other machines. Now updating the hosts file on one machine will sync the changes to all other machines, giving me hostname to IP address resolution without DNS.

Standard – A new tool for creating slideshows

Presentations

I’ve given a few presentations in my time. At University, at work, at conferences and barcamps, and recently to some students at the University of Portsmouth. They’ve all had one thing in common: a slideshow.

Slideshows Suck

There’s no reason that a presentation has to include a slideshow, but it can help focus the audiences attention on what you’re saying at a particular point. The problem I’ve found is that the most pervasive format for slideshows (PowerPoint) sucks, and the main alternative (OpenDocument) isn’t a lot better. They both rely on you having a local copy of the slideshow file, and having the appropriate software (and often the correct version) to display your slides as intended.

S5 Sucks Less

Recently, I started using a format called S5 (Simple Standards-based Slideshow System), created by Eric Myer. Eric was inspired by the Opera Show Format which allows you to create slideshows in XHTML to run in the Opera browser. S5 extends this idea using some simple Javascript and CSS to enable slideshows to run in any Standards-supporting browser. This eliminates the need for presentation software to be installed, meaning you don’t have to worry if your laptop dies and you’re presenting from another machine. It also makes it super-portable – you can run it from the local filesystem, upload it to some web hosting, or I just stick my slideshow in my public Dropbox folder, and present it from there. This gives me the double-whammy of being able to give a URL to my slides straight away.

Standard Makes Slideshows

The problem presented (ho, ho) by S5 is that it lacks the familiar editing tools of current formats. The easiest way to create one is to hand-code an HTML file, which is likely to be beyond the vast majority of presenters. Even WYSIWYG HTML editors aren’t ideal, as you’d have to edit the slideshow as a linear page, which is confusing unless you understand exactly how S5 works.


So here we reach the purpose of this post. Last night I released the first product of the Standard project, a new open source project I’ve started to produce tools for creating S5 slideshows. The key to these products is that you won’t need them to present the slideshow – you can use a web browser of your choice. The current editor is a plugin for Moodle 2, which I decided to create after using an S5 slideshow at work and seeing the potential for the format in a web-based Virtual Learning Environment. I also plan to create a simple desktop application that can be downloaded and run, and am looking at options for the best platform (I’ve had AIR suggested, but would prefer an open source solution, I’m currently looking at Ruby/Qt).

The first release is now in Moodle Contrib CVS, and the latest code will always be available from Github. If you want to keep track of the project, I’ll be blogging here with the Standard tag, Tweeting about it, and you can email me on mark at this domain.

Rock and roll!

Shuttleworth’s Law

On the last episode of UUPC, we mentioned “Shuttleworth’s Law” our very own adaptation of Godwin’s Law. In a nutshell, Shuttleworth’s Law is

As a discussion about Ubuntu grows longer, the probability of a user threatening to stop using the distribution approaches 1

Ciemon described the concept of Shuttleworth’s Law as “the mark of the bug” that sets it apart from others, in a similar way that Godwin’s Law suggests a conversation should probably be stopped (or already have been) once a comparison to Nazis or Hitler occurs.

Let’s look at some examples!
In the show, we mentioned 2 current discussions where the Law rings true. The first is during Popey‘s post on askubuntu.com, the new StackExchange site for Ubuntu-related questions. Popey wanted more information on why Ubuntu 10.04 would be switching to Unity for the default interface rather than working with the GNOME project to develop the desktop environment. Popey got his answer in the form of references to an ArsTechnica interview with Mark Shuttleworth. However, the conversation didn’t stop there. People took the question as an opportunity to vent their feelings about the announcement, and before long, we saw this post from Scott Evans. This may not be a perfect example of the Law as he talks about why he stopped using Ubuntu, rather than threatening to stop. However, the fact that he’s reading and posting on an Ubuntu Q&A site leads be to believe that he hasn’t stopped entirely.

The second example that we found on the show was during a discussion about the Launchpad trademark. Canonical hold a trademark over the Launchpad name, which is used for it’s open source bug tracking/project hosting site. Apple has recently announced that Mac OSX Lion will ship with a product called Launchpad, an iPad-style full screen application launcher. A bug was filed on Launchpad stating that Canonical should sue Apple for infringing the trademark. Canonical responded stating that the legal team was aware of the issue, and since it wasn’t a bug in the Launchpad software, the bug was marked as invalid. However, the responses continued, and yes, the user Tralalalala threatened they would “immediately remove Ubuntu from [their] PC and won’t use it again.” if Canonical were to sue.

Shuttleworth’s Law certainly isn’t a recent phenomenon. Shortly after Launchpad was open-sourced following pressure from the Ubuntu community, a bug was filed against the Ubuntu One Server project, stating that the server component of Canonical’s cloud storage service should also be open sourced. It was stated that Ubuntu One would remain a proprietary product, and that Canonical was doing so in the interests of getting a commercial return. This concluded, the bug was marked as Won’t Fix. Job done, right? Wrong. The comments continued, and sure enough user balleyne chimed in with this gem: “Ubuntu One makes me want to leave Ubuntu.

As for the reasons behind this pattern, I’d suggest a few hypotheses. An obvious one is simple Internet trolls who rock up to a controversial discussion and like to stir the pot a bit.
A second and slightly more worrying possibility is that it’s a desperate cry to be heard. If the community really feels that Canonical doesn’t listen to the needs of the users, is the only way they can get them to pay attention by threatening to vote with their feet?
Personally, I suspect it’s more a show of immaturity and arrogance than anything else, if there’s a belief that a company (or indeed a community) is going to change it’s strategy because one user is throwing its toys out of the pram. Once a decision’s been made, we need to live with it. If you don’t like it, voting with your feet is fine, but just do it! Popping your head round the door afterwards to make sure everyone knows your leaving is akin to threatening to go home and take your football with you if your team isn’t winning.

If you’ve seen another example of Shuttleworth’s Law in action, please post a comment. I might be fun to do some analysis of the occurrences (or is that just me?).

GuruPlug – Part 3

Now my GuruPlug was working again, it was time to set up the software.
The 3 functions wanted the ‘Plug to perform if possible are:

  • A web server
  • A bit torrent client
  • A UPnP Media Server

To start with, I wanted a nicer interface. I’m happy using the command line, but a default shell is a bit dull, and not very flexible. Using Ubuntu I’ve become a fan of byobu, a set of config profiles for GNU Screen which allows you to have a “tabbed” interface to within a shell and have useful system information displayed. Being built on Screen, it also leaves your session (and any commands) running when you log out, waiting to re-attach when you log in again.
Byobu isn’t currently in Debian Stable, so I found the package for Unstable, installed the dependencies with apt-get, and installed the package manually.

$ sudo apt-get install debconf gettext-base python python-newt screen
$ wget http://ftp.uk.debian.org/debian/pool/main/b/byobu/byobu_2.80-1_all.deb
$ sudo dpkg -i byobu_2.80-1_all.deb

Bit Torrent

Next I looked for a bit torrent client. I had the following criteria for a client:

  • It needed to run headless/daemonised
  • It needed a web interface
  • It needed to support encryption

After a bit searching and an abortive attempt at setting up rtorrent, I settled on Transmission, which aside from having the GTK-based GUI used as Ubuntu’s default client, also runs as a daemon with a web interface. The transmission-daemon package was only available to install from the lenny-backports repository, which caused a few dependency issues, but forcing install of the packages from backports with apt-get install -t lenny-backports did the job nicely.
transmission

UPnP Server

My plan was to share media from the ‘Plug’s external hard drive to other machines on my network (particularly my Wii, running GeeXboX). I installed MediaTomb from APT and set it up to share the files, but when testing with XMBC on another machine, I couldn’t find them. Unfortunately, there seems to be very little in the way of troubleshooting documentation or other readily-available clients to test with, so I don’t know if I’d mis-configured MediaTomb or XMBC, or my network.
In the end, I decided to switch to using Samba.

Samba

Setting up samba was a doddle. The GuruPlug comes preconfigured to share anything in /media, so I just needed to set it to allow guest access by adding some bits to /etc/samba/smb.conf:

[global]
...
security = share
...
guest user = nobody
map to guest = bad user
...
[media]
...
guest ok = yes

Another snag was that GeeXboX for Wii doesn’t support the Wii’s Wireless, which means I needed to plug it in to my network. This meant moving my router to be near my TV, and thus moving the Plug as well. Here’s the new setup.
IMAG0161.jpg
That’s the guruplug on the left, connected to the router behind the TV, and the hard drive is now in the shelf under the Wii.
IMAG0162
There’s the router behind the TV, with the Wii and GuruPlug connected.

Unfortunately, having the router behind the TV meant that the WiFi signal screws up the picture. Luckily, the ‘Plug acts as a Wireless Access Point!

Wireless Access Point

The ‘Plug comes pre-configured as an open access point, and routes traffic through the Ethernet interface. I just needed to make a few changes to enable WPA2 encryption. The script /root/init_setup.sh is run on boot to set up the access point among other things, so I just had to add a few commands from this guide.

ifconfig uap0 192.168.1.1 up
/usr/bin/uaputl sys_cfg_ssid $SSID
/usr/bin/uaputl sys_cfg_protocol 32
/usr/bin/uaputl sys_cfg_wpa_passphrase "passphrase_here"
/usr/bin/uaputl sys_cfg_cipher 8 8
/usr/bin/uaputl bss_start

Web Server

The GuruPlug comes with Lighttpd installed and running to serve some CGI scripts used for some simple configuration tasks, like switching the WiFi to client mode. To keep these scripts intact in case I needed them, I fiddled with lighttpd.conf to create Lighttpd’s equivalent of a vhost in Apache, letting me have the main site served when the server’s accessed by the hostname (and eventually, domain name), and the config scripts when it’s accessed by it’s private IP address. This prevents access to the config scripts from outside, while still having the main site available to the world.

server.document-root       = "/var/www/sites"

$HTTP["host"] == "192.168.0.9" {
        server.document-root    = "/var/www/setup"
}

I’ve got some additional ideas for things to do with the Plug, but it’s certainly served very well so far, so that’s all for now. If you’re interested in the resource usage, Byobu currently reports that RAM usage is at 13% after all the above setup. I’ll probably make a few smaller posts as I experiment some more!

GuruPlug – Part 2

Powering on the GuruPlug was pretty straightforward. Turn the socket on, lights flash, network connects, job done.
However, not being provided with any documentation, I was left out in the cold as to how to access it.
As I expected, it was configured to use DHCP be default, so I was able to find it’s IP address from my router. However, I was never furnished with the root password. Luckily for me, someone had created a GuruPlug Quickstart guide on the plugcomputer.org wiki, which contained this nugget of detail (I’ve since changed it, in case any opportunistic crackers are reading).

sheevaplug-debian:~# cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb http://http.us.debian.org/debian stable main contrib non-free
deb http://security.debian.org lenny/updates main contrib non-free
deb http://www.backports.org/debian lenny-backports main contrib non-free
deb http://10.82.108.51/kedars/sheevaplug_wifi/builds/packages/ binary/

The GuruPlug ships running Debian “Lenny” 5.0 with a minimal set of packages. The enabled repositories include the standard Debian binary repos, plus backports.org and, bizarrely, a WiFi driver repo pointing to a 10.x.x.x address, presumably left over from the factory install. Disable that, then.

sheevaplug-debian:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 251M     0  251M   0% /lib/init/rw
udev                   10M  708K  9.4M   7% /dev
tmpfs                 251M  4.0K  251M   1% /dev/shm
rootfs                463M  207M  256M  45% /
tmpfs                 251M   23M  229M   9% /var/cache/apt

The base system takes up about half of the 512MB internal flash. Having attached a 1TB hard drive, it only seems sensible to expand the available space somewhat.
I won’t go into the nitty gritty, but suffice to say I used LVM for flexibility, and put /home /usr and /var on their own partitions.

Now that I had somewhere to put a home directory, next step was to create a user. The ‘Plug only comes with the root user setup, and logging in as root is poor form, so I set myself up a user with sudo privileges.

A quick reboot to make sure everything’s working and… Oh, wait a minute… it stopped connecting to the network. No worries because whenever you reboot it reverts the wireless to Access Point Mode. Except… that didn’t work either. And no remote access means no log in. Ah.

It turns out that I needed to buy one of these JTAG boards in order to access the GuruPlug’s serial port. Remember that USB cable I mentioned in part 1? Turns out that the JTAG plugs in to the ‘Plug and acts as an adapter. If you clicked that link, yes you’re reading it right, that’s £30 to get access to my own device.
Suffice to say I wasn’t overly chuffed by the situation. The NewIT website implies that there’s some sort of Mini-USB connection to the device itself (as was the case with the SheevaPlug) and the only indication otherwise was in the documentation that I was emailed 2 days after I received the device.
Fortunately for me, NewIT saw my point of view on this and offered my a discount on the board, which I gratefully accepted. But please be aware that if you’re looking at getting a GuruPlug for anything other than it’s out-of-the-box functionality, buy a JTAG board too!

So, a day after my email discussion with NewIT’s customer services, I got my JTAG board. Here it is:
IMAG0144.jpg

I hooked the funny wiry connectors to the ‘Plug and the USB connector to my EeePC, an connected through Minicom
IMAG0145.jpg

On rebooting, I could see that the LVM devices weren’t being found. I’m not sure exactly why this prevented it from connecting to the network, but I’m guessing there’s something important in /usr or /var that it couldn’t access.
After a few posts on the HantsLUG mailing list and analysis of the boot messages, it turned out that the USB disk wasn’t being “found” by udev until after LVM had initialised and scanned the Volume Groups. This in turn meant that the logical volumes weren’t active when they needed to be mounted, leaving me without a /home /usr or /var.
The mailing list and some Googling told me that most distributions had solved this problem with udev rules that re-scan the volume groups when a new device is discovered, but Debian doesn’t appear to have gotten there yet (at least, not in Lenny). I’m no master with udev rules, but I do know my way around an init script, so I modified /etc/init.d/mountall.sh (the script that mounts everything in /etc/fstab) to manually re-scan the volume groups before it tries to mount. It’s not pretty, but it works.

...
pre_mountall
vgscan # re-scan the Volume Groups
vgchange -a y # Activate the Logical Volumes
if [ "$VERBOSE" = no ]
then
        log_action_begin_msg "Mounting local filesystems"
        mount_all_local
        log_action_end_msg $?
else
        log_daemon_msg "Will now mount local filesystems"
        mount_all_local
        log_end_msg $?
fi
post_mountall
...

So, now I can get back to business setting up the software. Join me again in part 3!

Guru Plug – Part 1

A few months ago I pre-ordered a GuruPlug, GlobalScale‘s new plug computer, and the successor to the SheevaPlug.
I’ve been wanting to run a home server for a while, to act as a web server as well as performing a few other always-on functions, but I’ve not been willing to pay the cost of running my desktop 24/7. Drawing under 5 Watts of power, the GuruPlug satisfies this need perfectly.
On Friday I finally received an email telling me my GuruPlug had been shipped, and on Saturday it arrived in the post.

Specs

The idea of plug form-factor machines is that everything is housed in the plug, that is to say, a block about the size of a plug with an integrated power transformer. Think along the lines of an Ethernet-over-mains adapter.
In the GuruPlug Standard, you get:

  • A 1.2 GHz Processor
  • 512 MB of RAM
  • 512 MB of NAND Flash
  • Wifi b/g
  • Bluetooth
  • 1 GB Ethernet Port
  • 2 USB 2.0 Ports
  • U-SNAP I/O for home automation devices

In the “Plus” model, you get an additional GB Ethernet port, a MicroSD slot and an eSATA interface.

Packaging

GuruPlug Box
Upon opening the bag the ‘Plug shipped in, I was expecting a nondescript corrugated affair to await me inside, but instead I was presented with a rather nicely printed box, with a satisfying magnetic catch holding the lid shut.
Opened GuruPlug Box
Unpacked GuruPlug Box
Opening up, the box contains

  • The plug
  • A 3-pin adapter for plugging directly in to the wall
  • A 2-pin adapter for attaching a longer cable, if you want to sit the plug on a desk/shelf/etc
  • Said longer cable with a 3-pin adapter
  • A USB to Mini-USB cable (The Plug aparrently has a Mini-USB interface on the site, but with a non-standard connector and no adapter provided)
  • A Cat5e Ethernet Cable

A notable omission from this contents list is any sort of setup instructions or documentation whatsoever. Not such a good start.

Size

Guruplug next to a tape measure and deck of cards
Here’s a quick indication of the size – the unit’s about 10cm long, slightly wider and longer than a deck of cards, and about as deep as 3 stacked on top of each other.

Setup

Assembled GuruPlug
Here the plug’s been assembled with the 3-pin adapter, ready to go.

GuruPlug in a wall socket with connected peripherals
I’ve hooked up the Plug to a 1TB hard drive in a USB enclosure, to allow me to use it for NAS/UPnP functionality. I’ve also plugged it into the router. As you can see it’s a cheap-as-free Netgear Special from my ISP, and the WiFi’s a tad dodgy, so while I could just connect the Plug wirelessly, I’d rather the security of the wired connection.

Close-up of powered on GuruPlug
Powering on, you get a nice display of LEDs on the front of the unit. Lacking any documentation, I don’t know what any of these mean, by they look pretty cool. Also note the decision to print the logo such that it’s upside down when plugged directly into the wall.
It’s notable that the Plug is completely silent when powered on. Unfortunately I can’t say the same for the hard drive.

So the hardware set-up’s all gone pretty well. Join me in part 2 for the software setup!

Getting wiipresent working on Ubuntu Lucid

I wanted wiipresent (a handy tool that lets you use a WiiMote as a handy wireless presenter) running on Ubuntu Lucid (10.04). Here’s how I did it:

First, I had to download the latest rpm from The Wiipresent site.

Next I needed to install alien to allow me to install the rpm on my debian-based system:
sudo apt-get install alien
sudo alien -i wiipresent-0.7.5.2-1.el5.rf.x86_64.rpm

That worked fine, but wiipresent can’t find the wiimote or bluetooth libraries it needs. So first, make sure they’re installed:
sudo apt-get install libcwiimote3 libbluetooth3

Then symlink the installed libraries to the place wiipresent is looking for them:
sudo ln -s /usr/lib/libbluetooth.so.3 /usr/lib/libbluetooth.so.2
sudo ln -s /usr/lib/libcwiimote.so.3 /usr/lib/libcwiimote.so.0

Run wiipresent, press 1+2 on your Wiimote, job done!