Finding a problem...
You probably don’t know this yet, but I’m in the process of preparing a course on Test Driven Development & Refactoring with Perl which I hope will find me some favour and income.
One of the trickier aspects, daft as it sounds, is finding a good problem to use for the course. Ideally you need something that you can see measurable improvement in as the code is developed, and a well defined set of requirements. One of the standard problems I’ve come across is that of scoring 10-pin bowling.
On one level 10-pin bowling is an excellent problem to solve, the rules for scoring are well defined, and there are enough little wrinkles to keep things interesting. However, I’m not keen, if only because bowling isn’t really a sport that everyone in the UK understands.
But I do like the idea of scoring something as my basic problem, so I’m thinking of using cricket scores. The only catch appears to be that cricket scoring might be a little too complex. There’s entire books written on the subject after all…
Maybe I’ll fall back to Bridge scoring, which is rather less open ended, but which does have various contextual rules and special cases to be taken into account.
I’m also open to any suggestions you all may have.
