You are here

Jonathan Hitchcock's blog

The Political Compass

The political discussions of the last century or so have mostly been dominated by the terms "right wing" and "left wing", both of which have all sorts of connotations attached to them. These terms, however, are rather limited. For example, both Stalin and Ghandi were "left wing", but their politics were worlds apart. There is clearly another dimension to their ideals that needs to be taken into account.

The political compass is a way of orienting somebody's political views that looks beyond the simple left-or-right of their economics, also grading the social aspect of their opinions, ranging from authoritarian (at the "top") to libertarian (at the "bottom"). To give you an idea of how this works, have a look at where some major historical figures stood:

political compass of major historical figures

There is an online test that gives you 62 statements on various issues, and requires you to agree or disagree, strongly or weakly, with each one, using your answers to position you on the compass, and show you where you stand in relation to others. Recently, a bunch of my (mostly CLUG) friends took the test, and Michael hacked together a nifty script that automatically generated a graph which plotted our positions against each other:

political compass for CLUGgers

As you can see, we all kinda cluster in the lower left corner, with the exception of a few fascists and capitalist pigs. This is probably to be expected from a bunch of freedom-loving open-source geeks, but the wide spread of our opinions got me thinking. We're all rational, intelligent people (well, almost all), and I've always had the (possibly rather naive) opinion that if people could just talk about stuff, and see each other's points of view, they'd agree. Or, disagree less. Bearing that in mind, and bearing my current campaign (which will become increasingly obvious) to raise the signal-to-noise ratio of our local internets, I balked at the simple "this is my score" posts that some of us were doing. Accordingly, I asked my friends to actually write up their test results, instead of just giving their scores - that is, to go through the test question by question, and actually explain their reasoning, so that we could see why our scores were different. So far, my call has been heeded by Stefano and Jeremy, bless their pasty white skins.

You will notice from the above graph that Jeremy (labelled as jerith) falls on the bourgeois-money-grubbing-lapdog-of-the-imperialist (that is to say "right") side of the economic spectrum, while I am fairly far left (vhata at about -5,-5), and I used this to perform an experiment when drawing up my analysis. First, I did the test as normal, and wrote down my answers. Then, I read through Jeremy's rationalisations (or "reasoning", if you must), and re-did the test, but bearing his thoughts in mind the second time. While nothing he said actually changed my mind (except for one question which I had misunderstood, and which was clarified by his answer), it did have some effect in strengthening or weakening my convictions.

This is exactly what I had hoped would happen (and I promise I didn't do it on purpose): getting an insight into the mind of another person whom I respect made me empathise with his opinions more, and drew me slightly towards his world-view. It turns out that my results after redoing the test pushed me just over two full points to the right, towards Jeremy's position. It also strengthens my belief that if we could just engage in proper dialogue, instead of always falling back on over-defensive rationalisation and emotional attacks, there would be a lot less conflict in the world.

Before I give the analysis of my answers, I want to quickly discuss the political compass of a few other people. The people at have put together charts for all of the European Union countries, and for all of the people running in the US presidential elections. They give some nice discussion, especially of the elections, so I won't duplicate that here. What I will say is that it is no surprise that almost all of the nodes are in the top-right corner: being below the x-axis means you don't like the government meddling with you, and it's not surprising that governments and politicians aren't in favour of that. What is pleasing is (a) how close to the centre point a lot of Europe is, and (b) where Barack Obama stands. Walton Pantland at Red Star Coven puts it really well, so once again, I won't re-say it here.

On to my analysis!

Propositions concerning the country and the world

  • If economic globalisation is inevitable, it should primarily serve humanity rather than the interests of trans-national corporations.
    Strongly Agree - trans-national corporations are an economic/political construct. To suggest that something should serve their interests instead of the interests of the human race which created them is simply frightening.

  • I'd always support my country, whether it was right or wrong.
    Strongly Disagree - again, to suggest that you would support something that you know is wrong, simply because it's "your" country is terrifying.

  • No one chooses his or her country of birth, so it's foolish to be proud of it.
    Disagree - you can be proud of the fine achievements of the country you were born into, just as you can be proud of your own natural talents (which you were born with, and did not earn). It's when you take that pride to levels of nationalism, and attack others because they're not your people that it gets bad.

  • Our race has many superior qualities, compared with other races.
    Disagree - I firmly believe that all humans are created equal: no race is inherently superior to another race. The reason this isn't a strong disagreement is that there are quantifiable physiological advantages that some races have in certain areas (Kenyans can run, French people can pronounce things nobody else can, Polynesian pearl divers can hold their breath for ages), but this is no reason to claim "superiority".

  • The enemy of my enemy is my friend.
    Disagree - the relationship is not black-and-white: both being against one thing does not mean we are both for the same things. Any teenager at highschool should know this.

  • Military action that defies international law is sometimes justified.
    Agree - very, very rarely, a military force might conceivably have to breach international law to achieve some greater good.

  • There is now a worrying fusion of information and entertainment.
    Disagree - I didn't understand this question until Jeremy pointed out that this fusion meant that we could no longer tell the difference between fact/reality, and fiction/entertainment, and this made me realise that this fusion can lead to wars and governments being treated like viewer-run reality shows. I changed my opinion to Agree after that.

The Economy

  • People are ultimately divided more by class than by nationality.
    Agree - In this era of globalisation, I don't feel that cross-border differences are anywhere near as important to our world-views as the differences of income and class.

  • Controlling inflation is more important than controlling unemployment.
    Disagree - if everybody has jobs, they will have money to spend and circulate, and inflation will decrease. I don't think the reverse will happen as readily.

  • Because corporations cannot be trusted to voluntarily protect the environment, they require regulation.
    Agree - They cannot be trusted, being primary money-creating machines, and the environment does need protection, so some form of regulation is required. It's not a strong agreement because I think my views that they can be (self?) regulated by consumer opinion and pressure to be ethical doesn't fall under the spirit of the question.

  • "from each according to his ability, to each according to his need" is a fundamentally good idea.
    Strongly Agree - it may not be implementable in our current situation, but it makes perfect sense that everybody does what they can, and gets what they need - it's just plain old efficient.

  • It's a sad reflection on our society that something as basic as drinking water is now a bottled, branded consumer product.
    Agree - I don't judge people for wanting luxuries of this sort, but I do think it's unfortunate that society makes people seek happiness in this form.

  • Land shouldn't be a commodity to be bought and sold.
    Disagree - land should be treated like other means of production. This isn't a strong disagreement because I acknowledge that it is still a more important means of production than most others, and maybe still deserves some slight special-casing.

  • It is regrettable that many personal fortunes are made by people who simply manipulate money and contribute nothing to their society.
    Agree - big-ups to them, but I would much prefer a world where you had to actually give back to society in order to be successful.

  • Protectionism is sometimes necessary in trade.
    Agree - occasionally, factors are such that greater harm will come from allowing a big corporation (or similar) to manipulate the market forces to destroy a small local economy (for example), than would come from putting restrictions on the free market.

  • The only social responsibility of a company should be to deliver a profit to its shareholders.
    Strongly Disagree - this leads directly to destroying the environment and having trade union leaders murdered in order to stop costs and wages going up. Companies should have a strong social responsibility to improve the community, etc. (Whether they ever will or not is not the subject of this question.)

  • The rich are too highly taxed.
    Strongly Disagree - They're not going to get any sympathy from me by whining that their huge salaries aren't as huge as they could have been, because some of it is being used for public good.

  • Those with the ability to pay should have the right to higher standards of medical care.
    Agree - excellent medical care is expensive and scarce - not everybody can obtain it, so let those who can pay for it do so, and make sure that everybody else gets medical care that is good enough.

  • Governments should penalise businesses that mislead the public.
    Strongly Agree - lying to the public to improve profits is just plain evil

  • A genuine free market requires restrictions on the ability of predator multinationals to create monopolies.
    Agree - to really let the free market forces work, you need to stop people with undue influence (be it the government, with the power to legislate, or corporations, with the economic power to crush competition) from creating artificial forces.

  • The freer the market, the freer the people.
    Strongly Agree - I don't think this contradicts the previous point, or the earlier one about protectionism - the most powerful voice people have nowadays is their consumerism, and they need to be free to wield it.

Personal Social Values

  • Abortion, when the woman's life is not threatened, should always be illegal.
    Strongly Disagree - that's intervening in somebody's life on dubious moral grounds to force them to take on a massive burden unwillingly.

  • All authority should be questioned.
    Strongly Agree - there is no authority that is above having to prove itself worthy of being an authority.

  • An eye for an eye and a tooth for a tooth.
    Strongly Disagree - perpetuating attacks and counter-attacks is just going to end up with everybody hurt. Forgive.

  • Taxpayers should not be expected to prop up any theatres or museums that cannot survive on a commercial basis.
    Strongly Disagree - Art and Culture should not have to be commercially successful to continue existing - the benefits we get from them supercedes this.

  • Schools should not make classroom attendance compulsory.
    Disagree - Children below a certain age aren't capable of making the decision as to whether or not they will benefit from something they simply see as unpleasant. I know I refused piano lessons when I was small, because I thought they were a drudge, and I regret it now.

  • All people have their rights, but it is better for all of us that different sorts of people should keep to their own kind.
    Disagree - the differences in other people are how we learn and grow. The need for genetic diversity in a healthy animal population is a simple example of why this is wrong. It's not a strong disagreement because I acknowledge that certain groups simply can't co-exist peacefully with each other (people from Fishoek, and normal people, for example).

  • Good parents sometimes have to spank their children.
    Strongly Agree - this is the first time children experience that their actions may have negative outcomes, a vital lesson in becoming morally mature.

  • It's natural for children to keep some secrets from their parents.
    Agree - everybody has a private inner life.

  • Possessing marijuana for personal use should not be a criminal offence.
    Agree - the (debatable) negative effects of marijuana are far outweighed by the very clear negative effects that criminalizing it has.

  • The prime function of schooling should be to equip the future generation to find jobs.
    Strongly Disagree - Education is to teach us how to live productively in society, and covers far more than simply "being hirable".

  • People with serious inheritable disabilities should not be allowed to reproduce.
    Strongly Disagree - to deprive somebody of a fundamental right (some would say, a biological imperative) for reasons of "genetic purity" is completely unjustified.

  • The most important thing for children to learn is to accept discipline.
    Strongly Disagree - Education is not to teach people to buckle under and accept authority. Children must be taught to question authority for themselves, to discipline themselves, and, in the end, must be given an appropriate moral understanding to realise for themselves when discipline is warranted.

  • There are no savage and civilised peoples; there are only different cultures.
    Agree - there are certainly savage people, but this is an aspect of their personalities, not of their cultures.

  • Those who are able to work, and refuse the opportunity, should not expect society's support.
    Agree - refusing to be productive in no way entitles you to the benefits of somebody else's productivity.

  • When you are troubled, it's better not to think about it, but to keep busy with more cheerful things.
    Disagree - Sometimes, if there is nothing you can do about it, taking your mind off something is the only thing to do. However, more often than not, burying your head in the sand won't do anything to help solve your problems.

  • First-generation immigrants can never be fully integrated within their new country.
    Disagree - There is nothing inherently alien about first-generation immigrants that mean they are less able to integrate than their children will be. This isn't a strong disagreement because it is clear that actually growing up in the new country will give their children a bigger advantage.

  • What's good for the most successful corporations is always, ultimately, good for all of us.
    Strongly Disagree - I can literally see no correlation between what stuffs the coffers of a big corporation, and what is good for humanity.

  • No broadcasting institution, however independent its content, should receive public funding.
    Disagree - I can easily conceive of an independent broadcasting institution that benefits the whole public, and is deserving of public funding.

Wider Society

  • Our civil liberties are being excessively curbed in the name of counter-terrorism.
    Strongly Agree - it's happening all over the world. Try and disagree with this next time you are forced to throw away your new can of after-shave before you get on the plane.

  • A significant advantage of a one-party state is that it avoids all the arguments that delay progress in a democratic political system.
    Agree - It also has significant disadvantages, but that's not under debate in this question.

  • Although the electronic age makes official surveillance easier, only wrongdoers need to be worried.
    Strongly Disagree - The statement has the underlying (false) assumption that the "officials" doing the surveillance have a purely noble agenda.

  • The death penalty should be an option for the most serious crimes.
    Agree - Sometimes, rehabilitation really is impossible, and you need this option.

  • In a civilised society, one must always have people above to be obeyed and people below to be commanded.
    Disagree - While people tend to naturally organise themselves into heirarchies of this nature, it is by no means a pre-requisite for civilised societies.

  • Abstract art that doesn't represent anything shouldn't be considered art at all.
    Strongly Disagree - Art doesn't have to be "of" something in order to make a statement, or simply be pleasant and appreciable.

  • In criminal justice, punishment should be more important than rehabilitation.
    Strongly Disagree - We are not dogs that have to be repeatedly beaten to enforce behaviour patterns, nor is the legal system a tool for taking revenge on people for the harm they've done. If we can "fix" a criminal, then we almost have a duty to do so.

  • It is a waste of time to try to rehabilitate some criminals.
    Disagree - At least try. I will allow that some criminals may turn out be beyond help, but that is not what this statement is saying. A human life is worth the effort.

  • The businessperson and the manufacturer are more important than the writer and the artist.
    Strongly Disagree - I can't put it better than Jeremy did: "The former allow us to survive. The latter allow us to live."

  • Mothers may have careers, but their first duty is to be homemakers.
    Disagree - Having a child means you have a duty to ensure that that child is brought up properly, it does not mean you have a duty to "be a homemaker". (For example, the father could take that responsibility.)

  • Multinational companies are unethically exploiting the plant genetic resources of developing countries.
    Strongly Agree - Once again, bringing their large economic forces to bear means that they can exploit what they shouldn't.

  • Making peace with the establishment is an important aspect of maturity.
    Disagree - It is important for your personal growth to come to terms with what you cannot change, but as people like Martin Luther King have shown, sometimes you have to refuse to back down and fight for change you know is necessary.


  • Astrology accurately explains many things.
    Strongly Disagree - My personality and fortunes are not governed by huge balls of flaming gas many light years away.

  • You cannot be moral without being religious.
    Strongly Disagree - There are several fundamentally excellent moral systems that are not based on the fiat-ethics that religion often imposes.

  • Charity is better than social security as a means of helping the genuinely disadvantaged.
    Agree - Charity is a distributed, grass-roots system that uses individual case-based judgements to decide how best to help others, and easily trumps social security's klunky centralised attempt at redistributing wealth.

  • Some people are naturally unlucky.
    Strongly Disagree - Randomness is random, and random events do not happen in a certain fashion because somebody has some ephemeral attribute called 'luck'.

  • It is important that my child's school instills religious values.
    Strongly Disagree - It is important that my child's school instills an enquiring attitude, a desire to strive for the truth, and an appreciation for the spiritual in life, so that my child can find (or not find) her own religious values.


  • Sex outside marriage is usually immoral.
    Strongly Disagree - Most sensible moral codes would accept a large portion of relationships nowadays as valid morally, even though they haven't got the official seal of marriage on them.

  • A same sex couple in a stable, loving relationship, should not be excluded from the possibility of child adoption.
    Strongly Agree - I think a child has a better chance of a good upbringing in such a household than in many households these days.

  • Pornography, depicting consenting adults, should be legal for the adult population.
    Agree - Censorship never achieved anything other than driving its target underground.

  • What goes on in a private bedroom between consenting adults is no business of the state.
    Strongly Agree - The state is in no position to prescribe what people can and cannot do, any more than it can make moral calls or restrict freedom in other ways.

  • No one can feel naturally homosexual.
    Strongly Disagree - There are too many gay teenagers who are desperately trying (and failing) to deny their homosexuality to themselves, for me to agree that it's "just a choice".

  • These days openness about sex has gone too far.
    Disagree - Making something a taboo, or creating an aura of mystique about it, is probably more harmful than overexposing it.


So there we have it. Those are my opinions. Every time I take the test my score seems to wobble a bit, although it's almost always somewhere in the vicinity of the -5,-5 mark. My official score from last week is:

Economic Left/Right: -5.38
Social Libertarian/Authoritarian: -5.03

I don't expect too many other people to go to the effort of transcribing their reasons (although it is quite an eye-opener, self-awareness-wise, when you do it, and I do recommend it), but I do want to restate that I firmly believe that if this sort of discussion happened more around ALL issues, there would be much less strife than there is in the world today.

The Large Hadron Collider

There's been a lot of talk recently about the Large Hadron Collider. Most of it, unfortunately, has been the press going "there's this big Science thing that could kill us all!" and not having a clue about what is actually going on up there. Unfortunately, journalists are not very good at Science. This hype has been blown so out of proportion that somebody committed suicide. XKCD, our favourite comic, did a comic about it which you should read.

Anyway, I thought I'd clear a few things up. I only did first-year Physics at university, but I've done some reading, and I'm going to try to explain exactly what is going on in Switzerland, in words that even a journalist will be able to understand. I'm leaving out the maths, and oversimplifying some things, but I hope I can at least give some idea of what is going on. (Everything below is as physicists currently see it, but of course might change as we discover new stuff.)

The Collider

First of all, the bit that everybody pretty much knows: the Large Hadron Collider consists of a very large circular tunnel underneath parts of France and Switzerland, 27km around, and 8.5km across, through which two beams of protons (a specific type of "hadron", explained below) are going to be fired at exceedingly fast speeds. To give you an idea of the geography and dimensions of the LHC, you can look here on OpenStreetMap, where it is clearly marked. The protons are going to be travelling at 99.999999% of the speed of light, which is 299,792,455 m/s (or 1,079,252,840 km/h, or 1,802,617,480,000 furlongs per fortnight). It's fast.

They will be firing two beams through the tube, very close to each other, and then at the right moment, they will shift one slightly so that it collides with the other one. The massive speeds at which they are travelling will mean that when they collide with each other, huge amounts of energy will be released, which will result in lots of bits of matter being created temporarily (you know, e=mc2), and in effect, we will have recreated conditions similar to the universe just after the Big Bang. Don't be alarmed that they are recreating the big bang - they are simply creating a very small area that will contain the sort of particle chaos that would have been around shortly after it, so that they can examine the particles while they're busy rushing around, before they have a chance to settle down and become too well-behaved to observe again.
(An interesting side-note: The proton beams are actually made of lots of clumps of protons, set a small distance apart, so that there will be repeated collisions, each about 2.5 nanoseconds (0.000000025 seconds) apart.)
The idea is that in all this chaos, we will be able to observe a large number of effects that we don't normally get to witness, and that this will shed light on a lot of ideas and theories that we have, and hopefully help us to explain things a bit better than we can now. The data we gather (and we're being quite careful about what we do and do not record) will be recorded and streamed off to datacentres all around the world (including one here in Cape Town), where it will provide physicists with material to study for years to come.

The Universe

So, that's what the LHC is, and what will happen during the experiments. Now for some background information on the Universe:

The stuff we see every day is all made up of atoms. And atoms are made up of varying numbers of protons, neutrons and electrons. And protons and neutrons are made up of three quarks each.
There are six types of quarks, classified according to strange things like "spin", "charge", "flavour", and "generation", and the most common types are called "up" quarks, and "down" quarks. Two "up" quarks and one "down" quark make a proton; two "down" quarks and one "up" quark make a neutron. ("Down" quarks have 1/3rd negative charge, and "up" quarks have 2/3rds positive charge, so if you add those charges together, you can see why protons have +1 positive charge, and neutrons have a neutral charge.) When a bunch of quarks are bound together to form a particle like this, it is called a hadron - protons and neutrons are the most common types of hadrons. The beams of the LHC are going to consist of a bunch of these protons flying through the tubes, which is why it's called the "hadron collider".
These "up" and "down" quarks are the only ones we really get in the matter we encounter in our day-to-day lives: the others are very unstable, and decay almost instantly after being created.
Apart from the "up" and "down" quarks, the other varieties are called "top" quarks, "bottom" quarks, "strange" quarks, and "charm" quarks. I will now pause for a second while you go and re-read this xkcd comic, especially the final frame.

Get it? Good. I shall continue.

Now that we know what stuff is made of, we can discuss how it interacts with other stuff. There are four (known) forces, or interactions, which can occur between things:

  • Gravitational force - we're all aware of this, because the earth sucks
  • Electromagnetic force - magnets, electricity, electromagnetism
  • Weak nuclear force - responsible for certain interactions between protons and neutrons within atoms
  • Strong nuclear force - responsible for keeping protons and neutrons together in the nucleus of atoms
When something exerts one of these forces on another thing, the force is "carried" to the other thing by a "boson" - a very small particle which transmits the energy from the one thing to the other. The different forces are carried by different bosons:
  • Gravitational force - supposedly carried by bosons called gravitons, although there is no evidence of gravitons as yet.
  • Electromagnetic force - carried by photons - bosons which weigh nothing and travel at the speed of light (since they are light)
  • Weak nuclear force - the bosons for this force were postulated in 1968, and named the W boson (named after the weak force), and the Z boson (named semi-humorously because they thought it would be the last boson to need discovery)
  • Strong nuclear force - carried by bosons called gluons (named because they glue the protons and neutrons together).
So, when the sun emits light, it is carried to us by photons, and when the earth pulls us towards it by gravity, that force is carried to us by gravitons, and so on.

Because physicists like to think that the universe is actually a very simple place, they believe (or hope) that these four forces are actually just different aspects of some Grand Unified force, simply behaving in four different ways. In fact, they have already managed to combine the Electromagnetic force and the Weak nuclear force into one new force, which they call the Electroweak force, which is responsible for both electromagnetic reactions and the weak nuclear interactions. This unification, while it was a great advance, did lead to a problem:

One of the fundamental differences between the W and Z bosons, and the other bosons, is that they are "massive", in the sense that they have a lot of mass. They are much heavier than other particles, and infinitely heavier than photons, which don't weigh anything at all. This was a bit of a problem for the physicists trying to unify the Weak and Electromagnetic forces, because they couldn't work out where the mass came from - why were photons massless, and the W and Z bosons massive, if the two were aspects of the same force? This is where Peter Higgs came in.

The Higgs Mechanism

Mr Higgs proposed something called the Higgs field, which covers all of space, and sort of "sticks" to some (but not all) of the particles moving through it (or, mathematically - decreases their momentum as they pass through it), giving them mass. This is called the "Higgs Mechanism", and the UCT physics department has a very good explanation of how it works:

Imagine a cocktail party of political party workers who are uniformly distributed across the floor, all talking to their nearest neighbours. The ex-Prime Minister enters and crosses the room. All of the workers in her neighbourhood are strongly attracted to her and cluster round her. As she moves she attracts the people she comes close to, while the ones she has left return to their even spacing. Because of the knot of people always clustered around her she acquires a greater mass than normal, that is she has more momentum for the same speed of movement across the room. Once moving she is hard to stop, and once stopped she is harder to get moving again because the clustering process has to be restarted.

The equations that describe the Higgs mechanism also indicate that there is an extra type of particle, which is also heavy, but had not been detected before. When Higgs originally submitted his paper describing this field, it was rejected, because it "did not predict any new detectable effects". So, he added a sentence at the end, mentioning that the equations seemed to imply the existence of this extra particle, and the paper was accepted. This extra particle is the Higgs boson, which passes its mass on to just about everything else, and would thus be the reason why things have any substance at all (earning it the nickname "God Particle").

To a non-scientist, the above description might set off some warning bells: "He just invented a new boson? Can you just do that?" Higgs didn't just invent the boson, though: he derived some formulae which explained how things interact with the Higgs field, and saw that if the formulae were correct, then it would also mean that the Higgs boson existed. And that's where the LHC comes in.

We've never seen a Higgs boson, and we don't have any actual proof that it exists, but the evidence of the equations, and the way the other particles act and react suggest that it might. This is how Science works: evidence suggests that something might be the case, so we set up some tests to see if the actual practice agrees. If something happens that disagrees with our original idea, we fix it up, or come up with a new one. The results of the experiments at the Large Hadron Collider are going to be examined very carefully, to see whether or not they agree with what Higgs's theories said. This is why we hope to see Higgs bosons flying out of the proton streams: that would positively confirm the theories and equations that he described, which would make our understanding of the universe that much more concrete. Whether or not it happens is debatable, but that's why we're doing the experiments.

The Dangers

Why are people so worried about the Large Hadron Collider? What do they think is going to happen? On the one hand, it's easy to dismiss them as being "Scared Of Big Science" - they heard that the LHC is going to recreate conditions similar to shortly after the Big Bang, and they just don't want that stuff happening anywhere near them. However, there are a few specific worries that people have voiced, which I'll go over quickly now.


Remember a few paragraphs back, I explained that most "everyday" (nuclear) matter is made of protons, neutrons and electrons, which essentially consist of "up" quarks and "down" quarks. Well, if you add "strange" quarks to the mix, you get what is called "strange matter". This can be thought of as a liquid substance totally unlike the nuclear matter that we see around us. The LHC produces a lot of strange matter, but this itself isn't dangerous, because it is very unstable, and decays almost instantly. However, there may also be things called strangelets - tiny, very stable configurations of strange matter. We have never encountered strangelets, but they are theoretically possible. Because they are so stable, they would not decay, and if they came into contact with nuclear matter (which is less stable), they might start converting it into strange mass by adding strange quarks to the up/down mix. The more this happens, the more strangelets there would be, and this would set off a long chain reaction that could turn the whole earth into a huge stable strangelet (known as a "quark star").

The worry, of course, is that the LHC experiments will produce strangelets, but this is highly unlikely: production of strangelets becomes less and less probable at higher energies, and the LHC is very high energy indeed - higher than previous experiments, which failed to create strangelets or destroy the world.

Miniature Black Holes

Another popular bugbear that people fear will come out of the LHC is "miniature black holes". A black hole is simply a piece of very, very dense matter. The denser something is (that is, the more stuff that is packed into less space), the more gravity it has, and so the more it pulls other stuff towards itself. A black hole has such high gravity that nothing can break free from it - not even light, hence the black part. Because everything gets sucked into it, its mass increases, and it gets more dense, and the gravity increases even more. You can see why you wouldn't want one of these anywhere near our planet.

Here, the worry is that the LHC experiments will produce enough energy to create micro black holes, which would start sucking the whole planet into them, as depicted on the popular LHC webcams that everybody linked to recently. As a matter of fact, the LHC energies are far too low to create these black holes, and even if they did, they would not be dangerous. Once again, the world is saved by my main man, Stephen Hawking: he predicted a thing called Hawking Radiation, which is a sort of heat that black holes emit. Micro black holes are so small that emitting energy by Hawking Radiation would decrease their mass (remember, energy = mass, e = mc2) fast enough that they would lose their "black hole" status before they had time to suck everything in.


As you may have heard, a helium leak means that the LHC experiments will be delayed two months, but hopefully things will be back on track after that. This is the greatest physics experiment man has yet attempted, and the amazing things we could find out should not take second place to superstitious fears that Science Will Destroy Us All.

I hope that this has been enlightening, and that I haven't been too misleading in my attempts to explain the physics in man-on-the-street language. Let me know if there is anything else I should explain, or any area that is unclear.

Doing the Cape - Reprise

Recently, a friend of mine told me that he and a friend wanted "something nice" to do on a sunny Saturday afternoon in Cape Town. My response was (transcribed):

Beer in the sun? Or, wait, there's an awesome italian ice-cream shop in Hout Bay, on your right, just before you round the corner that takes you to Chapman's Peak. Drive the long way round though - along the coast as much as possible. I'm not sure that Chapman's Peak drive is open now, but if it is, that would be a win, and it would take you down past Cape Point, and then you can stop in Simonstown and visit Just Nuisance. Then you could go to the jetty in Kalk Bay, then take the Muizenberg Coastal Road, along, ending up in Stellenbosch for supper. You should've started this two hours ago. I think Chapman's Peak drive is closed, actually, but you could still take Ou Kaapse Weg, which cuts across the lower cape, and bypasses going all the way round on Chapman's Peak. You could also go up northish, to Blaauwberg, and walk along the beach there. Go to Blue Peter and have a cocktail while sitting on the grass out front, although that'll probably be a bit crowded. Or go straight out to Stellenbosch, pick up some olives and cheese from the Spar, and go sit on the university lawns and eat them in the sun. Or go up to Rhodes Memorial and have hot chocolate at the cafe. You live in the most beautiful city in Africa, and you come online to ask what to do on a day like this?!
My point was that there are endless things to do in this amazing city. I've said it before, and I'll say it again.

I recently discovered Do Stuff in Cape Town - an awesome site that lets people add activities, tag them, rate them, add photographs and descriptions, and allows you to search for things by a number of criteria. My friend Megan tried to find a similar site for Johannesburg, and did in fact find a site entitled "Things to do in Johannesburg", which basically boiled down to:

  • Shopping
  • Sun City
  • Leaving Johannesburg for a holiday
Now, I don't want to say anything bad about Johannesburg, but... Well, you know... As Simon and Adrianna say, "Dry, flat and perpetually on fire.". But I digress. I come not to bury Johannesburg, but to praise Cape Town.

A little over a year ago, I wrote about wandering around the cape with Megan. Well, she recently returned, and once again, Cape Town didn't let us down.

Starting on Friday night, we had an awesome Mexican dinner at Panchos in Obs, and then went to Banana Jam for cocktails and drinks with some friends. On Saturday morning, after a bit of shopping at Canal Walk, we drove through to Stellenbosch for the Wine Festival. It was a little packed with students, but we had a lovely afternoon of tasting wines and a few other delicacies (oysters, mmm), then picked up some nice wine, and headed back to Cape Town, where we were having some friends over for dinner.

I have to digress here. Oh, Woolworths, how I love thee. I give you money, and you really impress my friends. For dinner, we made:

  • Starter: Philadelphia cheese with almonds and strawberries, drizzled with honey, on crackers.
  • Starter: Avo wrapped in salmon on a bed of rocket, with a lemon wedge.
  • Mains: Fettucine with pesto, sun-dried tomatoes and feta, with a greek salad and garlic bread.
  • Dessert: Pecan-nut pie with ice-cream
And while I am a little proud of that, I'll come right out and say that I couldn't have done it without the love and support of Woolworths, who always believed in me.

On Sunday, we went to Pastis - a lovely french restaurant in Groot Constantia - for breakfast with Paul and Kerry-Anne Gilowey, and Deon and tink, and thence to Cavendish for a bit more shopping (I sat in Mugg and Bean). When we were done there, it was still an awesome afternoon, so we drove down to the Radisson Hotel, where we had cocktails in the sun, and walked along the pier as the sun set. Finally, to top off the weekend, we went to Beluga for sushi and more cocktails. (Unfortunately, due to a misunderstanding I had with an airport luggage attendant (he must have thought that the camera in my bag belonged to him?), there was no photographic evidence like last time.)

Now, you'd think that I'd just about said all I could about Cape Town. But you're wrong. A week ago was Heidi's birthday, and a bunch of us went to Grabouw for the weekend. To say that it was beautiful will not suffice. We stayed in charming cottages nestled in a clearing in a pine forest, next to a lake in the mountains just outside Grabouw, and it was lovely. Jacques took this incredible panorama:

Grabouw Panorama

I don't think I can say anything to top that, so I'll tip my hat, once again, to the Cape, and stop.

Yes, we can.

Senator Barack Obama has won the race to become the nominee of the Democratic Party in the United States of America. Today, Hilary Clinton threw her weight behind him:

"Today as I suspend my campaign, I congratulate him on the victory he has won and the extraordinary campaign he has won," Mrs Clinton said. "I endorse him and throw my full support behind him and I ask of you to join me in working as hard for Barack Obama as you have for me."
I can't really tell you why I'm so hopeful for Obama. Maybe it's because people I really respect have come out and endorsed him - several times - breaking their usual non-political stances in several instances. But I've read about him, and I've watched his speeches (transcript here), and I'm optimistic about where America is going.

If you haven't seen the video before, watch it now: yes, we can.

America, so unwell, but still able to thrill us when you get it right...

Just do it

If you have any spare clothes (and I know you do), or any spare cash (and I know you do), please, PLEASE, help out. There are thousands of people left with no homes, and nothing possessions but what they're wearing. Most supermarkets should have donation boxes, but for more ideas of how to help, check out the Treatment Action Campaign site, and there's even a facebook group for you.


Phoblog: Weekend in Stanford

A champagne breakfast out of town in Stanford on the Garden RouteOverberg. Nothing more relaxing.

Pictured: Danni Davies, and our bottle of Poingracz. Not pictured: Matth Gair, Emily Davies, Shannon Morreira, James Reeler, and yours truly.

phoblogged image

phoblogged image

Phoblog: The mighty Stephen Hawking

You can't really make him out, but that is totally my man MC Hawking up there on stage. He's presenting a talk entitled Universe. It's awesome.

phoblogged image

May GeekDinner

As I said on the GeekDinner announcement list:

Since the last GeekDinner was held at the end of March, and since we hold the GeekDinners bimestrially, it seems we are due another one at the end of May. This is the eightthhth GeekDinner, and we're calling it "Happy Habanero". What with the habanero being the national vegetable of Azerbaijan, we're going to hold the dinner on Azerbaijan's Republic Day, which, according to wikipedia, is Wednesday, May 28th.

The venue for this dinner is Mel's Kitchen, in Rondebosch Village, just off Klipfontein Road.

As usual, you can sign up, and check on the other details, on the wiki page.

We're now in our second year of GeekDinners, and they seem to be going strong. We have a good model, mostly sustainable, although it is slightly dependent on the core group of organisers to get things moving. We have a solid set of regular attendees that should provide the dinners with enough momentum to continue, though, should anything happen, and I'm very positive about the future of the dinners. We're also managing, for the most part, to keep talks short and interesting to all comers - I know that newcomers always worry that everything's going to be "too hardcore techie", but honestly, it's not about microchips and "ones and zeroes". My favourite talks have been about hippies and the buttons on car radios. So, please, if you haven't been before, why not come along, meet some new people, share some free wine, and enjoy some excellent food.

The slideshow karaoke has become a regular feature of our dinners, and is always one of the most entertaining parts. The way it works is, somebody prepares a set of slides on any topic they want (we've had "Etiquette when dealing with British Royalty", "Common problems with cement tiles", and "A primer on lesser known Norse gods"). Somebody else then presents a talk based on these slides without any prior knowledge of the topic, or of the content of the slides - always to amusing effect. This time, Darb is preparing the slides, and we have yet to find a volunteer to present them. If you're keen, do volunteer. If not, maybe you have something interesting you'd like to talk about anyway - we have no volunteers for speakers yet.

If I've sold you, sign up on the wiki, and we'll see you there!


An apology

The sharp-eyed among you will have noticed that my blog has suddenly become one of those sites. I apologise for flooding your feed readers with pictures of seals, but let me explain.

A justification

The whole "let me post random photos from my life on my blog" thing was more an exercise in "how easy would it be to make a phoblog?" than a desire to share what my shoes look like. I will admit that when I took the sunset photo, I thought "this would be a really good thing to share with the world", because, let's admit it, Cape Town is one ridiculously beautiful city, and people need to hear that. But that got me thinking how easy it would be to make a photo shareable, and here is what I came up with.

An explanation

There is actually a function on my phone labelled "blog this", but I think it sends the image (or whatever) to a Sony-sponsored blogging site, and I'm frankly not interested in that. I wanted to solve the problem academically, for the general case, and as a side effect solve it for my specific case - I run this blog in a drupal instance on my own server hosted with Layered Tech.

A discussion

So, the various ways to get information from my phone to my server were MMS, email, some form of push to a web-page, or bluetooth/cable upload to a laptop/desktop which will send it on. The last option defeated the point - I wanted to be able to blog a photo from anywhere, using nothing but my phone. Using the web-page push is what the "blog this" function does, but for my specific case, I'd have to write a custom application for the phone, which was way more effort than I wanted to expend. Sending an MMS would require me to have a GSM modem listening somewhere to receive it, and had the added disadvantage of requiring that the images got resized down. So, it seems, the best way to get the information from my phone to my server was to simply send an email (with images attached).

A technical discussion

The rest of this post describes the technical details of what happens to the email when it arrives at my server.

As an overview: I catch mail meant for the phoblog using a procmail recipe, and pipe the mail to a python script, which parses the message and pulls out the relevant parts, constructing the body text, creating thumbnails of the images and saving them in the right place. Having deconstructed the message and constructed the blog post, it passes the bits (title, body, and publication date, which it extracts from the EXIF information in the photos) to a PHP script, which hooks into the Drupal API and actually creates the blog post.

The PHP script is necessary, since there's no other way to hook into the Drupal API. I could do something like faking a bunch of HTTP GETs and POSTs, and passing the information in as if I was actually blogging it from the web interface, but that's even more klunky than simply piping it into a PHP script. The question then arises why I couldn't write the whole thing in PHP, and save myself the expense of running two scripts requiring two different interpreters, but frankly, trying to get PHP to do what is necessary would end in such an inelegant, ugly, hackish result that it just wouldn't be worth it.

An added advantage to separating the Python parser and the PHP script is that you can replace the PHP script with one that injects an entry into a different blogging platform, and it'll still work fine. So, somebody could write a script that talks to Wordpress, and simply drop it into place.

The injector (the PHP script)

The PHP script needs to hook into the Drupal API, so we first need to bootstrap into the Drupal environment. First we fake some HTTP headers in the $_SERVER array so that Drupal knows which site is being "requested" (Drupal does some clever multi-site stuff based on which URL is being requested). Then we change to the Drupal base directory (defined as a constant at the top), include the bootstrap code (also defined at the top), and then simply run the drupal_bootstrap() function:

// Defined as a constant, could/should be passed as an option or loaded from a config file:
// Fairly standard for Drupal installations, but as above:

// Fake the necessary HTTP headers that Drupal needs:
$drupal_base_url parse_url(PHOBLOG_DRUPAL_URI);
$_SERVER['HTTP_HOST'] = $drupal_base_url['host'];
$_SERVER['PHP_SELF'] = $drupal_base_url['path'].'/index.php';

// Change to Drupal root dir.



Now we are running in a Drupal environment. The next step is to collect the information that we want to insert as a blog entry. We take the title and publish date from the arguments passed to the script, and then do a loop to read the body from standard input:

$subject $_SERVER['argv'][2];

$fp fopen('php://stdin''r');
$body "";
$line fgets($fp4096)) {
$body .= $line;


I may be wrong, but I don't think there are any sanitization problems in the above code. Let me know if you can see any? I'm pretty sure I don't need to escape anything, since I pass all variables as-is to Drupal, which does full sanitization before using them. Anyway, the final step is to simply call the drupal node_save() function to save the blog post as a node (passing it some default values):

((object)(array('created' => $date,
'title' => $subject,
'body' => $body,
'teaser' => $body,
'format' => '3',
'uid' => 1,
'type' => 'blog',
'status' => 1,
'comment' => 2,
'promote' => 0,
'sticky' => 0)));


My only worry there is that I specify that the format is type 3 (unfiltered HTML) - this might leave the phoblogger open to code-injection exploits. I should probably specify type 1, filtered HTML, to make sure that nobody can accidentally blog something nasty.

So, that's the PHP script that injects the entry into Drupal. The other part of the system is, of course, the Python script that parses the email in the first place.

The parser (the Python script)

I'm not posting the full script here, for a number of reasons, mostly to do with it "not being finished yet". It works, but it doesn't do everything it should (including a complete security check, since that's kinda hard to implement on emails, which can be faked). Suffice it to say, it uses the optparse, ConfigParser and logging modules to be nicely configurable, runnable, and debuggable, and all that. But, yeah, I'm still embarrassed about it, and won't post sourcecode until I think it's good-looking enough for public consumption. What I will post here is bits of python code that demonstrate the actual meat of the thing - how I deconstruct and process the email that I receive.

The basic steps I perform are:

  1. Break up the email and extract the bits I need from it.
  2. Process each attachment part:
    • Text attachments get HTML-ified
    • HTML attachments get inserted as-is
    • Image attachments get thumbnailed, and the thumbnails and originals get stored somewhere web-accessible, and a chunk of HTML that references them gets created.
  3. Send the results of this processing to the injector script with the right subject and date.
Breaking up the email is trivial using the email module in python:

import email
msg = email.message_from_file(sys.stdin)
subject = u''.join(unicode(part, encoding or 'us-ascii') for part, encoding in email.header.decode_header(msg.get('subject')))
msgfrom = email.utils.getaddresses([msg.get('from')])[0][1]
msgid = msg.get('message-id')

for piece in msg.get_payload():

As you can see, no regular expressions needed to match headers, do MIME decoding, or break up an email address. You can even give it a list of all the different stupid formats for addresses that mail clients seem to use these days, and it will understand them:

>>> getaddresses(["", '"Jonathan III" <>', ' (Benedict)'])
[('', ''),
 ('Jonathan III', ''),
 ('Benedict', '')]

I break each attachment up and send them to the processpiece() function one at a time.

Inside the processpiece() function, I can get at the content-type of the chunk I'm processing by using the get_content_type() method:

>>> piece.get_content_type()
>>> piece.get_content_maintype()
>>> piece.get_content_subtype()

and I can use this to work out what I want to do with the chunk. I can also get the chunk in its raw form (i.e. decoded from the MIME transport that email uses by simply calling get_payload() on it:

payload = piece.get_payload(decode=True)

If it's text, I simply replace all the newlines with HTML line breaks:

payload.replace("\n","<br />\n")

The difficult case is, of course, when it's an image. Here, I use the Python Imaging Library to process the image. I extract the EXIF timestamp and turn into a datetime structure, so that I can create a hierarchical directory tree to store the images. Then, I construct a thumbnail filename and create the thumbnail:

payload = piece.get_payload(decode=True)
image =

timestamp = datetime.datetime.strptime(image._getexif()[EXIF_DATETIME], "%Y:%m:%d %H:%M:%S")
self.entrystamp = timestamp

targetdir = "%04d/%02d/%02d" % (timestamp.year, timestamp.month,
   os.makedirs("%s/%s" % (TARGETDIR, targetdir), 0755)
except OSError:

fname = piece.get_filename()
(rootname, ext) = os.path.splitext(fname)
ext = ext.lower()
fname = "%s%s" % (rootname, ext)
thumbname = "%s-thumb%s" % (rootname, ext)"%s/%s/%s" % (TARGETDIR, targetdir, fname))
os.chmod("%s/%s/%s" % (TARGETDIR, targetdir, fname), 0644)
image2 = image.copy()
image2.thumbnail([THUMBSIZE,THUMBSIZE])"%s/%s/%s" % (TARGETDIR, targetdir, thumbname))
os.chmod("%s/%s/%s" % (TARGETDIR, targetdir, thumbname), 0644)

Then I return a templated chunk of text to dump into the blog post. Easy as pie.

The last step is to pipe the individually formatted pieces to the injector script, passing it the date (extracted from the EXIF information above) and subject as parameters:

injector = subprocess.Popen([ADDCMD, entrystamp.strftime("%s"), "Phoblog: %s" % subject],stdin=subprocess.PIPE)
for piece in body:

And off it goes.

Some concerns

First and foremost, security is a problem. If I'm sending an email from my phone, anybody can send the same email from their own phone - there is no identification in the email. One way around this would be to require a keyword in the subject before accepting it. This is security by obscurity - anybody who gets hold of the keyword will be in. I can decrease this risk by forcing some sort of hash on the keyword. For example, if the keyword was "pilates", I could require that the number of consonants in the current day be appended to that: "pilates6" on a Sunday, "pilates7" on a Tuesday. This slightly decreases the risk, but not much. There are other, even cleverer variations on this theme, but they are all basically just security by obscurity. A better way would be to use authenticated SMTP, and only accept phoblog messages that were authenticated through my own SMTP server, and I think I might implement this, unless I can think of a flaw in the idea.

Another problem is that I might lay myself open to HTML/javascript/etc injections, but I think this will be allayed if I solve the problem above.

A conclusion

This has been a somewhat rambling, somewhat disjointed explication, but I hope it gives you the general gist of what I did. If I ever look at the script again, maybe I'll fix it up properly, and make it publicly available. I even registered but that's taking some time. Meantime, enjoy piccies.

Phoblog: Camps Bay

My sister and I went to Camps Bay for the afternoon. It was extremely windy, and we both got thoroughly exfoliated, but at the end of it, we had this magnificent sunset as a reward. I don't think there's a prettier beach in the world than our west coast.

phoblogged image

phoblogged image


Subscribe to RSS - Jonathan Hitchcock's blog