Testing - kids get it
I haven't taught the Smalltalk class in a couple of weeks - the snow storm last week blew away a class, and if the snow keeps up the way the forecast calls for, tomorrow's class will be off as well.
In the meantime, I was very impressed with what happened last time around. I decided to introduce them to some rteal coding - with a browser. We took a very simple example - a simple "calculator" application that could add numbers. So we defined a class:
Smalltalk defineClass: #Counter
superclass: #{Core.Object}
indexedType: #none
private: false
instanceVariableNames: 'counter'
classInstanceVariableNames: ''
imports: ''
category: 'Calculator'
We actually use Squeak, since it has a lot of cool things for introducing programming - the Alice stuff in particular. Anyway, they stumbled through the creation a bit - but they got the basic class/instance split more quickly than I thought they would. Once we implemented the ' ' message, a light clicked - they got it!!. They they ran off and did subtraction, multiplication, and division - the biggest question they had was what sign to use for multiply - they were not familiar with the asterisk notation.
But they got it. Very impressive, and lots of fun.




