[maemo-community] Elections - proposal for counting

From: Dave Neary dneary at maemo.org
Date: Fri Mar 6 11:40:33 EET 2009
Hi all,

I've spent the last couple of days trying to do this "the Right Way",
and I think that the clock is going to run out on me, so here's a
proposal for counting these elections:

Current state of play (see maemo2midgard/maemo-elections/vote_preferential):

Voting preferentially is possible with a nice (at least I think so)
Javascript thing going on, you click on names to add them to the
preference list, click in the preference list to remove, when you're
happy, you submit, check we got your vote right, and commit.

Consulting votes after the election is working.

What's not working (yet) is consulting election results.

I have been working on either calling openstv from results.php, and
parsing output to put on the screen on-demand, or copying relevant parts
of openstv (which is Python), rewriting in php, and integrating into the
election software.

Neither of these are likely to produce results at this time.

So here's the proposal:

At the end of the election, the voting will be closed, people will be
able to consult the ballots and download them in .blt format (this is easy).

The election officials (me in this case) run the ballots through openstv
with STV and random surplus distribution (I'll post the various
parameters I want to use), generate the results, and make them available.

This way, results are generated once after the election, ballots are
available and verifiable, and hopefully everyone is happy.

I was thinking of adding another table to the database, and to do this
as easily as possible, storing a HTML blob with the results that we
query for the election id, and just dump on the screen in results.php.
If the results haven't been generated yet, then we show "election has
not yet been counted" message between the end of the election and the
availability of the results.

Does this sound acceptable to people? I don't think it's a hard and fast
requirement of the system to have results calculated on the fly by the
web app.


maemo.org docsmaster
Email: dneary at maemo.org
Jabber: bolsh at jabber.org

More information about the maemo-community mailing list