[TIP] testing: why bother?

C. Titus Brown ctb at msu.edu
Wed Mar 23 08:58:36 PDT 2011


On Wed, Mar 23, 2011 at 04:14:53PM +0100, Laura Creighton wrote:
> In a message of Wed, 23 Mar 2011 14:22:06 GMT, Jonathan Lange writes:
> >I have actually been thinking recently that if I were to have the
> >opportunity to teach programming to a beginner then I would like to
> >try starting with TDD (& probably also VCS) from the very beginning. I
> >have recently watched a couple of novice programmers suffer through
> >their formal instruction, largely because they were always piling
> >uncertainty upon uncertainty. When doing assignments, they would add
> >some code that they thought worked, then some more code that they
> >thought worked, then some more, and then after a few hours of
> >difficult thinking and coding they would try to run the code and then
> >see that it doesn't work and then be very upset.
> >
> >My hypotheses are that if they were taught to do TDD, this would be
> >much less of a problem, and that the relatively rigid discipline of
> >TDD makes it teachable even to programming novices.
> >
> >I guess this is wandering rather far off topic, but I would be very
> >interested to hear from anyone who has tried this.
> >
> >jml
> 
> It's working here for the teaching of children.  And the other very
> useful thing is that the kids always have more ideas than they can
> handle.  So they tend to write messes like the one you described
> because they cannot think about one thing at a time.  If every time
> they have an idea, instead of trying to write code, they just write
> a test that expresses what they want the idea to do ...  they can
> get back to finishing what they were working on.  Works better than
> other things I have tried.

This is great!  I've got my usual innate skeptical comments but I'll forbear
and just wonder out loud about how many ways we're "breaking" students in
our traditional educational system.

Mind you, I'm now part of that educational system, which does lead to some
other angst-y issues.  But that's an over-beer conversation...

cheers,
--titus
-- 
C. Titus Brown, ctb at msu.edu



More information about the testing-in-python mailing list