Tag Archives: TDD

Pong in HTML5 Canvas and YUI3, with tests!

In case you’re one of my clients, you might be wondering why I’ve been slacking off recently. Here’s why: I’ve been teaching myself ‘grown up’ JavaScript under instruction of Douglas Crockford (in book and video form, obviously). Crockford never mentions Test Driven Development, probably because he doesn’t do it. But I do, so I’ve been learning to do that in JavaScript too.

So here it is, HTML5 Canvas Pong.
Continue reading Pong in HTML5 Canvas and YUI3, with tests!

Optimising specs for ActiveRecord scopes and other database-dependent functionality

After recently switching to a lower-performance laptop for my regular development tasks, I decided to spend a bit of time cleaning up some long-running rspec examples. I found that some misunderstanding of rspec’s features had led me to write highly inefficient specs.
Continue reading Optimising specs for ActiveRecord scopes and other database-dependent functionality