<br><br><div class="gmail_quote">On Mon, Jul 20, 2009 at 10:56 PM, Douglas Philips <span dir="ltr"><<a href="mailto:dgou@mac.com">dgou@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On or about 2009 Jul 20, at 11:52 PM, C. Titus Brown indited:<br>
<div class="im">> So that's my answer to Noah: whenever you're suspicious of some part<br>
> of<br>
> your software and feel the urge to do some exploratory testing, do<br>
> some.<br>
> Then, when you've done the same thing twice, automate it instead of<br>
> doing it a third time. Soon enough you'll be adding the test code<br>
> before you've even done the exploratory testing once, and then you'll<br>
> be doing TDD. You're done when you are no longer suspicious of your<br>
> software.<br>
<br>
</div>IIRC, in "Test-driven Development" Kent Beck describes tests as<br>
transmuting fear into boredom.<br>
"Fear" being the fear of changing the code without breaking something.<br>
The suspiciousness here seems to be a similar thing. I like both:<br>
Tests transmute fear/suspicion into boredom.<br>
<div class="im"><br>
<br>
> Oh, and as an addendum, whenever you're not suspicious of your<br>
> software,<br>
> you're wrong.<br>
<br>
</div>So true, and so easy to forget.<br>
<div class="im"><br>
<br>
> More seriously, as long as you view "writing code" and "making sure<br>
> your<br>
> code works" as part of the same job, you'll be fine. Just don't let<br>
> non-developers push you around by asserting otherwise.<br>
<br>
</div>I'd love to redefine developer such that someone writing code without<br>
tests is not a developer. :)</blockquote><div><br></div><div>I agree with most of the really good points in this thread, which I forget if I hijacked or not :), but the elephant in the room is you CAN actually write ok code without testing if some of these factors are in place such as:</div>
<div><br></div><div>1. The problem is trivial.</div><div>2. The developer is used to writing good code, such as code that is actually testable, ironically.</div><div>3. The developer is really, really, really good (yes non testing coding ninjas exist).</div>
<div>4. The code doesn't need to be production quality.</div><div>5. It is compiled and written with some uber dev tool like Eclipse or XCode and isn't too complex.</div><div>6. Your writing a prototype based on well tested libraries.</div>
<div>7. The people you work for don't care you write shitty code and you don't realize you write shitty code, and shitty code kind of works for the year you work at the company before you quit.</div><div>8. You might get sucked into a job where you will get fired if you test your code....believe it or not, it could happen to you!</div>
<div><br></div><div>The downside of not testing code is often when the problem doesn't fit one of these "dirty secrets", and someone gets into what Titus calls the lack of testing "death spiral". This is when you rolled out a web application that a company depends on and it is straight up html print statements and if/else to the moon, with some triple quoted javascript print statements to boot. If you created the implosion yourself, or watched it, then you probably get spooked about not writing tests...if you can still get work as a developer.</div>
<div><br></div><div>The problem is non testers/beginning developers, old school C++ CTO's, non developers, and even expert old school developers, etc, intuitively know you can "ride your code dirty" and get away with it... a lot of the time. I think the real world testing spirit acknowledges this elephant, and tries to adapt for it....thus the question. I would love to see a treatment on this subject at PyCon, in a book, etc :)</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
-Doug<br>
<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thanks,<br><br>Noah<br>