The ant and the tree

When I first found out about BDD, way back in 2004, I remember TDD being rather like an ant looking for a flower on a tree, and telling all the other ants back at the nest on the ground about the route.

As the ant, I know roughly where I’m going. Sometimes I can even see the flower! But I keep going down dead-ends and having to backtrack. When I finally find the route and try to talk to the other ants about it, it’s hard to remember the direct path.

The mental map I had of my code looked rather like the path I’d taken as the ant. It was never completely clean. I had no flash of clarity; no sense of “This is the right way!”

Contrast that to the feeling I got when I started using the language of BDD (this was just before I realised that BDD also allows me to do outside-in development.)

If I can fly, I can move outside the tree. I can see the flower, then crawl from the flower to the twig, to the branch, to the trunk and down to the nest. The path is clear. I can tell the other ants exactly where I started, and how I reached them. Life is simple and beautiful. I can see how other ants might have become confused. I can see the other routes that might have side-tracked me. I just don’t have to go down them any more.

BDD gives me wings.

This entry was posted in bdd. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s