home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / papers / misc / cs.toronto.edu:programming / mistakes.tips < prev    next >
Encoding:
Internet Message Format  |  1992-10-18  |  1.8 KB

  1. Path: jarvis.csri.toronto.edu!mailrus!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!sceard!mrm
  2. From: mrm@sceard.UUCP (M.R.Murphy)
  3. Newsgroups: comp.misc
  4. Subject: Program Errors
  5. Keywords: list of possible errors
  6. Message-ID: <881@sceard.UUCP>
  7. Date: 27 Feb 89 22:50:46 GMT
  8. Organization: Sceard Systems, Inc., San Marcos, CA
  9. Lines: 33
  10.  
  11. About ten years ago I started keeping a list of the errors that I
  12. made in programs. I made the list in the form of questions to ask
  13. myself as I stared blankly at a {dump|hung machine|garbage output}.
  14. I tacked the list on the wall next to my desk and added a new question
  15. each time I found that I had made YASM (stupid mistake).
  16.  
  17. After a while, the additions to the list became less frequent, not because
  18. I made fewer SM's, but because each mistake could be classed as one already
  19. on the list.
  20.  
  21. Here's the list. I'm curious, can you add to it?
  22.  
  23.   1) Is the argument count correct?
  24.   2) Is the spelling correct?
  25.   3) Is the argment type correct?
  26.   4) Is the variable initialized correctly?
  27.   5) Do "ends" match "do"s?
  28.   6) Is the correct register used?
  29.   7) Is a previous equate, using, or define in effect?
  30.   8) Is the level of indirectness correct?
  31.   9) Are the defaults correct?
  32.  10) Is the array large enough to hold the data?
  33.  11) Is the index out of range?
  34.  12) Is reentrancy, reusability, refreshability preserved?
  35.  13) Did you let something go by that you can't explain? Fix it now.
  36.  14) Does the program have anything remotely to do with the requirement
  37.      for the program?
  38.  15) Did you start to code before thinking?
  39.  16) Did you read the manual?
  40.  
  41. If anybody(well, a few anybodies) cares, I'll summarize.
  42. ---
  43. Mike Murphy  Sceard Systems, Inc.  544 South Pacific St. San Marcos, CA  92069
  44. mrm@sceard.UUCP       {hp-sdd,nosc,ucsd}!sceard!mrm            +1 619 471 0655
  45.