Author Archives: david

Drinks from the weekend

So I had a birthday party on Saturday. As always seems to happen at my parties, cocktail science was performed. Here are the only two I came up with (or at least that I remember):

Faith Healer

So called because it has no medicinal properties and lies to you shamelessly, but for a brief period of time you feel a lot better.

Ingredients: Sloe gin, Orange Juice, Crabbies (alcoholic) Ginger Beer.

Process was not terribly precise. I think we used crabbies and orange juice in about a two : one ratio, and sloe gin was probably about a double to a largeish glass.

The result was extremely drinkable. However it had the downside of not tasting even slightly alcoholic, which given that it was probably about the strength of beer caused it to really sneak up on you.

We’ve since considered creating a non-alcoholic version called an evidence based medicine. Replace the crabbies with a normal non-alcoholic ginger beer, and replace the sloe gin with… something. We’re not really sure. I’m considering pomegranate syrup (proper pomegranate syrup, which is extremely sharp, not the shitty stuff you buy under the heading of grenadine which tastes mostly of sugar and red). Anyone know if it’s possible / reasonable to just buy a good sloe syrup?

Naga-sake

It turns out that there’s already a drink called a nagasake (egg nog and sake), but this seems to fit the name better.

Ingredients: Tomato juice and sake in equal proportions, a generous helping of chilli vodka. Serve warm.

I wasn’t terribly sold on this. I think I’d have liked it better with more tomato and served cold, closer to a bloody mary. It seemed to be a bit of a marmite drink – some people loved it, some people hated it. I was alas in the second category, despite being its creator.

This entry was posted in Uncategorized on by .

Maximum entropy methods for single-winner elections?

Dear Lazyweb,

You’ll never believe what happened to me the other… err. Sorry, wrong post.

So I read this paper the other day: http://www.votingmatters.org.uk/ISSUE26/I26P3.pdf

It’s a good idea. Essentially the idea is you apply the maximum entropy principle to probabilistic voting systems: You take the distribution on Perm(Candidates) which maximises entropy subject to the constraints P(x < y) = fraction of the voters who think x < y. This is satisfiable because random dictator has these constraints. The biggest problem with it is that it requires you to do a linear optimisation problem in N! - 1 dimensions, which isn't great. Additionally, I'm mainly interested in randomized methods for single-winner elections, which have a much smaller number of dimensions. I was wondering if there was a natural analogue to the idea for this case. Can anyone think of one? Obviously you can consider the maximum entropy distribution on Candidates, but it's not obvious what the equivalent constraints should be. Thoughts?

This entry was posted in Uncategorized on by .

On the value of helpful error messages

So I bought a Withings Bodyscale recently. It’s a good scale (does body fat as well as weight), but obviously its killer feature is that it records your weight on the Withings site.

Why? Well, because while I’m far from obese I could definitely stand to shed a few kilos (or at least convert a few kilos from fat to muscle), and my new mantra of “Strategies, not promises” tells me that I should pay attention to my past failure to actually keep up with exercise programs and do things to modify my behaviour rather than promising to do better. Additionally, I’m a firm believer that you can’t change what you can’t track, and this seems like a good way to track it.

Anyway, sales pitch over. That’s not the point of this post.

The point of this post is that I bought the weighing scale and it didn’t work. Initially I thought it didn’t work at all, but on further investigation it worked fine as long as it wasn’t hooked up to a computer via USB.

The USB thing is just for the initial calibration – it’s totally unimportant once you’ve set up what wifi network it should use – but unfortunately initial calibration is vital. This meant that the device in question was completely useless for what I actually bought it for, which was sad.

The symptoms were pretty dire too: It didn’t show up as a device at all under windows. Under my main linux system it gave a slew of unhelpful warnings in dmesg. If you tried to boot a windows machine while it was plugged in the entire system would scream in panic and send you into recovery and repair mode.

I was about to send a really shirty email to Withings (I’d already made them aware of the problem and hadn’t exactly received a lot of help back) when I thought I’d just try it on the teeny tiny ubuntu computer I use to drive my TV.

Behaviour was identical to on my laptop, no surprise there. Except when I looked at the dmesg output it said “Maybe bad USB cable?”

“Huh”, I thought. “You know, I haven’t tried that…”

So I went out and bought a new mini-usb cable (I have plenty of micro, but no mini. Seriously guys: Why in the name of bob are there 6 different connectors for an ostensibly universal standard?), and sure enough: The mini-USB cable they sent with the system was the culprit. System works fine when I use a different one.

So this turned out to be a really easy fix once I knew what to try, but I undoubtedly would have completely failed to suspect the cable, and would have created a great deal of hassle for both myself and Withings in the course of replacing the “broken” scale, if it weren’t for that teeny little piece of advice dmesg helpfully provided me with.

This entry was posted in life on by .

Ha ha, only serious

So 12,640,417 people told me the following joke earlier:

Q: If I ask you if I should listen to your advice, and you tell me “no”, what should I do?
A: I don’t know, but I bet the UK is going to spend the next couple decades finding out.

This entry was posted in voting on by .

My Brownie Recipe

I brought in brownies to work today, and it caused me to realise that I’ve never posted my brownie recipe.

Given that my brownie recipe is the best in the entire world, and really easy to make to boot, this is a mistake that should be rectified.

Note: Cups here are US cups. i.e. about 240ml

Ingredients

  • One pat butter (I think these are 250g)
  • Two cups granulated white sugar
  • One cup cocoa. The darker the better. Use the best you can find – these brownies live or die on the quality of their cocoa
  • One cup flour
  • Four eggs

Directions

Melt the butter. Stir in the sugar and the cocoa until it’s thoroughly mixed. Add the flour and eggs and stir further.

Decant the whole mix into a greased baking tray (I usually make these about half an inch deep). Bake at 160C for about 20 minutes. Check the brownies religiously towards the end. If you overcook these they will be too dry (still tasty, but less delicious). The brownies are ready when you can stick a knife in the middle and it comes out clean.

This entry was posted in Food on by .