comp.lang.ada
 help / color / mirror / Atom feed
From: <adaworks@sbcglobal.net>
Subject: Re: Working with incompetent adaists / unsafe typing war story
Date: Sun, 19 Feb 2006 03:58:50 GMT
Date: 2006-02-19T03:58:50+00:00	[thread overview]
Message-ID: <_1SJf.14861$2O6.8349@newssvr12.news.prodigy.com> (raw)
In-Reply-To: p9cJf.34455$lo3.34072@trnddc07


"Anonymous Coward" <anonymous@coward.org> wrote in message
news:p9cJf.34455$lo3.34072@trnddc07...
>
> Maybe I'm just dealing with a tough crowd.  A systems fella ordered a
> change on one of my private types, forcing me to represent the same
> type with a different set of numbers (a change in coordinate systems
> to be exact).  Because it was a private type, I only needed to make
> that change in ONE package; which took me about 15-20 minutes (the
> same change would have taken most of the day if the type were public).

Someone recently encountered a problem with a package I wrote years
ago that had a limited private type.  It seems I had overlooked one possible
requirement (method)  for that type. The need for the method is rare but I
should
have anticipated it.   No one ever encountered the problem before, as far as
I know.

It took me five minutes to add a specification for that method and about as
long to write an implementation for it in the package body.  The algorithm
was simple to implement, but did involve an if statement.   Had programmers
been able to write their own code for the functionality of this method, the
probability of some of them getting it wrong was low, but still possible.  In
this
case, the algorithm was testable in one place rather than scattered about.

If I had declared the type as non-limited, or had used a pre-defined type,
the absence of the method would never have manifested itself.   Users would
have simply carried on without thinking about it.  From this example, some
designers might suppose that the type should not have been limited.   My
own view is that we learned something from discovering the need for this
method.   Also, I ended up thinking more deeply about what other methods
might be required in the future.  I did not come up with anything else.

Unfortunately we did have to recompile the package specification, but that did
not seem to present any hardship. More important, the internal strucutre of
instances of the type continue to be unreachable by users of the package.

Richard Riehle






  parent reply	other threads:[~2006-02-19  3:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16  2:15 Working with incompetent adaists / unsafe typing war story Anonymous Coward
2006-02-16  8:32 ` Jean-Pierre Rosen
2006-02-16 16:10   ` Peter C. Chapin
2006-02-17  9:27   ` Jerome Hugues
2006-02-17  9:48     ` Stephen Leake
2006-02-16 10:20 ` stephe_on_the_web
2006-02-17  4:19   ` Anonymous Coward
2006-02-17  5:25     ` Jeffrey R. Carter
2006-02-19  3:58     ` adaworks [this message]
2006-02-19 15:28       ` Stephen Leake
2006-02-16 20:17 ` Ludovic Brenta
2006-02-17  4:25   ` Anonymous Coward
2006-02-17 23:09     ` Ludovic Brenta
2006-02-16 23:57 ` adaworks
     [not found]   ` <7glav1paqvs5oco9nn9s5gknlimfu8aglg@4ax.com>
2006-02-17 13:39     ` Marc A. Criley
2006-02-17 18:55   ` Simon Wright
2006-02-17 20:43     ` Pascal Obry
2006-02-17 21:02     ` Stefan Lucks
2006-02-17 21:04       ` Pascal Obry
2006-02-18  9:58       ` Simon Wright
2006-02-17  1:57 ` Brian May
2006-02-17  5:29   ` Jeffrey R. Carter
2006-02-17 12:43     ` Simon Clubley
2006-02-17 19:18       ` Jeffrey R. Carter
2006-02-20  4:44   ` Anonymous Coward
2006-02-20  7:42     ` Brian May
replies disabled

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