EBS and RDS snapshot management script for Amazon AWS

NB: When I became IT Director at work this year my team of brainy software engineers, who are much cleverer than me, forced me to retire from coding after 30 years experience (20 of them commercial). It doesn’t mean I can’t code any more, obviously, but it isn’t my day job any more and so I can’t promise that I’m fully up-to-date with the best methods and techniques any more.

ebs-snapshot-repositoryWe run a number of workloads in Amazon AWS, which many do these days, and one of the common things you have to think about it snapshots for your Elastic Block Store (EBS) volumes and Relational Database Service (RDS) instances. You can create these manually through the console, which is obviously a painful ball-ache if you want to introduce any sort of schedule whatsoever, or you can automate it, since every action on AWS is operable through their awesome API.

For a couple of years we used a commercial EC2 appliance to do this for us. It cost $1,800 per year. It wasn’t particularly pretty but it was easy enough to use and it did the job. But all it did was consume the AWS API on a schedule; it didn’t do anything particularly clever and certainly nothing that I wasn’t capable of doing myself by consuming the API directly. So I’ve replaced with a script which I’ve grown myself and now I’ve been testing it for a month or so I’m happy that it works.

I thought perhaps that others might find this useful too, especially if they want to save $1,800 per year, so here it is:

It has Composer dependencies, so satisfy them and then create an AWS key/secret pair which has access to EC2 and RDS. Enter these credentials into credentials.json. Using the standard policies AWSEC2FullAccess and AWSRDSFullAccess achieve this although you might want to create a custom policy which only allows listing of volumes and instances and the creation and deletion of snapshots, up to you and how anal you are about the scope of your AWS keys.

Then you’ll need to edit the schedule, which is in the execute() method. If people want me to I’ll refactor the schedule definition out into a JSON file, but in the meantime you’ll need to get familiar with the PHP date() function. The default schedule is as follows:

// EBS snapshots

// every day at 8pm, 7 day retention
if (date('G') == 20) $this->snapshotEBS(7); 

// every sunday at midnight, 4 week retention
if (date('D') == 'Sun' && date('G') == 0) $this->snapshotEBS(28); 

// every month, 12 month retention
if (date('j') == 1 && date('G') == 0) $this->snapshotEBS(360); 

// RDS snapshots

// every two hours, 1 day retention
if (in_array(date('G'), [1,3,5,7,9,11,13,15,17,19,21,23])) $this->snapshotRDS(1);

// every day at 8pm, 7 day retention
if (date('G') == 20) $this->snapshotRDS(7); 

// every sunday at midnight, 4 week retention
if (date('D') == 'Sun' && date('G') == 0) $this->snapshotRDS(28); 

// every month, 12 month retention
if (date('j') == 1 && date('G') == 0) $this->snapshotRDS(360); 

Run it every hour from the cron. Suggested crontab entry:

0 * * * * php /path/to/aws-snapshot-manager.php

It works properly and is reliable so long as cron doesn’t fall over and your AWS credentials don’t get rusty for some reason. However, its biggest weakness is that you won’t get told if it fails for any reason, which I guess would be the major improvement that it requires. It would need to be able to send alerts, by e-mail, SNS topic or SQS queue, in the event of a problem. So use at your own risk and periodically jump onto the AWS console to make sure your snapshots are up to date.

Don’t forget that AWS will charge you for snapshot storage space (EBS pricing, RDS pricing). Bear this in mind when defining your schedule and don’t wave your AWS bill in my face, I don’t want to see it.

PS: I realise that this is very boring to non-AWS people and I also realise that the AWS snapshot icon looks like a toilet.


#OrlandoStrong #OrlandoUnited

Context: This blog is an amalgamation and update of two previous Facebook posts. I was in Orlando, Florida on the day of the Orlando Pulse nightclub terrorist attack, but not involved. I did not want the posts to be lost in the firehose of social media.

I’ve only ever once experienced direct homophobia

When I was at university I was walking along the seafront one evening, hand-in-hand with boyfriend-du-jour. We passed a group of three lads, who went stony silent as they passed us. They waited until we were about 30 metres away before one of them yelled “QUEER BOYS!” at us. How original.

I was furious. University was my fresh start with my sexuality and I had always been open about it since arriving, having hidden it at Sixth Form (where I experienced indirect homophobia, almost always through ignorance rather than anything else), and this cunt violated that.

I started to run towards the one who I knew yelled it, the one with the biggest grin on his face. He broke away from his two friends and I chased him into the town. I caught up with him and I threw him to the ground. He put his arms up and said he was sorry and begged me to leave him alone, having very clearly underestimated me (bear in mind I was nowhere near as physically strong then as I am now). Which I did, after telling him what I thought of him at the top of my voice and instructed him in rather frank terms never to do such a thing again.

Why did I do this? Because what he did, even though it did not cause me or boyfriend any physical harm, was NOT FUCKING ACCEPTABLE, and I was not going to let him get away with it. I hope he never did it again and always thought twice about such idiocy and ignorance after that night.

(In hindsight it was a pretty stupid idea to abandon the boyfriend with the other two, but nothing else happened, I just have to chalk that one up to seeing red.)

Since then, some 20 years on, I have never suffered any sort of homophobic abuse. There are a couple of advantageous factors which have contributed to this, the first being that I “don’t look gay” (whatever that means) and the second being that I have lived in major cities for the majority of my years since university, which are generally considered to be safer for gay people.

But I realise that I am very lucky, and I also realise that it could happen to me, someone close to me or just any other gay person, known or unknown to me at any time. It scares me, and it isn’t right, and I still DO NOT FUCKING ACCEPT IT.

The attack in Orlando on 12th June was deliberately targeted at gay people. Again, it did not affect me directly. The reality is because I’m 40 and don’t go to nightclubs any more it would have never had a chance of affecting me personally. But it did affect 103 people with whom I share community, nearly half of which are now dead. And that is not fucking acceptable.

This will happen again if we don’t start to stand up to the plague of hate that we are suffering at the hands of extremists. This has nothing to do with guns, this was a hate attack, plain and simple, and it could have happened anywhere. I am sick of reading in the news about the plight of gay people in Muslim countries, and now not even that is good enough; now gay people in western countries are being targeted for public massacre. That is not fucking acceptable, and we cannot ignore it or make excuses for it.

Nobody should be in the least bit comfortable about what happened on that day and nobody should ever forget it. Homophobia in any form and from any source is never justifiable. This direct attack on our community, solidarity, hard-earned freedoms, rights, culture and way of life is way over the line, and we need to stand up to it and say that we will not fucking accept this bullshit any longer, regardless of who we may upset in the process.

When I came out to my parents, I told them I was frightened about what might happen to me because I’m gay. That fear upset them, especially my Mum. She’s long gone now, but it turns out that her upset wasn’t without merit. I need to show her that I’m not frightened, and I won’t fucking accept this.

I’m tired, it’s been a stressful day and I’ve been through a wide range of negative emotions, from anger and rage to frustration, disbelief, disgust, shock and of course grief and sadness. Thank you to all those who reached out to me today, it’s been very touching and it meant a lot to me, especially those whose care I arguably do not deserve.

Here’s the Orlando Eye, photographed the day after the attack. Many other buildings around the world were lit up in the rainbow colours in its wake.


This could have happened to any of us

A man from Illinois makes white crosses for every victim after a mass shooting in the United States. Now it’s Orlando’s turn. He’s made 49 white crosses and drove 1,200 miles to Orlando Health Medical Centre, just a couple of blocks from Pulse nightclub. Most of the victims were taken to this hospital.

I went there one week after the atrocity against gay people in Orlando to see these beautiful crosses and to pay my respects to the victims. It’s the least I could do.

People were solemn, people were silent, people were private in their respect and grief. I watched an elderly Japanese man bow to every single one of the 49 crosses. All I could hear was the water from the waterfall and the wind in the trees. There was no traffic to speak of because of the road closures still in place.

I wrote on one of the crosses, that of Alejandro Martinez, who was only just born at the time I was coming out at university. The man from Illinois will, after a while, deliver each of the crosses to their respective families.

Rest in peace, my 49 brothers and sisters.






Why I’m bowling for #brexit


Tl;dr: Because economic myths, Turkey and migration.

It’s now been more than two months since the Prime Minister returned from his negotiations in Brussels and announced that there would be a legally binding in/out referendum on the United Kingdom’s membership of the European Union (EU). For most of those two months I’ve been genuinely undecided as to how I will vote on Thursday 23rd June, but I have now made up my mind, and in this post I’m going to tell you why I’ve made this decision.

As the title of the post suggests, I think the United Kingdom should secede from the EU. This decision is not, as many might assume, born out of some knee-jerk right wing reaction to foreigners; those who know me well enough will realise that there’s more to my political views than that. I have made this decision after carefully considering facts and arguments from both “sides” in this debate.

Firstly let’s talk about those “sides”, specifically the “Leave” campaign and the “Remain” campaign. Both have been an utter shambles in equal measure so far, which has played no small part in determining the amount of time I have needed to come to my decision. They’re both run by hysterical loonies who spout sensationalist nonsense instead of educating people on the real facts and the issues that actually matter. I don’t care if there will be more or less potholes/booze cruises/pubs/cheap holidays/mobile phone bills abroad (delete as appropriate). These things do not matter. They don’t matter to me and they shouldn’t matter to anyone else. The following issues, however, do matter:


The economy is my primary argument. There are other arguments as you will see later on, but the economic argument is twice as important as the rest of them combined.

It’s always about the economy. Any reasonable person knows that without a strong economy nobody can have nice things like hospitals and nurses, schools and teachers, police officers and firefighters, and, yes, state handouts, if that’s your thing. Everyone, working or otherwise, should be primarily concerned with the economy.


One of the major arguments from those who wish to remain is that the EU is [one of] our biggest trading partner[s]. The words and letter in the square brackets are sometimes included, sometimes they are not; it depends who you talk to. Regardless, the message here seems to be that the UK “needs” the EU for its economy to strive and, if the UK leaves the EU, suddenly all trade between the UK and the EU will cease. This would, obviously, put quite a sizeable hole in our economy, but it’s not going to happen. Why? Because it would put an even bigger hole in the remaining EU economy.

Here’s how it stacks up: The map below shows the top 20 countries to which the UK exported goods and services during 2014, both EU and otherwise. Check my maths if you want, but I make it £131.7bn of exports to EU countries. £131.7bn of stuff we made and sold in 2014 was sold to our EU neighbours.

UK exports 2014

Now let’s look at the other map. This shows the top 20 countries from which the UK imported during the same year, again, EU and otherwise. Check my maths again, but you should get to £201.2bn of imports from EU countries.

UK imports 2014

That means we import £69.5bn more from the EU than we export to the EU. Our net worth in terms of trade to the European Union was nearly seventy billion quid in 2014. Now, would someone please tell exactly who “needs” who here, and why this sort of flow of trade would suddenly cease if we were to leave the EU? It wouldn’t happen, of course it wouldn’t happen.

It’s absolutely absurd to say that we have to be in a political union with a bloc of countries in order to trade with them. We traded with them for centuries before the EU came along and it will be perfectly possible to trade with them again independently of political union. This is scaremongering at its worst.

Our economic world will not end if the UK cedes from the EU, despite what Barrack Obama and George Osborne would like us to believe, the claims from the latter of whom have been debunked so heavily and by practically everyone that I simply can’t ever trust a word that comes out of his mouth ever again. And really, Mr. President? “Back of the queue”? We’ll remind you of those words when you want help with starting another war to prop up your economy!


This subject, although one of the more popular subjects bandied around by the Leave campaign, pales into comparison when compared to the trade argument and it’s not one of my high priority issues, but since it is so often a flag waved I need to cover it. The chart below shows the net contributors and net beneficiaries of EU membership.


So we’d save another £4.7bn in (net) contributions if we were to leave the EU. It’s better than a stab in the face, and just one year of this saving would, by way of a topical example, allow Tata Steel’s UK business to keep making a £1m per day loss for over 12 years. If that’s not issue-du-jour when you read this then let’s fall back on that old favourite of the Labour party: £4.7bn would pay for nearly 200,000 extra fully qualified NHS nurses every year.

Single currency

The United Kingdom didn’t join the european single currency (Euro), and it turns out that was one of the best decisions we ever made. We also wouldn’t ever be obliged to do so were we to remain in the EU, so the extent of my comment on this subject will be limited. Nonetheless, I believe the single currency to be a bad idea and it has caused extremely serious problems for the EU, which of course have had (albeit relatively limited) knock-on effects in the UK. The only way to maximise our distance from this basket-case of a currency union is to also leave the political union associated with it.


For the past twenty years the European Union has continued to expand by admitting more and more states, with more planned and proposed for the future. Some recent additions have been very successful, most notably Poland, which enjoyed an average of 4.2% economic growth in the ten years since the nation acceded to the union. The country now sits in spectacular and extreme contrast to its years under communism and is without a doubt an EU success story.

But the formula which worked in Poland, much like the single currency, is not a universal, one-size-fits all formula. To assume that it will simply work as well with all new member states is foolish and naive. It worked in Poland because the Poles are a modern, hardworking, tolerant and outward-looking people who were willing to embrace the ideals of the western-European nations which welcomed the country out from behind the Iron Curtain and into the EU.

Turkey, on the other hand, is quite different. With a population of 70 million Muslims the country could barely be more misaligned with the ideals and culture of western Europe. I believe that a political union with Turkey is completely unacceptable. Yet, that is exactly what is proposed. There is an application and a roadmap in place for Turkey to accede to the European Union.

Here’s what bothers me the most:

  1. Islam has an infamous and well-documented problem with homosexuality, an issue which is of course very close to my heart. Turkey aren’t throwing gays off buildings, sure, but Turkey has a very long way to go with regards to its legislation and culture surrounding homosexuality before I will consider entering into any sort of union with them. Homosexuality is not illegal or punishable in Turkey, as it is in most other Islamic nations, however:
    1. No laws exist that protect LGBT people from discrimination in employment, education, housing, health care, public accommodations or credit.
    2. The Turkish military openly discriminates against passive homosexuals by barring them from serving in the military.
    3. LGBT persons in Turkey may face discrimination, harassment and even violence from their relatives, neighbors, co-workers, bosses, employees, teachers, and even members of the Turkish police.
    4. Homosexuality is widely a taboo subject in Turkey and the culture of honour killings can be observed in Turkish society families murdering members who engage in sexual or moral behaviours regarded as inappropriate.
    5. Turkey does not recognise same-sex marriages, civil unions or domestic partnership benefits.
    6. In 2015 police in Istanbul dispersed a Pride parade with tear gas and water cannon, after the parade was suddenly banned by the Governor’s office, citing that it was the month of Ramadan as the reason.
  2. In March 2016 the Turkish government seized the country’s largest newspaper, removed its dditor-in-chief and forced it to start printing pro-government propaganda. Then the government tear-gassed in the streets anybody who objected to this flagrant crackdown on media freedom.  No country in the EU has ever witnessed such brutal suppression and control of the media since the Second World War.
  3. In April 2016 the Turkish government then seized all the Christian churches in one city and declared them state property, citing urban regeneration as the reason. The seizure fits into a pattern in the Middle East, where Christians are systematically displaced and persecuted.
  4. Turkey’s record on human rights remains appalling and, despite them since 2005 being central to negotiations to them one day acceding to the EU have actually become worse. Despite this the EU remains hellbent on moving forward with this process (see more on this below).

Why are we even giving half a passing thought to joining in political union with this country?

The European Union is hellbent on admitting Turkey regardless of costs or disadvantages. At the moment this is being primarily fuelled by the migrant crisis, but it was not always the case and still isn’t the only issue. Only days before the referendum Turkey will be granted visa-free access to the European Union, a key condition in the shady, underhand deal Turkey has struck with the EU regarding the management of migrants from the Middle East. To think that such demands will end with this is naive; Turkey will continue to make demands and threats up to and after accession to further its own self-interests. Turkey has the European Union over a barrel and I am not impressed with their blackmail in the slightest.

Even the pro-Remain Home Secretary Theresa May admits that admitting Turkey and four other countries to the union would be dangerous for the United Kingdom. I firmly believe that this referendum is as much about a decision to be in a political union with Turkey as it is the UK being part of the EU. I’m going to vote against such a union.

Immigration and security

It’s not been a good twelve months for the EU. With two major terrorist attacks, one of which was on its own de-facto capital city, plus an overwhelming wave of migrants and numerous reports of problems with their integration, the most notable of which being the organised mass sexual assaults of women in Cologne, immigration is a public relations disaster for the EU at the moment and it’s only getting worse. Immigration has always been a hot-potato subject with regards to the EU and the current migrant crisis could not have come at a worse time for those who advocate EU expansion and open borders.

Although I do feel strongly about this issue I am not going to go into so much detail as I have with the other issues. This is chiefly because I am mindful of the hysteria which is so often prompted when discussing this subject, with most arguments very quickly deteriorating in accusations of racism. My main points are therefore as follows:

  1. I believe that Labour’s immigration policies implemented while they were in power were largely cynical and inappropriate.
  2. I believe that “multiculturalism” is a failed project, not just in the UK but across the EU, and there are many very serious and large-scale examples of how integration has failed.
  3. I am uncomfortable with the recent rise of extremism and terrorism in European countries and I believe that both will become worse if migration continues the way it is.
  4. I completely disagree with the European Union dictating to the United Kingdom what we do and do not do with regards to migration.
  5. I am aghast at our apparent inability to tackle these issues and stand up to those who would abuse this country in the name of political correctness.
  6. I am uncomfortable at the apparent blanket tolerance being afforded to migrants who follow one particular religion known for its extreme intolerance and I believe this will have an effect on my way of life in the future.

Don’t get me wrong, I am not completely against immigration in any form. There have been some notable success stories (I refer back to my reverence for Polish people). But these examples are dwarfed by large, serious and glaring failures. Positive immigration is what the United Kingdom needs, not mass, indiscriminate migration.

Dave’s Dodgy Deal

During the week before announcing the referendum David Cameron was in Brussels furiously negotiating a deal for the United Kingdom within a “reformed EU”. The key points of this are:

  1. An “emergency brake” on in-word benefits for immigrants from a particular state if there was immigration pressure from it. This would have to be approved on a state-by-state basis by the EU council. This falls short of what Cameron asked for, which is a bar on in-work benefits and social housing for all immigrants for four years, regardless.
  2. An agreement that British taxpayers’ money can never be liable to support the eurozone, a win for Cameron in broad terms.
  3. Less regulation and stronger commitment to the free flow of capital, goods and services, key for our trading relationships with EU states. Again, in-line with what Cameron asked for.
  4. A “red card” for national parliaments, enabling them to block unwanted EU legislation. A win for Cameron, the deal says that 55% of national EU parliaments can bloke EU legislation if they object to it.
  5. An opt-out of the commitment to an “ever closer union” enshrined in the treaty to which every country has to sign up. Cameron secured this, but only for the United Kingdom. The EU super-state dream will continue to apply to other member states.

So, some wins, some with watered-down conditions. But it’s all meaningless. It doesn’t matter what Cameron negotiated. He could have negotiated industrial monopolies for the UK and a brand new BMW for every British family for all I care. Why? Because it’s not legally binding.

The Vice President of the European Parliament has stated that Brussels “clearly went too far” during its negotiations with  Cameron and that “their agreement is in no way a document of the European Union, but a text of hybrid character, which is unspecified and not legally binding”.

Cameron’s deal is worthless, and there is no “reformed EU”. It was all just a show to convince the voters that he’s done something about our unfavourable position within the EU. He hasn’t.

Attitude to democracy

The European Union has a terrible attitude towards democracy and will act unilaterally when it thinks it can get away with it. They’re even quite open about the fact; during April a top “Eurocrat” said that “Referenda are becoming a huge problem for the EU” and that “Perhaps it is time for an EU ban on referenda!“. He’s just one man, I realise, but this was really eye-opening for me. He clearly has no problem expressing his opinion, but that doesn’t mean that he’s the only person within the organisation which holds the same opinion. What will they call for a ban on next? Elections? Where does that end?

Don Juncker, who is very upset that we no longer want his family’s friendship and protection, might give us a clue to where it might end. In May he complained that Prime Ministers listen too much to their voters instead of being “full time Europeans”. More of that pesky democracy stuff getting in the way of the master plan! But he’s just one man. In addition to that other man. I wonder how many more men like these there are in the corridors of power in Brussels.

Here are a few examples of when pesky democracy stuff got in the way of the correct result and of the contempt the EU treats democratic processes (referenda specifically):

Country Date Issues ‘No’ vote Outcome
Denmark 1992 Maastricht Treaty 51.7% Made to vote again
Ireland 2001 Nice Treaty 53.9% Made to vote again
France 2005 EU Constitution 54.9% Ignored
Netherlands 2005 EU Constitution 61.5% Ignored
Ireland 2008 Lisbon Treaty 53.2% Made to vote again
Greece 2015 Euro bailout 61.3% Ignored

Which way will it go?

It’s all very well declaring support for one side or the other, but coming out in support of one side doesn’t necessarily mean that it will prevail on polling day. I stand by my decision and opinions stated in this post, of course I do, but do I believe that the UK will leave the EU? No, I do not. I believe that the Remain campaign will be successful, not by a landslide, certainly, but they will win.

The thing is about referenda is that they are, in the United Kingdom and many other countries, entirely voluntary democratic processes enacted by the government in power at the time. Whether they are declared “legally binding” or not (this one is, but not all are) there is no mandatory compulsion to call them in the first place, regardless of whether or not they formed part of a party’s general election manifesto. General elections, by-elections, local elections, yes, they are all mandatory processes; governments must call them regularly whether they like it or not and whether they think they will go in their favour or not. Not so with referenda.

Therefore, governments will only ever risk calling a referendum on an issue if they are reasonably confident that the outcome will be in their favour. This was true of the Scottish Independence referendum in 2014 (which went the government’s way) and also of the Lisbon Treaty referendum in 2007. Don’t remember that one? No, you won’t, because when it became clear to the contemporary Labour government that they would lose it they cancelled it, despite having promised it two years earlier in their general election manifesto.

Referenda give voters the illusion of power, but it is just that, an illusion. You think you’re making a difference by partaking in them, but actually the decision’s already been made, and there’s nothing you can do about it. I’m extremely sceptical of them.

Her Majesty’s Government has come out in support of the United Kingdom remaining in the European Union, and so that is what we shall do.


General election manifestos – A landlord’s guide

Shortly before the 2015 General Election I was asked to comment on the manifestos of five of the parties involved. On the day of the election itself my comments were published on two property trade journal websites:

  1. Residential Landlord
  2. Property Reporter

I have reproduced it here:


As the general election looms, Stuart Ford from Glide Utilities gives his opinion on the main party housing policies and how they are likely to affect the property market.

Rent controls – Labour/Green

Rent control is never a good idea. The profound economic and social consequences of government intervention in a nation’s housing markets have been documented in study after study, over the past twenty-five years. In almost every case where rent control has been applied to a city or a nation it has inevitably led to a shortage of well-maintained rental properties. Landlords are left short of funds to maintain their properties and developers have no incentive to invest in new construction projects, since they are unlikely to be able to make rental business models work.

Labour state that they will cap rent increases to inflation, however, the 5 year inflation rate has been 10.8% whereas the 5 year cost price inflation rate has been 13.0%. The policy could very easily actually lead to massive rent increases rather than have the desired effect, especially if Labour’s economic policies were to have an adverse effect on inflation.

Long term tenancies – Conservative/Labour/Green

Tenants in short term lets often feel insecure about their accommodation. Even with normal twelve month tenancies, having to find a new home potentially on an annual basis is disruptive, stressful and expensive. This is not so much of a problem for student lets but is more of a problem with young couples nurturing new careers and possibly new families. Long-term tenancies should be promoted and encouraged, however, they should certainly not be enforced since this could not only be disadvantageous for landlords but also tenants.

Landlord checks – Conservative/Lib Dem/Green

Most landlords are professional and upstanding, however, we all know that there are a subset which are far from adequate. The introduction of greater checks on landlords and even a licensing scheme is something that most above-board landlords should not have a problem with complying with, assuming such schemes do not come at unreasonable cost to them, and should help tackle the problem of rogue landlords and ‘slumlords’. Certainly the opportunity should not be seen by letting agencies as a way to simply charge extra fees, these measures should be designed to protect tenants.

New home construction – All parties

There is cross-party consensus on the need to build more new homes in the United Kingdom. The housing shortage is longstanding and while the coalition government has made good efforts to tackle it more needs to be done. The “Green Belt” issue, which has plagued developers for decades, needs to be reviewed and the needs of the many put before the needs of the few who would be affected by construction.

A proportion of the demand for new housing comes from immigration and it would be not unreasonable to argue that building new homes treats the symptom rather than the cause of this issue. However, changes to immigration rules, even if they could ever be approved (since they are a social hot-potato), would take decades to make a difference on housing demand and we have this shortage here and now.

Regeneration – Conservative/UKIP

UKIP lead the way in this area with their pledges to reduce restrictions on the use of brownfield sites and bringing inexplicably empty homes back into use. Recycling is always a good thing and these measures should probably be considered before constructing new homes on Green Belt land if only to show to those who would be affected by Green Belt construction that all the boxes have been ticked.

However, the £1bn ‘regeneration fund’ from the Conservatives is unlikely to go very far. This needs to be a larger figure.

Economic controls – Green

Finally perhaps the most alarming policy put forward by the Greens in this area is to give the Bank of England power to curb excesses in the housing market. The housing market is driven by any other market, supply and demand, and to do this would be treating the symptom rather than the cause. The correct treatment is new home construction and regeneration in order to increase the supply of homes, rather than try to control the economics of existing property.

The Greens have also pledged to reverse the changes the coalition made to the spare room subsidy for those on housing benefit. This measure is known erroneously by some as the ‘Bedroom Tax’. The measure was introduced in order to encourage appropriate distribution of social housing stock among those who required it and plays an important part in reducing the shortage of housing in particular areas and across certain social groups.


Third Mac mini

So, after four and a half years of solid service from my second Mac mini (a 2.53Ghz Core 2 Duo polycarbonate), which followed three and a half years of solid service from my first Mac mini (a 1.5Ghz Core Solo polycarbonate), I now have a third. It’s an aluminium unibody Intel Core i7 (2.7Ghz) and I’ve pimped it out with 16Gb of RAM and a 512Gb SSD, which will make it perform as fast as it will ever go. It’s quite a departure from its predecessor in terms of speed and usability.

Screen Shot 2014-06-24 at 22.24.02

I was going to splash out on a new iMac, but something stopped me at the last minute (most likely the imagined image of the credit card bill arriving) and then the opportunity to acquire this Mac mini presented itself, so I’ve saved myself a fair whack of cash. I’m still running it on the two 1600×1200 20″ monitors I bought ten years ago, which, because I spent rather a lot of money on them in 2004, simply refuse to die because they’re very good quality. The purchase of an iMac would have made these old faithfuls unnecessary redundant. The only real feature I’ve sacrificed in not buying the iMac is an up-to-date graphics card, which would have been nice, but an extravagant indulgence given how often I actually play demanding games.

This Mac mini should last me at least until the end of 2016 at which point I will consider my options again. I expect the monitors will probably last until then too, at which point they’ll be even more old fashioned but even harder to retire due to my irrational loyalty to their continued enduring service.

In other news I now have a Windows PC on my desk at work. This is the only statement I’m willing to make about it.


Home energy monitor reveals consumption horrors

I’ve moved flat recently (all planned, fancied an upgrade and the right opportunity came along), and my new flat is situated close to to the cupboard on my floor where the electricity meters are kept. This differs from previous apartment buildings in which I have lived because in those buildings the meters were all in the basement, far far away from the apartment itself. This prevented me from using an energy monitor, because for them to work you need to install a transmitter on the meter and that transmitter needs to be within a certain distance of the receiver inside the apartment.

Keen to work out why I kept getting over usage bills from my own employer, I bought an Owl Intuition-E and Micro+ bundle, which gave me the transmitter, the receiver and a network receiver, which allows me to upload usage data over the Internet to their online portal for analysis. Being within 30 metres of the meter, it works a treat.

I was a little surprised, however, with the results it gave me. I’ve found out the following:

  1. My television, surround sound and Bluray setup in the living room uses 60W on standby. 525 kWh per year (£78.75). I put a remote controlled socket on that lot straight away. I have no idea why 60W is necessary to keep four items AV equipment on standby.
  2. The TV / stereo setup in the bedroom uses 16W on standby. Another 140 kWh per year (£21.00) saved with another remote socket.
  3. I use a minimum of 241W. It never goes below that. This is during the day with no lights on (not that they bother me much, they’re all LED), with the fridge/freezer on (60W), my server and networking gear on (90W – this is lean, trust me) and my desktop computer on (60W), but with my monitors and everything else switched off. This means that there’s still 31W of background usage, 24 hours per day (271 kWh per year, £40.73).
  4. Consumption has been as high as > 9kW. This, presumably, was when I had the water heater and the cooker and the microwave and the telly on at the same time. Fortunately periods like this are always short-lived.

It’s a really good product, works very well, but I absolutely hate the web portal you have to log in to view your statistics. It’s awful. Fortunately, the network device can be configured to also sends its readings to a specified IP address on a specified UDP port, which is exactly what I’ve done and I store all my readings in a local database with a collector listening on that port. I then wrote my own software to analyse it and now I get a report like this every day. To this I have also added a web browser dashboard.


Update 19/05/2014: I’ve now created a web dashboard (which also works well on mobile devices).

Screen Shot 2014-05-19 at 20.03.27

Code’s here if you’re interested (NodeMon isn’t really a thing, just a project framework for various bits of tinkering). Needs Phalcon.


Where is my iPhone Mini?

I’ve been an iPhone user and fan ever since the original iPhone came out and I’ve used one for the past four and a half years. I had the original iPhone, the 3G, the 3GS and then I skipped a couple of models and now have an iPhone 5. I’ve smashed the screen, obviously, by dropping a dumbbell onto it, but it seems unfashionable to have an iPhone with an intact screen these days and the dumbbell thing* gives me man points.

Smashed screen aside, the iPhone 5 is a very capable smartphone. However, I’m at the point with it where I believe it is in fact too capable I’m struggling to justify ownership of it. I find that I actually use very little of what it has to offer. I use the phone, obviously, text messages, e-mail, Facebook, Twitter, Foursquare, Maps, Camera, iPod occasionally*, National Rail enquiries and a handful of other apps on an occasional basis. Although my old 3GS was slow, there was none of this that it couldn’t do and there is nothing I use my iPhone 5 for now that I didn’t use to use my 3GS for (with the exception of the camera, I didn’t used to use that on the 3GS because it was properly awful). I use mobile apps on my iPad much, much more than I do on my smartphone; my iPad is where I need the mobile computing power and features.

My point is that I’m paying for (£45 per month on a lease) and carrying around this massive overpowered pocket computer with me everywhere I go, with its fragile screen, poor battery life and a relatively high chance that I’ll get mugged for it one day, when I barely use its capabilities. When Apple launched the iPad Mini earlier this year I had very high hopes that they would follow suit with a smaller iPhone, the iPhone Mini, or whatever; a device which isn’t as powerful as a full-blown iPhone but is smaller, has a better battery life and can do the basics like make phone calls, text messages, basic social media apps, iPod, a reasonable (if not overly fancy) camera, etc.

My hope was that they would base it on the iPod Nano:


This device has a small colour multitouch screen with an iOS-like interface which is clearly capable of handling a form of application selection. I cannot imagine how it would be hard to include the necessary electronics for a mobile phone and wifi into a package this size, even if it had to be slightly thicker perhaps than a plain iPod Nano (in the same way that the iPod Touch is thinner than the iPhone). It would have been perfect for me, so I got quite excited when I saw the rumours about the iPhone 5C – perhaps the “C” stands for “compact”?

But no.

The iPhone 5C is nothing more than a re-packaged iPhone 5, except they’re making it out plastic, which will arguably be more robust, but is actually a decision that has mainly been made for cost-reduction purposes. Despite this, the 5C is by no means a bargain, offering a saving of just £80 over the even more powerful and even more expensive flagship iPhone 5S, which they have introduced to replace the iPhone 5. The top of the range 64Gb model costs more than an eye-watering £700.

They’ve missed a beat here. I’m not normally underwhelmed by Apple launches (although I am by no means a frothing fanboy before, during or after them), but this one may as well have never happened.

* I have, incidentally, eliminated the possibility of future dumbbell related screen smashes with the purchase of an iPod Shuffle for use in the gym. It’s not possible to smash the screen on this because it does not have one.


A very Angular learning curve

Recently my team at work have been working with Angular JS, a Javascript framework created, used and published by Google. We’ve used it extensively in our new website, which is created from static HTML and Javascript files with no server-side page generation. All the work is done by the browser and user interaction is processed using a REST API.


I didn’t actually do any of the coding on the website and so I did not have the opportunity to learn how to use Angular JS during the project as the rest of my team did, so in order that I did not fall behind on the skill I decided to learn it myself in my own time by creating a web-based tool which creates DHCPd configuration files. The application is boring (although actually useful if you run such a server), but that’s not the point, it was a learning exercise.

Angular JS has a bit of a learning curve. It works in different ways to other Javascript libraries and frameworks and it takes a while when you’ve started from scratch to “think Angular”, rather than in ways in which you may have become accustomed with things like jQuery, itself revolutionary in the world of Javascript, but Angular takes it to a whole new level. Once you are “thinking Angular” things become much clearer and easier and you find yourself in a very natural-feeling flow.

I’ve made the exercise available on Github. You may find the tool itself useful if you’re a system administrator, but if you’re a developer it’s more likely the demonstration of a simple Angular application that you will probably see more value in.

I have some larger extra-curricular projects around the corner which I intend to base on Angular JS and expand my knowledge. We’ll also continue to use it at work and will almost certainly use it when it comes to re-implementing the user interface of the company’s internal browser-based management system.