This inspiring phrase from Kent Beck’s book Test-Driven Development By Example:
“When we write a test, we imagine the perfect interface for our operation. We are telling ourselves a story about how the operation will look from the outside. Our story won’t always come true, but it’s better to start from the best-possible application program interface (API) and work backward than to make things complicated, ugly, and “realistic” from the get-go.”
The following example test is just a little simple one-method thing, but I realized this same approach could be used to design an entire system!
You can just start typing some pseudocode the way you *wish* you could type *if* your class/system was “just that easy”.
Then, when done, break it down into bits, and try test-driven development to see if you can make it so!
Just a 1-hour-old idea. Feel free to rip it apart….