Class comments!?

goran.krampe at bluefish.se goran.krampe at bluefish.se
Sun Oct 17 21:15:53 UTC 2004


Hi Andres and all!

I may have misunderstood your posting, but anyway:

Andres Valloud <sqrmax at cox.net> wrote:
> Hello.
> 
> > Well, if the harvesters actually DEMAND class comments, then I am
> > sure that the developers could take their time to actually write a
> > line or two explaining what the heck the object IS.
> 
> Random dictates that you will, in the course of your business,
> encounter other developers with different levels of experience than
> yours.

Yes, definitely.

> Code should be readable by most developers, because as a team you and
> your team mates should all be successful.

Yes, definitely.
 
> Therefore, code should be written with special care, trying to make it
> very simple.  Our problems as developers are usually very simple, and
> Smalltalk already provides in its library many ways of solving simple
> problems elegantly.  This is something that can be done.

Yes, definitely.

> Or not.  Because unnecessary complexity artificially raises the value
> of small accomplishments.

Eh, yes. Not sure I follow though. :)

> Caesars thrive in such environments at the cost of making the whole
> team fail.

Agreed. Seen it many times too.
 
> Andres.

Ok, perhaps I am misunderstanding you - but are you saying that code we
write in Smalltalk can be made so simple so we do not need to write
class comments? If this is what you are saying, then I clearly disagree.

First of all - things are not that simple. I mean, even simple code is
hard for a newbie, and there is also complex code in Squeak that IMHO
aren't more complex than needed and thus simply need class comments.
Period.

Secondly - a class comment should IMHO state WHAT the object IS. The
intention of the object. Sometimes it can be very, very short if it is
easy to understand. Sometimes it needs a little bit more of plain
english to explain what the object IS. This is ALL I ask for in a class
comment. I don't ask for detailed instvar descriptions. I don't ask for
detailed explanations of responsibilites, protocols or sample code. I
just want to know what it IS.

Now, if ANYONE can come up with a GOOD reason for NOT telling me what an
object IS, then I would gladly hear it.

regards, Göran

PS. Still quite confused that people can't share this idea. I mean, hey
look, a class called GummaBummaThingy! Ok... but what IS it? Ha! Won't
tell ya! You just have to read the damn code dude! Sigh.



More information about the Squeak-dev mailing list