Archives for testing

The Matchbook Problem

I have been reading a lovely book by Paul Nahin, Digital Dice. The book is subtitled Computational Solutions to Practical Probability Problems. I don’t know how practical the problems are, but they are a lot of fun. Probability theory is rife with seemingly simple problems which turn out to be less simple than first appears. [...]

Head to Head testing

Wally’s comment is insightful. Giving a thing a name makes it possible discuss that thing. Witness the enormous discussion of Test Driven Development on the internet. The purpose of this post is to give a name to a testing practice I have found useful, and to explain why it is useful. I call the practice [...]

Clojure bowling problem

ObjectMentor’s Uncle Bob posted about learning Clojure via a bowling challenge. The challenge is to write a program to compute bowling scores. I decided to give it a go. I’m not a bowler, so my first step was to try to understand how bowling scores are computed. Once I did that, it struck me that [...]

binary search

I read the following in chapter seven of Beautiful Code. The author wants to make some points about testing, and opts to use binary search as a compact but non-trivial example. If you have never implemented binary search, or haven’t done so in a few years, I suggest you try that yourself before going forward; [...]

Eunit

PragDave has a nice article on test driven development using Eunit. Eunit is very lightweight, easy to use, and useful. Check it out.