Triangulate To Design

See the book TestDrivenDevelopment.

Like DesignPatterns, the best of us do this without even realizing it.


For those of us who haven't bought the book, could someone briefly explain what "Triangulate to Design" means?

This is where you write a test, hardcode the answer, write another test, hardcode the answer, refactor, rinse and repeat. Done right, you'll likely end up testing every code path, every piece of logic. Very good when you have no idea how to proceed. It'll get you through the hairy bits in fine shape. The downside being that it's a little higher overhead than the more usual test-first approaches; indeed one often will switch back to another strategy once one knows how to proceed, and is confident in the correctness of that approach.

Pretty much the purest form of TestFirstDesign, after FakeIt (standard non-obvious progress) and writing a bigger, more comprehensive test and then just writing the implementation (for the dead simple, write-it-in-your-sleep type code).

--WilliamUnderwood

cf TracerBullets


EditText of this page (last edited August 28, 2004) or FindPage with title or text search