Sunday, November 29, 2015

Contract Programmer Seeks Job in Cambridge (£500 reward)

Anyone in Cambridge need a programmer? I'll give you £500 if you can find me a job that I want.

CV at

I make my usual promise, which I have paid out on several times:

If, within the next six months, I take a job which lasts longer than one month, and that is not obtained through an agency, then on the day the first cheque from that job cashes, I'll give £500 to the person who provided the crucial introduction.

If there are a number of people involved somehow, then I'll apportion it fairly between them. And if the timing conditions above are not quite met, or someone points me at a shorter contract which the £500 penalty makes not worth taking, then I'll do something fair and proportional anyway.

And this offer applies even to personal friends, and to old contacts whom I have not got round to calling yet, and to people who are themselves offering work, because why wouldn't it?

And obviously if I find one through my own efforts then I'll keep the money. But my word is generally thought to be good, and I have made a public promise on my own blog to this effect, so if I cheat you you can blacken my name and ruin my reputation for honesty, which is worth much more to me than £500.

And I also make the following boast:

I know all styles of programming and many languages, and can use any computer language you're likely to use as it was intended to be used.

I have a particular facility with mathematical concepts and algorithms of all kinds. I can become very interested in almost any problem which is hard enough that I can't solve it easily.

I have a deserved reputation for being able to produce heavily optimised, but nevertheless bug-free and readable code, but I also know how to hack together sloppy, bug-ridden prototypes, and I know which style is appropriate when, and how to slide along the continuum between them.

I've worked in telecoms, commercial research, banking, university research, chip design, server virtualization, university teaching, sports physics, a couple of startups, and occasionally completely alone.

I've worked on many sizes of machine. I've written programs for tiny 8-bit microcontrollers and gigantic servers, and once upon a time every IBM machine in the Maths Department in Imperial College was running my partial differential equation solvers in parallel in the background.

I'm smart and I get things done. I'm confident enough in my own abilities that if I can't do something I admit it and find someone who can.

I know what it means to understand a thing, and I know when I know something. If I understand a thing then I can usually find a way to communicate it to other people. If other people understand a thing even vaguely I can usually extract the ideas from them and work out which bits make sense.

Friday, November 20, 2015

The Prisoner's Dilemma is a Newcomb Problem

First Draft. Comments Please.


I've been feeling tired all the time recently.

It's been getting worse.

I went to the doctor's about it. He was very sympathetic. He asked me if I was getting enough sleep.

I'm getting more than enough. I go to bed at midnight and wake at noon. In the afternoons I often fall asleep in my chair, in front of the fire.

I think on average, I'm getting fourteen hours a day. It was when I realised that I decided it might be worth bothering a doctor.

He asked me if I was under much stress.

My grandfather said some pretty wise things when he was dying when I was a boy. One of them was "No-one ever died wishing they'd spent more time at work."

I intend to prove him wrong.

My entire life is optimised for not being stressful, and I'm good at it. I am the serenest motherfucker on the whole fucking planet. Bring it on.

So my doctor figured that there was probably some physical cause. He did a load of tests. He said to ring for the results in a week or so.

And the receptionist, she is like "We have got the results back, could you come in to see Dr Stewart to discuss them."

Her voice is bright.



It turns out that assisted suicide is legal in Switzerland (well, in Vaud canton, which is the one you can still smoke in, which is nice).

And what you do with your body afterwards is up to you.

That's a plan.

Great big vat of liquid nitrogen ho!

I think that being killed and then dumped into a vat of liquid nitrogen is not actually going to improve matters greatly.

Nobody know whether my will will stand up in court. There's never been a test case. But I don't have any heirs to dispute it. The popsicling is pretty pricey, but I'm going to leave the rest of my money to myself and see what happens.

My friend Mike assures me that the chances of this stuff working are as remote as the chances of God.

More worryingly, the entire respectable cryogenics profession agrees. Firmly. To a man.

Damned scientists. Messing with things they understand only too well.

The cryonicists (notice the difference) are quacks and ghouls. Save your money.

But they seem sincere.

Fuck Mike. Fuck the Moderator of the General Assembly of the Church of Scotland. I'm *dying*.

I am the plastic cat.


I'm in the Lake District. But it's usually summer and it goes on for ever.

I came here after I got bored of the heart of the sun.

I'm wearing animal skins. Comfy. I've got a fucking great spear and a bow and arrow.

And a good horse. And a good woman. She's the most beautiful thing I've ever seen and she's the best friend I've ever had.

The most beautiful thing she's ever seen is our first child. I think he's pretty cool too. Baby skins! We're so happy. We have lots of friends. And lots of enemies too. I wouldn't be without our enemies.

Sometimes we spend all day fighting, and then afterwards when the stars come out we spend all night drinking and singing and going on and on about how well we fought and how we'll do even better tomorrow, you watch out. Snorri's a great poet. You're already feeling pretty smug but he can always make it sound better than it was.

I like to hunt and to fight and to fuck and to swim and to fly and to build, and I like our politics and our songs and our dances, but the best thing about the savannah is the maths library.

I like to read the books because I can go faster that way.

When I watch the videos, or do the computer proofs, I can't go nearly as fast. The main trouble is finding problems that I can't just work out myself.

The Riemann hypothesis took all afternoon. But it was worth it. So beautiful. And it's good to know the truth. Although in hindsight a child could have seen it.

Four colours is nice too.

Fermat is kind of an anticlimax. Even the proof in the Book is long-winded. And the payoff is not that great. Still.

I've left those a long way behind now. What was known when I died is baby stuff now. In fact the baby's getting there! So cute.

Yesterday we decided to play cricket instead of fighting. The crowd at Lord's was great. I really cannot see how Mr Bradman gets into position so quickly, but I have a plan. I'll get him before this Test's over.



I've been tied to the railway by a mad philosopher.

One day we're sitting round a singularity and this guy turns up.

Peersa, he's called. Peersa for the State.

He explains there's been 'an unfortunate mistake'.

They did me twice.

Another me's been running around his own perfect universe for the last hundred years. I wonder what he's been doing? I imagine we started off pretty much the same way.

I feel violated. I hope I never meet him, although I suppose it would be interesting in a weird sort of way.

I'd rather this hadn't happened. I asked Peersa why they couldn't just pause the second copy.

He said it wasn't clear which one of us *was* the second copy, which was a bit deflating.

The reason, he said, that they noticed, was that the bill for both our worlds has been going to the same account. And they started off the same. But in the last period, there was a difference.

There's been enough divergence that one of us needs more physics than the other.

Peersa won't tell me which one. He says it will break the symmetry.

He says we can't be merged. The resulting personality wouldn't be a true descendant of either of us. And it would be quite mad and very unhappy. They'd have to pause it on ethical grounds.

So at the moment they're running us half and half. He gets a second, I get a second. I haven't noticed of course.

But it means that my life will be half as long as it should be. Still quite long, of course.

Peersa offered me a cigar.

I like cigars, but he said Wait! It's a special cigar.

If I smoke it, they'll pause my other copy.

But of course, they've made him the same offer.

If he smokes his, then once he's finished it, my world stops. No more me. Death. Just when I was getting the hang of having outsmarted the old bastard.

It doesn't matter what I do. His choice makes all the difference.

The only choice I have is whether I've got a last smoke as I face the firing squad.

I like to smoke. I always have.

If we both do, Peersa's going to end up with my share of the cosmos. I can fucking see it.

If I don't, my enemy is.

I can smoke it any time I like. I wonder if he's already started his.

Monday, November 16, 2015


No idea where this is from originally, but it's cute:

A child couldn't sleep, so her mother told a story about a little frog,
  who couldn't sleep, so the frog's mother told a story about a little bear,
     who couldn't sleep, so bear's mother told a story about a little weasel
       ...who fell asleep.
     ...and the little bear fell asleep;
  ...and the little frog fell asleep;
...and the child fell asleep.

Wednesday, September 23, 2015

Jeremy Corbyn on the Beach : Why a Man who Just Got Elected is Unelectable

I've noticed that most of the people I know seem to have found the whole 'Jeremy Corbyn' thing much more surprising than I did.

Similarly, many of them seem to have become convinced that it signals a leftward shift in British Politics.

The Daily Mash, as always, hit the nail on the head with the delightful 'Man Who Just Got Elected Definitely Unelectable':

I've even managed to get a couple of people to take bets on the question 'Will Jeremy Corbyn be the next British Prime Minister?'. I think not, but a number of people have been prepared to put their money where their mouth is for the other side, which to my mind means that they actually anticipate this as a likely outcome. I'm certainly not saying that's impossible, but I do think that the chances of it happening are considerably less than 50%.

If anyone else wants a piece of that action do let me know. If we can find some way of making the bet enforceable, then I'll accept for any amount I can afford.

At any rate, I'd like to explain my model of how politics works, and how it explains what just happened to the Labour party, and why it's a disaster for them.

I would like to point out that I rather like Jeremy Corbyn. He's transparently a good and honest man, who says what he believes and believes what he says. I wish that all politicians were like this. His politics remind me of my own teenage ideals.

If he promised to prosecute Tony Blair for treason over the Iraq War, which I think he might like to do, I would (will) vote for him myself. [0]

Unfortunately it's only in a certain kind of 'Mary Sue'-type science fiction story where an honest man goes into politics, only to find that everyone loves and respects his innovative new approach and he rides the breath of fresh air to an amazing victory and uses his honesty and openness and clear thinking to put everything right.

That's not how democracy works. It's amazing to me that it works at all. I think it does work reasonably well, and certainly much better than all the other systems which people have tried, but not really for the reasons everyone thinks it works.

Here's a very simple model that shows how I think democracies work:

Consider a beach:


Everyone on the beach likes ice cream. They'll go to the closest ice cream stall they can see to get one.

Say you want to set up an ice cream stall. Where do you put it?

It really doesn't matter. Say you put it in your favourite place. It's got the best view, maybe:


Profit! Everyone comes to you to buy an ice cream.

Now, pretty soon someone else is going to notice the good thing you've got going on, and set up in competition.

Maybe they don't want to be too in your face about this, or maybe they just like the other end of the beach.


Even so, they're going to take some of your customers. Nobody shops around for ice cream on beaches, and you're probably charging the same sort of price anyway. People just go the the closest stall.

This shows the flow of customers:


You get:


and your competitor gets:


What should you do?

Suppose the next morning you move your stall towards the middle of the beach.


Where do the customers go now?


You've got:
| >>>>>>>>>>>>>*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
and your rival's got:
| >>*<<<<<<<<<<<<<< |

But your rival can move too. Maybe he'd prefer to be out on the left, but he's more interested in getting as many customers as he can:

So the next morning:


|>>>>>>>>>>>>>>>>>>>>>>>>>>>>*<>*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |

And you're splitting the customers pretty much in half.

This really happens! If you go to a beach, the ice cream stalls are in the middle. [0.5]

This is obviously a bit of a pain for everyone involved. The beach-goers have to walk further than they'd like for their ice cream. And both you and your rival would probably prefer to be a bit further apart anyway.

Now, politics.

First of all, we'll have to assume that 'left-wing' and 'right-wing' actually mean something. [1]

And then we'll have to assume that everyone can be put on a line, with the most right wing people on the right, and the most left wing people on the left.

The normal state of British politics is that there are two main parties.


Their supporters look like this:

|>>>>>>>>>>>>>>>>>>>>>>>>>>>>*<>*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |

This is the Labour party:


Almost all its members and supporters feel that the Labour leader/manifesto, is to the right of their position.

This is the Tory party:


Almost all its members think that their leader/manifesto are to the left of their position.

Everyone in the country thinks that the two party leaders and their policies seem indistinguishable. This explains the constant complaint that 'They're all the same', even though if you actually know any members of either party, it's pretty clear that they have serious philosopical differences.

This is why our form of representative democracy works.

The voting system forces the two parties to choose leaders and manifestos that are roughly in the middle of the British electorate. Half of the population think that their government is too right wing, and half think it's too left wing.

So after every election, whoever wins, centrist things get done. No one can get away with doing anything too crazy without first persuading a lot of the population that it's a good idea.

The mistake that Labour just made was to not understand how its own leadership election is supposed to work.

The idea was that the Labour MPs, who are all interested in getting elected, because if they don't get elected they don't have a job any more and certainly can't influence British politics, get to do almost all the choosing of who is going to be Labour leader. They pick a number of Labour MPs as candidates, all of whom are supposed to be electable.


Then the Labour members get a completely pointless and illusionary choice between the four identical candidates, which leaves the party looking like this:

| >>>>>>>>>>>>>>>>>>>>>>>>>>>>>*< |

Almost all the power is in the choice of candidates. The votes of the party members count for almost nothing. [2]

But some Labour MPs ( I think 36 or so.. just enough anyway ) either didn't understand the system, or deliberately sabotaged it, by nominating a fairly left-wing MP, as well as the identikit clone candidates.

Now, when Labour held its leadership election, it looked like this:

| >>>>>>>>>>>>*<<<<<<>>>>>>>>**** |

And Jeremy Corbyn got most of the votes, while the 4 identical 'electable' clones ended up sharing out the few votes of the people who are Labour party members but who aren't particularly left-wing.

So now the Labour party looks like this:

| >>>>>>>>>>>>*<<<<<<<<<<<<<<<<<  |

This is a great result if you're a Labour supporter. Finally you've got rid of the lying right-wing weasels who took over your party in the eighties, and elected a leader who really represents what Labour stands for, the great current of socialist thought that brought your party into being.

Unfortunately that means that the next General Election looks like this:

|------------*------------------*--------------------------------- |

And the voters split like this:

|>>>>>>>>>>>>*<<<<<<<<<|>>>>>>>>>*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |

An absolutely thumping Tory victory.

Now, obviously, this model is very simple, and doesn't explain all sorts of features of British politics, like the existence of more than two parties, the effect of the constituency system, the rise of Scottish and Welsh nationalism, and so on.

It's actually much more like the system for electing the President of the United States. [2.5]

Neither does it model the fact that members of the electorate can actually change their minds. [3]

But nevertheless, I claim it's good enough model to tell us roughly what's going to happen in the next election. We can add more bells and whistles to make a more complicated model that better accounts for what actually happens in British Politics.

But the Corbyn Effect is so strong that I just have trouble seeing how the bells and whistles can possibly make a difference.

Within this model, Corbyn has literally no chance of being elected Prime Minister.

All the uncertainty is in the correspondence with reality. I'll be conservative and say that I'll give him a 20% chance of getting in because of some effect that I haven't captured in this model.

[0] Obviously Tony Blair is a traitor. He lied to the parliament in order to take us into an illegal war that has killed hundreds of thousands of completely innocent people, (including a few British soldiers, which is the bit that makes it treason).

Equally obviously no British court is going to convict him by the 'beyond reasonable doubt' standard. I'm cool with that. I don't believe it beyond reasonable doubt myself. It's possible that the lying snake believed everything he said. I find that even more worrying, and either way I'd like to watch the bastard squirm.

[0.5] In between, there are donkey rides. The Buridan franchise, usually.

[1] I'm not completely convinced this is true. Some of my political thoughts are left-wing. Some are right-wing. I'm usually happier when the Tories are in than when Labour are in, but I can usually see where they're both coming from.

In fact I think that there are three strands of politics in the UK, there's the social conservatives, the classical liberals, and the lefties. The social conservatives and the classical liberals are in an uneasy alliance called the Tory party, and cordially dislike each other but pretend not to. The lefties, who seem much more of one mind to me, are the Labour party.

My heart is with classical liberalism, but I prefer the lefties to the social right.

[2] In fact this is also true of the general election. Almost all the power is in the hands of the political parties themselves. There was an old anarchist T-shirt that said 'A lifetime's supply of democracy:XXXXXXXXXX'. That's about right. The genius of the system is that it forces the political parties to use their immense power to pick people who represent the people as a whole, even though the actual input of the people is very small.

[2.5] Where it, plus the assumption that the candidates are dishonest, handily predicts that before the primaries, all the candidates will appear to be extremist fucknuts, whilst after the primaries they will all appear to be centrists who appeal to the whole nation. You can tell an honest presidential candidate by the fact that he either loses the primary, or the election. You can only become president by tacking violently so as to win both.

[3] This effect is negligible except over geological time.