[ENH] sandboxCategory-ls ( [et][er][cd][sm] )
Lex Spoon
lex at cc.gatech.edu
Sat Nov 8 15:09:26 UTC 2003
"Richard A. O'Keefe" <ok at cs.otago.ac.nz> wrote:
> I wrote:
> > I'm already quite fed up with the amazing number of methods in
> > the 'as yet unclassified' category; I'm not looking forward to
> > a matching number of classes in a similar class category.
>
> "Lex Spoon" <lex at cc.gatech.edu> replied:
> But do you really want to disallow 'as yet unclassified' methods?
>
> I have made it a rule in my Smalltalk programming *never* to perpetrate
> an 'as yet unclassified' method myself. Once or twice when I was getting
> started or felt really lazy, I did that. Mea culpa, mea culpa, mea
> maxima culpa. Never again. The only reason I can see for not classifying
> a method that you are about to write is because you don't know what it is
> going to be about, and in that case, why are you writing it?
What a deep difference we have. I make it a rule never to let a naming
problem stop me, and I write code all the time with only hazy initial
ideas. I like being able to dump my ideas into code and then play with
them. I wait until a later phase to clean things up, name them nicely,
fix up the categories, and generally make the code nice to read.
In fact, I used to have a serious problem with naming. I realized I was
actually failing to write down various code snippets because I couldn't
think of an appropriate file name to put the code in. I forced myself
to start using names like "temp" for such experiments, because otherwise
they wouldn't get written at all. If the code lived for more than a few
minutes then I would *later* think up a good name for it. But if I just
wanted to execute 4 lines of code, why do I have to stop to think up a
good name? Why should I?
Similarly, I've always been annoyed at having to think up a class
category name before making a Squeak class. I'm sure there's been code
I didn't write because I didn't want to bother with this.
Anyway, there is an additional problem: good naming and categorization
is HARD. A bad name takes at least one chunk of working memory. A good
name is likely to take much more, and leave you afterwards saying "now
what was I doing again... ah yes." This doesn't seem like a good thing
to force into the flow of development. Squeak should be a place where
people can experiment and mess around. I think Squeak should allow
people to dump ideas into code as quickly as possible. Cross the t's at
a later time.
In fact, I would actually like to Squeak move further in this direction.
I wish, for example, you could easily create *new* classes and methods
without specifying a name. I'd like the browser to always open on a
fresh class, and I'd like a way to type in some code and get
"unnamed143" as the selector name.
But, there's clearly a divide. I have no idea how to resolve this.
Goran's idea of a preference sounds all too realistic. What would it be
called? #instaNag? #tidyEnforcement? #sloppyProgramming? If we think
of a good name it might combine several others, e.g. #sloppyProgramming
might cause #autoAccessors to turn on.
-Lex
More information about the Squeak-dev
mailing list
|