In Canada, where I live, the voting system for the parliaments is the easy to understand, but blunt, first past the post (FPTP) system (also called plurality voting). The person who wins the most votes (a plurality) wins the seat, whether they get over 50% or under 30%. I believe that it’s time we had a system that gives more people a more nuanced say in the government they get; tactical voting of various forms in a FPTP system only goes so far. For my own benefit I’ve written up the voting systems of 3 other countries in which I’ve lived. I don’t have a firm opinion on which one I prefer (yet).

### Germany

At the Federal level in Germany, the voting system is a version of a mixed-member proportional system: voters get two votes. One is for a direct candidate (approximately half the seats), and works by the plurality (FPTP) system. The other is where the voter votes for a party. Each party has a list, and the appropriate number from each party list is deemed elected, depending on the number of votes the party got. There is a threshold for the list votes; parties have to get over 5% of the vote to get any seats via the second (list) vote, unless more than three direct candidates from that party are elected.

This system was set up to balance many aims. Among them are the principle of equal votes (each vote must have equal weight), discourage small parties while allowing them, and encourage balance between various political views. It tends to lead to coalition governments, and is good for finding consensus.

### Australia

Australia uses preferential, or ranked, voting systems. The voter ranks the candidates in order of preference. If one candidate gets 50% + 1 (or more) first preference votes, they are elected. If not, the candidate who received the fewest first preference votes is eliminated from the list, and their second preferences are distributed. This process continues until one candidate does have 50% + 1 or more votes. There’s a variation for the Senate that I’m not going into.

Ranked voting gives people a chance to vote for a candidate they know won’t win, and give the second preference to a mainstream candidate, which makes it better than FPTP tactical voting. One downside is that you have to rank all candidates in order, and it is quite possible to miss a number, or make some other mistake. There are some people who number from 1 down the page, so the ballot has to be designed to take that ‘donkey vote’ into account.

### New Zealand

New Zealand uses a different version of mixed-member proportional representation to Germany. (No, I’m not going into detail on the precise differences.) Each voter has two votes: one for a direct candidate, and one for a party. The party vote determines the overall number of seats each party is entitled to. There is a threshold, as for Germany, of 5% for the party vote, or one direct candidate elected.

There are also a certain number of seats reserved for the Māori electorate; those use the same voting system.

Personally, I think any of these systems would be better than the current FPTP system we have.

I’ve been trying out Google App Engine, for which I signed up with the Google account where I just enabled 2FA. Of course, that means changing the way I update the uploaded trial application; the standard Google password has to give way to either a specific application-based password, or OAuth 2. OAuth 2 is obviously (to me) the better way to go.

The documentation is reasonably straight-forward. It even works as documented, assuming you’re signed in with the right Google account on your default browser. My workflow is a little different – my main browser (Firefox) is signed into my main Google account, and I sign into my other Google account (which I’m using for this development project) on Chrome. Copying the URL from Firefox to Chrome to allow the appcfg application access to that Google account worked; it’s refreshing to see. I get tired of web applications that use some hidden JavaScript magic and give you nonsensical results if you copy a URL from one browser to another.

There’s something appealing about OAuth 2, even if it appears a little too magical at times (a bit like git; when it works it’s magical, when it doesn’t, good luck!)

August ended up busy, busier than I intended. Balisage was as usual full of interesting discussions although some of the people I’d hoped to see weren’t able to make it this year. I took part in a panel on MathML, figured out (finally) there is an overlap between the overlapping markup discussions and the DOM Level 2 Range specification, and generally enjoyed myself.

Not long after that I left Design Science; I was disappointed it didn’t work out the way I’d hoped, but I did learn a lot about MathML and typesetting mathematics that I didn’t know before.

I’ve spent the last couple of weeks talking to people about different projects in healthcare and publishing, whether it’s something for me to work at or not. It’s good to be able to take time occasionally to see what’s out there, what people are working on. I’ve also been getting ready for the XML Summer School (there are still a couple of spots left in some of the courses if you’re interested in attending). And I’ve been working on learning plans for my children since their teachers are on strike. Khan Academy, Codecademy, and various workbooks to refresh last year’s skills to start with. I hope the strike is resolved before I have to do too much more planning.

At least we managed to spend a few weekends at the cabin for relaxation amongst all of that.

I've been working at Design Science for a couple of months now, as Senior Product Manager concentrating on the MathFlow products. So I figured I should enable MathML support on my blog. It's not hard, but like everything in tech there are a few niggly details. Many of those issues are caused by WordPress's over-eager helpfulness, which has to be reined in on a regular basis if you're doing anything at all out of the ordinary. Like editing your posts directly in HTML rather than using some pseudo-WYSIWYG editor.

Theoretically, showing MathML in a browser is easy, at least for the sort of equations that most people put in blog posts, even though not all browsers support MathML directly. You just use the MathJax JavaScript library. On WordPress there is even a plugin that adds the right script element, the MathJax-Latex plugin. You can make every page load MathJax, or use the [mathjax] shortcode to tell it when to load.

The wrinkle comes with WordPress' tendency to "correct" the markup. When you add the MathML, WordPress sprinkles it with <br/> tags. MathJax chokes on those and shows nothing. Since the tags don't show up in the editor view, you need some way of stopping WordPress from adding them. The best way I've found is with the Raw HTML plugin.

But there's a wrinkle with that too. For some reason if you use the shortcode version of the begin and end markers ([raw]) the editor decides that the XML characters between those markers has to be turned into the character entities, so for example the < characters are turned into &lt;. To stop that, you need to a) check all the checkboxes in the Raw HTML settings on the post, and b) use the comment version (<-- raw --> and <-- /raw -->) to mark the beginning and end of the section instead of the shortcode version.

Once it's done it's easy to add equations to your pages, so it's worth the extra few minutes to set it all up.

A couple of examples taken from the MathJax samples page

Curl of a Vector Field
$∇→×F→=(∂Fz∂y−∂Fy∂z)i+(∂Fx∂z−∂Fz∂x)j+(∂Fy∂x−∂Fx∂y)k$
Standard Deviation
$σ=1N∑i=1N(xi−μ)2$

and one from my thesis from way back when

$fλ=n!⁢∏i

My Mum used to make ginger beer on the farm. We would seal it in the glass bottles with bottle caps that you tapped on with a hammer, trying hard not to break the glass. A bottle or two would occasionally explode during the fermentation process, which was exciting, and messy.

I’ve taken to making it. Home-made ginger beer is a refreshing, fizzy drink, much less sweet than commercial soft drinks, with a pleasing zing. There is a small amount of alcohol in it due to the yeast-making-bubbles fermentation step, but it’s minimal. The process of making it is fun, teaches the kids something about chemistry, and is much less messy with the advent of PET bottles.

The process is reasonably simple. You start with a ginger beer plant (actually a fungus yeast and a bacterium; more details here). You feed it ginger and sugar every day until it’s ready, then add the liquid to a mixture of water, sugar, and lemon juice. Bottle, store for a few days, and enjoy!

There are a number of places on the internet you can get a ginger beer plant. I made my own; as a consequence it may not be a ‘real’ ginger beer plant, but given the ginger beer it produces is good, I’m not bothered by that fact. There are lots of variations; this is the recipe I follow.

To make the plant, put the following ingredients in a jug or jar.

• 8 organic sultanas (golden raisins). You need organic (or other unprocessed, if you’re lucky enough to be able to get them) to get access to the natural yeasts that live on the sultana skins. Modern processed sultanas are too clean and don’t have those yeasts on them, so the ginger beer won’t ferment properly.
• ¼ cup lemon juice. Use real lemons to get the juice, not something that comes in a bottle. Organic is nice, but not necessary.
• 1 teaspoon grated lemon zest. Make sure you wash the lemon first to get rid of any coating that might interfere with the yeast.
• 1 tablespoon sugar. I use white sugar, but you can use any type.

• 2 teaspoons ground ginger. You can also grate fresh ginger if you like, but I find that’s too much work.
• 2 cups water. I usually use ordinary water, since our tap water isn’t too heavily chlorinated. If you wouldn’t drink your tap water, use bottled or filtered (but not distilled).

Stir, and cover the jar loosely with a cloth. You want air to get in (for the natural yeasts) but not bugs (in summer this is a magnet in my kitchen for fruit flies). Keep at normal room temperature. Feed every day with 2 teaspoons ground ginger and 2 – 4 teaspoons of sugar (I use 4, you may like it slightly sweeter or less sweet). After a couple of days, you should notice some bubbles in the mix, and even a slight smell of fermentation as the natural yeasts go to work on the sugar and ginger. The plant will be more active in summer, when the kitchen is warmer.

After a week or three (the period depending on how much time I have in any given week), make the ginger beer. You will need around 12 one-litre PET bottles. If you don’t have those at home, a local beer-brewing shop will be happy to sell some to you, complete with the caps. Wash in soapy water, and rinse to get the bubbles out. You don’t need to sterilise the bottles, I find the usual detergents to be adequate.

In a large pot, boil 5 cups of water with 3 cups of sugar. Stir to make sure the sugar is all dissolved, then take the pot off the heat. Add the juice of three fresh lemons (yes, the prohibition against bottled lemon juice applies here too). If you have small lemons, make that the juice of four lemons. Place a clean cloth (an old linen tea towel, for example) over a sieve or colander and pour the ginger beer plant through the cloth into the pot. Squeeze the cloth to get as much liquid out of the plant and into the pot as possible. Add 7 litres of water to the pot (same comments on the water as above; I use tap water). Bottle the ginger beer, leaving some space at the top of the bottle for expansion.

The contents of the cloth are the ginger beer plant itself. Take approximately half of it, put in a clean jar with two cups of water, and feed. I also put another couple of sultanas in at this stage. This is the basis for the next batch of ginger beer, so feed every day as before. Give the other half of the plant to someone, or add to your compost bin. The plant gets better as it ages, so it’s worthwhile keeping it going rather than starting new each time.

After a couple of days, you should see some small bubbles in the bottles, and the bottles should be firmer. This stage may take a couple of days longer in winter than summer. You can drink the ginger beer at this stage, but it tastes better if you can leave it at least a week.

One of the things people always ask you as a teenager, or in job interviews, or when you’re contemplating doing something new, is: what do you want to do? And the questioner is often disappointed when you don’t have a barn-burning deeply-held specific desire just waiting there. Answers that are more generic (albeit equally important), such as ‘something interesting’, or ‘something useful’ are somehow unsatisfactory, even when coupled with a general idea of the area in which you want to do something useful and interesting.

This morning I read From “sit still” to “scratch your own itch” and it’s full of descriptions of expectations for programmers that resonate with me, such as the expectation that “a REAL programmer or a REAL open source contributor is supposed to be a self-starter who comes up with their own project ideas from the start”. The article has some techniques to stop these expectations from being overpowering or intimidating. The author suggests, for example, that writing Yet Another {Something Simple} is fine, just like sewing an item from a pattern (or in my case, knitting it). You learn from that, and expand your knowledge.

In my case, moving from project management back into more technical work, what helped was working through online tutorials until I was far enough along to be able to start writing my own useful stand-alone projects. Sometimes I’ve surprised myself by how much technical knowledge from 10 or more years ago comes back, like waking the technical brain up again that was dormant for a while. I guess, for me, that was the itch that needed to be scratched.

/* ]]> */