[squeak-dev] [Documentation] Classes with class comment with size
> 1000 chars
Hannes Hirzel
hannes.hirzel at gmail.com
Sun May 2 19:32:42 UTC 2010
Hello Michael
The metrics are interesting.
On 5/2/10, Michael Haupt <mhaupt at gmail.com> wrote:
> Hi Hannes,
>
> On Sun, May 2, 2010 at 9:10 PM, Hannes Hirzel <hannes.hirzel at gmail.com>
> wrote:
>> The following gives all the classes which have a comment which is
>> longer than 1000 chars.
>
> ah. You're on this too. Good. :-)
>
> Some metrics that I find interesting are these:
>
> [ Smalltalk allClasses size ] - that would be 2033 in my Trunk image.
>
> [ Smalltalk allClasses select: [ :class |
> class organization classComment = '' ] ] - this gives me an Array
> with 814 entries.
>
> So, of 2033 classes in the image, 814 have no class comment *at all*.
> That's 40 %, and *that* is a shame.
Or put it otherwise 60% have a comment. A good point to start ..... :-)
> In the inspector of the Array I got from above,
>
> [ self collect: [ :class | class category ] into: Set new ]
>
> gives me all the categories where the undocumented classes reside.
> There are many Kernel-* categories on that list, and also many *-Tests
> ones. (Just a quick glimpse.)
The test classes are there to test the corresponding class. I think we
can safely say they do not need a comment at this time. How can we
exclude them from the metrics?
>> Questions:
>> 1) How do I get them only once?
>
> This:
>
> [ Smalltalk allClasses select: [ :class | class organization
> classComment size > 1000] ]
>
> gives me 130 (just updated my Trunk image).
Thank you. I did not remember this message anymore and that I have to
go through the class organization.
>> 2) How do I get them sorted in the dictionary?
>
> A dictionary is not sorted by default. Or is it?
So I wonder, where is the Collection with keys and values where the
keys are sorted?
Best wishes
Hannes
More information about the Squeak-dev
mailing list
|