Lily Smith yinyuqin2000@yahoo.com wrote: The major reason that why SmallTalk is way less popular as Microsoft VB is that SmallTalk lacks documentatation and a good tutorial.
Lily Smith is half right, but only half.
"Smalltalk" is not a product, the way Visual Basic is a product. "Smalltalk" is a *FAMILY* of programming languages with a common heritage, including but not limited to Dolphin Smalltalk VisualWorks Smalltalk <-+ IBM Visual Age Smalltalk <-+ Squeak <-- Smalltalk/X where the ones labelled "<-" are ones that I have at one time or another downloaded. The ones labelled "<-+" have copious, nay, VOLUMINOUS documentation, including lots of tutorial material.
There are DOZENS of books about Smalltalk in general. The original Smalltalk books were really great and any place that requires students to learn Smalltalk probably has them. I have used "Inside Smalltalk" and found it extremely helpful.
Stephane Ducasse (may he flourish like the green bay free!) provides free electronic copies of several out-of-print but still useful Smalltalk books at
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html
Anyone who slams Smalltalk documentation and tutorials without as much as looking at this page hasn't done their homework. Where are the good free books for Visual Basic?
Tutorials? Squeak has quite a few.
I know SmallTalk can do almost everything that VB can,
With the admittedly important exception of making it easy for people to write Word viruses, this is a masterpiece of understatement. Smalltalk in general, and Squeak in particular, makes it easy to do things that VB hackers can only dream of. The main purpose of VB is to tie developers to Microsoft's apron strings.
but a newbie like me just don't know how to do it.
Nor could I do anything in Visual Basic without a book.
There are two or three books specifically about Squeak now. "Squeak Open Personal Computing and Multimedia", eds Guzdial & Rose, is the one I happen to have beside my keyboard at the moment. I've learned a fair bit from it, but it's not the one I'd start with.
It is not easy to find the correct class and method.
That's odd, even _without_ a Squeak manual I find that it usually takes only a few minutes to find these things.
It really DOES pay to work through some of the Squeak tutorials before complaining about them.
Even if I am lucky enough to find it, I have to spend hours to learn how to use those methods.
Few documentation and examples on the web are available.
There is more documentation and there are more examples on the web than I will ever have the time to read.
One of my assignments was to add a radio button group and then deal with the user input. Even my teacher does not know how to implement a radio button group. He spent half an hour in class, trying to show us how to add a radio button group. He failed.
I think your real problem may be with your teacher. (1) He should have solved the problem *before* the class. (2) For the old MVC framework, I'd just stretch my hand over to the other desk, pick up my copy of "Inside Smalltalk", and there it is.
Now, I have never ever done this in Squeak myself, because I don't have much use for radio buttons. Here I am starting at 1:35pm, knowing only that there is a PluggableButtonMorph class.
I open a Browser and read the class comment. Good. This will do what I want.
Now, I'm going to create a "RadioButtonGroup" class that holds three buttons. It's going to have state "1 .. 3, initially 1" button1.. button3 "PluggableButtonMorphs" rectangle "a RectangleMorph to hold the buttons"
methods: state: newState state = newState ifFalse: [ state := newState. self changed: #state1. self changed: #state2. self changed: #state3]
state ^state label1 ^'1' label2 ^'2' label3 ^'3' state1 ^state = 1 state2 ^state = 2 state3 ^state = 3 action1 self state: 1 action2 self state: 2 action3 self state: 3
I'm nearly there. I now have to figure out how to create the PluggableButtonMorphs and stick them together. To see how to create them, I look in the class side of PluggableButtonMorph and notice at the very top of the method list an 'example'.
At this point I kick myself,
BECAUSE THE EXAMPLE OF PLUGGABLEBUTTONMORPHS RIGHT THERE IN THE SYSTEM IS A THREE-WAY RADIO BUTTON! [almost]
It is now 1:51 and if I hadn't jumped into coding I'd have had the answer after five minutes!!!!
What was that about documentation and tutorials? The answer is right there staring us in the face in the obvious place to look!
'example' methods and 'example' message categories *always* repay study.
Oh well, let's use this example to finish my code.
initialize state := 1. button1 := PluggableButtonMorph on: self getState: #state1 action: #action1 label: #label1. button2 := PluggableButtonMorph on: self getState: #state2 action: #action2 label: #label2. button3 := PluggableButtonMorph on: self getState: #state3 action: #action3 label: #label3.
button1 hResizing: #spaceFill; vResizing: #spaceFill. button2 hResizing: #spaceFill; vResizing: #spaceFill. button3 hResizing: #spaceFill; vResizing: #spaceFill. rectangle := AlignmentMorph newRow hResizing: #spaceFill; vResizing: #spaceFill; addAllMorphs: {button1. button2. button3}; extent: 120@35.
openInWorld rectangle openInWorld
It's now 2:02pm, despite three phone calls from home. Code written and ready to test. RadioButtonGroup new initialize openInWorld
Hey, great! Three buttons labelled '1', '2', '3', and the first one is pressed (dark). Clickety clickety, yep, it's working.
Start to finish time: 30 minutes (including 3 1 minute phone calls).
Then he wanted us to complete that assignment ourselves. God! It is even difficult for a SmallTalk senior to find out something common!
Surprising as it may seem, radio buttons are NOT common in Squeak use. They have to be built from simpler components, as shown above. However, it is quite clear from my experience, as reported above, that it is NOT IN THE SLIGHTEST DIFFICULT, NOT AT ALL for a Smalltalk programmer with ___very___ modest experience to find out everything necessary and put the pieces together in just a few minutes. You should bear in mind that I have always had difficultly (mild to extreme) with GUI kits, with the notable exceptions of Interlisp-D and to a lesser extent Tcl/Tk, and you should particuarly bear in mind that I am a complete novice at doing things with Morphic. This is the first time in my life I have ever used a button in any Smalltalk dialect.
Thirty minutes.
You do not have a "Smalltalk senior" for a teacher.
Oh yes, I did say that I was starting from the knowledge that there was a PluggableButtonMorph class. How hard is that to discover?
In a browser, go to the leftmost pane and from the menu select "find class". Type "Button" into the text box that pops up and accept it. You are shown a list of all the classes that contain "Button" in their name. I wish I had done this at the beginning instead of remembering this one from an earlier "Pluggable" search, because guess what, this is the *FIRST* thing a Smalltalk beginner should think of trying and it turns up RadioButtonInput RadioButtonSetInput
They are both part of the Forms support in Squeak's web browser. They are a bit specialised to use directly, but there are ideas one could steal.
Narrowing things down, GUI components have names ending in "Morph", usually, so "...ButtonMorph" is something to look for.
How can SmallTalk be popular?
If people teach it well, and students read some of the MANY existing books and tutorials for Smalltalk.
Look at how easy it is to add a radio button group in Microsoft VB! 30 minutes to build a 3-way radio button group class in Squeak really isn't bad. Now that I have one, I shall probably improve it a bit for my own education, but there are widget libraries coming along which will be much much better.
For comparison, this morning I demonstrated in a class how I - found a limitation in Scamper (it doesn't support <INS> or <DEL> tags) - and fixed it in 30 minutes flat. When I _really_ did that two nights ago, it took me just five minutes more, and I have *never* modified Scamper before.
You can say many things about Squeak, but "classes and methods are hard to find" really isn't one of them. That's twice this week I've found the bits I've needed and whacked them together in half an hour in areas that I have never touched before in any Smalltalk.
Well, it is just my complaint on this language. I hope SmallTalk geeks should come up with a very good tutorial book for SmallTalk newbies. Otherwise, it will never be popular. The work "geek" is *EXTREMELY* offensive. It means a freak show performer whose act involves biting the heads off live chickens; we're talking serious subhumanity here.
Spelling the name of the language wrong (it's "Smalltalk", not "SmallTalk") is not a good move either; if you haven't even troubled to find out what the langauge is _called_, what _have_ you troubled to find out? To repeat: there are LOTS of good (even "very good") tutorial books for Smalltalk, and there is even an introductory book for Squeak by Mark Guzdial (may the light of 6 thousand suns shine on his head, but only at night time!). If your teacher has not made sure that you have access to a copy, blame the teacher but do not blame Smalltalk.
I fear that Smalltalk will never be popular with people who have inadequate teachers and are not even told where to find a good book about it. But the same could be said of anything, even Zope or PHP.
it is quite clear from my experience, as reported above, that it is NOT IN THE SLIGHTEST DIFFICULT, NOT AT ALL for a Smalltalk programmer with ___very___ modest experience to find out everything necessary and put the pieces together in just a few minutes. ....I am a complete novice at doing things with Morphic. This is the first time in my life I have ever used a button in any Smalltalk dialect.
Richard, I have the deepest respect for you ( I used to hunt out and read your messages in comp.lang.prolog back in the 80's.) However, I am afraid that this is a trifle disingenuous.
Although you are a novice at Morphic, you have far more computer science and software development experience than most people around.
I would suggest that Lilly ( the student who had difficulty with radio buttons ) and her teacher are extremely unlikely to be within several orders of magnitude of your competence and knowledge.
( I am assuming that you are the Richard O'Keefe of Quintus Prolog fame and who wrote The Craft of Prolog )
That may be so, but I had the same experience as Richard. Indeed, one needs some sophistication at programming language, and familiarity with oodl's are also important to code Smalltalk before becoming fluent at Squeak -- but in terms of becoming aclimated to it, this is by FAR the easiest non-trivial system with which I have become associated for building software of any kind.
On Saturday, July 27, 2002, at 08:26 PM, i r thomas wrote:
it is quite clear from my experience, as reported above, that it is NOT IN THE SLIGHTEST DIFFICULT, NOT AT ALL for a Smalltalk programmer with ___very___ modest experience to find out everything necessary and put the pieces together in just a few minutes. ....I am a complete novice at doing things with Morphic. This is the first time in my life I have ever used a button in any Smalltalk dialect.
Richard, I have the deepest respect for you ( I used to hunt out and read your messages in comp.lang.prolog back in the 80's.) However, I am afraid that this is a trifle disingenuous.
Although you are a novice at Morphic, you have far more computer science and software development experience than most people around.
I would suggest that Lilly ( the student who had difficulty with radio buttons ) and her teacher are extremely unlikely to be within several orders of magnitude of your competence and knowledge.
( I am assuming that you are the Richard O'Keefe of Quintus Prolog fame and who wrote The Craft of Prolog )
Richard does it all here. He responds on the merits to the whining statements of the unavailability of documentation -- points us immediately to free books, directs us to materials that would take hours to study, and finally shows not only how to solve Lily's problem, but teaches us "how to fish" by showing how he found out how to do it!
Let the whiners, at least, carefully study Richard's response -- this one deserves careful study and is repeated below because it is so great -- before continuing their canonization of VB and dissing of Squeak as a "product."
Thanks, Richard. This is an excellent response.
On Thursday, July 25, 2002, at 10:41 PM, Richard A. O'Keefe wrote:
Lily Smith yinyuqin2000@yahoo.com wrote: The major reason that why SmallTalk is way less popular as Microsoft VB is that SmallTalk lacks documentatation and a good tutorial.
Lily Smith is half right, but only half.
"Smalltalk" is not a product, the way Visual Basic is a product. "Smalltalk" is a *FAMILY* of programming languages with a common heritage, including but not limited to Dolphin Smalltalk VisualWorks Smalltalk <-+ IBM Visual Age Smalltalk <-+ Squeak <-- Smalltalk/X where the ones labelled "<-" are ones that I have at one time or another downloaded. The ones labelled "<-+" have copious, nay, VOLUMINOUS documentation, including lots of tutorial material.
There are DOZENS of books about Smalltalk in general. The original Smalltalk books were really great and any place that requires students to learn Smalltalk probably has them. I have used "Inside Smalltalk" and found it extremely helpful.
Stephane Ducasse (may he flourish like the green bay free!) provides free electronic copies of several out-of-print but still useful Smalltalk books at
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html
Anyone who slams Smalltalk documentation and tutorials without as much as looking at this page hasn't done their homework. Where are the good free books for Visual Basic?
Tutorials? Squeak has quite a few.
I know SmallTalk can do almost everything that VB can,
With the admittedly important exception of making it easy for people to write Word viruses, this is a masterpiece of understatement. Smalltalk in general, and Squeak in particular, makes it easy to do things that VB hackers can only dream of. The main purpose of VB is to tie developers to Microsoft's apron strings.
but a newbie like me just don't know how to do it.
Nor could I do anything in Visual Basic without a book.
There are two or three books specifically about Squeak now. "Squeak Open Personal Computing and Multimedia", eds Guzdial & Rose, is the one I happen to have beside my keyboard at the moment. I've learned a fair bit from it, but it's not the one I'd start with.
It is not easy to find the correct class and method.
That's odd, even _without_ a Squeak manual I find that it usually takes only a few minutes to find these things.
It really DOES pay to work through some of the Squeak tutorials before complaining about them.
Even if I am lucky enough to find it, I have to spend hours to learn how to use those methods.
Few documentation and examples on the web are available.
There is more documentation and there are more examples on the web than I will ever have the time to read.
One of my assignments was to add a radio button group and then deal with the user input. Even my teacher does not know how to implement a radio button group. He spent half an hour in class, trying to show us how to add a radio button group. He failed.
I think your real problem may be with your teacher. (1) He should have solved the problem *before* the class. (2) For the old MVC framework, I'd just stretch my hand over to the other desk, pick up my copy of "Inside Smalltalk", and there it is.
Now, I have never ever done this in Squeak myself, because I don't have much use for radio buttons. Here I am starting at 1:35pm, knowing only that there is a PluggableButtonMorph class.
I open a Browser and read the class comment. Good. This will do what I want.
Now, I'm going to create a "RadioButtonGroup" class that holds three buttons. It's going to have state "1 .. 3, initially 1" button1.. button3 "PluggableButtonMorphs" rectangle "a RectangleMorph to hold the buttons"
methods: state: newState state = newState ifFalse: [ state := newState. self changed: #state1. self changed: #state2. self changed: #state3]
state ^state label1 ^'1' label2 ^'2' label3 ^'3' state1 ^state = 1 state2 ^state = 2 state3 ^state = 3 action1 self state: 1 action2 self state: 2 action3 self state: 3
I'm nearly there. I now have to figure out how to create the PluggableButtonMorphs and stick them together. To see how to create them, I look in the class side of PluggableButtonMorph and notice at the very top of the method list an 'example'.
At this point I kick myself,
BECAUSE THE EXAMPLE OF PLUGGABLEBUTTONMORPHS RIGHT THERE IN THE SYSTEM IS A THREE-WAY RADIO BUTTON! [almost]
It is now 1:51 and if I hadn't jumped into coding I'd have had the answer after five minutes!!!!
What was that about documentation and tutorials? The answer is right there staring us in the face in the obvious place to look!
'example' methods and 'example' message categories *always* repay study.
Oh well, let's use this example to finish my code.
initialize
state := 1. button1 := PluggableButtonMorph on: self getState: #state1 action: #action1 label: #label1. button2 := PluggableButtonMorph on: self getState: #state2 action: #action2 label: #label2. button3 := PluggableButtonMorph on: self getState: #state3 action: #action3 label: #label3.
button1 hResizing: #spaceFill; vResizing: #spaceFill. button2 hResizing: #spaceFill; vResizing: #spaceFill. button3 hResizing: #spaceFill; vResizing: #spaceFill. rectangle := AlignmentMorph newRow hResizing: #spaceFill; vResizing: #spaceFill; addAllMorphs: {button1. button2. button3}; extent: 120@35.
openInWorld
rectangle openInWorld
It's now 2:02pm, despite three phone calls from home. Code written and ready to test. RadioButtonGroup new initialize openInWorld
Hey, great! Three buttons labelled '1', '2', '3', and the first one is pressed (dark). Clickety clickety, yep, it's working.
Start to finish time: 30 minutes (including 3 1 minute phone calls).
Then he wanted us to complete that assignment ourselves. God! It is even difficult for a SmallTalk senior to find out something common!
Surprising as it may seem, radio buttons are NOT common in Squeak use. They have to be built from simpler components, as shown above. However, it is quite clear from my experience, as reported above, that it is NOT IN THE SLIGHTEST DIFFICULT, NOT AT ALL for a Smalltalk programmer with ___very___ modest experience to find out everything necessary and put the pieces together in just a few minutes. You should bear in mind that I have always had difficultly (mild to extreme) with GUI kits, with the notable exceptions of Interlisp-D and to a lesser extent Tcl/Tk, and you should particuarly bear in mind that I am a complete novice at doing things with Morphic. This is the first time in my life I have ever used a button in any Smalltalk dialect.
Thirty minutes.
You do not have a "Smalltalk senior" for a teacher.
Oh yes, I did say that I was starting from the knowledge that there was a PluggableButtonMorph class. How hard is that to discover?
In a browser, go to the leftmost pane and from the menu select "find class". Type "Button" into the text box that pops up and accept it. You are shown a list of all the classes that contain "Button" in their name. I wish I had done this at the beginning instead of remembering this one from an earlier "Pluggable" search, because guess what, this is the *FIRST* thing a Smalltalk beginner should think of trying and it turns up RadioButtonInput RadioButtonSetInput
They are both part of the Forms support in Squeak's web browser. They are a bit specialised to use directly, but there are ideas one could steal.
Narrowing things down, GUI components have names ending in "Morph", usually, so "...ButtonMorph" is something to look for.
How can SmallTalk be popular?
If people teach it well, and students read some of the MANY existing books and tutorials for Smalltalk.
Look at how easy it is to add a radio button group in Microsoft VB!
30 minutes to build a 3-way radio button group class in Squeak really isn't bad. Now that I have one, I shall probably improve it a bit for my own education, but there are widget libraries coming along which will be much much better.
For comparison, this morning I demonstrated in a class how I
- found a limitation in Scamper (it doesn't support <INS> or <DEL> tags)
- and fixed it
in 30 minutes flat. When I _really_ did that two nights ago, it took me just five minutes more, and I have *never* modified Scamper before.
You can say many things about Squeak, but "classes and methods are hard to find" really isn't one of them. That's twice this week I've found the bits I've needed and whacked them together in half an hour in areas that I have never touched before in any Smalltalk.
Well, it is just my complaint on this language. I hope SmallTalk geeks should come up with a very good tutorial book for SmallTalk newbies. Otherwise, it will never be popular.
The work "geek" is *EXTREMELY* offensive. It means a freak show performer whose act involves biting the heads off live chickens; we're talking serious subhumanity here.
Spelling the name of the language wrong (it's "Smalltalk", not "SmallTalk") is not a good move either; if you haven't even troubled to find out what the langauge is _called_, what _have_ you troubled to find out?
To repeat: there are LOTS of good (even "very good") tutorial books for Smalltalk, and there is even an introductory book for Squeak by Mark Guzdial (may the light of 6 thousand suns shine on his head, but only at night time!). If your teacher has not made sure that you have access to a copy, blame the teacher but do not blame Smalltalk.
I fear that Smalltalk will never be popular with people who have inadequate teachers and are not even told where to find a good book about it. But the same could be said of anything, even Zope or PHP.
Richard does it all here. He responds on the merits to the whining statements of the unavailability of documentation -- points us immediately to free books, directs us to materials that would take hours to study, and finally shows not only how to solve Lily's problem, but teaches us "how to fish" by showing how he found out how to do it!
Let the whiners, at least, carefully study Richard's response -- this one deserves careful study and is repeated below because it is so great
Yes.
This was the quality that distinguished Richards contributions to comp.lang.prolog in the eighties. Nice to see that an old hero of mine is still admirable.
squeak-dev@lists.squeakfoundation.org