Should Test-Driven Development be in the beginners tutorial?

J J azreal1977 at hotmail.com
Sat Sep 23 15:18:41 UTC 2006


Well, that is valid.  The alternative to what I said is:  if your going to 
train someone, train them right from the start.

I guess I don't do it the way you described because I make my classes with 
an interface, then part way through I determine my first cut was wrong.  If 
I started with the tests I would have to change all the tests along with my 
class changes (right?), effectively doubling the work I do now.

Has any work been done to integrate testing into the browser?  It seems like 
some of the things you would write tests for are pretty predictable and 
could be automated or semi-automated.

>From: "Ralph Johnson" <johnson at cs.uiuc.edu>
>Reply-To: The general-purpose Squeak developers 
>list<squeak-dev at lists.squeakfoundation.org>
>To: "The general-purpose Squeak developers 
>list"<squeak-dev at lists.squeakfoundation.org>
>Subject: Re: Should Test-Driven Development be in the beginners tutorial?
>Date: Sat, 23 Sep 2006 10:00:01 -0500
>
>>A possible way is to make a theme like they did in Dolphin.  In Dolphin 
>>the
>>tutorial is about making a minimal bank account program.  Someone wrote
>>tutorials about how to extend these later.  I think that could work.  You
>>make your simple Morhpic app, then in the next installment you explain the
>>features your application doesn't have but needs and so you explain that 
>>you
>>want to first make unit tests to ensure you don't break anything.
>
>Matthew asked about unit tests, but he really should have asked about
>test-first.
>
>This isn't test-first.  Unit tests have many purposes.  Only one is to
>ensure that changes don't break anything.  A more important purpose is
>to ensure that you know what you are programming.  Test-first lets you
>think about the interface to your classes from the users point of
>view.  It provides documenation to how to use your classes, and
>provides a kind of specification.  Test-first is about design even
>more than testing.
>
>-Ralph Johnson
>





More information about the Squeak-dev mailing list