Structured Programming  «Prev  Next»
Lesson 1

Programming Fundamentals Course Map


History of Structured Programming

Structured programming emerged in the late 1960s as a response to the growing complexity of software development. Before its advent, programming often relied on unstructured techniques, heavily dependent on the "goto" statement, which allowed code to jump arbitrarily between sections. This approach frequently led to "spaghetti code", which is a tangled, hard-to-follow mess that made debugging and maintenance a nightmare. The push for structure came from pioneers like Edsger Dijkstra, whose seminal 1968 letter "Go To Statement Considered Harmful" argued that unrestricted jumps undermined program clarity and reliability. Dijkstra advocated for a disciplined approach using sequential execution, conditionals (if-then-else), and loops (while, for), laying the philosophical groundwork for what would become structured programming.
The formalization of structured programming took shape through the work of mathematicians and computer scientists like Donald Knuth and Niklaus Wirth, alongside practical developments in programming languages. In 1970, Dijkstra, along with C.A.R. Hoare and Ole-Johan Dahl, published "Structured Programming," a book that crystallized the concept with rigorous theory and examples. This coincided with the rise of languages like ALGOL, Pascal, and later C, which were designed to support structured constructs natively. The key idea was to break programs into smaller, manageable blocks, such as procedures or functions, each with a single entry and exit point. This modularity not only made code more readable but also provable, aligning software development with mathematical rigor. By the mid-1970s, structured programming had become a cornerstone of software engineering, taught widely in academia and adopted in industry to tame the chaos of early computing projects.
The impact of structured programming reverberates through modern software development, even as paradigms have evolved. It directly influenced the design of subsequent languages like Ada and Java, embedding principles of clarity and control flow into their DNA. Beyond syntax, it shifted the culture of coding toward discipline and foresight, paving the way for concepts like object-oriented programming, which built on its modular foundations. While critics later argued it could be overly rigid, pointing to functional or declarative paradigms as more flexible alternatives, structured programming’s legacy is undeniable. It brought order to a field once riddled with ad-hoc solutions, enabling the creation of complex, reliable systems that power everything from operating systems to enterprise software today.

Imperative Paradigm

Is based on the ideas of a Von Neummann architecture. A command has a measurable effect on the program and the order of commands is important. Tasks are executed consecutively in a specified order. Its main characteristics are
  1. incremental change of the program state (variables) as a function of time;
  2. execution of commands in an order governed by control structures; and
  3. the use of procedures, abstractions of one or more actions,
which can be called as a single command. Languages representatives of Imperative paradigm: Fortran, Algol, Basic, C, Pascal.
1 Program Example1 ;
Var
3 Num1, Num2, Sum: Integer ;
Begin
5 Write ( ' Input number 1 : ' ) ;
Readln (Num1) ;
7 Write (' Input number 2 :' ) ;
Readln (Num2) ;
9 Sum := Num1 + Num2;
Writeln (Sum) ;
11 Readln ;
End

SEMrush Software