Friday, July 06, 2012

The Perl script the powered the Alan Turing petition

Back in 2009 I was the person behind the successful petition asking the British government to apologize for the treatment of Alan Turing. As I worked on this completely alone (mostly via email, Twitter and phone while commuting to work) I needed some assistance to muster enough interest. Part of that backup was the following Perl script. What it does is look for celebrities that had signed the petition.


(Note that this script probably doesn't work any more because Wikipedia have changed their search functionality and the Number 10 petitions web site has been changed to no longer show the names of signatories).

That script ran hourly via a cron job and its output was emailed to me. It works by searching for each the name of each person who has signed the petition (since the last time the script ran) on Wikipedia and then seeing if a page exists for that person. If it does then it looks to see if that person is British (in any variation) or Irish. If so, it would output their name and page.

Initially, my parents had been reading the list on the web site and texting me to say that someone well known had signed, but that became impossible as the number of signatories increased. Hence the script.

I wanted to know who had signed for the simple reason that it would give the press something to write about. After the initial rush of publicity I wanted to keep the petition in the news and there were a couple of ways to do that: get lots of people to sign so that the number of signatories was newsworthy and spot when famous people signed.

A famous person signing gives the press something to say. In the end, many famous people did sign and their names became an important part of the media story around the petition.

Labels: ,

If you enjoyed this blog post, you might enjoy my travel book for people interested in science and technology: The Geek Atlas. Signed copies of The Geek Atlas are available.

5 Comments:

Blogger Nikolay Mishin said...

good script

8:40 PM  
Blogger Nikolay Mishin said...

good script

8:41 PM  
Blogger AP Resources said...

Hi John

I listened to you on TWiT a while ago and was very impressed. I'm also really pleased to see that you used Perl for this. I bet you didn't have all that error trapping in Day One :-) Anyway, thank you for sharing this. It's great to actually see some code that had such an effect, and hopefull it will inspire others. As an accomplished programmer and constantly angry person, I keep telling myself I will do things like this when the kids have left home. But I bet I won't.

9:41 PM  
Blogger AP Resources said...

Hi John

I listened to you on TWiT a while ago and was very impressed. I'm also really pleased to see that you used Perl for this. I bet you didn't have all that error trapping in Day One :-) Anyway, thank you for sharing this. It's great to actually see some code that had such an effect, and hopefull it will inspire others. As an accomplished programmer and constantly angry person, I keep telling myself I will do things like this when the kids have left home. But I bet I won't.

9:41 PM  
Blogger AP Resources said...

Hi John

I listened to you on TWiT a while ago and was very impressed. I'm also really pleased to see that you used Perl for this. I bet you didn't have all that error trapping in Day One :-) Anyway, thank you for sharing this. It's great to actually see some code that had such an effect, and hopefull it will inspire others. As an accomplished programmer and constantly angry person, I keep telling myself I will do things like this when the kids have left home. But I bet I won't.

9:42 PM  

Post a Comment

Links to this post:

Create a Link

<< Home