|
[Back to Table of Contents]
|
Section 1
::
|
Computer Programming Essentials
|
.:
Introduction to Computer
Science
.:
[Steps of Program Development]
.:
Levels of Computer Languages
.:
Internal Representation of
Data
Steps of Program Development
In the world of computing, the job of a computer programmer is to create programs that solve specific problems. The problems that programmers encounter may be as simple as printing a billing summary for customers at a store, or they can be as complex as performing financial calculations for a bank. Whatever the problem may be, programmers follow a multi-step process called program development in order to create successful programs. Program development is a five-step process requiring understanding of the problem at hand, developing a solution, writing a program, testing the program, and maintaining it.
The first step in the program development process is to understand the problem. This step is critical because a programmer cannot solve a problem until he fully understands it. During this step, the programmer carefully analyzes the problem in order to form a precise specification that includes the input required and the type of output needed. Input refers to the specific data that is put into a problem in order for it to be solved. Output refers to the exact answer that must be produced from the problem. Before the programmer can do anything else, it is vital that he fully understands the problem.
After he fully understands the problem, his next step is to develop a solution. It is important that the solution is developed before writing any type of programming code. When developing the solution, the programmer must devise an algorithm, which is a step-by-step plan for solving a particular problem. An algorithm can be displayed on paper in one of three ways: a flowchart, a structure chart, or pseudocode. Most programmers choose to use pseudocode, which is a verbal description of the solution involving a mixture of English and a programming language. During this step, the programmer must also make sure he is solving the problem correctly (verification), and he is solving the correct problem (validation).
After a solution has been developed, the next step of the process is to write program code. Writing code essentially means taking the algorithm and converting it into a computer programming language. The programmer must first pick an appropriate programming language to use, such as BASIC, Pascal, Ada, and C. When writing code, the programmer starts at the beginning of the algorithm and works his way down to the end. He must make sure his program code is well-structured and includes adequate documentation. Documentation is statements written in program code that does not theoretically affect the code, but is used to explain the logic behind specific code segments.
The next step in the process is to test the code. Testing can be done by running the program and manually checking the results. Two types of testing normally take place during this step: white box testing and black box testing. White box testing, commonly called glass box testing, refers to testing done by the person who wrote the program code. In other words, the person doing the testing knows everything about the program code. Black box testing, on the other hand, refers to testing done by someone who has no idea of how the program code is written. Documentation is especially important in this phase so other programmers (including yourself) can analyze the code easily in the future. This makes it extremely easier to find and correct mistakes that are initially unnoticed.
After the code has been thoroughly tested, the fifth and final step is maintaining the completed program. The programmer maintains it by updating the code and editing the code in order to make it more efficient. During this maintenance phase, programmers also may have to correct "bugs", which are errors in code that were not recognized during testing.
Every time a programmer is given a problem to solve, he calls upon the program development process for guidance. Every step in the process must be completed in order for the programmer to create a successful solution. If the problem is not understood, a solution will not be developed, and a program will not be written. If a program is successfully written but not maintained, the program will eventually become obsolete. Every step is critical towards the overall success of the program. Although the problems programmers encounter may change, the process of developing a solution will remain the same.
The following is an outline of each step in the program development process. Note the requirements of each step.
1) Understand the Problem
- You can't solve a particular problem unless you understand it.
- Form a precise specification, including the input required for the program and the output needed.
2) Develop an Algorithm
- You should develop a plan before writing any type of program code.
- Check verification : Are you solving the problem correctly?
- Check validation: Are you solving the correct problem.
- Ways to display algorithms: structure chart, pseudocode, flowchart
3) Write the Program Code
- Essentially converting an algorithm into a computer programming language such as C, C++, Java, BASIC, Pascal, or Ada.
- Be sure to use meaningful identifiers, which are names give to variables
- Be sure to include adequate documentation, which are comment statements written in your program code that do not affect the code itself, but explain what specific code segments are supposed to do.
4) Test the Program
- Run the program and manually check the results.
- Be thorough:
- Test all possibilities
- Test extreme data (invalid data, limit values, empty/null values)
- Perform BlackBox testing
- Perform WhiteBox testing
5) Maintenance
- Normally geared toward programming in the real world (careers)
- Update Code
- Correct "bugs"
- Edit code to make it more efficient.
With the program development process covered, we can now look at the different levels of computer languages. Read on for more...
Next Article: Levels of Computer Languages
[Back to Top]
|