Should Test-Driven Development be in the beginners tutorial?
Ralph Johnson
johnson at cs.uiuc.edu
Sat Sep 23 15:00:01 UTC 2006
> 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
|