Tuesday, 9 August 2016

An angry rant on the state of housing in London (and most likely elsewhere in the UK)

This was in reply to a friend's facebook comment about salary requirements on rentals:

If your rent is much more than 50% of your income you're going to really struggle unless, at the very least, bills are also taken care of or you plan to overcrowd the flat.

The fact that rent is so high in the first place is the real problem. The government has repeatedly said that it was going to have the private sector build more - although most companies have simply opted to build very high value properties that also aren't going to work for those on low incomes. Social housing could help, but so much of it has been sold off - especially in London - that waiting lists are extremely long.

The Tories have been ideologically opposed to social housing so they're not likely to help the situation and instead seem content to build £450k "starter" homes. Even New Labour was at best luke warm about it. I think it's worth pointing out that Tony Blair made a personal fortune from the property market representing a blatant conflict of interest.


Which, incidentally, is one of the many reasons people have decided the Labour party needs to shift away from its previous status quo.

 The current government and their contractors still have yet to deliver their Ebbsfleet settlement and judging by the view when I go past there between London and Chatham progress is very slow - apparently their target is 300 homes to be completed this year out of 15,000 in total.

Gentrification is also a substantial issue, especially with welfare caps coming into force soon which will almost certainly displace poor sections of the population. In 2014 it was reported by the BBC that over 80,000 residential properties were left unoccupied (http://www.bbc.co.uk/news/uk-england-london-28349374).

All this while homelessness has doubled over the period of Tory government and mayor in the capital. Sadiq Khan seems to have become a bit quiet on trying to solve the issue and it may simply be that as mayor he doesn't have the power to resolve it.

I'm very disappointed that the Northern Powerhouse project appears to have been canned (although it did appear to be mindbogglingly incompetently managed) as a second strong city I believe is necessary to "take the load off" London for people who want to have the kinds of career prospects you often only find in London and other international capitals.

 The situation as it stands in my opinion represents decades of failure, an ideological obsession with increasing house prices and the frankly arbitrary privatisation of everything (also frustrating: when this happens in the context of a single-payer "market") - progressively making it harder and harder for people to get affordable housing. At best, the situation is incompetence - at worst it is a cynical attempt to keep artificially extracting value from the property market at the expense of ordinary people.

And breeeeaaaathe.

Thursday, 4 August 2016

Thoughts on Labour Cardiff leadership competition hustings

While, unfortunately, not a lot of new information was presented in these hustings it rather sums up how the debate has gone in general thus far. It is telling that the hashtag "#IAgreeWithJeremy" has been trending for a couple of hours now as primarily that was the theme of the debate. To understand this, you have to understand the history of the competition  as it started out with a leadership coup - a deliberate attempt to force Jeremy Corbyn to resign through media smears and coordinated resignations. Smith's attempts to emulate Corbyn's policies in this light come across as a cynical attempt to convert Corbyn supporters as Corbyn is currently set to win the leadership contest by a landslide just as he did last year. So from this point on-wards I will focus on the differences between the two candidates:

The EU was a primary point on which the candidates disagreed. Corbyn is of the opinion that we should respect the outcome of the brexit referendum whereas Smith believes that we should hold a second referendum with the option of pulling out before triggering article 50. While many of us were pro-remain (including myself) there are a few issues with Smith's stance - primarily if he is talking about a snap election (which is highly speculatory in itself), it's worth noting that two thirds of constituencies across the UK voted  to leave. Unfortunately this means that in the context of a general election, the single most divisive subject in recent political history will be significantly stacked against Labour simply because of the first past the post electoral system. The other issue that I have with it is that I believe Smith must know this - he also knows that whether or not to respect the referendum is a divisive issue in the Labour party. This is a classic "wedge" strategy, designed to split the pro-Corbyn vote. In light of all this, I am strongly of the opinion that Labour is much better positioned, in the context of a snap election, to campaign on a platform of ensuring and even improving worker's rights and providing a substantial fiscal stimulus to offset the negative financial aspects of the referendum.

There are other points of contention over Brexit such as the controversial TTIP trade deal which, in a leaked draft which was published on the BBC website, indicated that certain public health services including hospitals, if they have been privatised, effectively cannot be brought back into public ownership. If a future government does move back to a single-payer system, then the private company would be allowed to sue the government on the basis of lost profits because of unfair competition. This is effectively a form of "ratchet mechanism" ensuring that public services are run more and more by the private sector. In 2014, David Cameron was very fond of the TTIP trade deal stating that he would put "rocket boosters" on it - so presumably it is the case that the Conservatives are in favour of this kind of ratchet mechanism which puts road up blocks to single-payer health systems. Labour should be putting across the point that they will negotiate trade deals which will not undermine our valuable public services.

A moral obligation of us all, I believe, is to ensure that EU citizens who have settled in the UK and UK citizens settled in the EU should have their rights protected. I believe Labour is much better positioned to do this if they make this a negotiating target rather than going into a general election with a promise to deliver an extremely unpopular referendum.

A problem I had with Smith in particular was that he is too willing to pay anti-immigration sentiments lip service. It came across as though he wanted to appeal to those on the right but does not seem to have any particular idea about what to propose simply saying that he "would not put a finite number on it" when speaking of immigration caps. This seems both at odds with his stance on the EU but this kind of rhetoric is also the kind of thing that has enabled the infamous post-Brexit racism. By contrast, Corbyn channeled Diane Abbot drawing attention to the issue that the immigration policies for those outside the EUs are so restrictive that they stop families from re-uniting.

Another point of significant disagreement was over the trident nuclear deterrent. It is of course not particularly clear how functional it actually is as a deterrent and does cost a large amount with estimates of around £205 billion in costs at a time when we're making massive spending cuts in other areas. Cynically I'd suggest that our biggest nuclear threat is most likely to be Donald Trump acting on his "first strike" nuclear policy and sparking a war - of course that doesn't help us so much as the dead reckoning system on the trident missiles relies on US satellites to calibrate, it is not a particularly independent weapon. The immediate callousness of politicians and their willingness to "push the button" comes across to me as oddly remorseless. It is also the case that primarily our national threats are greatly dispersed, our primary military involvement is in the Middle East and our war against ISIS for which nuclear weapons are grossly inappropriate.

On anti-Semitism within the Labour party, Smith said that he thinks the party should take a zero-tolerance approach and act immediately. Corbyn is of the stance that members should be allowed due process, under his leadership members have indeed been suspended rather swiftly. The socialist Jewish outlet Jewish Voice tweeted:
Fiscal stimulus is another area where they disagree somewhat - while they both agree  that spending packages are necessary, Corbyn proposes a £500bn package involving the creation of a national investment bank whereas Smith is slightly more conservative in suggesting a £300bn spending package.

In general I felt that the hustings largely just reflected the overall debate that we've had so far with fairly little deviance between. In my estimation the crowd seemed to respond more positively toward Corbyn than towards Smith. Some of the points Smith made, particularly on immigration, echoed back to a recent episode of newsnight where he considered "small-c conservatism" to be something he advocated.

Smith also advocated "good, old fashioned socialist policies" although I do not think "old fashioned socialism" is really something many want to get behind.

Smith has a long way to go to win this contest in my estimation, and this charade continues to do more damage to the Labour Party than it is ever likely to resolve.

Sunday, 3 July 2016

Murdoch media rallies for people to join... Labour?! The chicken coup goes cuckoo

In a slightly bizarre turn of events, the Conservative leaning The Sun and The Times newspapers owned by News UK/News Corp./Rupert Murdoch have suddenly started advocating that people give their hard earned to the Labour Party so that they can join and vote against Jeremy Corbyn.

This is part of the overall Labour coup narrative - the Labour MPs failed to find a way to oust Jeremy Corbyn without a contest, instead holding a "vote of no confidence" in the style of a secret ballot, which has no binding outcome in the rules of the party.

The article in The Sun was written by rebel Labour MP Gloria De Piero, in which she makes an emotional appeal to "give Labour the champion they need" whereas the article in The Times is hidden behind a paywall and encourages readers to "Join the Labour Party to topple Corbyn" and appears to be making some kind of comparison to the First World War. It is not clear at this time whether these articles will appear in print.

This appears to be a coordinated attempt to get right-wing entryists to join the Labour Party in order to have a pro-establishment candidate elected as leader.

Taken from thetimes.co.uk at 03:50 BST

Taken from thesun.co.uk at 03:50BST

The Parliamentary Labour Party have maintained that Corbyn is "unelectable" as the sole motivation for a new leader and this line has been repeated by the media since even before Corbyn's nomination, although by-election results and mayoral elections indicate that the party has gained popularity under Corbyn. Corbyn was also voted in by an overwhelming majority in his leadership contest and remains very popular with the membership even today.

He is the simultaneously "unelectable" and overwhelmingly elected leader - loved by members, but not by the establishment.

 It's no secret that the right-wing of Labour have had good relations with Murdoch as we saw in the 1997 general election when they backed Tony Blair as the prime ministerial candidate. So, too, do the Conservative party have good ties with the Murdoch press. The motivation to stop the possibility of a left-wing Labour party is a well known position of the former prime minister Tony Blair, who many of the Labour MPs were nominated under, that he does not want a left-wing Labour Party to take power.

The timing seems suspect as we are awaiting the release of the Chilcot Report on Wednesday 6th July.

And there have been reports that members of the Parliamentary Labour Party have used psychologically abusive tactics to "break him as a man" in order to encourage him to quit.  Although, as we have seen he decided to carry on regardless.

This is very serious stuff. In a post-Brexit world where we do not have the EU's guarantees of our working rights like sick pay, holiday pay, holiday allowances, limits on time worked and maternity leave a strong Labour movement which really values and upholds worker's rights and supports unions is a must. We cannot take these things for granted.

A Blairite Labour party has shown that it will just toe the line with the Tories and cannot be trusted to stand for our rights. Centrism is no guarantee of electoral success, as we saw under Gordon Brown and Ed Miliband in the 2010 and 2015 general elections respectively - especially in a world where the recession has been pushing people to either extreme. We are in a period of massive upheaval. Allowing Labour to be manipulated by The Sun and The Times is not something we should accept either in the Labour Party or in our country - it is an affront to our democracy.

Sunday, 10 April 2016

A hybrid representative/direct democratic model

There are some problems with the way that we currently implement representative democracy in parliamentary democracies in many countries, including the UK. Part of the issue with this is that your representative is not always going to align with your viewpoint. For instance, I am currently in a constituency with a Conservative MP who is very loyal to the party line and who I am unlikely to change the views of by writing to them. For instance, in a previous post I made, I advocated for proportional representation - however, my MP has come out in favour of FPTP. In some sense, that means that my representative cannot effectively represent my views because of an ideological divide.

Now when you look at direct democracy, where voters can vote on propositions/bills directly, that has some benefits in the sense that it directly acts on a voter's viewpoint. Although it does have some problems such as tyranny of the majority and people who do not vote on particular bills or don't have the time to keep up to date on every little detail of every issue (i.e. most people) end up not having their views represented properly.

The idea that one of my colleagues suggested to me was this: For a particular bill, an MP would have as many votes as the amount of people in their constituency - when an MP votes, they cast all of those votes on their constituents' behalf. However, if a constituent wishes to, they have the option of voting a different way to their MP. So for instance if your MP is voting to cut welfare, then you would have the option of voting the opposite way to them. This also means that if you aren't interested in a particular issue, then you're still represented by your MP. This may also help to balance out "tyranny of the majority" since the representatives are still likely to cast most of the votes on most issues.

The main argument against such a system seems to be that historically it would have been difficult to administer. These days, however, setting up an electronic software system to do it is easily within the realms of possibility. It seems like it would be a good candidate for giving citizens more of a say in the way that their country is run without some of the drawbacks of direct democracy and to help give people power to counter other forms of democratic deficit.

I've had trouble finding any systems that work like this in practice, so if you know of any, let me know! This hybrid democratic model may well be worth voting for.

Thursday, 10 March 2016

People under Proportional Representation 11% happier than those under First Past the Post systems

Having recently come across the fact that Denmark had (although now it would appear to be Switzerland!) the highest happiness rating in the world and that it uses a proportional representation - and it certainly seems like having your voice heard could somehow correspond to happiness - I decided to investigate whether there was a link between proportional representation systems and happiness. To do this, I gathered data from the 2015 world happiness report, which countries use the List PR system (from IDEA, 10/03/2016) and which countries use FPTP (from IDEA, 10/03/2016).

Briefly, proportional representation is a system whereby the number of representatives selected for parliament is proportional to the amount of people who voted for that party. First past the post is a constituency based system whereby members of parliament are selected based on a vote taken in some geographical location; in this system a single MP runs for a particular area. If you live in the UK or USA then you are under first past the post.

Read more on FPTP vs PR

I made a reasonable attempt to make sure as much data as possible could be linked to either of these systems although a significant number of countries did not take part in the world happiness report and so were ignored. The means of the happiness scores were compared in this analysis.

Findings: PR had an 11.56% higher happiness rating than FPTP and 4.8% higher than all countries combined.

Happiness of different electoral systems (NOTE: Non-zeroed graph! Pay attention to scale - I can't figure out how to fix it and feel kind of sick anyway so...)
However, there is the caveat that the difference between the happiness given by the two systems does not exceed the standard deviation.

Countries with FPTP include the United States, the United Kingdom, Canada and India
Countries with PR include Switzerland, Denmark, Sweden, Iceland, Austria and Russia

Other notable countries include Germany who have their own system

So what does this say? It seems to suggest that countries with proportional representation systems are more likely to be happy. Certainly this is a correlation and not a causation - although a plausible cause is that people who feel they are adequately represented in government are more likely to be happy although there are likely to be many confounding factors including the country's history. It seems to be the case that Proportional Representation tends towards creating coalition governments who tend to have to come to consensus based policies rather than guided by ideology or party bias.

That being said, I support proportional representation and I hope you will too!

Download the data

Sunday, 24 January 2016

The frustrating, fragmented state of programming for mobile devices

If you want to program for a mobile device, you'll find a frustrating set of trade-offs. To introduce this topic, I'll introduce some of the major platforms for the mobile ecosystem.

The native platforms:

Android SDK 

If you go this route, you're stuck with Java. The Android SDK for whatever reason is tied completely to the Java programming language, despite Oracle using it as a rod to try and beat Google with. The API that it provides is fairly usable and there are a large number of tools which make this quite an easy process. However, this is only if you intend to target Android devices and nothing else.

Android NDK

It's curious that Google doesn't put more work into this, it seems that they try to do everything to discourage developers from using it. This is partly because applications which are developed this way will not make architecture agnostic executables. Nonetheless, the NDK has a lot of potential as a LLVM compatible compile target which could support a number of languages targeting it. However, the Google supported libraries with this are limited, it is essentially the case that you call NDK code from an SDK developed application putting limits on what you can do with it. There are some positives in that you can at least write applications using SDL, for instance, this way.


Again this is a similar situation as with the Android SDK. You have a couple of options here, you can choose to write applications using Apple's latest and greatest Swift language or you can choose to use Objective-C. Because Objective-C is compatible with C, it is also possible to write applications in C (just like with Android).  Again, though, choosing to use the native libraries ties you to that target platform.

Windows Phone

C# or something. I'm not really familiar but I assume that it's pretty good and again totally analogous with the iOS and Android situations.

What you probably notice here is that all of the provider supported phone platforms have basically zero interoperability with one another.

This goes fairly deep as Google's version of Java does not rely on standard .class files full of Java Byte Code, but instead packages code into its own Dex format (which incidentally is not compatible with any platform bar Android). The consequence of this is that, while the platform is very well optimised with Java code, no other languages in the Java ecosystem are compatible with it (which rules out Clojure, Scala, JPython, JRuby, and so on).

So we've ascertained that the standard toolkits are incompatible with one another. What are we to do? Well there are a number of cross platform SDKs:


Xamarin is the most popular/best marketed cross platform framework for mobile development. It has the major advantage of creating applications with a "native" look and feel, but unfortunately is not free. It also has the caveat of only supporting C# and since it is a closed platform solution, it is unlikely to gain any developer support in terms of supporting other languages. It also seems to only provide a thin layer of abstraction between Android and iOS, meaning that you'll still have to write a large amount of platform dependent code unless you can shoehorn it into their forms framework.


Qt has been around for a long, long time on the desktop and you can program mobile applications with it, too. Applications that you create with it will have a native look and feel, and indeed it's open source so you can use it for free. Again though, it does very little to provide developers any flexibility in terms of the tools they can use with their project and you will be using their QtQuick QML and ECMAScript/JS dialect to write your applications.


There are ways to bundle your webpage into an app if you want to. Cordova is one such technology although its documentation is for whatever reason mindbogglingly obtuse to for something which you would want to use to simplify your workflow. There is also the caveat that such applications cannot resemble the native UI, and they will by necessity be running in some kind of VM which may harm battery life (although I cannot confirm this). Attempts at simplifying this include PhoneGap and Intel's XDK - even then these are not exactly seamless


LibGDX is a Java framework primarily for games which targets Android, iOS, the web (using GWT) and the desktop. It does what it does very well, giving a unified interface to create games for many platforms. However, it has the caveat that it is domain specific (you can see this as a strength or a weakness). It also has a user interface library which you can use to create stylised (but very non-native looking) UIs. This is a strong candidate if you're a game programmer who wants to target multiple devices.


While there are a plethora of solutions for creating different kinds of applications for the mobile platform, some of them even interoperable with desktops, it's striking that there's also no highly unified, open way of creating mobile applications which allows you to use your own tooling, your own choice of language - essentially what I'm trying to get at here is that while there are several highly targeted platforms for mobile development, they are all quite tied down by their limitations. This is not the same on the desktop where you can have a new language, for instance Nim, which can be made compatible with all of your existing libraries through foreign function interfaces or you can develop native-look applications with any of a multitude of free libraries which have wrappers for a vast amount of programming languages.

Even Java, the venerable advocate of portability, has been torn apart by this situation where under Android its implementation is highly non-standard, its implementation is far behind the language specification (Java 8's first stable release was in March 2014 and is still not supported even though it is the platform's major language; the JEPs for the language dating as far back as 2011) and its ecosystem is barely supported at all (with the notable exception of its IDEs). Nobody seems to be attempting to write backends for other major programming languages which target the Android Dex bytecode format. There is, for instance, no Dex backend for LLVM (at least not that I can find).

It's hard to tell what the future holds - I imagine that in the distant future it might turn out that WebAssembly is used as a standard target running in a small VM on phones. Ultimately it would be good if the companies involved could band together and attempt to standardise the situation somehow but of course they have vested interests in trying to make developers focus on one platform or the other. It's important to remember that the reason this happened on the desktop is because the x86 architecture became dominant and everybody just targeted that. In this brave new world of hardware agnostic phone OS vendors that is no longer possible. Of course it's a good thing that hardware vendors can be competitive in the mobile devices industry, but the fact that the abstractions don't play nice together is problematic.

It is worrying that the major player with regards to cross-platform compatibility seems to be Xamarin with their closed, pricey, solution that still requires you to write a lot of device dependent code. Frustratingly it seems that the best solutions at the moment are either to write your application n many times for the platforms you wish to target or use the web as a target since that is also supported everywhere - Qt probably offers the best trade off between these solutions as it stands and LibGDX is great if you're interested in implementing a game.

Wednesday, 23 December 2015

Nimble Explorer

Nimble Explorer is a small website I've knocked up which allows you to search for packages for the Nim language contained in the its package manager Nimble. It's written almost entirely in JavaScript and Nimble, making use of JSONP to retrieve the Nimble's JSON file from Github with a backend which caches the JSON file for browsers which do not support JSONP properly as a fall-back.

It uses Fuse.js to power its search, and explorer.js (the front-end JS file for nimble-explorer) enhances this somewhat by implementing a search narrowing mechanism (specified by space separated words) and searching for tags. The search mechanism was quite easy to work with, although required some tweaking before it worked sensibly.

At this point it's quite usable, and will even work in many browsers in Google's cached version of the page (which is useful in case Linode, my host, decides to perform some surprise maintenance).

This is also the first time I've set up a web deployment mechanism using Git and it's working very smoothly which is nice