From: Jim Weirich Date: 2004-06-07T14:59:15+09:00 Subject: Unit tests ... not just for the young Sean O'Dell wrote: > I tend to have a low defect rate these days. Not that they don't happen, it's > just that I tend to be careful in areas I know are troublesome and I get rid > of the big problems very early. Some things still get me, but nothing I can > anticipate, and virtually never something that comes back and gets me a > second time on the same project. I've been programming for something like 23 > years now. I started with Basic on the TRS-80 and did a lot of ASM-like > programming using Peek and Poke. My first real programming class was in > 1982, Cobol, time-sharing an HP. Perhaps I just approach programming in a > way now that solves a lot of problems, [...] Thanks for the bio Sean. The problem with email conversations is that you don't know the experience level of the poster and its easy to pigeon-hole others based on their assertions. Its clear that you have plenty of experience and have found an effective way to program without relying on unit tests. It would be interesting to compare our techniques for while I have a similar background (e.g. over 25 years of programming experience and low-defect rates), in recent years I have found myself becoming a strong advocate of test-first/test-driven development. TFD/TDD has not lowered my defect rate, nor has it found more bugs for me. What it does do is allow me to refactor the code with more speed and confidence. > [...] and a lot of younger programmers > haven't figured it all out yet and unit tests get them to a higher > quality of code quicker. This is the comment that triggered my response. Its not just the young programmers who are finding TDD effective. A lot of us old-timers are too. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)