I love to write programs. Statistical programming is my job, but for my blog I write programs for fun.
Testing? Not so much fun, but a necessary part of my job.
To me, programming is like eating candy or a mouth-watering dessert. Testing is like brushing my teeth afterwards.
If I eat sweets and don’t brush, my teeth will decay and fall out of my mouth. My teeth will yellow and my breath will stink. If I try to chew something, a tooth might actually break and need expensive repairs.
In the same way, testing enables me to take preventive steps to ensure that my programs don’t fall apart. I can make sure that my programs don’t break when they are being used, and I can reduce the time and effort required for “repairs.”
Andrew Ratcliffe recently blogged about ways to minimize the pain of testing. In an accompanying paper, he describes a testing framework (called the V-model) that can help the programmer “clarify the relationships between requirements, specifications, and testing.” This framework was developed in the 1980s, but I hadn’t heard of it before.
Take ten minutes to read Andrew’s blog and paper. Like a trip to the dentist, thinking about testing now can prevent pain and discomfort in the future.