Chapter 3. Refactoring in small steps

The most powerful designs are always the result of a continuous process of simplification and refinement.

Kevin Mullet, Designing Visual Interfaces: Communication Oriented Techniques

In the previous chapter, we began implementing a template engine using test-driven development, starting from basically nothing and ending up with a rather useful chunk of code. In fact, we’ve gotten this far with almost laughably little code. If you look at our Template class, it’s a lot smaller than I suppose most would’ve guessed based on years of experience in waterfall-style, big-design-up-front development. Or maybe it’s just me. Perhaps others have indeed come up with small and simple solutions while I devised fancy ...

Get Test Driven now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.