Well, when the code is well and truly ruined, theres just one thing to do: back it out. The easiest way was to hold down Ctrl+Z (undo) until the code was backed up to a known good point. So we did that and then took a little time to reflect. Its important to reflect when things go wrong. You wont always have the right idea for whats next , but often you will.
I like to think that Chet and I are pretty calm about throwing code away. (Weve thrown away so much!) It always hurts but only until you do it. Then its like putting down a big bucket of water: a great relief. So we thought, and Chet reflected back on something he had said earlier in the process. We kept having to write procedural code inside the CustomerTest to manipulate the strings that make up a test. He had commented that the object wasnt helping us much, but we never followed up on it. We decided to think about it a little bit before we stopped for the day.