I like to think of coding by need as walking on a red carpet from a problem to its solution. A friendly test failure or compilation error message nicely points to the next problem that needs the programmer's attention.
It is almost always possible and feasible to drive development with an end-to-end "automated user story" that will stay red until the story is really done. But sometimes the intermediate reds like lower-level unit tests and compilation errors all turn green and leave the programmer wondering what to do next. Searching for the next carpet fragment by reading design documentation.
One way to measure code design is to count the number of gaps in the carpet when implementing a story. In the ideal case the compiler and test messages will guide the programmer from start to finish, and virtually no (other) documentation is needed.
Premature green is another root of all evil.
Originally published on 2010-05-07 at http://www.jroller.com/wipu/entry/walking_on_red_carpet under category Art of programming