Prerequisites for Learning TDD?

135 views
Skip to first unread message

Daniel Wellman

unread,
Aug 12, 2015, 9:03:28 AM8/12/15
to growing-object-o...@googlegroups.com
Hi GOOS list!

I have heard a few times (maybe even on this list) that goes something like this (paraphrasing mistakes are all mine):

"If you want to teach someone to TDD, don't start with TDD. Instead, start by teaching them about objects and design principles first and *then* teach them TDD."

Assuming I've heard that right, what would you teach people about objects and design principles first?

Cheers
Dan



George Dinwiddie

unread,
Aug 12, 2015, 9:06:36 AM8/12/15
to growing-object-o...@googlegroups.com
Daniel,

I would teach someone about objects and design principles using TDD.

Much of what we call good design relates to being flexible for multiple
clients. The tests (or specs) automatically provide a second client for
the code. This makes good design much easier to see.

- George
--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------

Steve Freeman

unread,
Aug 12, 2015, 11:01:04 AM8/12/15
to growing-object-o...@googlegroups.com
I might be responsible for some of this because I was observing that some problems people had with TDD were because they didn’t have the design experience to respond to the feedback from the tests.

I don’t know which order is best to teach, but TDD needs an understanding of OO (I would argue RDD) to make it work well. As George points out, it might be best to teach both together.

S

Jeff Langr

unread,
Aug 12, 2015, 11:23:16 AM8/12/15
to growing-object-o...@googlegroups.com
I've had good results from teaching both combined, and Agile Java continues to sell and get good feedback 10 years on (and many dead Java versions past).

As far as objects and design principles, I generally push Beck's simple design rules first (no duplication, expressiveness, sufficiency)--they are easy concepts--then start introducing more "named" design concepts (SOLID, demeter, code smells, patterns, etc) incrementally as needed.

Jeff

Langr Software Solutions, Inc.



--

---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maurício Aniche

unread,
Aug 12, 2015, 3:55:28 PM8/12/15
to growing-object-o...@googlegroups.com
I have been teaching the basics of a unit test, asserts, etc. Then, I simply present the mechanics of TDD. And then, I go over design principles and how TDD influences them.
--

Luca Minudel

unread,
Aug 13, 2015, 4:47:43 AM8/13/15
to Growing Object-Oriented Software
In the article 'TDD with Mock Objects: Design Principles and Emergent Properties' published here http://www.methodsandtools.com/mt/download.php?winter14 you find an experience report that describe an experience where after and initial overview of OO concepts and principles, feedback from TDD was fundamental to get a better and practical understanding of OO principles.

Remember that learning process is not linear and is individual, you can provide learning opportunities but the way a person absorb, incorporate, elaborate and connect those leanings is outside your area or control.
HTH, Luca

Daniel Wellman

unread,
Aug 15, 2015, 8:08:16 PM8/15/15
to growing-object-o...@googlegroups.com
This is all very helpful advice, I appreciate each of you sharing your suggestions with me!

Cheers,
Dan

Steve Smith

unread,
Aug 19, 2015, 3:52:24 AM8/19/15
to growing-object-o...@googlegroups.com
I like to cover principles like SOLID, DRY, and rules of simple
design. I usually point folks at my video course on this subject (on
Pluralsight):
http://bit.ly/solid-smith

Steve
--
Steve Smith
http://Ardalis.com/
http://twitter.com/ardalis
Reply all
Reply to author
Forward
0 new messages