Code Comments
Programming Forum and web based access to our favorite programming groups.Paul, This is such a great example. Tammy, please do take the time to enlighten us as to what here is in error and how it compares to your control group.
Post Follow-up to this messageFirst I have a correction. When I re-checked my notes I found that I made a syntax error after point 4. I'll call that one 4.1: 4.1) code failed to compile because I included the header "algorithm" rather than "numeric" > Tammy, please do take the time to enlighten us as to what here is in > error and how it compares to your control group. Using the unexpected result as Tammy suggests I make it 4 errors (3, 4.1, 8, and 10) and maybe 10 lines of code (depending on how you count them...)
Post Follow-up to this messageOne more on this. I decided to try again, this time creating the whole program in one step. The code turned out about 50% longer but when I compiled it and ran it I had made no typing errors and it passed all the tests first time. I think the bowling game example may be too small to show up errors coded this way. For some reason I feel more confident about the code written TDD style, but I can't explain why - they have, after all, passed exactly the same tests.
Post Follow-up to this messageI don't think this experience is unique. It is an old adage that the best thing to do is to throw the first attempt away. Personally, I think these draft versions darned well should be full of errors and sloppy stuff and your example was just an excellent traversal of developing a program. I don't think that designs and programs arrive whole-cloth. The whole damned thing is a bugathon until the abstractions move from the fuzzy to the concrete. I think that's what I find so baffling about this thread - the act of creation must be regarded a throw-away. Otherwise investing too much an intellectual or emotional stake in the thing makes it impossible to design review it, code review it, and dispose of it if necessary. Now, the second part of your observation is that you have developed a comfort zone with TDD. There are worse druthers to have.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.