Development

And another thing about TDD

So things have been hectic over the past few months and fragile has taken a back seat, but I thought I’d relay the following since I thought it was pretty cool.

At a recent one on one, I was asking one of my developers how he’d found trialling TDD on a recent project. He said that while at first he’d found it uncomfortable, once he got going it felt great. Aside from any benefits in design he raised a very interesting point that I’d not considered before. He noted that when writing tests after the implementation the test and the implementation often looked very similar. This meant that not only is the test likely to be more fragile over time, it is also more likely to duplicate any bugs already present in the implementation. By writing the tests first this problem disappears, since the test is more concerned with intent and the implementation itself is yet to be considered.

Standard

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s