>IMO, the basic principle of TDD is solid: write the tests, then write the code.
This is where we disagree: the value of the code is secondary to the tests (this shouldn't be that big a point of disagreement: would you rather have no tests and the code of a functional program, or great tests and no program?), but if you design the tests first, you are going to design the program such that it is easy to write tests for.
Write the program first, then write tests for it in the places where it is reasonably worth your time to do so.