Test First Works.

18 August 2009 by Paul

I've been a big advocate of Agile development for a while.  The only thing is, I hadn't really done any true Agile development.

I've worked in an agile environment with an already designed system, and that worked well. We managed to do everything required, get it in on time, and add a bit more than was expected to boot.  We could never have done any of that work without tools like CruiseControl(.Net in this instance), unit testing, code coverage, or the metrics supplied by a myriad of other tools.  Not to mention the 3 massive architecture re-shuffles we did (ahh, we forgot a few things :-s).

And so the other day, as a skills sharpening excercise, and a means of doing something I'd wanted to do for a while, I began the task of upgrading an application I started writing 6-8 years ago, and shelved due to conflicts with my work some 4 years ago.  At the time, I had no idea about Agile and even less about Design Patterns.

My task: to upgrade the app using a whole host of cutting edge technologies and use Design Patterns judiciously throughout.  I pretty much had a design in my head, but when I started coding it, I got a little stuck.  I didn't quite know where to begin this journey, and of course I wanted it to be perfect.  So I dawdled round a few classes and didn't really get anything constructive.

Eventually, it struck me.  Test first! So I took a step back, and re-started my development in a TDD manner.  Interestingly, the app took shape in a near heart-beat.  One test had set up a structure of about 10 classes and interfaces, and spawned another 50 tests to test the functionality represented in those new application artifacts.  I'm still a long way away from the re-written app I set out to develop, but the exercise highlighted to me two very important lessons.

  1. TDD does work.  There's absolutely no doubt in my mind about it. (and yes, I do know that TDD is not Agile)
  2. I've got a long way to go to really be a true Agile guy.

The situation might be slightly skewed by the fact that I've thought about this application almost every day for the last 8 years, regardless of my ability to program it, but then how many developments are truly greenfield?  Almost every app I know takes a little something from somewhere else, and that's as good a starting point as any.  Before you know it, you'll have a full application architecture using Agile, and writing those pesky little tests first.

Enjoy.

11 comment(s) for “Test First Works.”

  1. Gravatar of free mcdonalds food coupons
    free mcdonalds food coupons Says:
    Thank you very much for that wonderful entry.
  2. Gravatar of Incest Cartoons Free
    Incest Cartoons Free Says:
    hm. really like it.
  3. Gravatar of Speedo Bulges Teen
    Speedo Bulges Teen Says:
    now I'll stay in touch..
  4. Gravatar of Brazil Foto Sexo
    Brazil Foto Sexo Says:
    mm.. love it..
  5. Gravatar of Free Incest Galleries
    Free Incest Galleries Says:
    ehh.. interesting
  6. Gravatar of Femmes Fatales Mcfarlane
    Femmes Fatales Mcfarlane Says:
    well.. it's like I thought!
  7. Gravatar of Rc Model Maschines]double big dicked moms[/url] lesben sex video
    Rc Model Maschines]double big dicked moms[/url] lesben sex video Says:
    huh. bookmarked post ))
  8. Gravatar of Sick Japan Porn
    Sick Japan Porn Says:
    mm. informative ..
  9. Gravatar of Chat Incest Adult
    Chat Incest Adult Says:
    yoo. funny !
  10. Gravatar of amazon coupon
    amazon coupon Says:
    interesting read. I would love to follow you on twitter.
  11. Gravatar of Virginiamse
    Virginiamse Says:
    Your website is like q blonde with a brain. I like it. Jokes apart, very informative post and equally impresisve deisgn.

Leave comment:

Name:  
Email:  
Website:
Comment: