Archive for September, 2012

Add Scala to your system path on Mac

Wednesday, September 5th, 2012 | Programming, Tech

Lets say you are running Mac OS X Lion and you have installed Scala to /usr/local/scala. To access scala from the terminal you need to do the following.

cd /etc/paths.d/
sudo vim scala

Add one line with the following in.

/usr/local/scala/bin

Save the file and restart terminal. You’ll now be able to use scala from the terminal.

August 2012 Wendy House

Wednesday, September 5th, 2012 | Friends, Life

I couldn’t be bothered to take my camera to last month’s Wendy House. But we did enjoy a few drinks beforehand under threat of extermination.

StayCity Serviced Apartments

Tuesday, September 4th, 2012 | Reviews, Travel

While in Dublin, we stayed at StayCity Serviced Apparents, so I thought I would share my thoughts on them.

When I originally tried to book online with Laterooms, it told me they had run out of available rooms and I had to call the Laterooms call centre. I did, and they confirmed there were no more rooms available, but suggested they could book me in at another StayCity just a few minutes away – and offer that I accepted.

Having turned up at said location, I was then told that we had actually been put in the original location. They were very nice about it and put is in a free taxi to the original location, where we found they had allocated a two bedroom apartment to us (couldn’t make use of it though as Elina insisted on sleeping in the same bed).

It was a bit run down, but when the serviced apartments I have to compare against it are Warwick and Oxford, you probably can’t expect the same standards. I can’t help but feel they were falling a little too much into stereotypes though by not providing any tall glasses, yet providing several types of wine glasses.

It was rather cold at first too as they had most of the windows opened when we arrived, so it took a while to warm up (and was never overly warm). It was also rather nosier than I was expecting when it came to trying to sleep.

The location was fantastic though – it was literally over the river from Temple Bar, so for the price and location, it still comes up as a good deal. Their wifi was good too. You do need a pass per device, but I had no problem streaming high-quality video.

Dublin

Monday, September 3rd, 2012 | Photos, Travel

To make the most of the bank holiday weekend, we headed over to Dublin. Despite having been all round Europe, I had never been to Ireland, so it seemed like good choice for somewhere to visit.

While there we made it round the Tall Ship Festival, Trinity College and the Book of Kells, Christ Church, Dublin Castle, the Wax Museum and the National Library. Unfortunately, we didn’t make it to the National Museum or Natural History Museum as they are closed on Mondays (it wasn’t a bank holiday in Ireland).

We also took in the nightlife at Temple Bar with a few different restaurants and pubs around that area, as well as the street artists. We eventually settled in at really cool place named the Bison Bar that had saddles for stools and bison and dear heads on the walls, as well as a superb range of whiskey (not that I benefited from such a collection).

Best moment? Definitely meeting SpongeBob at the wax museum!

It’s a great city, and well worth a visit, though given it has a flight time comparable with Paris, and I found Paris more beautiful and about the same price, I think I would opt to head back to the continent for a short break.

JavaScript’s querySelector

Sunday, September 2nd, 2012 | Programming

jQuery has an amazing set of selectors, but what happens if you don’t have access to jQuery?

It happens, especially if you’re writing the automated tests or working within an existing framework and don’t necessarily have control over the content of the page. Luckily, you don’t actually need jQuery!

All modern browsers support the use of querySelector. When I saw all modern browsers, I even include Internet Explorer which added basic support for it in 8 and full support in 9. You use it like this.

document.querySelector(“p.introduction”);

This works just like jQuery – selecting all paragraph tags with the class introduction.

Airport security

Saturday, September 1st, 2012 | Religion & Politics, Thoughts

I’ve said it before and I’ll say it again – airport security should be relaxed.

Flying back from Dublin recently, we arrived at Dublin airport and joined the queue to pass through to the departures lounge – a queue that would take us 40 minutes to get through. That is really long and irritating. But often, these queues can be even longer (though in fairness, often shorter too).

Of course you can come back with “but you can’t put a price on human life”, but this is simply nieve and we all know you really can. For example, a million people a year die on the roads and we could reduce this by setting the speed limit to 20 miles per hour on every road everywhere. But this would be too inconvenient, we would rather let people die is the harsh truth.

So, putting emotional arguments aside, why should we relax airport security?

Well, first off, lets remember why we shouldn’t – if we did, more terrorists would get through with more bombs, and people would die. That is a good reason for airport security!

But there has to be a trade off between the lengths taken and the success. So my question is, have we got the levels quite right. I would argue that perhaps we have not.

Firstly, there is a time cost. 40 minutes for everyone passing through an airport is a long time. Given that the average person has around 3,000,000 (3 million) hours left on this Earth, that means that for every 6 million people that pass through airport security, we’ve essentially wasted a human life.

It isn’t as simple as time vs life as the emotional argument would have you belief – when it comes down to it, length queues in airport security take away small parts of people’s lives – and these quickly add up to entire lives.

London’s airports see 134,000,000 people pass through it each year. Based on our previous maths that is 22 people’s lives per year spent on airport security. That is just one city, albeit the busiest in the world in terms of air passengers – internationally, we’re losing hundreds of lives per year.

So terrorists would have to kill everyone on board a jumbo jet (or several smaller planes) at least once a year to make the time we spend on airport security cost effective.

Secondly, we have to wonder how effective these security checks are. Most terrorist plots are stopped by homeland security forces in the planning stage, airport security stops very few – indeed, security expert Bruce Schneier argues that a lot of the security added in recent years does absolutely nothing, and is merely a “theater” designed to make us feel safer. Is that the kind of system that saves a jumbo jet full of people, every year?

It is also arguable that it simply doesn’t work – even in a post 9/11 world we still have the shoe bomber and the printer cartridge bombs – we’re more paranoid than ever before and people are still getting bombs on our planes.

Finally, it is also worth asking what ideological cost we are paying for these security checks.

We have to remember that the aim of a terrorist isn’t to blow up an aeroplane – that is merely a means to an end, and the end is, as is suggested by their name, causing terror.

Now, I don’t know about you, but when we’re all too scared to let a small child take a bottle of water onto a plane, in my book that suggests that we’re pretty fucking terrified.

Like many of you, I’m sick and tired of hipsters wearing “keep calm and…” t-shirts. But what is worse is that the whole meaning of them has been lost. As you may well know, the original meme comes from British posters that said “keep calm and carry on” to tell the public what to do during the Second World War.

That is what London does best – when the terrorists struck on 7-7 and blow up our trains and our buses, what did Londoners do? They stuck two fingers up at the terrorists, got right back on those buses and showed them that we were not going to be scared of them.

Air transport however, has taken no such approach. As news stories about parents forced to drink baby milk to show it wasn’t actually liquid explosive have shown, there is literally no substance that we cannot be scared of.

Seems a high price to me.

Luckily, of course, you can buy a bottle of water once you have passed through security, for twice the price. But that is a different blog post.

So the situation is this.

In order to stop terrorists we’ve banned every single substance we can think of that could possibly be used as an explosive, even though they’re still getting explosives onto the planes and we’re using up hundreds of people’s lives a year in a line of defense which may or may not be saving any lives.

Maybe it is time that we, at least reviewed, the situation.