Program Development
Program Development
Problem recognition.
Problem recognition refers to the understanding and interpretation of a particular problem.
The programmer must know what problem he/she is trying to solve. He/she must also understand
clearly the nature of the problem & the function of the program.
In order to understand a problem, look for the keywords such as compute, evaluate, compare, etc.
Usually, a programmer identifies problems in the environment and tries to solve them by writing
a computer program.
There are 3 situations that cause the programmer to identify a problem that is worth solving:
1. Problems or undesirable situations that prevent an individual or organizations from
achieving their purpose.
2. Opportunity to improve the current program.
3. A new directive given by the management requiring a change in the current system.
Sample problem: Develop a program that can be used to calculate/find the area of a circle. Use
the equation A = π * r2.
Note. Problem definition should be done thoroughly to ensure user satisfaction, and to facilitate
the subsequent stages in the program development cycle. A failure at this stage usually results in
a system that will not work as intended, or that may not work at all.
Program design
Program design is the actual development of the program’s process or problem solving logic
called the Algorithm.
It involves identifying the processing tasks required to be carried out in order to solve the
problem.
The design stage enables the programmer to come up with a model of the expected program (or a
general framework (outline) of how to solve the problem, and where possible, break it into a
sequence of small & simple steps.
The models show the flow of events throughout the entire program from the time data is input to
the time the program gives out the expected information.
√ The processing tasks must be in order & systematic. Therefore, the programmer
identifies the processing tasks required, and the exact order in which they are to be carried out.
√ The design process does not take account of the programming language to be used in the
final product, since it only defines program logic.
√ Program design provides for easy maintenance.
Note. It is important to design programs before entering them into the computer. The
programmer should only attempt to covert a design into a program code after ensuring that it is
logically correct. If possible, check the logical order on the desk.
Some programmers produce rough & ready solutions at a Keyboard, and continue to amend the
programs until eventually the program appears to do what was expected. This is not
recommended in programming because of the following reasons:
1. The final code may not be easy to follow, since it was just cobbled together.
2. Variable names & specific items of code may not be documented.
3. Programs produced by continuous amendments & changing of codes mostly lead to
unforeseen side effects.
E.g., there may not have been plan for testing the program or procedures, hence, the program
may easily fail.
4. A programmer may be asked to modify the code at a later date. Without sufficient
documentation, the programmer will be forced to trace through the program in order to gain an
insight into how the program functions.
Modular programming
Many programs are non-monolithic (i.e., they are not usually made up of one large block of
code). Instead, they are made up of several units called modules, that work together to form the
whole program with each module performing a specific task.
This approach makes a program flexible, easier to read, and carry out error correction.
Program coding
Program coding is the actual process of converting a design model into its equivalent program.
Coding requires the programmer to convert the design specification (algorithm) into actual
computer instructions using a particular programming language.
For example;
The programmer may be required to write the program code either in Pascal, C++, Visual Basic
or Java, and develop (invent) suitable identifiers, variable names, & their data types. However,
remember that, at this stage the coding is still a Pencil & paper exercise.
The end result of this stage is a source program that can be translated into machine readable form
for the computer to execute and solve the target problem.
Rules followed in coding a program.
1. Use the standard identifiers or reserved words.
2. Make the program more readable by using meaningful identifiers.
3. Don’t use similar variables.
4. Keep spellings as normal as possible.
5. Use comments to explain variables & procedures. This makes the program readable.
6. Avoid tricks – write the program using straightforward codes that people can readily
understand.
7. Modularize your program.
TESTING:
Testing is the process of running computer software to detect/find any errors (or bugs) in the
program that might have gone unnoticed.
During program testing, the following details should be checked;
The reports generated by the system.
The files maintained in connection to the system’s information requirements.
The input to the system.
The processing tasks.
The controls incorporated within the system.
Note. The testing process is a continuous process, and it ends only when the Programmer & the
other personnel involved are satisfied that when operational, the program will meet the objectives
and the growing demands of the organization.
Semantic errors.
These are meaning errors. They occur when the programmer develops statements, which are not
projecting towards the desired goal. Such statements will create deviations from the desired
objectives.
Semantic errors are not detected by the computer. The programmer detects them when the
program results are produced.
Example;
a). IF GP>=1500 OR 2200 THEN
TAX: = GP - (GP * 13%)
b). IF GP>=1500 AND GP<= 2200 THEN
TAX: = GP - (GP * 13%)
In the 1st statement, if the selection is between 1500 & 2200, the computer will pick only 1500 &
2200, and the other values will not be touched.
In the 2nd statement, the computer will be able to pick all the values between 1500 & 2200
because of the ‘AND’ operator.
Lexicon errors.
These are the errors, which occur as a result of misusing Reserved words (words reserved for a
particular language).
DEBUGGING:
The term Bug is used to refer to an error in a computer program.
Most programming errors often remain undetected until an attempt is made to translate a
program.
The most common errors include:-
Improperly declared Constants and Variables.
A reference to undeclared variable.
Incorrect punctuation.
Debugging is therefore, the process of detecting, locating & correcting (removing, eliminating)
all errors (mistakes or bugs) that may exist in a computer program.
Diagnostic procedures.
For complex programs, diagnostic procedures, such as Trace routines, may be used to find
logical errors.
A Trace prints out the results at each processing step to enable errors to be detected quickly.
IMPLEMENTATION
Implementation refers to the actual delivery, installation and putting of the new program into
use.
The program is put into use after it is fully tested, well documented, and after training the staff
who will be involved in the running of the new program.
Structured Walk Through:
It is an organized style of evaluating/reviewing a program by a team of other programmers,
which then reports to the programming team.
Program documentation.
After writing, testing, and debugging a program, it must be documented. In other words, the
programmer should describe all what he was doing during the program development stages.
Program documentation is the writing of supportive materials explaining how the program can
be used by users, installed by operators, or modified by other programmers.
Note. All the program development activities (i.e., from the initial stage up to the complete
program) should be documented/recorded in order to assist in the development of the program,
future modification of the program, general maintenance, machine & software conversion at a
later date, and program changeover.
Documentation can either be; Internal or External.
Internal documentation is the writing of non-executable lines (comments) in the source program
that help other programmers to understand the code statements.
External documentation refers to reference materials such as user manuals printed as booklets.
2. Operator-oriented documentation:
This is meant for computer operators such as the technical staff. It is used to help
them install & maintain the program.
3. Programmer-oriented documentation:
This is a detailed documentation written for skilled programmers. It provides the
necessary technical information to help in future modification of the program.