[GRASS-dev] Re: a better console and better diff

On Dec 17, 2009, at 10:00 AM, grass-dev-request@lists.osgeo.org wrote:

Date: Thu, 17 Dec 2009 16:31:06 +0100
From: Martin Landa <landa.martin@gmail.com>
Subject: Re: [GRASS-dev] Re: a better console and better diff
To: Michael Barton <michael.barton@asu.edu>
Cc: "grass-dev@lists.osgeo.org" <grass-dev@lists.osgeo.org>, Tim
       Michelsen <timmichelsen@gmx-topmail.de>
Message-ID:
       <f8fe65c40912170731q75654b8aq4b1105ed9fd7dda5@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

2009/12/17 Michael Barton <michael.barton@asu.edu>:

[...]

+1 add support for MDI

-1 for MDI. Most modern software has abandoned the multiple document interface. It means creating a smaller desktop-like window and putting all the program windows into this smaller desktop. So there is less room to see the windows than if they are just on your

-1 for optional DI? Sorry I am not getting the point. User should have
a option to decide if to use SDI or MDI. Personally I prefer SDI, but
it's not the point.

Adding an MDI and getting all GRASS windows inside requires substantial programming and could limit other options, like docked control and display windows, which more people have asked for. This programming would require maintenance and debugging. The GUI is a huge programming effort. A year ago, it was over 40,000 lines of code and I suspect it is now over 50,000. Many new things added to this complex system create new and unexpected bugs due to the many interactions. That is, there is a cost to anything new added that needs to be weighed against its potential benefits in providing a better user experience. Though one or two people have mentioned MDI, I have not heard a loud clamor for this kind of interface. While an optional MDI could be added, in this case I feel that the short and long term costs outweigh any benefits. Hence the -1.

Michael

Michael wrote:

The GUI is a huge programming effort. A year ago,
it was over 40,000 lines of code and I suspect it is now
over 50,000.

fwiw

$ sloccount trunk/gui/ trunk/lib/python/

SLOC Directory SLOC-by-Language (Sorted)
35268 gui python=30290,cpp=4722,sh=256
462 python python=462

Totals grouped by language (dominant language first):
python: 30752 (86.07%)
cpp: 4722 (13.22%)
sh: 256 (0.72%)

Total Physical Source Lines of Code (SLOC) = 35,730
Development Effort Estimate, Person-Years (Person-Months) = 8.55 (102.54)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 1.21 (14.52)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 7.06
Total Estimated Cost to Develop = $ 1,154,320
(average salary = $56,286/year, overhead = 2.40).

"generated using David A. Wheeler's 'SLOCCount'."

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.

number of files: 136 (including image files) + 71 new icons (143 old icons)
lines of written code: 91,818 (not counting lines in image and icon files)

This is ONLY the wxPython code base. The TclTk code base is not as large, but is still considerable.

I wonder why SLOCCount undercounts by so much?
I guess that the SLOCCount 'estimated cost to develop' ought to be a lot higher too.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 19, 2009, at 7:38 PM, Hamish wrote:

Michael wrote:

The GUI is a huge programming effort. A year ago,
it was over 40,000 lines of code and I suspect it is now
over 50,000.

fwiw

$ sloccount trunk/gui/ trunk/lib/python/

SLOC Directory SLOC-by-Language (Sorted)
35268 gui python=30290,cpp=4722,sh=256
462 python python=462

Totals grouped by language (dominant language first):
python: 30752 (86.07%)
cpp: 4722 (13.22%)
sh: 256 (0.72%)

Total Physical Source Lines of Code (SLOC) = 35,730
Development Effort Estimate, Person-Years (Person-Months) = 8.55 (102.54)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 1.21 (14.52)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 7.06
Total Estimated Cost to Develop = $ 1,154,320
(average salary = $56,286/year, overhead = 2.40).

"generated using David A. Wheeler's 'SLOCCount'."

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.

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...

I guess that the SLOCCount 'estimated cost to develop'
ought to be a lot higher too.

depends on how much you value your time :wink:
see the sloccount man page and website for how to adjust that parameter,
and not that was just for the gui/wxpython/ dir. 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.

Hamish

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 :wink:

Never enough--though probably more than others do :wink:

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

On Mon, Dec 21, 2009 at 10:43 PM, Hamish <hamish_b@yahoo.com> 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.

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...

I guess that the SLOCCount 'estimated cost to develop'
ought to be a lot higher too.

depends on how much you value your time :wink:
see the sloccount man page and website for how to adjust that parameter,
and not that was just for the gui/wxpython/ dir. 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.

Well stated! I am more and more impressed with the quality of the new
GUI-- despite my grumbling on the d.* commands. Great work everyone!

Dylan

On Dec 22, 2009, at 8:59 AM, Dylan Beaudette wrote:

On Mon, Dec 21, 2009 at 10:43 PM, Hamish <hamish_b@yahoo.com> 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.

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...

I guess that the SLOCCount 'estimated cost to develop'
ought to be a lot higher too.

depends on how much you value your time :wink:
see the sloccount man page and website for how to adjust that parameter,
and not that was just for the gui/wxpython/ dir. 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.

Well stated! I am more and more impressed with the quality of the new
GUI-- despite my grumbling on the d.* commands. Great work everyone!

Thanks much Dylan! Hopefully we're making some improvements on the command front too.

Michael