Before a computer program can be written the requirements of the
application must be investigated and defined comprehensively and
unambiguously . This leads to the production of the requirements
specification.
A precise set of instructions to solve a problem is called an
algorithm. The first step in writing a computer program is to
produce an algorithm.
Once the algorithm is designed it must be translated into a suitable
high-level programming language. This program is then compiled to machine
code, linked with any system libraries required and loaded into memory.
At the compilation stage syntactic errors in the program may be found
and have to be corrected before any further progress can be made.
Once the program has been compiled, linked and loaded it can be tested
with realistic test data.
Testing may show up the presence of logical errors in the program. These
may lead to the production of wrong results or cause the program to halt
on a run-time error.