Red, green, refactor: writing perfect Go, with TDD
bitfieldconsulting.com·3h
Flag this post

Writing is basically an iterative process. It is a rare writer who dashes out a finished piece; most of us work in circles. —Dale Dougherty & Tim O’Reilly, “Unix Text Processing”

In Programming with confidence, we started building an interactive fiction game with Go, with an unusual twist: before we wrote any part of the game code, we started by writing a test for that code.

Weird, right? How can you test something before you write it? Well, maybe it’s not that strange. After all, it’s the same way we deal with new drivers: we make sure they can pass a driving test before we send them out on the road.

The game is the game

In this final part of our series on test-driven developme…

Similar Posts

Loading similar posts...