¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Prompt: Why do you still care about TDD?


 

¿ªÔÆÌåÓý

I have spent my career looking for ways to do software better - to improve productivity and quality and reduce rework. I tried all kinds of techniques, including formal structured analysis and design, and automated tools whose names I no longer recall. TDD is the first one I have found which actually delivers. It lets me build code more quickly and change it when needed.?

I see unit tests as having four main functions:
1. regression detection (much faster than functional tests)
2. supporting refactoring
3. driving development
4. documenting behavior much more reliably than comments

Unit tests that were created for the purpose of driving the code tend to be a better job at the other functions than do tests written afterwards for the purpose of improving code-coverage numbers.

TDD also leads to software components built as components, with good information hiding. The usual proclivity of developers is to see a problem and immediately search for the algorithms and data structures needed to implement it - and those then become the core abstraction that the codebase must know. A change in algorithm for better performance then becomes a major deal. That should not happen with TDD used properly.
-----------------
Author, HttpUnit <http://www.httpunit.org> and SimpleStub <http://simplestub.meterware.com>
Now blogging at <http://russgold.net/sw/>

Have you listened to Edict Zero <>? If not, you don¡¯t know what you¡¯re missing!






On Jun 26, 2023, at 9:21 AM, J. B. Rainsberger <me@...> wrote:

Hi, folks. Why do you still care about TDD?

Please skip the platitudes and write from the heart. Why does it still matter to you? Why do you still practise it? How does it still help? Why do you still teach it?

Or not?
--
J. B. (Joe) Rainsberger :: ?:: ::

Replies from this account routinely take a few days, which allows me to reply thoughtfully. I reply more quickly to messages that clearly require answers urgently. If you need something from me and are on a deadline, then let me know how soon you need a reply so that I can better help you to get what you need. Thank you for your consideration.

--
J. B. (Joe) Rainsberger :: :: ::
Teaching evolutionary design and TDD since 2002

Join [email protected] to automatically receive all group messages.