comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <eachus@mitre.org>
Subject: Re: Self-referential types
Date: 1999/10/22
Date: 1999-10-22T20:39:42+00:00	[thread overview]
Message-ID: <3810CCC8.E4CB47C4@mitre.org> (raw)
In-Reply-To: 7uq8g3$jl8$1@nntp5.atl.mindspring.net

Richard D Riehle wrote:
>                                        As you so carefully note in your
> message, this does require some planning.   In a large-scale development
> effort, planning at this level of detail is often absent from the
> process.

    I think that this really sums it all up.  Fortunately less often
recently, I get put on "Red Teams" to decide if some project can be
saved, and if so how.  (And for how much, or whether it is better to
cancel it anyway.)

    So from my experience, too many nested procedures is an indication
of (very) bad design.  As I also said, nested functions, usually small,
don't seem to imply bad design, but nested procedures do.  If I were to
make this a serious metric by itself, I would use something like, for
each procedure start with zero.  Climb to the root, and for each
nesting, if inside another subprogram or task entry add one.  Sum over
all procedures and divide by the number of procedures to normalize.

    I could then set up a scale: 0.1 or less very good,...0.5
acceptable, >1.5
reject.  I don't for two reasons.  First I have some coupling measures
which do a better job, and second, you don't need a scale.  Most code is
either near zero, around one, or over three...

    In fact, MITRE did do a lot of work on coupling and cohesion
measures using DIANA a few years ago--I would lie to update the tools to
use ASIS.
But in reality, these tools were of no use at all.  The results were
either, "Gee, this is just short of perfection, can you do anything
about package XXX?" or "This code sucks, but you knew that just from the
effort to get it processed by the front-end of the tool.  There is no
reason to tell you where it sucks or how to fix it.  But if you care the
answers are 'everywhere' and 'don't'."

    Incidently, I took a look at some of the GNAT library packages.  For
almost all of them, the count as expressed above would be zero.  The
exceptions?  Explicit finite state such as in GNAT.Regexp, where such
structure is completely justified.  But while Robert Dewar and I may
write such code, most programmers never do.

-- 

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  reply	other threads:[~1999-10-22  0:00 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7ttb4a$8mq$1@nnrp1.deja.com>
     [not found] ` <3802597B.9205AEE8@averstar.com>
1999-10-12  0:00   ` Self-referential types Ted Dennison
1999-10-12  0:00     ` Matthew Heaney
1999-10-13  0:00       ` Ted Dennison
1999-10-12  0:00 ` Vladimir Olensky
1999-10-12  0:00   ` Matthew Heaney
1999-10-12  0:00     ` Ted Dennison
1999-10-12  0:00       ` Matthew Heaney
1999-10-12  0:00     ` Robert I. Eachus
1999-10-12  0:00       ` Matthew Heaney
1999-10-13  0:00         ` Vladimir Olensky
1999-10-13  0:00           ` Vladimir Olensky
1999-10-18  0:00           ` Robert Dewar
1999-10-18  0:00             ` Vladimir Olensky
1999-10-18  0:00             ` Laurent Guerby
1999-10-13  0:00         ` Ted Dennison
1999-10-13  0:00           ` Matthew Heaney
1999-10-13  0:00         ` Robert I. Eachus
1999-10-13  0:00           ` Brian Rogoff
1999-10-15  0:00             ` Robert I. Eachus
1999-10-15  0:00               ` Marin David Condic
1999-10-15  0:00                 ` Robert I. Eachus
1999-10-18  0:00                   ` Robert Dewar
1999-10-19  0:00                     ` Robert I. Eachus
     [not found]               ` <7u86su$o5v$1@nntp8.atl.mindspring.net>
1999-10-18  0:00                 ` Robert I. Eachus
1999-10-22  0:00                   ` Richard D Riehle
1999-10-22  0:00                     ` Robert I. Eachus [this message]
1999-10-18  0:00               ` Robert Dewar
1999-10-18  0:00                 ` Ed Falis
1999-10-19  0:00                   ` Robert Dewar
1999-10-18  0:00                 ` Brian Rogoff
     [not found]               ` <slrn80fl9f.68j.aidan@skinner.demon.co.uk>
1999-10-19  0:00                 ` Wes Groleau
1999-10-21  0:00                   ` Robert Dewar
1999-10-21  0:00                     ` Jean-Pierre Rosen
1999-10-21  0:00                       ` Robert Dewar
1999-10-21  0:00                     ` Comments (was: Self-referential types) Wes Groleau
1999-10-21  0:00                       ` Ehud Lamm
1999-10-22  0:00                         ` Ted Dennison
1999-10-23  0:00                           ` Ehud Lamm
1999-10-23  0:00                         ` Robert Dewar
1999-10-23  0:00                           ` Ehud Lamm
1999-10-23  0:00                             ` Comments Georg Bauhaus
1999-10-24  0:00                               ` Comments Ehud Lamm
1999-10-26  0:00                                 ` Comments Robert I. Eachus
1999-10-28  0:00                                   ` Comments Jerry van Dijk
1999-10-28  0:00                                     ` Comments Ted Dennison
1999-10-25  0:00                             ` Comments (was: Self-referential types) Wes Groleau
1999-10-23  0:00                       ` M.
     [not found]                       ` <Pine.A41.3.96-heb-2.07.991021191504.30582K-100000@pluto.mscc.huji. <381477c9.e1388ff3@ftw.rsc.raytheon.com>
1999-10-25  0:00                         ` Larry Kilgallen
1999-10-21  0:00                     ` Self-referential types Larry Kilgallen
1999-10-22  0:00                     ` Richard D Riehle
1999-10-23  0:00                       ` Robert A Duff
1999-10-23  0:00                         ` Richard D Riehle
1999-10-24  0:00                       ` Michel DELARCHE
1999-10-12  0:00     ` Richard D Riehle
1999-10-12  0:00     ` news.oxy.com
1999-10-12  0:00       ` Ted Dennison
1999-10-12  0:00         ` Stanley R. Allen
1999-10-13  0:00           ` Ted Dennison
1999-10-13  0:00         ` Vladimir Olensky
1999-10-14  0:00         ` Multiple Inheritance in Ada 95 [was Re: Self-referential types] Tucker Taft
1999-10-12  0:00       ` Self-referential types Matthew Heaney
1999-10-12  0:00 ` Robert A Duff
replies disabled

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