TDD & Design: quotes & ideas


TDD does not drive towards good design, it drives away from a bad design. If you know what good design is, the result is a better design  -  Nat Pryce





TDD doesn't drive good design. TDD gives you immediate feedback about what is likely to be bad design  -  Kent Beck




Writing tests is another way to look the code and locally understand it and reuse it, and that is the same goal of good OO design. This is the reason of the deep synergy between testability and good design  -  Michael Feathers






2 interesting questions then




1)    Why a team when writing code with TDD & Mocks [1] seemed to make less violations of the design principles than when writing code only with the explicit policy to follow the
design principles ?


2)    Why a team practicing TDD & Mocks [1] gained a deeper understanding of the
design principles making the connection between the general and abstract definition of the principles and the line of code written in a specific language and technology stack ?



One possible answer : here






Print | posted @ martedì 25 ottobre 2011 9.59

Comments on this entry:

Gravatar # re: TDD & Design: quotes & ideas
by LudovicoVan at 28/10/2011 21.13

My take, if you will allow me:

> TDD does not drive towards good design, it drives away from a bad design.

Great, that is what I call "making progress"... ;)

> If you know what good design is, the result is a better design.

Not necessarily, actually quite unlikely: real performances are affected by available competences. See also below my comments to your first question.

> Writing tests is another way to look the code and locally understand it and reuse it, and that is the same goal of good OO design.

That is not the goal of good design (OO or otherwise, most probably the usual mix of imperative and declarative languages), whose goal rather is of a global nature relative to the coding level.

> Why a team when writing code with TDD & Mocks [1] seemed to make less violations of the design principles than when writing code only with the explicit policy to follow the design principles ?

Maybe because that is what they knew and could manage? IOW, it is not a significant comparison relative to the general case.

> Why a team practicing TDD & Mocks [1] gained a deeper understanding of the design principles...

Ditto.

-LV
  
Gravatar # re: TDD & Design: quotes & ideas
by LudovicoVan at 28/10/2011 21.15

P.S.

Not to mention that I suspect the patterns you allude to and that the team is supposed to understand are not of very general interest either...

-LV
  

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 8 and 7 and type the answer here: