[Newbies] Re: Test Driven Development

Jerome Peace peace_the_dreamer at yahoo.com
Tue Jan 6 19:54:59 UTC 2009


[Newbies] Test Driven Development

Hi Ryan,

>Ryan Zerby tahognome at gmail.com 
>Mon Jan 5 14:31:26 UTC 2009 
>

>
>I've run through "Squeak By Example" and have I was curious what kind
>of TDD would be appropriate on Quinto.

I got stuck writing a reply to you then I found this:

What's the Simplest Thing that Could Possibly Work?

http://www.artima.com/intv/simplest3.html

by one of the guys that invented it all.

====


Partial progress counts.

The question to ask is, "What type of testing would give me peace of mind?"
About your program?

When I am programing things graphical,
 I usually code until I have enough stuff working I can debug graphically.
It means writing a test cases in a workspace to gen up the morph or the graphic.
Playing with it until something unusual happens
 then thinking about why the unusual results.
 Then more trial and error.

If I code too much,
 I will start to get needle-in-a-haystack uneasy about debugging the code. When that happens its time to write examples or tests to prove the pieces.

Graphics can be sampled and the samples compared with known results.
So debugging graphics can be getting it to do what you want. 
Saving that then writing a assertion
 that the example will make the same result during the test.

You'll will know when you have a useful test.
Once you've written it, after each change you run it again.
Half the time it will surprise you with its results. 
Sometimes because they pass, more often because they fail.

If you get surprises you've got a good test. Write more like it.


> It seems so graphic oriented
>that I'm having a tough time coming up with tests that even begin to
>feel complete, without feeling like I'm testing the Morphic framework,
>or a bunch of setters, rather than Quinto.  The only test I could
>think of was testing that neighbor cells were actually changed when
>the proper method was executed.
>
Cool.

>Is that really the case, or am I missing something?  I've done TDD
>before, but there was a lot more 'behind the scenes' work to test in
>those cases.
>

What is the user story for Quinto? What are you trying to do?
How will you know when you've accomplished it?
What is the user experience (in the story) of using Quinto?

What testing will allow you do a better job?
To be more adventurous in your experimenting?

I have an imaginative  assistant Puck. 
( I said imaginary but he insisted I change it. :)
Who is in charge of coming up with test cases.
More on his role after you answer the above.

Yours in curiosity and service, --Jerome Peace



      


More information about the Beginners mailing list