[squeak-dev] Re: Code distribution (was Re: Gofer versus Installer)
Andreas Raab
andreas.raab at gmx.de
Sun Dec 19 01:56:57 UTC 2010
On 12/18/2010 2:20 PM, Janko Mivšek wrote:
> Code for this code stats comparison is freely available, just load
> package WebCodeStats:
>
> http://www.squeaksource.com/WebCodeStats.html
>
> It is also pretty simple to adapt to your needs, just select which
> packages to measure. See for instance #setAidaCodeStats in setup.
Very cool. I just ran this on our code base:
Code stats Tweak Croquet
Nr of packages: 14 17
Nr of categories 53 26
Nr of classes: 297 241
Nr of methods: 6168 6476
lines of code: 36919 49063
Avg methods/class: 20.7 26.8
Avg lines/method: 5.9 7.5
Nr of test methods: 6 150
% of commented methods: 50 53
% of commented classes: 59 92
(I'll ask if I can share the numbers on the Qwaq packages as well). One
relevant note is that I don't have the Tweak test packages loaded which
explains the absence of tests. Other than that it looks as if there's
virtually no difference in terms of average length of methods (Tweak is
a little lower probably because of auto-generated accessors) but it's
amazing that the average length of Croquet (and Qwaq) methods is
virtually identical to the average length of Aida and Seaside methods :-)
One thing that was interesting to me was that when I ran the method
distribution code I found that we have a significant number of classes
with more than 50 methods (in the 10% range). In your comparison, there
is nothing listed beyond 50 methods/class. Are there no classes with
more methods in any of the frameworks, or did you prune them? What
surprised me here was that the number is significantly higher than I
expected; but it seems that there are usually one or two very large
interfaces (CPlayer in Tweak for example carrying 400 methods) and I
think it's not too uncommon to have a "handful" of classes that come in
in the 50-100 methods range.
In any case, this is extremely interesting data.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|