andrew's blog

Olympic farce

It's not often that I watch the TV with my mouth open, but I've just been doing precisely that. I've been watching the news coverage of the Olympic torch relay through London today.

What a complete and utter farce.

The torch relay is meant to be a celebration of the Games and how they connect to the people around the world. Instead we saw a massive security cordon, protesters screaming at the police, and Tessa Jowell trying to make out that nothing's wrong.

When will Labour listen? We don't support China's brutality. We're not prepared to pay for London 2012, just as we're not prepared to pay for any of your other incompetent failures.

At least by 2012 their flame might have been extinguished for another decade.

Site upgrade

So, our website provider upgraded to PHP5 and the site stopped working properly. I figured I could just upgrade Drupal and it would all be dandy.

Reader, I broke the website. But I've now managed to get it back working again, by reinstalling Drupal and upgrading Gallery to the latest version too.

Hopefully it's all working properly, but if there are any problems, please let me know!

Harried Harman

So Harriet Harman apparently wants to introduce a law to ban the buying of sex. Unfortunately for her, New Labour's calamitous autumn (and winter) leads one to suspect that there are ulterior motives somewhere. Rather like the hellfire and brimstone southern US politicians who decry homosexuality but are then caught trying to buy it in a public lavatory, is there some hidden motive behind her campaign? And one can only marvel at the childish naivety behind the presumption that merely banning something in law is sufficient to prohibit it.

Also, wasn't this the Government that banned campaign contributions from anonymous donors, yet wasn't Harman the politician that accepted one anyway and who took out illegal loans to fund her deputy leadership campaign?

As for the law itself, I'd better cancel the monthly transfer I make to Regan's account, in case I get arrested. Merry Christmas, Darling!

John Rutter meets his match

We just got back from what we hope will be an annual tradition - going to the 9 Lessons and Carols from St Alfege Church in Greenwich. I first went in 2003 and have been every year since with a different combination of girls. Buffy is the big challenge of course. Last year we left during O Come All Ye Faithful. This year, she and Regan left in the middle. She Had Had Enough. And that was that.

As for Katie, she was recovering from a cold, had been to a dance party in the afternoon and was pooped. She wasn't in the best of moods and wanted to leave too. But I really wanted to stay, not least because Richard Brasier, the new organist, was playing Messiaen's Dieu Parmi Nous, one of the most sublime Christmas organ pieces there is, at the end. So I tried to keep her entertained by talking up what was coming next.

How could she not like the jolly charms of Rutter's Shepherd's Pipe Carol? Isn't it fun, Katie?

"No, Daddy. It sounds like terrible goblin music."

Oh well, there's always next year.

Having fun with goats

When we were young, we used to receive the Radio Times every week. Back then there were only three television channels (four from 1982!) and four main BBC radio stations. One week - I still remember it clearly - there was a listing on Radio 4 for a programme entitled "Having fun with goats". The text beneath it said "We regret that in the interests of public hygiene, this programme has been replaced by an episode of I'm sorry I haven't a clue". It's good to see that programme-makers have a sense of humour.

I'm reminded of goatplay by the debate which crops up at this time of year as to whether charitable giving is really a gift or not. You can walk into a charity store and 'buy' a goat or similar animal for a friend. You then give them a card to let them know what you have bought them on their behalf.

I have to say, this is brilliant advertising on behalf of the charities. Well done to them. Because the idea is in fact the biggest load of cobblers going. If I choose to give to charity, good for me. But I can't both give to charity and give you a gift. Charitable goat-giving is an attempt to have your cake and eat it.

By means of demonstration, I came across this howler this week. It's a competition, where the main prize is... a goat. If you still doubt that I'm right, consider how you would feel if you received an e-mail telling you that you had won the competition. Would you feel any different if you later learned that everyone had received the same e-mail?

In the midst of all the Christmas madness we’d really appreciate it if you’d take five minutes to take our 2007 poll. It’s the time of year when we all look back and think about the last 12 months and we’d like to know how 2007 was for you. Our four favourite answers for the final question ‘What’s your 2008 New Year’s Resolution’ will have a present donated to Oxfam Unwrapped on their behalf. Click here to take our poll and you could win a goat or clean water for someone who really needs it – that’s got to be worth five minutes!

A crossword

Here's a simple crossword:

+---------------+
|##c#scab#asides|
|a#l#u#m#p#u#i#l|
|grasp#analgesia|
|g#s#e#s#w#a#s#u|
|resorts#parking|
|a#i#s#e#a###m#h|
|n#fee#downshift|
|d#i#d##d##e#l#e|
|increased#aha#r|
|s#a###c#e#h#r#h|
|esthete#proviso|
|m#i#r#n#o#r#t#u|
|economics#sails|
|n#n#d#c#e#e#e#e|
|tasked#asks#s##|
+---------------+

OK, so it's hardly the greatest crossword ever. 'Esthete' is an American-looking spelling and there are too many 3-letter words in the grid. But here's the catch - both the grid and the words were generated by computer.

The grid-writing software was knocked up in perl. It fills the grid at random, ensuring half-turn rotation and then checks for certain undesirable features in the grid, for example too many blank spaces together, two-letter words, singletons, etc. It adjusts for these features and keeps rechecking until it has something it likes.

The grid-filling software I wrote in C++, after putting together a prototype script in perl. It tries words by brute-force with a fairly rudimentary look-ahead function. It's not brilliantly efficient, but it can fill a 15x15 cryptic-style grid in no time. Very tight American-style grids take it a long time and use up a lot of memory too!

I wrote these scripts after being asked to compile a crossword for the December issue of Accountancy magazine.

I may even post the source publicly if there's enough interest.

Syndicate content