comp.lang.ada
 help / color / mirror / Atom feed
* How to measure reused vs. modified LOC?
@ 1995-04-04  0:00 Dave Struble
  1995-04-04  0:00 ` David Weller
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Struble @ 1995-04-04  0:00 UTC (permalink / raw)


How does one differentiate between "reused" and "modified" when
counting lines of code?

For example, starting with a module having 100 lines of code,
suppose that you change one (non-comment) line? One project here
at TI called this 100 lines of *modified* code since, from the
testing aspect, all 100 lines would have to be retested. We call a
component "reused" if it is useable without modification (plug and
play), but this definition gets us into trouble in certain cases.
Examples:

1.  100 line module, change one comment line: probably doesn't
    warrant retesting, so is this 100 LOC reused?  On the other
    hand, one line was modified.  Is this 99 LOC reused?

2.  100 line module, change one non-comment line: again, 99
    reused and 1 modified? or 100 modified due to test issues?

3.  100 line module, change 20 lines: 80 reused and 20 modified, or
    80 reused and 20 new?  What qualifications do you put on the 20
    lines to determine new vs. modified?

3.  100 line module, use basic design for new implementation, but
    discard old code: some measure of reuse here, but how much?

4.  How much code has to be modified before "reuse" loses its
    meaning?  DoD generally uses >30% as cut-off, but is this a
    commercial practice as well?

I would be interested in hearing of ways that other software
organizations have resolved these counting problems and what
definitions work best for new, reused and modified LOC.

Thanks for any help.

---------------------------------------------------------------------
-  Dave Struble                                                     -
-  Texas Instruments Incorporated       "Happiness is just a        -
-  e-mail: struble@mcopn.dseg.ti.com       Flaming Moe away."       -
-  Voice:  (214) 575-5346                                           -
-  FAX:    (214) 575-6200                                           -
---------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to measure reused vs. modified LOC?
  1995-04-04  0:00 How to measure reused vs. modified LOC? Dave Struble
@ 1995-04-04  0:00 ` David Weller
  0 siblings, 0 replies; 2+ messages in thread
From: David Weller @ 1995-04-04  0:00 UTC (permalink / raw)


In article <struble.29.0436E495@mcopn2.dseg.ti.com>,
Dave Struble <struble@mcopn2.dseg.ti.com> wrote:
>How does one differentiate between "reused" and "modified" when
>counting lines of code?
>
There's a pretty good discussion of this in Watts Humphrie's "A
Discipline for Software Engineering"

-- 
      Frustrated with C, C++, Pascal, Fortran?  Ada95 _might_ be for you!
	  For all sorts of interesting Ada95 tidbits, run the command:
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
		if u cn rd ths, u r gd enuf to chg to Ada   :-)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-04-04  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-04-04  0:00 How to measure reused vs. modified LOC? Dave Struble
1995-04-04  0:00 ` David Weller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox