Monday, November 11, 2013

1.0.5 Testing the Program

In theory, a well-designed program can be written correctly the first time. However, the imperfections of the world are still with us, so most programmers get used to the idea that their newly written programs have a few errors. Therefore, after coding the program, you must test it on the computer.. This steps involves these phases:

  •  Desk-checking 
                                 In desk checking, simply sit down and mentally trace or check, the logic of the program to attempt to ensure that it is error-free and workable. Many organizations take this phase a step further with a walk through , a process in which a group of programmers-your peers-review your program and offer suggestions in a collegial way.

  • Translating 
  1.  Checks the syntax of the program to make sure the programming language was used correctly, giving all the syntax-error messages, called diagnostic and then
  2. Translates the program into a form the computer can understand. The mistakes are called syntax-errors. The translator produces descriptive error messages. Programs are most commonly translated by a compiler, which translates your entire program at one time. The translation involves the original program, called a source module, which is transformed by a compiler into an object module. Pre-written programs from a system library maybe added during the link/load phase, resulting in a load module, which can executed by a computer.
  • Debugging 
                                 A term used extensively in programming. Debugging means detecting, locating and corresponding bugs(mistakes), usually by running the program. These bugs are logic errors, such as  telling a computer to repeat an operation but not telling it how to stop repeating.

No comments:

Post a Comment