Back to the issue... (was RE: Squeak coding style...)

goran.krampe at bluefish.se goran.krampe at bluefish.se
Wed Mar 3 00:20:19 UTC 2004


Hi Andreas and all!

"Andreas Raab" <andreas.raab at gmx.de> wrote:
> > Another thing is that I think pretty printing is *hard*: For example
> > code with blocks tend to be hard to format according to rules so that it
> > always "looks good". I have given up on trying to figure out what my own
> > personal rules are - I seem to always adapt my style to the code at
> > hand.
> 
> Interesting point, since I do the same - for example, if I'm in a method
> using underscore as assignment I use underscore, if I see colon-equals I use
> colon-equals. Etc.

Right. But also - when I write code with a few nested blocks - I always
end up formatting it differently. I just can't seem to settle on ONE way
to indent/format code with nested blocks.

> > I just want us to think if we can agree on *a few simple rules*.
> 
> Agreeing???? On Squeak-dev????? About style???? ;-)

:) Yeah, I know. Pretty outlandish!
 
> > For example - is it really too much to ask that comments which are meant
> > to be full sentences are formatted accordingly to proper english? (first
> > word with capital letter, ending with a period)
> >
> > Or is it really too much to ask that all classes have a class comment?
> > Even if it is only one or two lines? Missing class comments is IMHO
> > totally unacceptable *in the standard packages*.
> >
> > So please people, could we get back to this issue? Do you agree with me
> > that a few simple rules could actually be a good thing to have regarding
> > the code in the "standard" Squeak packages?
> 
> I think it is possible to agree on a (very) limited set of rules but whether
> those are actually enforcable is a different matter. I'm no believer in
> rejecting stuff based purely on a formal basis as most of the people are in
> for the fun of it and if people are it's hard to force them to adapt any
> particular style. It is much more helpful to educate people gently along the
> right lines.

True. But on the other hand - if the rules are few, obvious and pretty
much 100% agreed upon - like for example starting sentences in proper
english - then we might even be able to automate it so that code
entering these standards packages (I am of course talking *only* about
those) is automatically transformed to be compliant.

The lack of class comments can not be automated away of course, but I
agree with you that the new Red Sign should make it better in the long
run. Also - I will scream out LOUD if I ever see a harvester approve
classes into standard packages that lack class comments. Really. It
would piss me off. Seriously. We do need to make things *better*, not
worse.

> For example, I believe that the embarrassment of having a big red "THIS
> CLASS HAS NO COMMENT" sprayed right over your face will have quite an impact
> on the quality of class comments long-term. This is a wonderful addition
> both in terms of usability as well as in terms of educating people *why*
> they should write class comments.

Yep. And btw... SM creates all new wonderful opportunities to harass
people. We now have a clear mapping from developer initial all the way
to the SM account. Hehe... (horns growing out of forehead) Hmmmm.... :)

> Cheers,
>   - Andreas

regards, Göran



More information about the Squeak-dev mailing list