Let’s do TDD–take #2

Thursday, October 18, 2012

I’ve been preaching about the benefits of Test Driven Development (TDD) for a long time and for the last two years I’ve been trying to introduce the idea to my team with limited success – some of my co-workers embraced TDD while other "just didn’t get it”.
imageAt first I become frustrated and I’ve tried explaining more and more about it without any real success. When I asked several of my teammates why they fail to even try writing tests before code the answer usually was – “I would but I don’t have enough time for it right now” or “it’s a good idea but it won’t work with this feature”.
One day it hit me – why not get the team to do TDD in a natural environment where they can try it without fear of missing a deadline or writing bad code. And so I gathered the team together in one room for an hour and a half of “TDD training”.
For the exercise I’ve chosen a problem that is simple to solve in small iterative steps (TDD) but very hard to design up front.
The exercise I've used was a roman numeral to decimal convertor. it is a well known problem that luckily for me none of my team had the pleasure of solving in the past. 
The slides from this session are available here.
After a short introduction of the problem and a few slides on the subject of TDD I got the team to pair up and try and solve that problem.
image
It was a fun exercise and some of my co-workers got to try test first for the first time.
I loved the fact The pair that finished first really embraced the methodology. The cool thing is that one member of that pair refused to try TDD for the last year.
We had so much fun that we’ve decided as a team to have this kind of meeting every three weeks.

Happy coding…

9 comments

  1. So, what was the problem?

    ReplyDelete
  2. Hi Dror,

    Do you mind to share the slides and problem you used? Could be usefull for everyone.

    Thanks

    Bart

    ReplyDelete
  3. Gabriel Rodriguez19 October 2012 at 22:43

    Just a suggestion..I think it's pretty standard (and a very good practice) that when you're writing a blog post series, you always provide links to the previous posts in the series at the top. Or bottom.

    ReplyDelete
  4. Gabriel Rodriguez19 October 2012 at 22:44

    aaaand I just realized the #2 is not because this is a series, but a second shot at something. My bad.

    ReplyDelete
  5. Good idea, I'll add the slides and a short description of the exercise to this post - soon

    ReplyDelete
  6. I've added details of the exercise & slides. Thanks for the helpful suggestion

    ReplyDelete
  7. Just curious -- after you had this meeting (or meetings, since I see some time has elapsed), what was the adoption percentage as compared to before within the group?

    ReplyDelete
  8. This is an excellent question...
    I think it's too soon to know, but I got really good feedback from the team and I got some of them to use TDD for the first time. 

    Now I'm waiting to see if it has any impact.

    ReplyDelete

Newer Older
Related Posts Plugin for WordPress, Blogger...