[ENH] sandboxCategory-ls ( [et][er][cd][sm] )

Andreas Raab andreas.raab at gmx.de
Sat Nov 8 16:55:48 UTC 2003


Lex,

> What a deep difference we have.

Funny thing to read for me, given that I agree with _both_ of you. How so?
Well, for just coding some idea I certainly don't want to think about names
and such. In this regard I'm with you. But for looking at and browsing
Squeak I hate to see unclassified methods, unclear names etc. That's because
I don't know what ideas were behind the code in question when it was
written, and a classification plus names helps greatly in understanding
other people's code. So my rule of thumb would be: As long as you're on your
own, do whatever you want. You want a quick hack? Go for it. But as soon as
you start sharing (which includes sending a CS around) I'd argue that things
should be classified by then. Or put differently: Nothing that ships with
"official Squeak" should have unclassified methods or non-descript names.

Cheers,
  - Andreas


> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Lex Spoon
> Sent: Saturday, November 08, 2003 4:09 PM
> To: The general-purpose Squeak developers list
> Subject: Re: [ENH] sandboxCategory-ls ( [et][er][cd][sm] )
> 
> 
> "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