I was planning on writing the bits of code, in class. Rather than start with a finished example, where all the bugs are eliminated, I thought it would be useful for them to see me make mistakes, and what methods I use to track down the mistakes and fix them.
At the end of the class, each student can have a copy of what I did, so that they can play with it and expand on it if they want.
I am also setting up a private forum, so the more adventurous kids can post questions etc (just like perl monks).
Sandy