Smalltalk & Squeak featured on Slashdot

Richard A. O'Keefe ok at atlas.otago.ac.nz
Fri Apr 20 05:13:06 UTC 2001


I have been challenged on my statement that
    > Putting everything in the Squeak image *adds value for BEGINNERS*
    > because everything is findable.
	
Do I know any real beginners with NO previous ST experience that this
has helped?

Of course not, because you have to have at least an hour's experience
before you can start looking, and then you don't have NO previous
experience.  This is the second year now that I have given Squeak to
4th-year students.  They were provided with the best tutorial material
I could find on the net, and given about a one-and-a-half hour demo of
what's there and how you can find things.  They were also provided with
a copy of Lalonde & someone in the 4th-year lab, which is really very
helpful.

It's far too early to tell how this year's lot will do.  (Recall that
the university year in the southern hemisphere matches the calendar year.)
Last year's lot did pretty well, with almost no hand-holding past the first
week.

My challenger says that of a group he started with, half fell away because
it was "poorly documented" and "difficult to work with".

It is difficult to answer that without knowing what documentation they
had.  Without Lalonde, it might have been a different story.  (I must
take a look at the Winston book.  Maybe that will be useful too.)

I deny categorically that Squeak is in any way difficult to work with,
IF YOU HAVE GOOD DOCUMENTATION TO GET YOU STARTED.  If you have the
Goldberg et al coloured books, you have adequate documentation to get
you started, especially in MVC projects.

I am still troubled by the move to Morphic as the default environment
in Squeak 3.0.  When there is a book of the quality of the Orange book
or Lalonde V2 that describes Morphic, that will change my mind.

I have specifically been asked:
	Are there some guidelines to follow where using the browsers and
	whatnot can answer questions like "How do I configure squeak to
	run as a CGI?"  or "How do I read from a file?"
	
Some of that stuff is on the Swiki, and one of the ways that having
everything in Squeak helps you find that stuff is Scamper.

There *are* guidelines for how to look.
    open a method finder and search for a keyword
    open a browser and search for a keyword
    select a likely string and search for methods containing it in a string
    look on the Swiki

Having tried these, I can say with some confidence that CGI support is NOT
part of the 3.0 distribution, so the guideline says to look on the Swiki
next.  I'm not *interested* in CGI at the moment, so I'm not going to.

Reading from a file?
    method finder "read" brings up some promising things.
	canRead:			(FlashFileReader)
	character reading		(note space, select shows nothing)
	chunk reading			(note space, select shows nothing)
	isReadOnly
	...
select "isReadOnly" and you discover the class StandardFileStream.
An excellent place to look, and found in seconds.

[What are those lines with spaces in them?  They look as though they
 might be message categories.  A message category finder might be a nice
 tool, at least for the rarer categories.]

In fact, a little more poking in this method finder brought me to
LimitingLineStreamWrapper, which I didn't know about and may have a use for.

I would certainly expect someone with some UNIX experience to be able
to write straightforward filters in Squeak after a week or two; there
is information you need that's tricky to dig out of the code, but it's
in the manual page.  I wouldn't expect them to find it *easy*, because
Smalltalk isn't like C or Pascal or even Java.  But it's the libraries
they'd be getting their heads around, not the language as such or the IDE.

Oh yes, what if someone didn't look at isReadOnly, but at gifReaderClass,
which precedes it?  Well, they'd find a reference to GifReadWriter,
where method category private-decoding would take them to readHeader,
which leads to readWord, which leads to GifReadWriter>>next.  That's not
in GifReadWriter, but browse hierarchy leads to ImageReadWriter which
calls stream next.  So there's a clue that "next" is the way to read a
byte from a stream. Cmd-m (implementors) on 'next' then tells us about
CrlfFileStream, FileStream, and FlashFileStream, and the class comment
on FileStream tells you the rest.

(Don't forget, there was an *easier* route.  This is what you get if you
slog away at the first plausible option every time.)

Something that *would* help for searches like this would be
something to search the class comments, and if I didn't have to go and
collect my car from the panelbeater (road rage incident:  the so-and-so
punched my driver-side window to shards and splinters) I'd have a crack
at implementing it.





More information about the Squeak-dev mailing list