[GRASS-dev] Re: wxPython GUI code base (was Re: a better console and better diff)

Michael Barton Michael.Barton at asu.edu
Tue Dec 22 10:58:28 EST 2009


Interesting program. I found the docs on the web.

On Dec 21, 2009, at 11:43 PM, Hamish wrote:

> Michael wrote:
>> I used wc -l to count lines and files
>> in ./grass65_dev/gui/wxpython (source from develbranch_6)
>> and came up with a considerably larger number.
> ...
>> lines of written code:     91,818 
> ...
>> I wonder why SLOCCount undercounts by so much?
> 
> AFAIU it is "SLOC" not LOC. my limited understanding is that it removes
> whitespace, comments, and continuations and just reports hard lines of
> code. but that does not mean lines of logic.  FWTW, it's just a metric,
> it doesn't really mean much. Some commercial programmers get paid per
> line of code or have a quota of number of lines per day, with predictably
> verbose results. At the other end of the spectrum is the obfuscated C contest which tries to do as much as possible in a single line of code.

OK. I think I see. It's not the whitespace or comments (we are pretty good about commenting, but not THAT verbose). It's the fact that wxPython especially, as an OO event-driven language, is written with relatively few VERY long lines (i.e., with a lot of continuation). So SLOCCount may tend to underestimate the effort in languages where a lot is jammed into single lines. On the other hand, while wc may give a better idea of the amount of typing involved--though it probably overcounts because some of the lines are quite short.

> 
> It's a bogus as trying to quantitatively measure teaching performance or
> research impact with some formula. It gives a rough idea, but only a
> very rough one...

Well, I wouldn't say it is at all bogus. But it is good to understand what it is actually measuring.

> 
> 
>> I guess that the SLOCCount 'estimated cost to develop'
>> ought to be a lot higher too.
> 
> depends on how much you value your time ;)

Never enough--though probably more than others do ;-)

> see the sloccount man page and website for how to adjust that parameter,
> and not that was just for the gui/wxpython/ dir.

That is what surprised me so much.

> see the main wiki page
> for oholo's project development metrics. (which in turn ignores anything
> not copied from grass5 and pre-svn..)
> 
> anyway, you can comfortably tell folks that the new GUI looks like a
> million bucks.

...or $2M or $3M (just don't tell my wife, since my financial take has been...let's see...oh yeah, $0)

Michael

> 
> 
> Hamish
> 
> 
> 
> 



More information about the grass-dev mailing list