Saturday, 9 May 2015

Post election thoughts

A marker for the future, not anything profound. I wish I'd written down what I thought in 2010, and before. Well, here we are in 2015.

So, the result: a slim Tory majority. Which was totally unexpected: a coalition had been forecast, though it as unclear exactly what coalition.

As I wrote on facebook:

UKIP 3,881,064 votes 1 seat (shafting ratio 1:82); Green 1,156,149 votes 1 seat (SR 1:25); Lib Dem 2,415,862 votes 8 seats (SR 8:51). Everyone else seems to be close to 1:1, except the DUP who have an anti-shafting ratio of 2:1 (and the SNP have an ASR of something like 1.8:1).

For completeness: Tories 11M, seats 331. Labour 9M, seats 232. SNP 1.5M, seats 56.LibDem 2.4M, seats 8.

However, we had the PR referendum a couple of years back and the result was a resounding No, so I can't see anything new happening there; and while plenty of my FB friends are unhappy with the unfairness, well, what's that to the country as a whole? As JE said, roughly: "everyone I know is unhappy with this result, so what does that say about me / my friends?" And the answer, of course, is "not typical of the country as a whole", as indeed I and my friends aren't either. I'd damn well hope not.

In normal times, the result would be uncomplicated: a Tory majority, shrug, nothing new. However, the two big complicating factors are the promised in/out Euro referendum, and the "Scottish problem".

Euro referendum

Cameron promised a year back that, if a Tory govt were elected, there would be a simple in/out referendum vote on the EU. IMHO I think he said that to buy people off, not because he wanted it, and he expected not to have to deliver on it, because he expected to be in coalition. Perhaps you could argue it was a success, in that it bought him some UKIP votes, and secured his majority. But UKIP's support, whilst widespread, only got them one seat. In retrospect buying off UKIP doesn't look too important; a bit less Euroskepticism from Cameron might have lost him a seat or two, to UKIP, but so what? Might even have lost him enough to force another coalition with the LibDems: I'd have welcomed that. In some ways I think Cameron might have, too.

I can find Tories salivating over the prospect of a referendum, which is a sign of trouble ahead. Indeed, that column is already laying the ground work for myth, by claiming this won the election. I don't believe that (see below). Quite what will happen, I don't know. If Cameron sticks to his promise - and I can't see any way he can get out of it - but campaigns along with a substantial part of the Tories for "in", then I'd expect us to stay in, but not decisively. And the "out" Tories to be miffed, but stay on board.


Meh. Scotland, this year, was like England when it didn't elect Kinnock and instead elected Major. Everyone knew it wasn't what we really wanted, but people had done it out of fear / inertia / whatevs. And so next time it was Blair by a landslide. Similarly, after failing to go for Independence through cowardice / sanity / whatevs, Scotland is a bit disgusted with itself and so has had a fit of voting SNP. It will wear off, in time. But they'll need to be bought off; hopefully not with money, they get quite enough of that already. More devolution, perhaps? I couldn't object to that and might even be in favour. I guess the Tories can't just say "screw you, we've got a majority" because if done too blatantly it might piss the Scots off enough to screw up their courage and vote for Independence.

Will they, buoyed by this vote, try for another referendum? Probably not: another No would rather prick the bubble.

What would be deeply amusing / trouble making is some combination of referendum and Scotland. What if the UK voted to leave, but Scotland clearly wanted to stay in? Would that trigger another vote on Independence? I doubt it happens.

What won the election?

The economy I think. I really don't know what got into Miliband: he couldn't see a thing without wanting to subject it to price controls, aiming for a state like Venezula. Idiot. In a sense it was a good thing, because Labour were clearly distinct from the Tories, which was rather less true under Blair.

I don't have a closer and more detailed analysis than that, and I don't think most people voting have, either. Its a mood-music thing.


I voted Green. I always do, if I can. Their economic policies are mad, but never mind, they won't get to try them out so that's OK. Simon Saggers got 6.5% in South Cambs and so retains the deposit, well done. In 2010 there was no Green so I voted Lib Dem, which made no difference locally (S Cambs being securely Tory) but added my tiny bit of support to the coalition.

The Lib Dems

I feel a lot of sympathy for them. They went into coalition, admittedly for the power, but by doing so gave us five years of stability and tempered the Tories somewhat; and the electorate rewarded them for that by gutting them. I think that tells you a lot about the Lib Dem support, and its fickleness. Too much empty-headed wishfullness, who knows how they voted for this time.

My preferred result

Of all the results that could plausibly have happened - i.e., I'm not allowed to wish for me being voted Dictator for life - I'd have preferred another Tory-LibDem coalition. I certainly didn't want Labour to win. A small Tory majority is better than Labour, but not good. People not needing SNP support for a coalition is good.

Monday, 20 April 2015

Book review: Code Complete by Steve McConnell

Code Complete, 2nd Edition. Redmond, Wa.: Microsoft Press, 2004. 960 pages. Retail Price $49.99. ISBN:, or Amazon. Wiki says "Code Complete has received outstanding reviews, being widely regarded as one of the leading must-reads for software developers" but what does wiki know?

I brought this home for the weekend. But I got to page 371 and then stopped, fairly bored. There's not enough here that's new to me. Perhaps that's good. I did have some nice time in the garden in the sunshine beneath the young quince shoots before I realised it was dull.

It feels far too long though. Perhaps it might be useful as a reference book; but it feels like bloatware. There's just too much stuffed in here. Too much is dull or obvious; the few interesting things are deeply buried in the dross.

To do: review something I did like. Software craftmanship. I'd have to read it again, of course.

Friday, 3 April 2015

Ermine usury

Unprompted, E told me that she had been lending at interest at school: her rate was something like 10p on a 70p loan, due the next day. I was impressed with her enterprise, and we briefly discussed usury and its negative connotations, and the difference between 5% annual interest on a 10k loan and 300% interest on a pay day loan. Unfortunately, the dead hand of authority has squashed E's enterprise: Miss C has forbidden lending-at-interest which, in an interesting echo of the payday lending stuff, means she'll no longer be lending to the boys. Also interestingly, she had no problems with being repaid; she only lent to people who were trustworthy.

Sunday, 22 March 2015

Book review: Dune

Dune is a 1965 epic science fiction novel by Frank Herbert. It won the Hugo Award in 1966, and the inaugural Nebula Award for Best Novel. Dune is the world's best-selling science fiction novel and is the start of the Dune saga says wiki. And that all seems fair enough. Read more there.

The cover I'm showing you here is the one I remember from my youth, not the one I've just read. Its notable for the rather implausible "ornithopter" but really, what was the artist to make of Frank Herbert's concept?

As to the book, I remember it making a great impression on me when young. Re-reading it now (I don't think I've re-read it since) its fairly clear that it strives for impressiveness, which weakens it from an adult perspective (minor example-of-a-type: often, people say "like wow, he just did that, to convince us-the-reader that the thing just done was like mega-impressive). Various aspects of the "economics" (the CHOAM stuff, say) which seemed rather well crafted to my youthful self now look crude. His interest in ecology fares much better - the sum total doesn't quite work, but much of the detail is believable, and the aura of it well done. and the story overall is good, if you gloss over the defects.

Saturday, 21 March 2015

What would the Tory party say?

I thought, as an experiment, I'd try answering as though I was a Conservative spokesman; or David Cameron making a speech, or writing a manifesto. [Updated: but actually its really hard to do that. Too many of the questions are leading. The sort of questions you expect stupid interviewers to ask. Take for example "No one chooses his or her country of birth, so it's foolish to be proud of it." The Tory answer is clearly "I'm proud of Britain!" But the prefix makes that sound foolish. So in the real world, in interview, the correctly briefed candidate waffles, or avoids the question. In a manifesto or speech, the question never comes up in this form.]

Just a few propositions to start with, concerning — no less — how you see the country and the world.

1. If economic globalisation is inevitable, it should primarily serve humanity rather than the interests of trans-national corporations.

A: agree. Because: these people are pols; the "correct" answer is clearly "serve humanity". Everyone hates evil multinationals.

2. I'd always support my country, whether it was right or wrong.

A: agree. Because: they are Tories.

3. No one chooses his or her country of birth, so it's foolish to be proud of it.

A: disagree. Tories are proud of Britain.

4. Our race has many superior qualities, compared with other races.

A: disagree. Because: meh, crap question, but these are pols.

5. The enemy of my enemy is my friend.

A: agree. Because: meh, hard one to guess on their behalf.

6. Military action that defies international law is sometimes justified.

A: disagree. Because: they're Tories, they believe in Law; if they want to defy International law theyll do so by pretending it is other than it is.

7. There is now a worrying fusion of information and entertainment.

A: agree. Because: its the kind of thing the Daily Mail loves.

Well, that's a sample of detail. I got bored though so the rest is briefer.

Now, the economy. We're talking attitudes here, not the FTSE index.

People are ultimately divided more by class than by nationality: agree.
Controlling inflation is more important than controlling unemployment: agree.
Because corporations cannot be trusted to voluntarily protect the environment, they require regulation: agree.
"from each according to his ability, to each according to his need" is a fundamentally good idea: strong disagree.
It's a sad reflection on our society that something as basic as drinking water is now a bottled, branded consumer product: disagree.
Land shouldn't be a commodity to be bought and sold: strongly disagree.
It is regrettable that many personal fortunes are made by people who simply manipulate money and contribute nothing to their society: disagree.
Protectionism is sometimes necessary in trade: agree.
The only social responsibility of a company should be to deliver a profit to its shareholders: disagree.
The rich are too highly taxed: agree.
Those with the ability to pay should have the right to higher standards of medical care : disagree.
Governments should penalise businesses that mislead the public: agree.
A genuine free market requires restrictions on the ability of predator multinationals to create monopolies: agree.
The freer the market, the freer the people: agree.

After that I got too bored to copy them all down, so you'll just have to accept that I did my best to guess as fairly as I could. For example, what to do with "You cannot be moral without being religious". I think that many religious people believe this, and I suspect many Tories believe it, but I don't think I can imagine them coming out and saying it. Meh, in the end I said "agree" for them.

And the result was...

Absolute dead center. Well, close enough. L/R: 0.25. A/L: 0.15.

Saturday, 7 March 2015

Book review: Redshirts

Redshirts is a science fiction novel by John Scalzi. Its OK. I enjoyed it, though I didn't wade through all the endless codas. But there are really only two bits to it, and on reflection I think it would have been better at short story or novella length. There's not really enough substance. There are a variety of cute bits ("who are you, who is so side i the ways of X") for you to congratulate yourself upon your getting-it-ness. But apart from that, it is in a curious way reminiscent of the flimsy sets of the original Star Trek.

Don't read on if you ever want to read it. Wiki says 
Ensign Andrew Dahl, newly assigned to the Intrepid, flagship of the Universal Union, works in the xenobiology lab. However, upon receiving the chance to work with famed senior officers of the ship on "Away Missions" to dangerous planets, Dahl realizes that as a low-ranking crew member, he is very likely to be killed while on one of these missions. He and the other new ensigns notice something weird about life aboard the Intrepid — on any away mission, at least one crew member dies. And each away mission seems to follow a bizarre set of rules. The crew of the Intrepid has become very superstitious and fearful about getting involved in the bridge crew's missions. The ensigns get to know Lt. Kerensky, who is Russian, lecherous and constantly getting infected with diseases, beaten within an inch of life, or otherwise hurt — only to be totally fine a few days later. Lt. Kerensky winds up dating Ensign Duvall, one of the new ensigns. After meeting with a lost crewmember, the ensigns learn that they are characters in a TV show.
Somewhat to my surprise, it also says The book won the 2013 Hugo Award for Best Novel and Locus Award for Best Science Fiction Novel.

Saturday, 14 February 2015

AES as a test of software engineering

I've recently been using an AES CCM program that someone wrote at work a while back - apparently downloading one of the many public implementations was a bad idea, for some mysterious reason. It works. I'm using it to compare to hardware, and since the two are completely independent versions, if they agree its virtually certain that the hardware is correct. So far so spiffy.

I've only briefly looked at the internals of the program but I have read the wiki page, and its fairly clear that, whilst not exactly rocket science, getting the code right is far from trivial. And I know this in the other direction from personal experience, as I struggled with getting the encodes to match whilst guessing what byte-ordering the hardware used; as is deliberately the nature of this stuff, if you get even a tiny bit wrong the whole output is junk.

But the interesting bit, to me, is that I regarded the guy who wrote the program as close to incompetent. Certainly I wouldn't have trusted him to do anything major on his own, and I watched him struggle on a variety of tasks making simple mistakes that someone else had to come in and undo. And this throws up the difference between software engineering and programming. I'm a software engineer, at least in my own mind and in my job contract. The amount of time I spend actually writing computer code is a small fraction of my time. Its clear you can be a reasonably decent programmer - at least in terms of making programmes that produce the correct output - whilst being rather poor at the overall software engineering task (though even there I should qualify that somewhat. If you poke into the internals of the code its a mess, sufficiently so that I didn't stay in there for very long. And in terms of design, it doesn't really produce the output you want it to, exactly, nor does it allow you to input data in the form you'd want to, and the commenting is poor, and the documentation also. So much so that a simple perl script to pre-format the input and play with the output massively improved my productivity).

So much for the example. Onto the generics. Software engineering - collaborative working on a large codebase years old - is about far more than just making the bit of code you've got now, to work, just on its own terms. The code has to fit into the overall structure without bending what's already there, without breaking the poorly documented assumptions, permitting future maintenance and extension, to be readable, to run fast enough and not use too much memory; and more. And it has to do what it supposed to do, which - a familiar plaint - is frequently not quite what you've been told its supposed to do.

This makes recruiting people hard. Being able to write coherent C is a basic requirement, but its not sufficient. Unfortunately, its the only bit that really possible to hard-test in the limited time available. You can talk about all the rest, but its hard to judge bluster from real experience. In my experience.