Garvan Walshe was National and International Security Policy Adviser to the Conservative Party until 2008.

Some 40,000 Tamils, civilians as well as combatants, were killed in the last, brutal, stages of Sri Lanka’s civil war in 2009. That the Sri Lankan government’s opponents, the LTTE – distinguished, among other things, as the inventors of the modern suicide bomb – were equally murderous will no doubt impinge upon historians’ judgments of the Rajapaska brothers’ (for there are four of them at the top of the administration in Colombo) successful counterinsurgency, which has been subject to credible allegations of widespread human rights abuses.

But the issue is political, not moral. It has long been known that holding a Commonwealth Heads of Government Meeting (to those in the know: the phlegm-productive acronym CHOGM) there would prove controversial everywhere, except perhaps the presidential palace in Harare. Just in case the officials planning the Prime Minister’s visit had forgotten, the boycott of the event by Manmohan Singh, India’s Prime Minister, should have concentrated minds.

The pictures looked certainly looked good. David Cameron, suitless and tieless, sporting the black shirt that he wore while launching his leadership campaign at the London Wetlands Centre (images consigned to the memory hole by CCHQ), in furious outrage at the Sri Lankan government’s behaviour, demanded an inquiry by the UN Human Rights Council. The Rajapaska Bros. will have little to fear from that body to which Algeria, Russia, China and Saudi Arabia have just been elected – joining among other staunch defenders of civil and political liberty, Kazakhstan, Pakistan and the United Arab Emirates.

Or, they looked good until his car was surrounded by angry women demanding justice for their husbands and sons.

Now this forces me to wonder, is there a meeting planning a visit to Israel taking place?

“Can we get Dave to take a trip down to Gaza after he’s met Netanyahu.”

“Yes, it would help make him seem balanced. Would go down really well on al-Jazeera,”

“But we’d need to leave the arms industry executives behind, Hamas are designated as a terrorist organisation…”

“Good point. We don’t want to upset Theresa.”

That this government’s foreign policy is chaotic is hardly new. There was turning inwards to focus on massive defence cuts, and to build aircraft carriers without planes. Simultaneously looking outwards by expanding the aid budget. Mercantilist support for friendly or useful dictators (a visit planned to the Middle East with arms industry executives, timed to perfection to coincide with the Egyptian revolution). Defence of human rights and democracy (the Prime Minister’s speech in Kuwait, as those same arms execs looked on), then military intervention against suddenly embarrassing useful despots (Libya). Then a surprise return to neo-conservatism (terrorism being a generational threat), to be followed by army cutbacks (announced the day after the generational threat speech).

The Left like to think we’re the evil geniuses we used to be, but the truth is this kind of incompetence isn’t confined to foreign affairs. Among the documents rendered inaccessible by last week’s website purge was something called “Built to Last.” Written in 2006, this was the leadership’s attempt to pretend it had a coherent set of ideas. The general stratagem was to present a series of jarring opposites, thus hoping to look fresh. The results varied from meaningless “We understand the limitations of government, but are not limited in our aspirations for government” to scary: “We believe that government should be closer to the people, not further away.”

It was motivated by what we might call the Sweetshop Theory of Politics. The Sweetshop Theory tells us that the electorate is broken down into lots of little tiny segments. If we give each segment something tasty, then they’ll vote for us.

So, gay marriage and a growing aid budget for the Left. Immigration vans and prisoners’ uniforms for the Right.

The Sweetshop Theory gives us flexibility too. When people say they want action to deal with climate change, we dress up Ed Miliband’s expensive and regressive climate policies instead of designing proper Tory ones. When they worry about the cost of living, we say we’ll abolish them. But, like the widows and relatives of prisoners who surrounded the Prime Minster’s cars in Sri Lanka, voters, if they noticed the PM’s u-turn on green taxes at all, didn’t see it as a gesture to them, but as lack of principle.

Or take education. You can’t say that schools should be free to run their own affairs, and then require them to teach using synthetic phonics. Rather, you can say it, but you can’t do it. You have to compromise. Nor is it possible to demand that banks increase the amount of capital they hold, and wind down risky loans, and at the same time lend to small businesses. Or insist that the British economy needs to export, and then demand that its most successful industry, financial services, focus on the domestic market.

Seen from the spin room, where the world is divided into different constituencies, The Sweetshop Theory of Politics looks wise. Give out five sweets in one direction, and five in the other, and everyone should be happy. It works in opposition, when the goodies are only promised, and the contradictions in them remain buried, like little time-bombs.

But voters think Government is more like maths: add plus five to minus five, and you get nothing.

Politics of course isn’t like maths. Events happen and politicians have to react to them, but when they do, they owe the voters an explanation of why they changed their minds, why difficult decisions have to be made, and sacrifices are a matter of regret. If we don’t come up with one soon, we’ll lose in 2015.