Beware Choosing the Most Complex Tool for the Job

I once saw a TV show about competing groups of archeologists trying to demonstrate how the ancient Egyptians raised stone obelisks weighing hundreds of tons. One group of archeologists built a complex apparatus involving a wooden frame and lots of rope. It looked impressive, but it didn’t work. The other team built a sand pit,… Continue reading Beware Choosing the Most Complex Tool for the Job

Assertions and Invariants

I’ve been thinking a lot about testing frameworks over the past six months, and I’m not the only Stuart doing that. Stuart Halloway, who spent some time on his own Clojure testing framework, Circumspec, recently wrote about his experiences refactoring some of the language tests included with Clojure. One of Stu’s first points is that… Continue reading Assertions and Invariants

Lazytest Churn

One of my stated goals with Lazytest was to enforce a clean separation between test assertions and code that runs before/around the assertions. The Spock framework for Java/Groovy calls these the stimulus and response, identified by the keywords when and then, respectively. I find this approach attractive, but one look at Spock’s documentation shows it’s… Continue reading Lazytest Churn

Typed Assertions Tell You What Hurts

One thing clojure.test did reasonably well was tell you why an assertion failed. Currently, Lazytest fails in this regard. The problem with requiring test functions to return true/false to indicate pass/fail is that they can’t attach any additional information to a failure to explain why it failed. I realized that function return values are insufficient… Continue reading Typed Assertions Tell You What Hurts

A Journey of a Thousand Lines Begins with a Single Test

I have a curious obsession with testing frameworks. The first thing I do with any new programming language is try to write a test framework in it. It’s a useful exercise for exploring the metaprogramming facilities provided by any language. So in C, I use preprocessor macros; in Java, annotations; and in a Lisp, macros.… Continue reading A Journey of a Thousand Lines Begins with a Single Test

Spread Thin

With the profusion of “community” web sites around today, it’s getting hard to keep track of where your “community” is. For example, the “Clojure community” exists in 7 places: clojure.org (main documentation) Github (source code) Assembla (bug tracking) Wikibooks (more documentation) Google Groups (discussion) Google Code (downloads) Freenode (chat) That doesn’t include the defunct Sourceforge… Continue reading Spread Thin