Category Archives: Thoughts

I Shouldn’t Be Allowed to Use a C++ Compiler

class mesh_cell
double _x, _v, _P, _rho, _q, _e;


// Defines that automatically write get/set accessors for me if I provide the variable names.
// Evil? Saves me writing boilerplate though!
#define var(i) double& i() { return _##i; }
#define get_var(i) const double& get_##i() const { return _##i; }
#define set_var(i) void set_##i(const double& var) { _##i = var; }
#define gs_var(i) var(i) get_var(i) set_var(i)



I need help.

Arch & Architecture

As I frequently do late at night when I’m bored, I reached for my iPad and decided to watch something on iPlayer. The only thing which caught my eye (and it must have been a really very slow iPlayer day) was a documentary following the redevelopment of King’s Cross. As it’s a listed building, any alterations to it must be approved with English Heritage, and the programme followed the discussions, arguments and compromises between all the parties involved on how to go forward with the project.

The parties involved were Network Rail, trying to ensure the station would be fit for purpose for the 21st Century, the architects trying to impose their vision, and English Heritage, trying to preserve the historical character of the building.

It’s easy to dismiss the efforts of English Heritage as pointless bureaucracy, forcing developers to jump through hoops to get their projects approved, but a cursory examination of any city in this country will show why they’re necessary. It is in the instincts of architects to build things which they believe are beautiful, and which fit with the prevailing architectural fashions; by and large they have no care for the old.

Because of this, all across this country perfectly good old buildings were torn down and replaced. An example highlighted in the programme is the old Euston Station: it, along with its fabulous grand arch, were torn down and replaced with the 60s monstrosity we see there today. The same wanton architectural vandalism, veiled with the name of progress and modernism, is visible up and down the country. It’s almost impossible to count the number of town and cities where the heart and soul of the place has been torn out, replaced with weather-damaged concrete boxes, decaying in the rain.

I dread to think of the fate that could have befallen King’s Cross if they were allowed to just tear it down entirely. Maybe what they would have replaced it with would be as beautiful as the current Victorian train-shed with its towering brick facade, but there’s no guaranteeing that. There’s certainly an argument for little-c conservatism in the treatment of our built environment, and that’s without consideration for preserving buildings solely as important cultural, architectural, and historical artefacts in themselves. Whatever is done with these buildings could last lifetimes; we have a duty to treat that responsibility with the respect and caution it deserves.

I want to make it clear that I’m not opposed to architectural progress. I’m actually quite a big fan of the modern style of having lots of glass and metal. My only concerns are that we not get so carried away with ourselves that we trample all over our past, and that we have concern for what these buildings are going to be like, 30, 50, 100 years down the road. My favourite way to go is where modern additions are brought into an older building in a way that’s sympathetic with it; like the fantastic new roof over the British Museum.

This was the most satisfying thing about the programme; the architect backed down from his plans to demolish the interior features of the building, and submitted a new design that incorporated them, and merged them with the modern to create a design that worked with a balance of the new and the old. He realised, to only slightly paraphrase his words, that other people could be right. It made me feel altogether rather happy.

Spotify Post-mortem

For a while now I’ve had a Spotify Premium account, and since I told myself it was an experiment which I would then subsequently review, I really ought to actually do that rather than just letting it roll over and over each month.

I assume most of you are familiar with Spotify; if you’re not, then where the hell have you been the last year? It’s pretty much ubiquitous now.

Anyways, Spotify Premium is £9.99 a month, and that entitles you to higher quality music, offline mode, and use on mobile devices, like the iPhone. A full comparison of the different types of account is available on the Spotify website. The main thing that drew me to paying for premium was the use on mobile devices, like my iPhone, and I have used it pretty extensively.

And, based on that experience, I think I’m going to stop paying for it.

There’s a few reasons for this: the catalogue on Spotify isn’t as extensive I would like, and has a really large number of omissions, the software is occasionally unstable, etc. but the major one is mostly a strictly human limitation. I found myself just listening to the same set of music over and over, or I was undecided about what I actually wanted to listen to on any particular day, and Spotify just isn’t geared up to make it easy to browse to find something you want. The tools available for finding entirely new music on Spotify aren’t really very wonderful, either.

What I could do instead with my £10 is just buy a new album (or two) every month, add it to my collection, and then use tools like Genius playlists on the iPhone to listen to the whole damn lot in nicely selected chunks, which I find a really satisfying way of consuming music. This plan also has the advantage that I get to keep all this music if I every subsequently decide to stop paying monthly.

Anyways, I haven’t made any final decisions yet, so I’d be very interested to see what other people think about this, any tips/tricks or perspectives to share would be great.

(Coming up soon: a series of posts about my holiday to Ireland, and hopefully just more posts in general…)

The Famous Scientist Fallacy

If there’s one thing that really riles me, it’s when articles by laymen / crazy people fixate on famous scientists; you know the sort of thing I mean, endless speculation about the religious beliefs of Einstein or Darwin, endless analyses about exactly how their particular arguments were in some way flawed or incomplete, inane (but mercifully not endless) documentaries about their personal life carefully contrasted against their work.

I suppose in some ways it’s the fault of the way that science is regularly communicated. We seem to really love the “Great Man” theory of History in the scientific field. We love to pretend that great advances in science are propelled forwards by the heroic efforts of individuals. It’s absolute grade-A twaddle.

Sure, Einstein was smarter than your average bear; he figured out a great many things over a short period of time and for this he is justifiably famous. In 1905 alone, he postulated the photon, explained Brownian motion and the photoelectric effect, and laid out the first exposition of what came to be known as Special Relativity. It was a fantastic year, and is rightly known as his annus mirabilis.

The fact remains though that all of this work was riding the physical zeitgeist; for instance Special Relativity simply pieced together the work of Maxwell and Lorentz and many other contributors into a coherent framework. The pieces necessary were all ready and in place for the discovery, so somebody would have figured out the final piece — the principle of relativity — sooner or later. It was ripe for discovery.

Nor has that venerable theory gone unaltered since Einstein. It received a fairly substantial boost (no pun intended, physics fans) when Minkowski noticed that the theory made the most sense when cast in the form of a 4D space-time, which was named Minkowski space in his honour.

I apologise for the physics examples, but it’s just what I know best; I’m sure evolution and Darwin suffer ever more greatly from this phenomenon, where the central character becomes mythologised as law-giver.

This mythologised status, and the invented infallibility which goes with it, irritates me because it neglects that this sort of foundational work was done an awful long time ago, and science hasn’t been sitting on its hands for a hundred years. Today it doesn’t matter one iota what Darwin or Einstein did or said. That is relevant only as historical curiosity; as practical science they have been superceeded. Nobody learns mechanics by reading Newton’s “Principia”, or learns evolution by reading “On the Origin of Species”. These are not unquestionable sacred prophetic texts, but merely starting points on the road to a fuller understanding, to be amended or discarded as appropriate.

What got me immediately riled up was this article that John Gruber was dissecting, which falsely attributes some fairly odd platitudes to Einstein (as a side note, I desperately hate it when people over-extrapolate physical concepts beyond their range of applicability. It’s moronic). It shouldn’t matter what Einstein said, or thought, even if those thoughts weren’t just invented ad hoc by a lazy journalist. He was a good physicist, but his opinion would be fairly worthless in most fields of human endeavour. He was smart, but not an expert in everything!

The fact is that Darwin could have raped kittens for fun and it wouldn’t make a jot of difference to the correctness of evolution. He could have screwed up one of his arguments, or mis-interpreted evidence, and it wouldn’t matter. Newton was an absolute bastard, but it doesn’t invalidate his ideas about gravity. His wacky religious ideas and theories on alchemy are rightly discarded and forgotten, because they’re nonsense, even though they’re from a figure as towering in the history of science as Newton.

I suppose it’s far easier to teach and understand the simplistic great man narrative; maybe it speaks to something which we want to believe. Alas, I fear it’s a way of thinking which does nothing but give succour to our enemies. It’s a bit like the terrible, misleading, New Scientist headlines, I think.

Why We Should Fear “The Big Society”

The Big Society is ostensibly the centerpiece feature of the Conservatives’ policy for this election; their manifesto was titled “Invitation to Join the Government of Britain” in reference to it.

For such a centerpiece policy, it is breathtakingly vague. Nobody understands it properly, not even many people within the Conservative party. One shadow minister said: “The ‘big society’ needs to be turned into more practical, voter-friendly language. We need to turn Oliver Letwin’s Hegelian dialectic into voter friendly stuff.” When you’re using the phrase “Hegelian dialectic” to describe why something is tricky to understand, you know you’re in deep trouble.

Not many people (who don’t have philosophy degrees) are going to know that Hegel was German philosopher, one of Marx’s influences, and like the philosophy of Marx the ideas of the Big Society display an earnest idealism totally stripped of even a single iota of pragmatism.

The Big Society is supposed to conjure up an image of us as a country spontaneously coming together to fix “Broken Britain”, volunteering to fix our social ills, to cure a culture of entitlement, to restore power to the people, etc. It speaks of a social movement to bring about change, and in the face of the Big Society, the Big State will wither away.

That’s bollocks. It’s the same mad utopian dream as that of Communism.

There is no social movement, no grass-roots activism for the Big Society. Cameron didn’t even mention it in the debates, and their polling is hovering steady in the low thirties; this is no popular movement. It’s just words, words with nothing but vague appeals to working together for change. It’s all just political hot air.

The real intent, the real policy, is a return to something like the libertarian aspects of Thatcherism, or worse. The state will not be allowed to wither as vounteerism takes up the slack; the state will be hacked away with glee, cut to the bone. Provision for the poor, for the weak, will fall through the cracks as charities and volunteers struggle to cope. It’s a reversion to how things were a hundred years ago or more, before these functions were absorbed by the state. Police and Fire services were once run by dedicated volunteers, and there’s a damn good reason that we don’t do things like that any more. Similarly with social services; look at what’s happened in Hammersmith and Fulham as council provision has been stripped away. It’s ugly, so very ugly.

In many ways, the individualism inherent in Thatcherism, the belief that “There is no such thing as society” is part of the root of what is wrong with Britain today. We were told, as a nation, that we should look out for ourselves, that greed was good, individualism was king. Are we surprised that people took this to heart? That kids who grew up in that time, and in the time since, act as if they have no responsibility to anybody? There’s a thread running directly from Thatcherism to the rise of the ASBO.

I’m not saying there isn’t a place for charity or volunteering; absolutely there is. It’s a noble thing to give of your time and money for a good cause, but it should be in addition to the services provided by the state, not an alternative. The richest and strongest have a responsibility to the poorest and weakest, whether they like it or not.

The Big Society is also economically nonsensical. The wealth of nations is at least partly based on the division of labour. If I do my job well, and efficiently, it will generate wealth. That wealth can partly be used to fund somebody whose job it is to provide social services, which they too will do efficiently. If social services are performed by volunteers, then they will be performing both their day job and their volunteer work, reducing overall efficiency.

Before I’m accused of being a mad Big Statist, I’d like to point out that I am a Liberal Democrat; the first paragraph of the preamble to the Lib Dem constitution includes the words “we aim to disperse power”. The state doesn’t need to be large, monolithic and centralised, and that has been a major failure of the current Labour government, but it also shouldn’t be wiped away entirely.

The free markets and spontaneous individual action are not, and cannot, be the solution. When individual initiative is allowed to run too far, unrestrained, the consequences are usually disaster. Look at the banking crisis. Look at the Roman civil wars in the first few decades B.C. Look at the dictatorships of the world. We have a democracy because we know that pluralism, not individualism, is the way forward. We are stronger together than we are apart.

Adobe vs. Apple

Apple and Adobe have been having a rather public tiff about the use of Adobe’s Flash on Apple’s mobile platforms, the phenomenally successful iPhone and iPad platforms. I’m going to have to split my response to this into two logical parts:

1. The Web

Flash is predominantly used as a container for video content, Flash-based games, and the occasional little widget. Almost every other use is a disaster; I’m sure we all have horror stories of terrible Flash-based websites.

Apple’s argument in this space is one I completely agree with: letting one company, with one proprietary implementation, control several important classes of web application is just wrong. Emerging standards like HTML5 video and canvas tags, and support for them in all the major browsers (Chrome/Safari, Firefox, IE9)  mean that we have no need to stick to Flash. Even if we were to assume that Flash was high-quality, secure, performant, and stable, which it isn’t, letting it have total control of web video would be an incredibly bad idea. The sooner it dies a miserable death, the better for all of us.

2. For The Writing of Cross-Platform Apps

This one is somewhat more of a grey area.

First off, let’s be honest; Flash doesn’t help you build cross-platform apps. It helps you write apps that run on Adobe’s platform. They want you to write Flash-based apps for the same reason that Microsoft wants you to write Windows apps, or Apple wants you to write iPhone OS apps, or Valve wants people to use the Steamworks APIs: they want you locked to their platform, for their own business reasons. There isn’t any altruism here, no matter how much Adobe wants to play the martyr.

This is why Apple is refusing to let apps which target Adobe’s platform to run on their OS. Adobe are making a power-play to subvert Apple on their own platform, and Apple are rightly telling them to go fuck themselves. It’s not an unreasonable position, even from a user’s perspective. One of the reasons that Windows is a cluster-fuck is that fundamentally Microsoft lost control; they need to keep backwards compatibility with almost every Windows app ever written, even the ones that don’t play by the rules and call undocumented APIs in broken ways. That’s a millstone around their neck, preventing them from ever moving quickly. That situation is good for nobody; it hurts application stability, and it hurts innovation.

On the other hand, Apple are keeping control with an iron fist, in a fairly velvety (albeit thin) glove. Call undocumented APIs, don’t natively target Apple APIs, you get bounced out. On the other hand, it means Apple can keep nimble. They know that because all their app developers are playing by the rules, they can change things rapidly. Change CPU architectures? Boom, most apps will just recompile without needing changes. Stick a third-party toolchain in there, and you get unpredictable effects; every app using that third-party system could stop working.  What if Apple want to add new features? If Apple exposes a new API, native apps can start consuming that API straight away. They don’t have to wait for a third-party platform to figure a way to pass through that API, if they ever do. They don’t have to worry about developers only targeting the minimum common feature set.

It’s a Faustian pact. Nobody is denying that. If you don’t like Apple’s strategy, you don’t have to buy an iPhone OS device.

For the moment, I’m happy with the trade-off. When I decide on my next phone, you bet I’m going to look at Android. But I’m happy right now, and I quite want an iPad…

Anyways, if you really want to write cross-platform code, you do it the same way we’ve always done it. Write core code in C++, staying agnostic as possible to the real environment you’re running in. C++ pretty much works everywhere. Hooray for open standards! Also, on another note, I also think that half the time the FSF is full of shit. Or to be less inflammatory, they’re so committed to their ideology that they’re blind to reality. But that’s a story for another day.


Since my crazy inflamed passion for politics is driving me crazy, I reckon if I just open a release valve, blog it out, I’ll be able to settle down and get some work done.

So here’s me, speculating on what might happen.

I think, barring a spectacular performance by Cameron over and above Clegg (and that’s not to discount Brown, who for all his faults has substantial economic nous) in the final leader’s debate on economics hosted by the BBC (who I confidently predict will have the least shit studio for the occasion) the poll numbers should hold steady going into the final approach to the election.

Unfortunately, because these waters are so uncharted, it’s hard to predict exactly how that’s going to translate into seats and votes on the night, but it seems like the most likely outcome will be a narrow margin between either the Tories or Labour as to who will be the overall largest party (probably the Tories) with a substantially increased Lib Dem contingent. I very much doubt any party will be able to form an overall majority.

That gives Brown first move, as he’s the incumbent. What he does with it will be interesting, and depends on the Lib Dem posture; there’s a reasonable chance that the Lib Dems would consider coalition, or at least a promise of support, at a price.

The Lib Dems are certain to want electoral reform. That is absolutely non-negotiable, and given the result is likely to be fairly absurd in terms of proportions of votes to seats, they’ll have a substantial popular mandate for moving to a more proportional, fairer, system.

A second condition is likely to be that Brown promptly fall onto his own sword. He’s a liability to his own party, let alone to the fortunes of a coalition. A  third condition might well be the installation of Vince Cable as the Chancellor, a move likely to be publically popular. I doubt the Lib Dems will win enough support to justify Clegg taking over as PM, but it’s an interesting possibility, especially in the power vacuum left by the Brown murder-suicide.

Note that those things get increasingly more unlikely as they go on; Clegg for PM is practically a fan-boy’s pipe-dream. But a Lib-Lab pact founded on electoral reform and the toppling of Brown is an attractive possibility.

What if conditions make it such that we end up with a Tory minority government? This is possible in the case of the Tories having a reasonable lead in seats over Labour, or Brown rebuffing the Lib Dems in attempt to claw onto power.

The Tories are going to be a lot warier of siding with the Lib Dems; electoral reform might well be a price too high for them to pay. It would mean the end of any hope of a Tory majority government ever again. Fundamentally this is a progressive, centre-left country; between them Labour and the Lib Dems have nearly 60% of the vote. If our votes were ever allowed to count equally, the Tories would never see power again.

In the absence of coalition, this would mean a weak and unstable government; Cameron would have to pull off some pretty damn good politicking to save his hide and win a proper majority in a hypothetical second election. Considering this the man who’s managed to turn what should have been a slam-dunk victory into a hung parliament, and almost brought his party to the point of being made irrelevant by proportional representation, it doesn’t look good for him.

That’s, of course, assuming his party doesn’t stab him in the back. The New Conservatives under Cameron (why that appellation isn’t more widely used I’m not sure) is much more of a surface veneer than the transformation of Labour under Blair, who truely fought for the heart and soul of the Labour party.

Cameron’s makeover of the Tories is mere lubrication designed to help him squeeze down the corridors of power. Which is possibly the most unpleasant metaphor I’ve ever written. There are lots of Tory backbenchers who are still the nasty Tories of old, untouched by Cameron’s campaign to change the party’s image; look at some of the homophobic statements that have leaked out in recent weeks. These people tolerate Dave because they believe that he can put them back into power, where they believe they belong. If he fails to deliver, they may well see Dave as expendable.

The more right-wing Tory who would replace him would, naturally be a lot less electable; this is the same party that tried tacking to the right three times before they realised it was a losing strategy.

Anyways, I guess the only really firm conclusion to be made is that this election is both incredibly interesting and unbelievably important; we could be on the threshold of real political change in this country.