Post details: Test driven programming practice vs theory

03/12/06

Permalink 01:33:40 pm, Categories: Programming, 304 words   English (US)

Test driven programming practice vs theory

I've never been much of a software developer. I usually write stuff that start out as small hacks and end up as very large hacks. Throughout school I just did not have much interest in software engineering methodology. It seemed all theoretical to me, and I just wanted to get down and start coding. Design? yeh right.. My projects were small enough that I could keep everything in my head.

So this is probably why I find it hard to do test driven development. It seems when you write tests first, you are assuming that the modules you write will have a certain API. The problem I have is that API is a contantly changing thing for me. I may do things one way, and then realize I don't like it. Then I will redo it another way. My program ends up being blob-like and always changing. I don't like to make the assumption that one way, especially my first draft, is the right way, and things can always improve. I've always felt programming was like painting. The painter has something in his head and starts drawing. He doesn't do a UML diagram first. If he doesn't like the result he throws away the canvas.

So how do you deal with this? Think more hard about your design and API before coding? Sure that's probably what all those classes preached :). Of course the proper thing would be to have the tests constantly changing as well as my API. Time then becomes a factor. I feel when writing tests I sort of lose my stream of consciousness. I lose the inspiration of my project by being interrupted to write tests.

Oh well, this is more of a rant than anything else. I do know the right way, I just don't agree with it many times.

Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

Leave a comment:


Warning: touch() [function.touch]: Unable to create file /hsphere/local/home/valankar/viraj.org/_tmp/hn_captcha_counter.txt because No such file or directory in /hsphere/local/home/valankar/viraj.org/b2evolution/blogs/skins/hn_captcha.class.x1.php on line 209

Warning: touch() [function.touch]: Unable to create file /hsphere/local/home/valankar/viraj.org/_tmp/hn_captcha_counter.txt because No such file or directory in /hsphere/local/home/valankar/viraj.org/b2evolution/blogs/skins/hn_captcha.class.x1.php on line 209


An ERROR has occured!
Here you might send email-notification to webmaster or something like that.

Unable to safe captcha-image.