TDD Is Not An Algorithm Generator
vladimirlevin.blogspot.co.uk
vladimirlevin.blogspot.co.uk
This is why I have to watch co-workers create dozens of useless error classes and utility functions, and totally ignore YAGNI, before actually taking a single step towards a working program.
If you don't know the algorithm, and haven't figured out the abstractions, then just slinging some implementation code is the easiest (and laziest) thing you can do. It's basically a way of avoiding having the necessary conversations. In this case, the question that needed answering before beginning TDD was: "How does one efficiently solve a sudoku puzzle (as opposed to just manipulating one)"
What it usefully replaces is bikeshedding. It lets you try out the design you have in your head, in bite size pieces.
But if the design in your head is an algorithm that can be expressed in natural language, then TDD will let you take that and make a loosely coupled, maintainable program out of it.
Good post on the difference here: http://cumulative-hypotheses.org/2011/08/30/tdd-as-if-you-me...
Also I applaud Ron for posting an utter failure to get the job done. MANY people run into issues like this (lord knows I have) and documenting it for everyone to see is something we need more of.