The parable of the paint roller
As I mentioned, I spent the remainder of last night painting the nursery (or what will become the nursery). I must’ve been getting really tired, or, more likely, it’s the result of a Baptist upbringing, but I started to draw parallels to my day job (writing software). I spent most of my time taping up skirting boards and windows. In fact, the majority of my time was probably spent preparing to paint, rather than actually getting anywhere near the walls with the roller. But, all this preparation meant two things happened: the actual painting went much quicker; and it was a neater job in the end. And that got me to thinking about testing, specifically, test driven development, which, coincidentally, I’ve just given a presentation on at work a couple of weeks ago. Why write your tests before you write any code? The reasons are the same as my painting job: you’ll end up with neater, smaller code written faster with less mess to clean up afterwards. You’d think I’d learn my own lesson, but I’m still in the habit of getting down to coding instead of testing. Maybe I should paint more rooms in the house to drive home the lesson.