[TIP] testing: why bother?
jml at mumak.net
Wed Mar 23 07:22:06 PDT 2011
On Wed, Mar 23, 2011 at 2:09 PM, C. Titus Brown <ctb at msu.edu> wrote:
> (Since I like to argue with Michael...)
> IMO, TDD is too big a leap for people without a fair amount of
> programming experience. However, once you have a bit of testing
> under your belt, TDD becomes much easier to justify.
What makes you say that, other than an entirely understandable desire
to argue with Michael?
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.
More information about the testing-in-python