How to write a program-coding, testing and debugging

Steps involve to write a program

There are some of the steps to start writing the program. The very first one is understand the problem that you are trying to solve and doing programming for that. Second one is Design a solution for the program or draw a flow chart for that. Third one is write pseudo-code and code for the program in any user like language. Fourth step is to test the code and find the bugs from it and also test in the real world with the authorised users. Final step is to release the program and iterate the steps for the next version.

Writing Code

Code is basically a list of instructions that can be run by a certain program. Code is a plain document that can be used for many different programs and the nature of the code can be indicate by their unique extension. For example: if a programmer doing code by using java programming language then the extension would be and the actual content is till just plain text. Code can be written in basic word pad and it would be more effective to use some software application that is specifically designed to code in particular language. Code editor is a software tool that provide syntax checking and to check grammar of the code. It is also known by integrated development environment or IDE to formatting the code, checking syntax, running as well as testing it. Some of the tools work with specific language and some of them use programming language.


If we define testing in one line it is finding out how something well work. This phase mostly come when software is to be done, testing is done by team of testers in order to find out defect in the software. Testers will test on software and if they encounter any defect then the report will give it to the development team. A tester has to report at what point the defect occurred and what happened due to its occurrence. As we talk early when the design is complete, coding is done and finished code is tested at the module level by each programmer.


The activity is done by the development team after getting report from testers about the defects the developers tries to find cause of the defect. While tries to find the defect sometimes it may need to go through lines of codes and finding out which part causing defect. Once he found the defect the he tries to modify it and rechecks the defect is finally removed or not and after fixing the defect then the software send back to the tester.

Difference between Testing and Debugging


  1. The purpose of testing is to find out bugs of software.
  2. Testing can be done by outsider.
  3. Execution of the test cases and design can be automated.
  4. Testing can be done without the knowledge of design and code.
  5. As testing always start with the known conditions which provide predictable outcomes too.


  1. Whereas purpose of debugging is to find out cause of bug.
  2. For debugging programmer should be involved.
  3. Automated is next to impossible for the programmer.
  4. Debugging is hard to hard when a programmer doesn't have detailed design knowledge.
  5. Whereas debugging start with the possibly un-known initial condition and cannot be predicted.