0 errors, 0 failures

13 January 2007

I wrote my first proper Unit Tests in Ruby today. It felt good.

That probably sounds slightly gauche and hypocritical coming from a Rails developer. But remember – I’ve come from a front-end background; most of the time, other people make the tests; it’s up to me not to break them. I’m perfectly capable of editing tests to bring them in line with updated functionality; it just tends to have been the case that I’ve never really got my head around testing properly.

That changed recently, mainly thanks to Geoffrey Grosenbach’s excellent Peepcode screencasts. I’ve read a fair amount on testing up to now – Mark Pilgrim’s Dive Into Python is very good on the subject – but it was Geoffrey’s material that really clicked with me. (I’m watching his Capistrano one at the moment, and it’s certainly proving to be as good as the testing one).

I’ve always understood the point – and the utility – of test suites, but I’m pleased to have got my head around writing my own, starting with one (of several) projects on the back burner. Small steps at first, but it’s really satisfying to be working in a relatively test-driven manner.

And so I’ve been enjoying watching the dots fly by before those magic words come up: 0 errors, 0 failures. The Peepcode screencasts come strongly recommended, as well. Here’s to slightly more watertight code from now on.

Guitar Hero II screengrab

This is the first an (hopefully) recurring series on Infovore, in which I write about, well, great gaming moments in whatever I’m playing at the time – current or otherwise. Let’s hope I can keep it up…

Guitar Hero was my favourite game of 2006. No question of that. A wonderful, empowering, hugely satisfying experience that cried out to be played for the sake of it. The sequel, released at the end of last year, is at least as good. It suffers by not being the first, not having the wonderful new-ness the first game brought to the market, but it’s more attractive, more polished, has much better note-detection, and a swathe of new features.

And, finishing it for the first time this morning, it brought my first “great gaming moment” of this year.

Before we go on, a note on the slightly altered structure of GHII. To progress through the game, you play gigs of songs; complete a whole gig and you can move on to the next set of songs at the next venue. Obviously, they get progressively harder. In GH, it was only necessary to complete either four or five (out of five) in the set, dependent on difficulty level, in order to progress.

GHII roughly sticks to that, but with a twist: it only lists four songs in the group. When you complete the final song necessary to progress, the camera lingers on your gig, and the audience start chanting, demanding an encore. And the game ask you if you want to give them one. Of course, you click yes, and wait for the game to load a song that’ll be a complete surprise to you.

It doesn’t really affect how the game plays, but it adds to the experience – of being a rock god – so much. So: to return to my story.

The greatest moment in the game is the final encore. It’s the final gig. You’ve shredded your way through four hellish solo-heavy songs, playing a special gig at Stonehenge. And the crowd start clamouring for an encore. But this time around, they’re not chanting indecipherable words, oh no.

It’s quite clear what they’re yelling.

“Freebird! Freebird!”

They want you to play Freebird.

And up pops the game. “The audience are demanding Freebird! Will you give it to them?”.

You hit Yes.

“You’re really going to play Freebird?”

Yes.

“You’re definitely sure about this?”

Yes. Got to love the game’s sense of humour.

Practice mode, Guitar Solo i is what you’re looking for, says the loading screen. It turns out that it’s not lying.

If I leave here tomorrow…“. I stand in my living room, tapping out that wonderful acoustic first section, as hundreds of little computer people wave their lighters in the air. Crudely rendered they may be, but it’s a magical moment.

And then the tempo picks up, and the shredding begins.

It’s all over only a few minutes later. The grin is still on my face; it’s a hectic, exciting series of solos that rattle your wrists. As I write this, that grin is returning to my face, honestly.

It’s the most majestic pay-off. Two games, and seventy-odd songs later, the audience inside my PS2 are clamouring for one last song. They know exactly what song they want to hear. And finally, I can play it for them. That one moment – that’s Guitar Hero II in a nutshell: charming, exhilirating, a masterpiece of challenge-and-reward.

I have to go now. I can hear the crowd calling again.