Computer programming is an art. Many people believe that a programmer must be good at mathematics, have a memory for figures and technical information, and be prepared to spend many hours sitting at a computer, typing programs. However, given the right tools and steps to follow, anyone can write well designed programs. It is a task worth doing, as it is both stimulating and fullfilling.
Programming can be defined as the development of a solution to and identified problem, and the setting up of a related series of instructions that, when directed through computer hardware, will produce the desired results. It is the first part of this definition that satisfies the programmer’s creative needs; that is, to design a solution to an identified problem. Yet this step is so often overlooked. Leaping straight into the coding phase without first designing a proper solution usually results in a program that contains many errors. Often the programmer then needs to spend a significant amount of time finding these errors and correcting them. A more experienced programmer will design a solution to the program first, desk check this solution, and then code the program in a chosen programming language.
These are seven basic steps in the development of a program, as follows.
1. Define the problem
This step involves carefully reading and rereading the problem until you understand completely what is required. To help with this initial analysis, the problem should be divided into three separate components: the inputs, the outputs, the processing steps to produce the required outputs.