Todays XP Installed reading chapters are "Unit Tests", "Test First, By Intention", and "Releasing Changes".
Chapter 13 is about unit tests. It starts by saying why they are useful: they're about like mini-acceptance tests; if I change something, I have some assurance that nothing broke if the tests pass. It then goes through a simple example, answering the question of "How do I unit test a module that depends on other incomplete modules", and then goes on to answer questions regarding testing.
Chapter 14 walks through a (supposedly) actual TDD session between the authors of the book. In SmallTalk. In it they create a summary class, for what I assume is supposed to be some form of order/requisition summary.
Chapter 15 talks about how changes are released from a developer work station to the wilds of /dev. Basically, once at a sufficient milestone, (hopefully at least daily), you go through and merge you changes with any more recent changes, and then commit to dev / the_trunk / svn / source_control / the_big_round_file_in_the_sky once all tests are back to passing at 500%.
Discussion:
1. Why is this paper interesting or significant?
It briefly mentions some of the problems with TDD- testing the database tends to be finicky, and is better avoided in favor of using mocks and a limited set of direct to DB tests; threaded things are hard to test; automated testing of the GUI never ends well, etc. I think they could have generalized "testing the database" to "testing something with external effects"- if it goes outside the PC bounds, by network connection, USB, serial, or other, chances are there'll be problems. Even if it's all on the box, going outside the App Domain (file access; communicating with another process) can be finicky or nearly impossible to test). They also mention "don't test things which are obvious", which is nice, and one of the short comings in my previous experiences with TDD.
2. What are the faults of this work?
I apparently said it last time, but I'll say it again: TDD tends to have one of two effects on a code base. Either a massive glut of tests add to the momentum required to make any sort of non-trivial (non-additive) change to the code base, or the testing is so sparse that it doesn't really provide any guaranty that nothing broke. Or, even better, it'll do both.
I'm in favor of testing those things that need to be tested. Those things that you look at and somewhere in the back of your head is the tiniest bit of self doubt. Where there is something worth testing. Too often I see unit tests akin to "Do I get an empty collection on construction", which just robs the usefulness of having tests to refer back to.
That, and SmallTalk? Srsly? You put a note at the top "You'll do fine", then spend a quarter of the chapter explaining the idiosyncrasies of SmallTalk in a planet dominated by the bastardized offspring of C? Srsly?
3. What is the possible future work extending from this work?
In theory unit testing and proper handling of releasing to dev. In practice, half of my work is tied to the micro controller, a wonderful combination of C/C++ (typically unfriendly unit test frameworks), low memory availability, and low program space. The problems at this level are more likely to be a faulty hardware setup then faulty code. But, that's just my opinion.
