Use Programming Constructs

Two people working at computers

Bohm and Jacopini (1967) proved that any problem that requires a logical solution can be solved using only three concepts to develop the solution. These are typically known as control constructs in programming and can be identified as:

Sequence – A list of instructions to be carried out one after the other in a strict sequence from top to bottom or from the beginning to the end. Each command will only be carried out once.

Selection – Two or more sets of alternative instructions with one path being chosen according to the value of a condition.

Iteration – A set of instructions that could be repeated zero or more times.

Dijkstra (1968) added to this impetus for structured programming by publishing a paper called ‘GoTo Statement Considered Harmful’. In this paper, he argued that the use of the Go To statement as a branching construct led to more problems than it solved. In many instances, the overuse of the Go To statement in large programs created what became known as ‘spaghetti code’.

These ideas along with the principles of Functional Decomposition and Stepwise Refinement go to make up the concept of Structured Program Design.

Typically, a computer will perform input, output, data storage, and arithmetic operations as well as implementing structured programming control constructs.

Next: Sequence