b. Debugging. Other, more subtle types of errors will be detected in the
debugging phase. These are logic errors that result when the programmer hasn't fully
understood the problem or when he has not fully accounted for problems that might
arise during processing. In fact, one-third to one-half of the programmer s time is spent
debugging the program. For example, a logic error would result if the programmer told
the computer to go to a program line that didn't exist. In an "a-b-c-d" multiple choice
test item, the programmer might have omitted alternative "d."
Figure 2-10. Origin of the term "debugging.
debugging: locating, isolating, and eliminating errors found in the program.
c. Testing. In the testing phase, the programmer actually executes or tries out
the program, using sample or facsimile input data whose results he knows and
understands. In this way, it will become clear if the program produces the desired
results. The programmer might also enter invalid data to ensure that they are detected
and/or bypassed. A complex program is written and tested in separate units so that
errors can be isolated to one specific section. Error traps should be written to detect
invalid data that repeatedly result in improper execution of the program. The
programmer will strengthen error traps, that is, write program lines that will detect
inappropriate user responses. Questions will be re-asked if the user enters numbers
where text should have been entered, or if zero is the answer to a question where a
higher number should have been entered. Programmers often swap partially debugged
program with colleagues, so that a fresh perspective is gained on the clarity and error-
freeness of the program.
MD0058
2-11