The UK Referendum on Leaving the EU

I want to record my thoughts on the UK referendum, so that in the future I can refer to them, and remember my feelings in the immediate aftermath.

I was going to the Glastonbury festival on Friday 24th June. Normally I go on the Wednesday, but this time I’d just come back from Montreal the week before, so I left it until later. On the Thursday evening, I started watching the results, but ended up watching all night, in some disbelief. At Glastonbury, the mood was sombre amongst my friends and the people we met, and amongst the performers who spoke out.

I think my overwhelming feeling was one of loss: I thought we were all in this together, we being Europe, and then the world. This felt like a step backwards, splitting apart instead of coming together to work out our problems. I wanted our borders, a purely human divisive contrivance, to become less important, not more. Of course, in this day and age of increasingly easy mass communication, this is not really going to happen unless civilization takes a severely different turn, which I hope is unlikely.

My perception is that people voted to leave the EU for a variety of reasons, not all of which are compatible. In the process of leaving, some of those who voted to leave will be dissatisfied. For those on far enough left of the political spectrum, the EU is too right-wing; for those far enough on the right, the EU is too left-wing. I think those on the left disapprove of TTIP, and the effects of global capitalism. I’m not sure what those on the right exactly disapprove of. I did entertain the idea that some were still hoping for the return of the British Empire, then dismissed that thought as insulting. To my astonishment through the referendum campaign, I realized that there really are some in that camp.

Undoubtedly one of the key reasons people voted to leave is immigration. David Cameron promised in 2010 to reduce immigration to the tens of thousands per year, a policy with which I broadly don’t agree. The promise was reiterated in 2015. The failure to do this was blamed on the EU. Yet we have more immigration from outside of the EU – only slightly more, but still more. Even the immigration over which we already have control has not been reduced to the “tens of thousands” per year. Why not? That is just abject failure and dishonesty on the part of the government – making a promise on which they know they can’t deliver. Then it was used as a stick with which to beat the EU.

Another reason was to vote leave was to save the money contributed to the EU. This rough figure is easy enough to estimate, event if the Leave campaign got it wrong by “forgetting” to subtract the money we get back. Even then the figure doesn’t take into account the benefit to us of being within the single market, the growth in the economy that otherwise wouldn’t have happened. Of course, we don’t really know how big that the effect was, we can only speculate. Then the question is, is it worth contributing £160 million per week? If we leave, will we actually save that amount, or will it be eaten away by other costs and expenses?

Perhaps the biggest message was “taking back control”, “loss of sovereignty”, which included immigration. As noted, we couldn’t even reduce the immigration over which we already did have control. In my life in Britain, I’ve never lived in a place where my vote in a general election had any effect. Growing up in South Wales, Labour would always win. Since I started work, I’ve only lived in constituencies where the Conservatives always win. Under the first past the post system, I vote, but it has no effect. Conversely, my MEP is elected by proportional representation. We are largely governed by the privately educated; the head of state inherits his or her position, and the second chamber of parliament is full of appointees. I don’t want to give more power to this leadership – the EU is more democratic.

I subscribe to the Economist. One article referred to a report written by the Open Europe, which I downloaded and read significant parts of. It seemed to be the most balanced analysis of the impact of the UK leaving the EU. It also contains what I feel to be a key statement:

“If the UK puts as much effort into reforming the EU as it would have to in order to make a success of Brexit, the UK and the EU would both be far better off.”

To make the most “success” out of leaving, we would have to abolish or reduce regulations on subjects like environmental and employment protections and climate change mitigation. Those are not topics on which I wish to see less regulation. Over many important aspects of decision making, we already had control – it was our own government not the EU that dictated our position. The EU was just a scapegoat.

Instead of making a concerted effort to make a better EU, years of effort will now be put into unnecessary legal process and trade negotiations. This could take the best part of a decade, the only winners out of which will be the lawyers, politicians, trade negotiators and accountants. Maybe some company board members will accrue a few more millions as a result of reduced employment and environmental legislation. It looks like we’ll get a watered down version of the Universal Declaration of Human Rights, which British representatives helped to draft. According to this entry at the British Library, “British representatives were frustrated that it had moral but no legal obligation” at the time of the original drafting. It sounds suspiciously like we think it’s good enough for everyone but us.

One of the biggest frustrations for me is that no leading campaigner had any specific plans for leaving. There are innumerable options, with various pros and cons, some of which outlined in the Open Europe report. People voted to leave on the expectation that some or other promises would be delivered. In reality, none of them may be: if we end up with a Norway type deal for instance.

Continually, throughout the campaign, I saw people repeating the myths and legends about the EU. The cabbage regulations, the lack of democracy, the £350 million a week we would save. I did think that at least leaving would mean people would stop blaming the EU for everything, but in the aftermath of the vote I realize that even this hope will probably be in vain.

You might have noticed that I haven’t used the term “Brexit”. I can’t bring myself to regularly use that word, because to me it trivializes the whole issue, reduces the impact of the decision to an easily digested soundbite. It’s symptomatic of the whole simplistic leave rhetoric.

Right now, it is quite common to see pro-leave opinion pointing out that the worst predictions of the effects of leaving the EU have not come to pass. This amazes me – not only have we not left; we have not even started the process of leaving; not even decided when to start the process of leaving (by invoking article 50). We could be sitting around in five years time and still wondering if we have actually, really left. I hope we avoid the worst possible outcomes of leaving the EU, but to do so I think we will have to disappoint many who voted leave on the basis of promises impossible to keep.

Using the Eclipse Paho “Test” Broker to Help Test MQTT

I may not have finished all my goals for the test material in the Eclipse Paho project, as outlined in this blog post of mine, but some components are still useful in their current state.

Recently my IBM and Paho colleague, James Sutton, needed to check the behaviour of the Java and Android clients when receiving an error code in response to an MQTT subscribe request. This error code, returned in the MQTT suback packet, was introduced in the last, and current, version of MQTT, 3.1.1. It takes the form of an 0x80 value in the granted QoS (Quality of Service) field, for which only 0, 1 or 2 are valid values – the set of integers which QoS can take in MQTT.

Now you could fire up a broker like Eclipse Mosquitto and configure it to disallow a subscription to a certain topic. If you know the broker well enough, this may be quick and easy. It’s possible you might have to do some fishing around, and figure out whether that broker is actually returning 0x80 as you wanted.

So James turned to the Paho test broker ( in this repo.) (You must use Python 3 to run it, not Python 2). As it stands, this broker will return 0x80 if you try to subscribe to the topic “test/nosubscribe” (see line 322 in That’s pretty easy. If you checked out that file, you will notice another two topics: “test/QoS 1 only” and “test/QoS 0 only”, which will return granted QoSs of a maximum of 1 and 0 respectively. These behaviours can be hard to elicit out of a standard MQTT broker.

Ultimately I guess I should make the specific topics which these responses are attached to configurable, but they aren’t right now.

There are some other characteristics of this broker, which single it out as a “test” broker rather than a product:

  • the goal of the coding is clarity rather than performance. You can tell me whether I succeeded
  • there is no persistence: if you want to simulate stopping and restarting a broker, this broker can just remain running, and disconnect all clients
  • MQTT specification conformance statements are embedded in the code, so that when a test suite is run against the broker, it can tell you which statements were encountered, and which weren’t.
  • the broker has parameters to choose behaviours which can vary but still conform to the MQTT specification:
    1. whether to publish QoS 2 messages on PUBREL or not
    2. whether multiple matching subscriptions result in one publication, or more than one
    3. whether queued QoS 0 messages are dropped if the client is disconnected, or not
    4. whether zero_length_clientids are allowed

    it’s possible more might be added in the future.

The main missing feature of this broker is TLS – but it does have WebSocket support. TLS is on my to do list, as will be updates for the next version of MQTT, 5, which we are working on, and is tentatively scheduled for completion next year.

As outlined in the blog post, this broker is meant to help with broker testing as well, as an oracle.

For some more information, see the Eclipse Paho website for the test tools.

You can use issues on this project to ask for new features or identify bugs, or pull requests to offer your own contributions.