13 September 2004

  • Post author:
  • Post category:Uncategorized

Foundation Elections

There has been talk on the foundation list about changing the vote counting procedure to something more fair. The method being proposed is Single Transferable Vote, which is the same system used within a single electorate for the senate vote in the Australian Federal Election. As with the Australian elections, some people have some trouble understanding exactly how it works, so here is a description.

  1. Each voter orders every candidate on their ballot in order of preference. Each ballot is assigned a weight of 1.
  2. The ballots are grouped by the first preference.
  3. If any candidate’s total reaches the quota, then they get in. The quota is chosen such that if there are s seats, then at most s candidates can reach the quota. So a candidate must get more than n/(s + 1) first preference votes in order to reach the quota.
  4. If any candidate gets over the quota, then the highest vote getter is elected, and their votes are redistributed at a reduced strength. If x people voted for the candidate, then the weighting of each of the votes is scaled by (xq)/x where q is the quota (xq is the number of votes over the quota). The winning candidate’s name is removed from all ballots and we go back to step 2 and repeat to find the next winner.
  5. If no candidate reaches the quota, then the candidate with the least first preference votes is removed from the election. Their name is removed from all ballots, and we go back to step 2. The votes for the removed candidate are redistributed at the same strength, since they didn’t help elect a candidate.

Note that this vote counting system is identical to Instant-runoff voting when there is only a single seat. The quota calculation shows that the winning candidate needs to get more than 50% of the votes to win, as expected.

Some of the nice properties of this system include:

  • If you vote for a losing candidate, your vote is transfered at the same strength, so is not wasted. This reduces the risk of voting for a candidate that is unlikely to win.
  • Voting for a popular candidate doesn’t waste your vote. The portion of your vote that wasn’t needed to elect the candidate is redistributed to the next preference. For example, if 50% of people vote for dcamp, but the quota is 10% of the votes, then all his votes will be redistributed to second preference at 80% strength.
  • If there are two similar candidates, they shouldn’t split the vote in such a way that neither wins. If one candidate gets knocked out, their votes will transfer to the other.

There are some differences between what I described and what is used in the Australian elections. This seems to be to make the process more discrete and easier to count (mostly rounding the various quotas and transfer values). For the foundation election though, I can’t see any reason not to use a more exact version.

Zenity Notification Icon

Yesterday Glynn posted about notification icon support in Zenity. His current implementation really only handles one-shot notifications, since the icon disappears and zenity exits when you click the icon.

I talked with him on IRC about adding support for a different mode where you send commands to zenity via stdin, similar to the jhbuild notification icon prototype Davyd did. This would allow you to write bash scripts like this:

exec 3> >(zenity --notification)
echo "icon: someicon" >&3
echo "tooltip: doing some important work" >&3
# do stuff
echo "icon: someothericon" >&3
# do some more stuff
exec 3>&-

This could be very useful for many scripts in addition to jhbuild, which is why I suggested adding it to zenity. Now it just needs implementing …

6 September 2004

  • Post author:
  • Post category:Uncategorized

linux.conf.au

The LCA2004 team have put together the conference CD and DVD. Apparently they will arrive in the mail in about a week.

They put the CD contents on the web first, and I was a bit disappointed that the recording of my talk was missing (it does include my slides though). However, when they put the DVD contents up I saw that it included a video recording of the talk, which is pretty cool.

There are links to the CD and DVD contents on the wiki. The video recording can be found by following one of the “Explore DVD” links, and looking at the entry second from the bottom. There is also a video of Havoc’s keynote in there.

jhbuild

It sounds like Fluendo are looking at using the Subversion support I added to jhbuild. There were a few bugs in the code that jdahlin fixed, but it seems to be working pretty well. I still need to fix up the Arch support so that you don’t need tla unless you actually build a module managed by Arch.

I’ve also dropped one of the old versions of Automake (1.6) from the bootstrap moduleset and sanity checks. Maybe after Gnome 2.8 is out we can clean up the last few modules still requiring Automake 1.4, which should drop the number of Automake versions I need to deal with even further.

Elections

Today is the last day people can enrol to vote in the federal election. Last week we had John Howard defending one of his part members, Trish Worth, for comparing refugees to animals at a forum organised by the group Justice for Refugees.

There is also a Liberal (Peter King) who lost preselection, but is still running as an independent. He has been accused of splitting the conservative vote, which is a bit strange. I’d assume that conservatives who vote for him would give their second preference to the Liberal candidate, and vice versa. What might happen is that Labor voters might pick the independent candidate over the Liberal candidate (this happened in my electorate when a similar thing happened a few years back).

Meanwhile, the National party leader is going round telling people that the Greens are really communists: “They are watermelons. many of them – green on the outside and very, very, very red on the inside.”

One other weird thing was the postal vote applications sent out by the current MP. The weird thing was that they came with reply paid envelopes to send the application back to the MP instead of the AEC. She explained why in response to a letter in the local paper, but it still seems a bit weird for the applications to pass through the office of the currently elected member.

Federal Election

So the Federal election has been announced for 9th October. If you are an Australian living overseas, now would be a good time to apply for a postal vote. It’d be great if this gets rid of John Howard. Of course, even if he does win he will probably retire soon after the election …

Last week, it also turned out that John Howard is a spammer. He paid his son’s company to send out unsolicited email to members of his electorate. Apparently our anti-spam laws include exceptions for political parties, so it might not be illegal. However, the Labor party are chasing it up whether it was legal for a third party to send out the spam (since they don’t have the protection of the exemption). On the brighter side, it might encourage the politicians to rethink whether the exemptions in the Spam Act are a good idea or not.

Python Unicode Weirdness

  • Post author:
  • Post category:Uncategorized

While discussing unicode on IRC with owen, we ran into a peculiarity in Python’s unicode handling. It can be tested with the following code:

>>> s = u'\U00010001\U00010002'
>>> len(s)
>>> s[0]

Python can be compiled to use either 16-bit or 32-bit widths for characters in its unicode strings (16-bit being the default). When compiled in 32-bit mode, the results of the last two statements are 2 and u'\U00010001' respectively. When compiled in 16-bit mode, the results are 4 and u'\ud800'.

So rather than just being an implementation detail, the unicode string width chosen at compile time can alter the result of Python programs that manipulate characters outside of the basic multilingual plane. It would be nice if Python programs didn’t have to care about this sort of detail …

Oxford

I’ve been in Oxford for the past week at the Canonical conference. There are lots of great people here, working on a lot of cool projects. Jordi’s blog has a lot more info about it.