Wednesday, July 12, 2006

Hegel's (or rather Jim Weirich's) Ruby Dialectic: the synthesis of Design by Contract and Behavior Driven Development

At a great Extreme Programmers User’s Group meeting here in Cincinnati, Ohio, Jim Weirich gave a thought provoking presentation on the experimentation of utilizing the semantics of a Behavior Driven Design (BDD) and the more traditional Design by Contact (DbC) with the Ruby rSpec tool. Having come out of the VB/ASP/COM/.Net world and now working on the J2EE team at US Bank, I appreciate the semantic qualities that various languages possess and more importantly the "idioms" they teach. I agree with the classic Sapir-Whorf hypothesis that the language(s) you use can either aid or hinder your ability to form thoughts and even solve problems.

With that said, the potential of Jim’s experiment with BDD and DbC is rich in its bringing together two divergent methodologies into a potentially better one. The question that the experiment is attempting to answer, from my understanding of the presentation, is can the thesis of DbC and its emphasis on getting the specifications completed upfront, pre and post conditions, and assertions combined with the antithesis of BDD’s executable specifications (a.k.a unit tests in Test Driven Devlopment) and short iterations produce synthesis of the two--a clearly understood contract (or set of contracts) between customer and developer that is the requirement for a short, iterative BDD’s executable specification(s)? Moreover, are there any unanticipated results that will emerge from the experiment that can be immediately useful or spawn more questions? One might state this is similar to an "alchemist experiment to see what comes to the top of the mixture of the two elements."

In summary, after showing us his Ruby framework to support Design by Contract, Jim explicitly stated that the experiment’s result(s) are not intended to replace Test Driven Development, BDD or DbC. However, in my view, it could produce a client initiated contract that can be solved in a few iterations with BDD. Or, sticking with the previous alchemist analogy, Jim's experiment could provide some proverbial "gold from silver and copper."

No comments: