The key change in software development over the last few years is almost surely the growth of test-driven development. It’s certainly changed the way I work. The central idea here is to build a huge and very detailed test suite alongside the application; the tests define and document how things work and help make sure that things continue to work as the system changes.

It’s essential to run tests all the time, because a test you don’t use is worthless. That means that tests need to be fast. I spent a few hours today polishing some slower tests in Tinderbox Six.

Fast Unit Tests
”380 slowest tests in Tinderbox Six: 22 July 2013”

Right now there are 499 tests in all. The slowest test (testAnimation) takes 250msec, and the fastest 120 tests ran in less than a millisecond. In fact, almost everything is pretty fast. The whole suite takes about 5sec. The economics of improving this aren’t great: I invested about three hours to knock a second or two off each test, so break-even is about 10,000 runs unless you account for the annoyance of waiting for the tests to finish.

It looks like we’re up to 100,000 lines of code, ignoring blank lines.

And, yes, after a marathon development weekend, we’re making some interesting progress.