Test Driven Development helps you develop software in most cases. Even when you don't know exactly how to reach your end goal, you can usually take baby steps to at least make progress. When you are developing an algorithm, however, you often can't take baby steps. I was once asked to develop a program to as a test for a possible contract. They wanted me to write a tic tac toe game that couldn't lose. I knew that I'd use a brute force recursive algorithm that tries every possible move. I found, though, that I couldn't make progress by whittling away at the problem. I had to come up with a design for entire algorithm and develop it without much benefit from Test Driven Design. Tests tell you what is needed but not how to do it. Deciding how to do it can sometimes be tricky. When it is, TDD may not help you get through it. You may have to develop the algorithmic part in one shot and return to test driven development afterward.
Download