Test driven Tetris

Changing a mature software project is like playing Tetris in too many dimensions. While a new piece you want to add would fit with all accumulated pieces in a number of dimensions you can recall and control, there will likely be way more dimensions you would miss to consider and not remember to fit accordingly. This is why test-driven development can do this for you – place a tiny program asserting a fitting contract along each dimension and guarantee many more fitting dimensions than the ones you can handle by yourself. Of course if you add some special pieces, they might rafactor and annihilate some of the previous pieces you have to consider and thus reduce the complexity you have to grapple with but these same tiny sentinels can also help you discover such special pieces and guide you in directions of size-diminishing annihilation. This is in fact an even more important part of test-driven development – the one of driving design.

 

Leave a Reply

Your email address will not be published. Required fields are marked *