This must be why I feel like yeast

This must be why I feel like yeast

Tim Bray, one of the developers of XML, comments in Language Fermentation on other postings bouncing around the Blogoshpere such as Strong Typing vs. Strong Testing from Bruce Eckel (of “Thinking in Java” fame).

One conculsion : Strong Typing is a kind of testing, which I’ll concur with based on my experiences with pascal, c and lotusScript: enforcing type catches sloppy coding mistakes.

Also : Test Driven Development (of which unit test is part of) may be one of the more useful concepts to come out of extreme programming practices, and that TDD may also lead to a resurgence of dynamical typed (or loosely type) languages, which can be more flexible and quickly written.

(Tim concludes with a neat Java Exceptions trick.)

The irony is not lost on him. The strong type-ness of Java was in part a response to loosely type-ness C bugs. My experience again: bad mixed typing (and bad casting), and pointers were the biggest causes of easily fixable runtime errors; both absent in Java. A strong testing mindset (testing before not after coding) may allow for the power and speed of C without the headaches that came with-it.

I wonder how a strong testing and the TDD mindset will effect the gathering of requirements?

One of the senior, very sharp, guys during my brief stay at the now defunct Orlan Karigan once made some comments about getting numerical data as part of the requirements for certain type of project. Part of signing off on requirements was agreeing that if the program gave output X for Input Y then it passed acceptance testing. This allowed the developers to code to the test data. Defacto test driven development. Only I could never figure out how to apply that sort of process to the sort of web work it did.

Phil Wiindley has also post comments on Tim’s bit. No doubt there is more such over in the Java.blog community, such as ::Manageability::

The Strong Testing tool set seems inmature, but rapidly improving. Lee mentioned Mock Object as one way to go beyond the trivial sort of unit testing that need to be done in the real world. I wonder if it would be possible to generate some unit tests beyond the stubs using Java Reflection? Something allong those lines bubbled to the surface recently on Slashdot: FindBugs – A Bug Pattern Detector for Java.

I guess my point is : Learn the TDD mindset now. Non trivial systems need non trivial verification of completeness and robustness. This is at least a start.

Leave a Reply