home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / object / 3212 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  2.0 KB

  1. Path: sparky!uunet!nntp1.radiomail.net!cronos!mandor!neff
  2. From: neff@mandor.metaphor.com (Randall Neff)
  3. Newsgroups: comp.object
  4. Subject: Re: OO Software Metrics: beyond lines of code
  5. Message-ID: <2427@cronos.metaphor.com>
  6. Date: 14 Aug 92 16:15:51 GMT
  7. References: <RHARMON.92Aug11164255@triton.srg>
  8. Sender: news@cronos.metaphor.com
  9. Distribution: comp.object
  10. Organization: Metaphor Computer Systems, Mountain View, CA
  11. Lines: 38
  12.  
  13.  
  14. Two Ignored Research Topics:   
  15.     (Watch out for people proposing software metrics unless they 
  16.     personally write large programs.)
  17.  
  18.  
  19. 1.  There needs to be a metric that measures the quality/completeness of the
  20. documentation:
  21.     Every method has its pre-conditions and post-conditions listed. 
  22.         Does the method change the object's internal state?
  23.     Every parameter to every method has ranges listed (what about null
  24.         pointers?).
  25.     Every method has its exceptional behavior listed, its error conditions
  26.        and what it does about them.
  27.     Every method has a O() performance function.
  28.     Every method describes any memory allocation (how many bytes) and
  29.        memory deallocation.  (This is very tricky with reference counted
  30.        objects).
  31.     Every object with internal state has invariants listed.
  32.     The size of an object in bytes is listed (or a formula, watch out for
  33.        what malloc really does in terms of allocation).
  34.     Every class has a complete list of all (ALL!) methods that it supports,
  35.        identifying which parent class each method is inherited from. This
  36.        is extremely important for multiple inheritence.
  37.         
  38.  
  39. 2.  There needs to be a metric on uniformity of methods (ie every class has
  40.     a required set of methods):
  41.     The class of every object can be determined at run time.
  42.     Every object can print (or write/read to a file) its contents.
  43.     The correctness of the contents of an object can be checked.
  44.     Each object has deep and shallow copy, deep and shallow equality.
  45.     It is possible to enumerate over all objects of a class.
  46.  
  47.  
  48. Randall Neff, Ph.D.
  49. (Personal opinion, not those of Metaphor.)
  50.  
  51.