[buug] On missing data

Bob Read unixjavabob at yahoo.com
Mon Dec 2 11:53:41 PST 2002

   A similar (the same?) dilemma constantly weighs on
me:  when/how to validate data in a system.
   I've found that I am able to identify when/how to
validate data (ie what to do with "missing" data and
when/how to do it) by creating system flow diagrams
and use case scenarios.
   Thus, it's a design issue...and thus, can be
determined by writing a requirements document (which
is different for every unique system).
   Now on to Ian's response (which I liked very much
because I do it in Perl and C all the time):

> OOP believers (of which I used to be one) hate this,
> and will instead
> invent a base type of which both Value and Missing
> are subtypes, and
> equip the base type with operations so that users of
> the type don't
> have to distinguish the cases.

   Why create a "Missing subtype"?  Instead, throw an
exception (ie MissingDataException) during the
object.slidingAverage() if the data is missing.


Bob Read
Exit Code Incorporated
cell (510)-703-1634
unixjavabob at yahoo.com

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the buug mailing list