Voskhod instruments by Tom Royal on Flickr
Valentina Tereshkova with Vostok 6 by Tom Royal on Flickr
Voskhod Capsule by Tom Royal on Flickr
Chartwell by Tom Royal on Flickr
Chartwell by Tom Royal on Flickr
Heron by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr
Highgate Cemetery by Tom Royal on Flickr

You're using a very old version of Internet Explorer which can't show the photos that should be in this box. Please consider upgrading to a newer version of IE or an alternative such as Firefox. Thanks.

Kittens vs the Daily Mail

September 28th, 2010

This is what the Daily Mail website now looks like on my computer. Let me explain.

It’s hard to avoid the Daily Mail. Even if you’d never choose to buy a copy, links to its website are everywhere (except this post, obviously). Some are easy to spot and avoid, but when one is obfuscated by link shortening services – particularly common on Twitter, for obvious reasons – it’s all to easy to visit Mail Online unintentionally. And this is bad for two reasons: it’ll make you very angry or upset*, and it helps to bolster the newspaper’s website stats and online advert impressions.

My solution involves kittens. All the best solutions do.

Kitten Block is a Firefox extension that blocks the Daily Mail and Daily Express websites. And nothing else. There are no configuration settings, options or adjustable blacklists and no override option, so once installed it looks rather like this:

If you click on a link – shortened, full or whatever – to either site the extension intercepts it and redirects you to a special page on www.teaandkittens.co.uk, as pictured above. The extension can of course be disabled or removed. It’s free, obviously – the code that makes it tick is mostly cobbled together from snippets on the Mozilla Developer Hub site, so I take no real credit – and anyone’s welcome to edit, reuse or improve it.

Kitten Block has been tested on Firefox 3.6 under Windows, but use it at your own risk – please let me know if you spot any bugs, problems etc. You can get it from the Mozilla Addons site, here.

UPDATE: Kitten Block version 1.1 is now up on the Mozilla Addons site. It includes support for Firefox 4 Beta (up to 4.0b7), optimised code (shorter, smarter, redesigned to prevent incompatibility with other addons) and – very excitingly – a new kitten icon.

UPDATE 2: Now also available for Chrome!

* Or both, obviously.

Hacked off by statistics

September 22nd, 2010

Here’s an interesting story from the Press Association, today:

One in five university students have hacked into computer systems, from using someone else’s online profile to breaching internet shopping accounts, a survey has found.

The idea that “One in five university students have hacked into computer systems” is pretty remarkable. Of course there’s no indication given of what the survey means by “hack”, but even assuming it’s something vague, along the lines of “bypassed some sort of computer security measure to use something without someone’s consent” it’s still a very high percentage.

So what does the research itself say? You can’t look it up online, but as a journalist I’m lucky – I can ask the PR for a copy. So I did.

“Tried” and error

The most immediate problem is that the survey doesn’t actually ask the question “have you ever hacked into a computer”. It does ask “Have you ever tried hacking”, and 23% of those surveyed answered “yes”.

Having “tried hacking” and “hacking into” are not the same thing. If I walked to any computer in this office and attempted to log in using the password “hellokitty” I could say, perhaps, that I’ve “tried hacking”. I would not have hacked into anything. Next paragraph of the story:

The survey of 1,000 university students found 37% had hacked Facebook profiles, 26% targeted emails and 10% breached online shopping accounts.

This suggests that 37% of the 1000 students surveyed (there were, in fact, 1001, but never mind) have hacked into Facebook. That’s completely wrong. In fact, the question is “have you or a friend ever hacked into the following”, and it was only put to those who answered “yes” to having “tried hacking”.

So, 37% of the 23%, or 10.5% of the total sample, have either “hacked into” Facebook, or rather said-they-thought-they-knew-someone-who-has. You have to wonder if they’re even correct about that. The same error applies to the 26% (really 7.4%) and 10% (3.8%) figures. Next:

Nearly half of the students (46%) had also had their own social networking or email accounts hacked, with 41% saying their passwords to university networks had been abused by a third party.

Again, this is just bollocks. The 46% figure refers to the question “Have you or any of your friends had their (sic) Social Networking/email account hacked?”. The 41% refers to the question “has anyone ever abused your passwords” with no mention of university networks.

The article goes on. And it’s not alone: the same mistakes – particularly attributing percentages to the whole group, when in fact they refer to the much smaller subset, and ignoring the “or a friend clauses” in the questions – can be found in other stories too.

So where does this all come from? Well, here’s the start of the press release:

Research published today by IT security experts, Tufin Technologies, reveals that 23% of college and university students have hacked into IT systems. Of these hackers, 40% waited until after their 18th birthday before their first hacking attempt. On a positive note, 84% of 18-21 year olds recognised that hacking is wrong. However, 32% identified that hacking is ‘cool’ and worryingly, for the targets of hackers in this age group, 28% considered hacking to be easy.

This research, which was supported by the Association of Chief Police Officers (ACPO) – builds on a study carried out in March amongst teenagers. The teenage research survey revealed similar attitudes towards hacking, although only 18% considered hacking to be easy, suggesting that hackers’ experience develops through their teenage years. Both surveys found that there was no gender bias in hackers with an equal split between boys and girls.

The survey which was carried out amongst 1000 College and University students from across 5 London Universities and 3 Northern Universities showed that just over one in three students said that they hacked for fun. A further 22% cited curiousity as their main reason for hacking. An entrepreneurial 15% revealed that they hacked to make money. This was further reflected in the types of sites that had fallen victim to these youngsters. The survey found that 37% had hacked facebook accounts, 26% email accounts with 10% breaching online shopping accounts. Although 39% of hackers use their own computer, others have used public computers and networks with 32% a university machine and 23% using an internet café.

Unfortunately, the study also discovered that nearly half of the students (46%) had fallen foul of hackers having had either their social networking or email accounts breached. A further 41% said that they had had their passwords to university networks abused by a third party.

You can read the whole thing here.

It’s easy to see how the errors were copied-and-pasted out: 23% “have hacked”, and “the survey found that 37% had hacked facebook accounts, 26% email accounts with 10% breaching online shopping accounts”, with no mention of the “or a friend” clauses. These errors don’t take much research to spot, but it seems that nobody checked the survey findings, let alone how the survey was conducted.

Call the cops!

Incidentally, you might wonder why this survey, which is clearly designed to promote the computer security firm behind it, mentions the Association of Chief Police Officers, and can be found on that organisation’s website.

After all, ACPO doesn’t exist to help firms promote their services through annoying press releases – it’s partially funded by a grant from the Government. And yet it appears in the release, and pops up in many of the news pieces:

The research by Tufin Technologies and the Association of Chief Police Officers (ACPO) found that…

(Source here)

The report, commissioned by Tufin Technologies and the Association of Chief Police Officers in the U.K

(Source here)

So I asked the ACPO press office, which is easy to do if you’re a journalist but not so much if you just happen to have read one of the stories. The answer? “We weren’t involved in the research at all.”


Incidentally, I also asked the National Union of Students what it made of the whole thing. Its response, in its entirety, was:

“We can’t comment on a survey without full details of the methodology – how was the sample selected, what’s the full demographic of the group, etc.”

How terribly sensible. Clever people, students.

* Sample: me. Completely made up margin of error: 2%.

On Nokia

September 17th, 2010

Nokia, maker of mobile phones and annoying jingly tunes, held a big conference this week in London. I wasn’t invited. On the second day, HTC – previously the maker of truly mediocre Windows Mobile handsets and now crowned iPhone-killer-in-waiting – held its own conference just across town. I wasn’t invited to that, either, but I digress.

In response to HTC’s conference Nokia sent some people to stand outside with balloons, and gave journalists sandwiches to take along. Journalists were, for reasons that I don’t really understand*, outraged. But then it’s popular to hate Nokia these days. And that got me thinking about Nokia:

  • It produced electronic devices just as they started to sell to home and small business users
  • It innovated several key technologies in that field
  • At the time, its products were very well designed – a cut above most alternatives – and well made, too
  • .. and they could play games!
  • It did very well out of this, selling shedloads of some excellent models
  • Over time, though, it began to sell a confusing array of products, some of which just weren’t great
  • Its once-loved operating system began to really need a drastic overhaul, just as a slightly shonky rival OS picked up market share on devices produced by a range of manufacturers
  • Games went to other platforms
  • It even produced some touchscreen devices, but they just weren’t very good and didn’t turn its fortunes around

Remind you of anyone? Nokia now is Apple in the mid 1990s, before the iMac, OSX and the return of Steve Jobs. I wonder what’ll happen next?

* I like sandwiches. And balloons.

Nokia 5110 image by Dominic’s Pics, used under CC license.

Extending battery life on the Aspire One A150

September 15th, 2010

I love my little Acer Aspire One laptop. It’s small, light, has a decent keyboard and because I picked it up for just £150 I’m quite happy to lug it around the world protected by only a jiffy bag and / or rolled up in a jacket. And, since I put Windows 7 on it, it runs all the software I need for work quite happily.

There’s one problem, though: the battery. The A110 and A150 models shipped with a tiny 2200mAh three-cell battery that, in my experience, runs Windows 7 for around 90 minutes. And so, this week, I upgraded to a new, seven-hour battery life. Here’s how.

1) Fit a bigger battery

First, and most obviously, you need a bigger battery. Although it’s possible to squeeze more life from the three-cell model, for a full working day you’ll need more juice. Various third-party batteries are available, but having written about how lithium-ion technology works, and being in possession of a very real fear of explosions, I picked up the standard Acer 6-cell part. This costs £95 all-in from the Acer Store and holds 5800mAh.

2) Disable Windows Aero

Next, fix the Windows power settings. The key thing here is to turn off Aero graphics off and set reasonable periods for display timeout and sleep. If you’re using the laptop for stuff like word processing, this alone will make a difference to the battery life even without the larger battery pack.

3) Fix the brightness settings in the BIOS

Finally, you need sort the brightness settings. This is the tricky one. The Aspire One was designed for ten levels of screen brightness, but later BIOS revisions prevent the use of the lower ones, leaving the screen stuck on around 40% or more. This was done for a reason – some displays are faulty, and flicker at low brightness – but the “fix” applies to all models.

If your Aspire One has ten levels of brightness control, then you’re all set. If it has only a few it is possible to fix the problem, but you may find that some lower levels cause flickering (mine’s just fine on all settings). Also you may brick your laptop or invalidate your Windows license, so beware.

To restore all ten brightness levels you need to install a BIOS meant for one of the Aspire One clones made by Packard Bell and Gateway. Instructions, and the necessary BIOS files, can be found on this excellent blog. A further word of warning, though: I found that installing the Packard Bell BIOS necessitated a complete reinstall of all drivers (Windows 7 handled this automatically) and voided my Windows 7 license (fixed by phoning the authentication line).

And that’s that. Armed with the six cell battery, lowered Windows power settings and a new BIOS that allows for the display to be dimmed, my little Aspire One’s happily chugging away after six hours away from the mains, connected to Wifi, with more power to spare – and for far less than the cost of a new six-cell netbook.

Mouse click event handling in Flash Actionscript 3 (AS3)

September 11th, 2010

When I first used Flash I learned to program Actionscript 2, and handling clicks on objects was easy: you could simply attach code to the movieclip or button. Today I had to do the same thing in Actionscript 3, and it’s all changed, so I thought I’d write the whole process down – from scratch, as it’s a handy first step for those new to ActionScript and Flash. Here’s how it works.

First, you’ll need a movieclip or button on the stage with an instance name assigned. To create one, click the rectangle tool and drag out a box. Choose the selection tool and double-click it to select.

Right-click and choose Convert to Symbol from the menu. Give the symbol a name for the library (“block”, perhaps) and leave Type as Movie Clip. Click OK.

Make sure the clip is selected (if not, left-click), then look in the Properties toolbar. Enter an instance name: I’ve used “m_block_1”. Here’s how it should look:

The MovieClip in Flash CS5

Now it’s time to add the ActionScript. Right-click on the current frame – frame 1 – in the timeline, and choose Actions. The Actions window or panel will appear.

In ActionScript 2 (AS2) you could add the actions you want performed when the MovieClip is clicked directly to the clip (or by using something like m_block_1.onRelease = function() {}). In AS3, though, we have to add them to the timeline, and we need to add two bits of code: an EventListener for the MovieClip, telling it to do something (a function) when something happens (a mouse event), and the function to perform on that event.

In this case, we need to add the event listener to m_block_1, and we’ll have it call a function called doSomething. Code:

m_block_1.addEventListener(MouseEvent.CLICK, doSomething);

Then define the function doSomething. We’ll simply have it trace for now. Code:

function doSomething(event:MouseEvent):void{

trace(“Box has been clicked”);


And that’s it. In this case the function will execute when the MovieClip is clicked, but you can also listen for mouse button press (use MOUSE_DOWN instead of CLICK), release (MOUSE_UP) and other non-button actions such as leaving the object (MOUSE_OUT). There’s a list on the Adobe site here.

You may, later on, wish to remove this event handler. To do so, replace addEventListener with removeEventListener:

m_block_1.removeEventListener(MouseEvent.CLICK, doSomething);

It’s even possible to put removeEventListener in the function called by addEventListener, limiting the function to running on the first click only. If you’re using a Button rather than a MovieClip the whole process is just the same – it makes no difference to the code.