Platypus Header

Platypus Innovation Blog

14 December 2015

The COP21 Paris Agreement - The Full Text

Here is the full text of the final version of the Paris COP21 agreement on Climate Change. Hurrah!

TL:DR; It's a good deal, better than expected. But it has no teeth!

Good points are the goal of peaking and reduce as fast as possible, a sensible target, $100bn in annual aid from 2020, and trying to base policy on science. Weak points are that countries set their own targets, and there are no penalties if they don't meet them. So this is not the end, or even the beginning of the end, but it is perhaps the end of the morass and the start of a solution.

The best thing is the progress. The test is what happens next.

2 degrees does not sound much. Why the worry? To put 2 degrees in perspective, a 4 degree rise would be “incompatible with an organized global community, is likely to be beyond ‘adaptation’, is devastating to the majority of ecosystems, and has a high probability of not being stable.”, according to climate expert Professor Andersen, University of Manchester.

16 November 2015

Are sweat-shops bad?

"Slavery was bad -- I don't think I need to justify that statement too much -- but sweatshops..."
An interesting pub conversation led to the question: Should sweat-shops (and other bad labour practices) be shut down?

I think the answer is yes! -- but it is not as straightforward as one might think.

Why do people work in sweat-shops?
Putting up with low-pay, long shifts, wretched and dangerous working conditions, and where sexual harassment is common and unpunished? Because the alternatives are even worse. So if you close down a sweat-shop, those employees are worse off. The same mostly goes for child-labour

E.g. On the stopping of child labour in football manufacturing:
Some perplexing implications are emerging... said Sajid Kazmi of the Sustainable Development Policy Institute in Islamabad. "And if children cannot work in the football industry they will shift to more hazardous industries." Source: The Guardian, [1] 
If a factory closes down, even a bad factory, the short-term result is worse for the employees. In the West, sweat-shops were the first stage in a rise in living standards -- why shouldn't they similarly be a stepping stone upwards in the modern global market?

Firstly, globalisation has weakened the position of Labour: Moving production is not cheap, but it's a lot easier and cheaper than it used to be (and the constant improvements from automation, internet knowledge, and easier inter-business workflows will continue to make it cheaper). That makes it easier for producers to play one country off against another, thwarting unions and driving down labour pay & conditions. So an improvement in one area may only be temporary, before production moves on to a cheaper more desperate region.

The route historically followed by The West, where better working standards were driven by unions and regional left-wing political movements is no longer as effective.

Secondly, I challenge the idea that imposing standards leads to factory closures. It's more likely to move them (as happened in the football example referenced above).

If a bad factory closes, but a better one opens -- the net effect is that people are better off. Some people are worse (the employees of the old factory who then got worse jobs or no job), but that is counter-balanced by the people who now have better jobs: the overall impact is positive.

If public pressure leads to e.g. Marks & Spencers[2] avoiding sweat-shops, then that could trigger some factories closing down. However the consumer demand will still be there. If we assume (a) that the sweat-shop labour costs were a small fraction of the total cost, and (b) that the level of demand in the West for many products is not terribly price-sensitive (such that, say, a 10% change in pricing will not noticeably change sales)*. Then closing down sweat-shops does not cause net unemployment -- instead it leads to an overall improvement in labour conditions.

This also suggests that a lot of power for improvement lies with the consumer, if we shop humanely -- our buying preferences can have a big enough effect on sales to outweigh the benefits of sweat-shops.

So: do buy fair trade, and do pressure big brands to treat their (typically out-sourced) workforce properly.

[1]: "Football ban sends child workers into worse jobs", The Guardian, April 2001
[2]: "10 Major Clothing Brands Caught in Shocking Sweatshop Scandals"
*I claim Western demand for many products (e.g. footballs) is not that price-sensitive, even though shopping habits are. That is, people will often compare prices and pick the cheapest, but would have bought anyway at the higher priced options. So if one retailer raises their price, they may lose sales, but if the price for product goes up across the board, sales will remain level.

8 October 2015

Javascript Debugging - Tips & Tricks

Chrome shortcuts

control-g, open script file by name. Really useful

What modified my object? Object.observe

Object.observe(myobject, function (changes) {
   changes.forEach(function (change) {
      console.log("Property '%s' changed from '%s' to '%s'",, change.oldValue, change.object[]) }) })

1 September 2015

AI Haiku - survey

This Haiku was written by a computer (programmed by my MSc student Aji Alhalm). Topic: sadness

all hearts desire,in the my frustration

More AI Haiku (and some rating questions)

Encountering #feminism on Twitter: A Methodology Story

This is from my work (and Alex and Jenni's) with Viv Cree and Steve Kirkwood at Edinburgh University analysing #feminism on Twitter: notes on how we worked together. Here are the Talk Slides

16 July 2015


An idea for a play of pure blackness came to me this morning. Taking a leaf from the great Borges and being short on time, I will write the synopsis rather than the thing. But unlike Borges, I will also dispense with the beauty and poetry of the writing.

The perfectly normal remnant of a family: A father lives with his one of his grown up daughters. The setting is modern America. The family are normal; everyone works, everyone has it hard. Father is diagnosed with a disease -- painful, deadly, but curable. But the cure is expensive, and his health insurance, which is not very good, will not cover it. The father is a gruff quiet fellow, a man of stoical dignity. He asks for nothing. There is a second daughter, and she is called in to help. Of course she comes as quick as she can, and wants to help. But she is reluctant to part with her savings -- the product of years of toil, carefully set-aside so she can buy a house.

The family look for other ways out. The tension grows between the two sisters. But it is the father who cracks. A gut-wrenching scene follows, where the father breaks down and begs for his life from his daughter.

This horror is the heart of the play. What happens next is inevitably bad: The daughter gives in and says yes. But the next morning her sibling finds she has gone. Unwilling to make this sacrifice, but unable to face her family, she packed and fled. The remaining daughter hides this betrayal from her father. She chooses the sacrifice, giving not only her own savings, but now also needing to take on a crippling loan. She buys the expensive medicine, a few bottles of pills, small yet precious.

While she is out on these life-changing errands, father is home reflecting. Appalled by what he has asked of his children, he commits suicide. The daughter returns home to find him dead, an empty bottle of pills by his side.


The ending is overly melodramatic; there is no need for the suicide. This is a kindness to the audience, to spare them the black bile of realism and instead give the full blood and catharsis of Tragedy.

The moral of course is that there is a better way: the community should provide free healthcare, making fair decisions about what can be provided. For a UK audience, this moral would be obvious, as would be the follow-on of: protect the NHS and the Welfare State, it's a good thing.

16 June 2015

Eclipse 4 vs IntelliJ 13 -- Which is the best Java IDE?

Which is better for Java development - Eclipse or IntelliJ?

Having worked with both, I think there is no clear winner.

IntelliJ scores big on:
 - UI speed: I think Eclipse's auto-complete is a bit more powerful, but IntelliJ's is faster.
 - Stability: About once every few months, Eclipse gets into a broken state best fixed by re-installing it.
 - Finding features: IntelliJ has a command-finder, much like the one in Sublime Text. Hit Control+Shift+A then type a keyword, and it lists the related commands. This is great for discovering features.
 - A more natural relationship with the file-system (although still a bit peculiar).

Eclipse wins on:
 - The compiler: IntelliJ demands that all files compile without error. That sounds reasonable, but it's actually a nuisance in team-work projects. Someone else's error in a different part of the code can block your work.
 - Git / source-control integration: The Eclipse integration is easy to use, and the diff compare-with tool is brilliant.
 - The debugger: they're both very good, but Eclipse's debugger wins. It has easier breakpointing, better inspection tools, and brilliant support for editing code whilst it's running.
 - The refactoring support.

In many places it's a matter of personal taste. For example, IntelliJ's layout is more compact. Eclipse has dynamic switching between layouts ("perspectives"), with stable views in a layout; whilst IntelliJ has one layout with dynamic pop-up views. etc. etc.

If you're familiar with one -- I would stick with the devil you know.

14 January 2015

JVM settings when using Jetty via Gradle & Gretty

We're using Gradle, Jetty, and Gretty in a project. We'd like to use asserts and a native library... How do you pass in settings to your JVM?

You can do this in the file build.gradle, within the gretty block, using jvmArgs (which takes a list of strings), like this:

// Gretty
buildscript {  
    dependencies {
        classpath 'org.akhikhl.gretty:gretty:1.1.3'

apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'

gretty {
    // supported values:
    // 'jetty7', 'jetty8', 'jetty9', 'tomcat7', 'tomcat8'
    servletContainer = 'jetty8'
    jvmArgs = ['-ea']


And that's enableAssertions set to true.

1 January 2015

Not antisemitic only anti-Zionist?

If you're in doubt about whether antisemitism exists in Britain, read the Facebook page Everyday Antisemitism.

The Guardian's had some good articles recently on antisemitism in the UK, especially within the left-wing. The comments section (never read the comments) shows that the problem is real, and also that some people don't recognise offensive and antisemitic comments. So here is the EU's working draft definition of antisemitism.

There's obviously anti-semitic stuff, and then there's a grey area around Israel and Zionism, and this document has a reasonable go at delineating that. Summary: Criticism of Israel similar to that levelled against any other country cannot be regarded as antisemitic, but anti-Israel comments can be antisemitic.

Some people seem to feel that any anti-Israeli statement is fine as long as it doesn't use the word "Jew". That's problematic. Of course Israel can be criticised for e.g. its poor human rights record. But also it is possible to be racist about Israel and Israelis. To debate whether such comments are technically antisemitic or merely racist-towards-a-nation seems besides the point.

On the recent Labour Party problems, some on the left have tried to dismiss the issue, arguing that it is being used to unfairly attack Corbyn -- whilst Zac Goldsmith and the Tory Party can get away with running a really racist anti-Muslim campaign. I think this is true, but dismissing the issue is wrong. The problem of antisemitism is real, and should be addressed.

My own experience is I'm happy to say I rarely encounter antisemitism, but I have encountered it, and in leftwing groups (although there's a sampling bias there, as I rarely hang out with UKIPpers).

Note: This post was backdated from May 2016, because that is the way to set front-page ordering on this blog.

Good-Loop Unit