test-driven development ideas used for whole system

by Derek Sivers

Related link: http://safari.oreilly.com/JVXSL.asp?x=1&mode=section&sortKey=title&sortOrder=asc…



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....


2 Comments

bazzargh
2004-12-20 02:43:49
kent speaks...
If you liked the book, you'll probably be find the videos of his talk at the
Developer Testing Forum interesting. (the talk by Sriram Sankar about developer testing at Google is also well worth it). If you prefer audio-only Kent's talk is also on ITConversations in other formats.
bazzargh
2004-12-20 02:45:09
kent speaks...
whoops... I should point out (as its the kind of thing I would want to know before clicking) that these are free, no-reg required, and not just little snippets: kent's talk is a full hour.