NAVmoble - the pocket-sized ERP
Optimized for Microsoft Dynamics NAV and Windows Mobile powered devices

Thursday, July 01, 2004

First steps in TDD

My first impression from the Test Driven Development papers was negative. I was little bit suspicious.
I wondered why should I write so much code that is actually out of the project scope. Why should I spent so much time to think about tests before even write a line of useful code. Is this a practically inspired and efficient methodology or just a kind of yeasty theoretical thesis.
I wondered if this methodology is meaningless, why is this world-wide craze about TDD happening . This questions and the world-wide craze forced me to try using the TDD approach in a couple of simple projects.
I was suprised when I saw TDD as a real practically inspired methodology a result these are the advantages as I see them:

  • TDD is forcing me to write clean and elegant code.

  • TDD forced my self to write my code in a way to maximize usability. As a result my code is clean,elegant,easier to understand and function exactly as I presume
  • TDD forces my developing effort to focus over the project scope.

  • First you have to write down the list of tests that you should implement in order to meet functional requirements.
    Then when you have the tests implemented and your code have passed them, you already have a code that meets the functional requirements.

  • TDD gives me a confidence about my past work.

  • Before TDD when I sit down and start coding it takes a lot of time to investigate if a broke something. Now I know - hit RUN and wait the green light. It is very useful when I am in a hurry

To be continued ...

No comments: