The first program you’re s’posed to write in any new language is Hello World. If you’re doing Test Driven Development (TDD), what does Hello World look like?
The actual printing of the hello world text is the UI, and it’s hard to write unit tests for UIs. So we create a thin veneer of a UI, and put all logic into an engine layer. The engine layer is all unit-testable, and we design that Test First. then when we have the engine done, we slap a quick UI on it and our program’s done.
(more…)