In the early days of programming (1960's), the approach to writing software was relatively primitive and ineffective. Much of the code was written with goto
statements that transferred program control to another line in the code. Tracing this type of code was an exercise in jumping from one spot to another, leaving behind a trail of lines similar to spaghetti. The term "spaghetti code" comes from trying to trace code linked together with goto
statements. The complexity this added to code led to the development of structured programming.
The research of Bohm and Jacopini has led to the rules of structured programming. Here are five tenets of structured programming.
goto
statements are to be used in writing code.break
statement.The control structures of Java encourage structured programming. Staying within the guidelines of structured programming has led to great productivity gains in the field of software engineering.
Last modified: December 12, 2022