TDD and me
I have been learning TDD using the resources here: [1][2][3] Why am I learning TDD?
I have always heard that TDD is really slow and requires you to do obvious tests for the sake of testing.
I wanted to try it out and see what it is like. Was it slow?
Yes at first, omg was it slow! To be honest, part of this may be related to my inexperience in C#. Eventually I got much faster at coding with less mistakes, which is the goal of any new programming method.
Nothing is for free. There is definitely a period of time when TDD is slower. It can be similar to learning any new method or technique.
There have always been detractors to new methods.
"Assembly is for true coders. C is for suckas"
"C++ and OOP are useless"
"Managed code is too slow for real programs"
etc...
The truth lies between detractors and proponents.
Back to the slowness. I thought it was slow at first until I noticed that I wasn't debugging anything. I was running code and tests but hadn't started a debugger at all -- everything basically just works.
I have no aversion to debuggers and assembly. Even when looking at someone else's software that has src, I usually open it in IDA first.
I've spent many a time in a debugging session only to find out that like Michael Bolton from Office Space, “I always mess up some mundane detail!”
I am not under the illusion that TDD will get rid of all mistakes.
So far I like:
- testing each module of an app independently
- customer tests specify functionality allowing clean room implementations
- confidence from knowing sections of the code are fully tested
Not sold on yet:
- the design as you go concept
- the "simple" tests
I'll see how it goes as I move into more complicated code.
I have always heard that TDD is really slow and requires you to do obvious tests for the sake of testing.
I wanted to try it out and see what it is like. Was it slow?
Yes at first, omg was it slow! To be honest, part of this may be related to my inexperience in C#. Eventually I got much faster at coding with less mistakes, which is the goal of any new programming method.
Nothing is for free. There is definitely a period of time when TDD is slower. It can be similar to learning any new method or technique.
There have always been detractors to new methods.
"Assembly is for true coders. C is for suckas"
"C++ and OOP are useless"
"Managed code is too slow for real programs"
etc...
The truth lies between detractors and proponents.
Back to the slowness. I thought it was slow at first until I noticed that I wasn't debugging anything. I was running code and tests but hadn't started a debugger at all -- everything basically just works.
I have no aversion to debuggers and assembly. Even when looking at someone else's software that has src, I usually open it in IDA first.
I've spent many a time in a debugging session only to find out that like Michael Bolton from Office Space, “I always mess up some mundane detail!”
I am not under the illusion that TDD will get rid of all mistakes.
So far I like:
- testing each module of an app independently
- customer tests specify functionality allowing clean room implementations
- confidence from knowing sections of the code are fully tested
Not sold on yet:
- the design as you go concept
- the "simple" tests
I'll see how it goes as I move into more complicated code.
0 Comments:
Post a Comment
<< Home