Structured programming (sometimes known as modular programming) is a subset of procedural programming that enforces a logical structure on the program being written to make it more efficient and easier to understand and modify.[1]
This definition does not expose the need of structured programming. As programs were getting larger there was no method of proving their correctness. “Therefore, I have not focused my attention on the question “How do we prove the correctness of a given program?” but on the questions “for what program structures can we give correctness proofs without undue labour, even if the programs get large?” and, as a sequel, “How do we make, for a given task, such a well-structured program?”. My willingness to confine my attention to such “well-structured programs” (as a subset of the set of all possible programs) is based on my belief that we can find such a well structured subset satisfying our programming needs, i.e. that for each programmable task this subset contains enough realistic programs.”[2].
Structured programming helps writing programs that are easier to debug and are break down to manageable pieces of code. The GOTO statement was no more needed, the GOTO statement was representing the JMP (JUMP) assembly language instruction that every processor has. It meant the alternation of program path. This can be accomplished by other control statements and the use of GOTO statement can be eliminated or hidden. The use of structured programming was a revolution a life changing event.[3]
I have used structured programming since 1984. Previously, I was exposed to the mighty GOTO statement when I was writing BASIC programs back in 1980. GOTO was the source of spaghetti code and hours of debugging, I learned structured programming through a PASCAL course taught on UCSD-p Pascal running on an Apple IIe computer.
Structured programming changes the way of thinking. As later OO programming changed the level of abstraction and again the way of thinking from structured programming and coding methodologies.
The Structured programming brought the concept of types. Adding another level of abstraction to data representation. The genesis of structured programming based on procedures gave birth on the concept of objects of classes.” A procedure which is capable of giving rise to block instances which survive its call will be known as a class; and the instances will be known as objects of that class.”[4]
References
[1] TechTarget (2008). structured programming [Online] http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci866374,00.html
[2]Edsger W. Dijkstra (August 1969).Structured Programming [Online]. http://www.cs.utexas.edu/~EWD/transcriptions/EWD02xx/EWD268.html
[3]Donald E. Knuth (December, 1974). Structured Programming with go to Statements [Online] Computing Surveys, VoL 6, No. 4 http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf
[4]O—J.Dahl, E. W. Dijkstra, C. A. R. Hoare(1972) Structured Programming. Academic press London and New York 1972. ISBN: 0–12-200550
No Responses to “What is structured programming?”