Seven? Heavens!

May 30th, 2010

We took Ben and his friends bowling today for his birthday. His seventh birthday. I think I feel like this every year — how did he get so old so fast? — but I guess it gets worse (as it were) with each passing year. It’s strange to think that he’s at the same age where my “stream of consciousness” begins, by which I mean my memories are continuous and not the odd snatches you get of those oldest memories.

Two weeks ago, he asked me if he could write a computer program. He knows this is what I do at work and sees me working on the FFL at home, so it’s hardly a surprise that he’s interested. And yet I am surprised because he’s at precisely the age when I first wrote a computer program.

So, being that he was clearly “old enough” I had to decide how to fulfil his wish. Not having a ZX81 or BBC to hand (or an emulator — although I considered that) I decided to use Ruby and IRB to get that interactive style of programming that helps when you start out. And so, in traditional style, Ben’s first program was:

puts "Hello Ben!"

Making the computer “say” different things provided much amusement, far more than I expected for a boy who’s used to playing on a Wii. From here we progressed to the next natural step of getting the computer to say something lots of times.

Now, I’m not going to introduce him to GOTO, that would be harmful, so I showed him the next best thing in Ruby:

100.times { puts "Hello Ben" }

And playing with that provided almost an hour of further amusement!

In the two weeks since, he’s not mentioned it again. I suspect it was the same way with me; it was a few years more before programming really turned into an abiding interest for me. I wonder if Ben (or Jess for that matter) will follow in my footsteps.

I reserve the right to be disappointed

May 14th, 2010

So, one week on and the political situation has settled down into something surprising but perhaps not unexpected. I have to say that right now, I’m feeling quite positive. Most of the Tory old guard appears to have been swept away and the Lib Dems appear to have secured some really good concessions. The ID card scheme has been scrapped (fast!) and there’s an AV referendum on the cards, so on this I’m really happy. I am perhaps reserved about the changes in education; I don’t believe that any amount of political fiddling around with the education system is beneficial. So, interesting and hopeful times… but I reserve the right be disappointed.

Election night

May 6th, 2010

Like (I suspect) most people, not since 1997 have I been this interested in the election. In fact, I’ve never been so hopeful as at this time; the prospect of a hung parliament brings the possibility of electoral reform tantalisingly close.

I have vague memories of, what I think, was the 1983 election. This was the first election I was aware of and remember that the SDP were a new party. This concept that something new could happen with the government, that people could decide to change the way things were done was very exciting. I guess I’ve been disappointed ever since.

And I suppose that’s why I’m so hopeful now. In 1997 I was interested because I wanted to see the incumbents out. This time I’m more interested in who gets in. Maybe we’ll see some genuine (not Cameron branded) chang in politics in this country. I suspect, though, that I’m going to be disappointed again.

Anyway, let’s stay positive. It’s a long night ahead. I wonder how long I’ll be able to stay awake?

Capistrano task to backup production database

April 24th, 2010

One of the tools I’ve been using to automate my work on the FFL is Capistrano. If you’re looking to deploy a Rails app onto remote servers… well, you probably already know about Capistrano. If not, it’s a pretty good solution.

Something I need to do is perform remote database backups for the FFL. Getting Capistrano to automate this for me makes a lot of sense. I had a look around the available gems and plugins and could find nothing that matched what I wanted: Run mysqldump and keep the backup local on the server (I’ll deal with downloading and clean-up later).

I found a few helpful blog posts, however, and have come up with the following recipe that seems to work quite nicely:

namespace :db do
  desc "Backup the remote production database."
  task :backup, :roles => :db, :only => { :primary => true } do
    backup_to = File.join(deploy_to, "backups")
    backup_file = File.join(backup_to, "#{application}.backup.#{Time.now.to_i}.sql.bz2")
    on_rollback { delete backup_file }
    db = YAML::load(ERB.new(IO.read(File.join(File.dirname(__FILE__), 'database.yml'))).result)['production']
    commands = %Q{
      mkdir -p #{backup_to} &&
      mysqldump --user=#{db['username']} --password=#{db['password']} #{db['database']} | bzip2 -c > #{backup_file}
    }
    run commands do |ch, stream, out|
      puts out
    end
  end
end

Many thanks go to Nick Poulden and Brandon who showed me the way with their articles.

This post was brought to you by the power of Orbital.

Parties

April 22nd, 2010

I missed the leadership debate last week, much to my regret now, because I was out with my brother. We were keeping busy the night before his wedding. Badminton, beer and pizza. The American Hot at Pizza Express is to be recommended. I recommend it. There, recommended.

Anyways… the next day I was fulfilling Best Man duties. Being that this was, like, important, I made a list and even went so far as to cross items off as I went. This was mainly because I’d forgotten about The Rings until the day before and was feeling a little insecure that I might mess things up.

I had a certain amount of running around and subterfuge during the day as I prepared for my speech. I managed to keep the fact I was presenting slides on a projector secret until just before the speeches started. If any of you remember my wedding, Pete stitched me up with some embarassing pictures of when I was growing up. Keeping with tradition, I turned the tables and did the same right back.

As is usual when I talk in public (which happens from time to time) I found the opening couple of minutes hard but settled in pretty nicely after that. There was a lot of laughter. Nobody cried. Nobody booed. People said nice things afterwards. My favourite comment from one of Pete’s friends was, “Mate, I thought you were going to bomb like Dresden but you were really good!”

I guess I should consider all that sufficient sign of success. I couldn’t help but feel a bit of angst over the few jokes that died when I woke up the next morning but I think I should just get over myself. Job done.

The wedding as a whole was just fantastic. Thankfully, both Pete and Sophie are very laid back and that atmosphere pervaded the day. I’m not what I’d call “close” to my family like some people are; I think it’s because I’m quite independent in spirit and the age gap between myself and my brother and sister just emphasises that. However, on the wedding day it felt really great to be surrounded by my family, both close and distant, a feeling of real belonging that I don’t often feel; I think this is something that’s increased for me since we’ve had children. Sophie’s large family — she’s one of six — are also very nice, it must be said.

I watched tonight’s leadership debate in full… while I did Wii Fit step exercises and then the laundry.

I should start by declaring my interests: I’ve always felt closest to the policies of the Liberal Democrats. So, I don’t know if it was because I “naturally” support Clegg but I did feel he came out best again; certainly, his closing statement really lifted my spirits that we might see some change from the two-party, self-serving sludge that politics is today.

That’s not to say the other leaders didn’t have their moments. I was with Cameron on the need for greater social responsibility. And with Brown… hmm… perhaps tellingly I can’t remember a particular case of him impressing me but I remember the feeling. He did have had authority and experience but given that Labour long ago lost my trust I’m afraid that’s just not enough.

Interesting times.

Music odyssey completed

January 5th, 2010

At the weekend I completed the musical odyssey I started in 2008 and reported on last year. The last track to come out of the giant shuffle was Song For Shelter by Fatboy Slim, which was somewhat fitting and certainly a better finish than the penultimate track. This means all my digital tracks are now recorded in my Last.fm profile for freaky MI5 profiling posterity. Now, I just need to go back and look at all my vinyl…

New year, new Ubuntu 9.10 Atheros wireless issue

January 1st, 2010

Having finally got off my backside and purchased an external hard-drive to back up all our files, I thought the new year would be a good time to upgrade to the latest version of Ubuntu, namely 9.10. Everything went very smoothly until I rebooted and the wireless network card failed to initialise. I let out the customary howl of anguish of the Linux user faced with unexpected hardware issues. (I really did and Ben asked what was up. I snapped back at him; a great start to the year.)

Now this was particularly galling as I’d booted up on a USB memory stick to check for hardware compatibility and everything had worked fine. I was just gearing up for a complete rebuild of the machine when I thought I’d have a quick poke around /etc/modprobe.d to see if anything stuck out. And so it did: blacklist-ath_pci.conf. I tried sudo modprobe ath5k and up came the wireless. I then used sudo gedit /etc/modprobe.d/blacklist-ath_pci.conf to comment out the last and everything is back up and working.

It turns out that I’d tripped over bug 429595 because I’d previously used different drivers and this machine has been continuously upgraded for the last two years. Fresh installs aren’t affected, hence nothing showed up when I booted up on the USB memory stick. So… panic over.

I also encountered a problem with Gwibber (possibly bug 437562) but re-entering the account details cleared that up.

It lives!

December 7th, 2009

I once read that your blog is “dead” if you don’t update it at least once every 3 months. Well, it’s been 3 months and 1 day since my last post and I’ve been meaning to posts for weeks months so I thought I’d better do something about it.

So, where have I been? Well, mostly on Twitter, as predicted. Also, I’ve been very much tied up getting the all new Fantasy Film League back up and running. This has sucked up pretty much all my spare time. (That at the bathroom demolition refit.) With that in mind, I’m going to keep this short so I can back to the grindstone.

I’ll see if I can keep posting here but past predictions have been laughably inaccurate, so no promises. One thought I had was that I might use this as a place to post things I’ve learnt on my FFL oddessy. For instance, I’ve been mighty impressed by the Ruby on Rails guides site. It’s a great place to learn or brush up on your Rails programming.

Anyways… hope to see you round here again in the not too distant future.

Holidays

September 6th, 2009

We took two week-long holidays this year. The first, at the beginning of August, was to the south coast of Devon. We stayed, as we have for the last four years, in a caravan and spent our time on the beach and visiting local farms and the like. You could take the kids to just about any beach and they’d have a good time, the only requirement is it isn’t raining. This year, for the first time, our luck with the weather didn’t hold and we were subjected to a couple of truly miserable rainy days. This cemented the idea in our mind to try something different next year and go slightly further afield.

In the last week of August we went to Disneyland Paris. Overall, it was a very good, if tiring, holiday. The first thing I really enjoyed was being able to catch the Eurostar from London and within a couple of hours walk out of the station in France, turn right and straight into the park.

The whole park is a very polished operation and despite my usual corporate cynicism, I did find myself being excited by the whole experience… possibly contagiously from the children. More than any amusement park I’ve been is before they really due try to amuse you at every turn, not just on the rides. One slightly odd detail was the incessant music being played wherever you were in the park; sometimes this worked better than others.

We stayed at one of the (cheaper) Disney hotels, which was nicely themed and entirely adequate given that we really only stayed there when we were sleeping. One of our main concerns was that as we were all sharing a single room, getting to sleep was going to be awkard. However, we were up at 8am each day, into the park around 9am and not back home until after 10pm, so we all flaked out immediately as soon as we got back.

The queues weren’t too bad (with the notable exception of an hour and fourty minutes for Crush’s Coaster) and some judicious use of the Fast Passes allowed us to get on almost every ride in the five days we were there. Ben’s favourite ride was Star Tours, which we went on three times. It has a delightfully 80s overtone that fits very well with “classic” Star Wars. Jessica’s favourite the Buzz Lightyear ride because she loves the “Ooo! The Claw!” aliens. Again, that ride got three goes. By the end of the three days we were pretty worn out and it was definitely time to head home.

The only downside was the food. This was very expensive and rather samey, although we rarely ventured above the fast food level, so perhaps if you’re flush you get a better experience.

I’d definitely recommend going if you have young children, for them it really will be magical. That said, I don’t think we’ll go back for a good few years, partly due to the expense and partly because we feel we’ve really “done” it and going back wouldn’t live up to this year’s experience.

One thousand tracks and counting

August 16th, 2009

Well over a year ago, I finished ripping all my music onto the computer and set about listening to every track. Today I passed the 1000 track mark. Clearly I don’t listen to music on the computer all that often. In fact, it’s about 1.7 tracks a day on average. My in-car listening is very much confined to podcasts these days.

Interesting note on the state of applications: I was about to fire up a spreasheet app to do the above calculation when I decided to see if the internet could do the necessary work for me. Short answer: Yes. It’s the future, baby!