This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: On Learning Smalltalk
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
I notice that Giulio Piancastelli was trying to learn Smalltalk, but gave up - he tried to do this in a workspace:
foo: n
|s|
s := n.
^[:i | s := s+i.]
He ran into trouble getting a "Nothing more expected" error from the system (Squeak, in this case). Now, for those of us who are Smalltalkers, this is clear - you don't write methods in a workspace, you write them in a browser, in a class. Here, he's trying to write a method in a workspace. Like I said, clear to us Smalltalkers - obviously not clear to a neophyte.
This is an expectations issue. People expect to write code and then compile it "en masse" - which just isn't what you do in Smalltalk. You can write the kind of code he wanted to write in a workspace, but not as a method - a method is typically attached to a class. You can script in a workspace, but you just omit the method entry point. That's what threw Giulio; he didn't realize that he was supposed to create a class, add a method, and then write some script to drive it in a workspace. Probably a better book would have helped - certainly for VisualWorks, a walk through the examples workspace would have helped (as well as a look at the tutorials).
However, that's obviously not enough - VW has tutorials and the examples workspace - what should we be doing that we aren't? I'd like to be able to help people like Giulio not get discouraged.