Monday, 26 August 2013

Atomic Scala has TDD Baked In

I’m still slowly working through Bruce Eckel’s and Dianne Marsh’s Atomic Scala.  I just got to the Testing "Atom” (Chapter) (pp. 94-100).  It’s the first atom (that I can recall anyway) which has merited a sub-atom, entitled “Testing as Part Programming”, and it introduces TDD.

I’m a massive fan of TDD, and my this I mean Kent-Beck-Red-Green-Refactor-Test-Driven-Design-TDD, and these guys get it.  They keep it simple (it’s a beginners book after all) but it’s the first time I’ve seen TDD being brought in so early to teach a new language (hell, I’ve never even seen it for frameworks outside of Beck’s “Test-Driven Development by Example”, and it works excellently. 

Given the known, but little-discussed mental-offloading benefits of TDD, I’m surprised they’re such pathfinders.  A real shame really, but others loss is their gain…