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