<br><br><div class="gmail_quote">On Wed, Mar 23, 2011 at 9:34 AM, Laura Creighton <span dir="ltr">&lt;<a href="mailto:lac@openend.se">lac@openend.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I think that the most important reason to write tests is so that they<br>
can write them _first_, and the code _later_.  This will change the way<br>
they write code, so that they won&#39;t produce these large, self-contained,<br>
too-tightly coupled messes, which just happen to work, and which are<br>
a nightmare to refactor because they don&#39;t decompose nicely.<br>
<br>
However, telling them that they should write tests because their code<br>
is crappy is unlikely to have the positive effect you want.<br></blockquote><div><br></div><div>Well, it wasn&#39;t my intention to say such a thing :) I believe in pointing the right way</div><div>rather than pointing to what is wrong. </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
So tell them that they should write tests because it is best way to<br>
document exactly what a piece of code is supposed to do, by design,<br>
as opposed to the things it just happens to do but is irrelevant to<br>
its function.  That way, when somebody, often not the original writer<br>
of the code wants to change it, he knows exactly what it is that he<br>
has to keep working.  And the failures will tell him when he hasn&#39;t<br>
done this properly.<br></blockquote><div><br></div><div>This seems a bit better than talking about BDD to a non-initiated crowd. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
But if &#39;how do you _know_ this code is correct&#39; hasn&#39;t caused them to<br>
write tests already, then I suspect they are hopeless.<br>
<font color="#888888"><br></font></blockquote><div>That whole concept is from outer-space for them. They have not thought about it</div><div>in the way you and I understand it.</div><div><br></div><div>It is the same scenario as trying to explain that you are not going to fall of the face of the</div>

<div>earth because the earth is round to someone that hasn&#39;t thought about that possibility.</div><div><br></div><div>Again, I am just trying to inflict such an impact that they at least give it enough thought</div><div>

to try it out and see for themselves. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888">
Laura<br>
<br>
</font></blockquote></div><br>