Spaghetti code
Pejorative phrase for source code that has a complex and tangled control structure reminiscent of spaghetti
Spaghetti code is computer source code that encodes control flow that is convoluted, and therefore, hard to understand. Control statements direct program execution in ways that instead of having a quality of structure, resembles cooked spaghetti, twisted and tangled. The code tends to be hard to maintain.
Nº Q1047561 ★★
Uncommon · History
Spaghetti code
Pejorative phrase for source code that has a complex and tangled control structure reminiscent of spaghetti
Spaghetti code is computer source code that encodes control flow that is convoluted, and therefore, hard to understand. Control statements direct program execution in ways that instead of having a quality of structure, resembles cooked spaghetti, twisted and tangled. The code tends to be hard to maintain.
From Wikipedia
Spaghetti code is computer source code that encodes control flow that is convoluted, and therefore, hard to understand. Control statements direct program execution in ways that instead of having a quality of structure, resembles cooked spaghetti, twisted and tangled. The code tends to be hard to maintain. Since control flow logic encoded via the goto statement tends to lead to convoluted control flow, use of goto is often associated with a classification as spaghetti code. The practice of structured programming was envisioned to eliminate the need for and use of the goto statement as one way to avoid the production of spaghetti code. Ensuring the creation of high-quality software, instead of spaghetti code, often involves aspects such as using better tools, training developers and improving software development processes. Spaghetti code can also describe an anti-pattern in which object-oriented code is written in a procedural style, such as by creating classes whose methods are overly long and messy, or forsaking object-oriented concepts like polymorphism. The presence of this form of spaghetti code can significantly reduce the comprehensibility of a system.
Text: Wikipédia, CC BY-SA 4.0. · Image: BizRules.com (CC BY-SA 4.0) ·
Related cards
-
S
Skeleton (computer programming)
Design pattern in software development
Nº Q1169129 ★★
Not listed
-
Snippet (programming)
Programming term for a small region of re-usable source code, machine code, or text
Nº Q1120538 ★★
Not listed
-
C
Control flow
Order in which individual statements, instructions or function calls of an imperative program are executed or evaluated
Nº Q868299 ★★
Not listed
-
Goto
Statement invoking one-way transfer of program control in many languages
Nº Q750997 ★
Not listed
-
S
Source lines of code
Software metric
Nº Q942695 ★
Not listed
-
Facade pattern
Software design pattern that provides a simplified interface
Nº Q428170 ★★
Not listed