Spaghetti code
From CSSEMediaWiki
(Difference between revisions)
m (Reverted edits by Ebybymic (Talk); changed back to last version by JaninaVoigt) |
|||
Line 3: | Line 3: | ||
Spaghetti code can be caused by a number of things including excessive and unstructured use of GOTO statements and objects accessing each other's internal parts. Inexperienced programmers sometimes tend to write spaghetti code when they first learn to program. | Spaghetti code can be caused by a number of things including excessive and unstructured use of GOTO statements and objects accessing each other's internal parts. Inexperienced programmers sometimes tend to write spaghetti code when they first learn to program. | ||
− | + | ==Liabilities== | |
*Makes a system hard to understand. | *Makes a system hard to understand. | ||
*Makes a system hard to maintain because it is difficult to understand and because bugs are difficult to trace. | *Makes a system hard to maintain because it is difficult to understand and because bugs are difficult to trace. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==See also== | ==See also== | ||
*[[Object orgy]] | *[[Object orgy]] | ||
*[[Goto considered harmful]] | *[[Goto considered harmful]] |
Latest revision as of 03:21, 25 November 2010
Spaghetti code is a common term for complicated and convoluted code that is difficult to understand and maintain. It is called spaghetti code because the control flow of the code looks like spaghetti and goes all over the place.
Spaghetti code can be caused by a number of things including excessive and unstructured use of GOTO statements and objects accessing each other's internal parts. Inexperienced programmers sometimes tend to write spaghetti code when they first learn to program.
Liabilities
- Makes a system hard to understand.
- Makes a system hard to maintain because it is difficult to understand and because bugs are difficult to trace.