Saturday, May 09, 2009

Test Driven Development

A lot of people are ripping this video on the internets but I found it to be really, really good.



One of the criticisms of the speech I read here is that talking about TDD is outdated, because everyone should be doing it now.   I’m not sure what world that guy works in, because millions of lines of code shipped with no unit tests.  None.  I’m not even saying TDD here.. I’m saying unit tests in any form. 

TDD should be a mandate on any project running things with “agile”.   The ideas of agile cannot be reflected without code written in the TDD way.  For example, how is it supposed to be that any engineer can pick up any task on the board?   The only way to make something like that work is to use TDD.  They cannot verify that their addition has not broken the rest of the system without it.

Furthermore, what’s the point of having an acceptance test at a management level—a sticky on a board given to a product owner to verify—if we don’t do the same thing for our code?   How do you know something works, just because a it was verified at a user level?  It’s brittle, and foolish.  If one is to work on code in the agile framework, they should be writing acceptance tests—unit tests—ahead of their code. 

Anyway, fabulous presentation, no matter what you think of the Ruby/Rails community (they do seem to have quite a bit of entertaining infighting).

1 comment:

Urs Enzler said...

I couldn't agree more with your post.
Not using TDD or at least unit test after, is just not anymore professional software development.