Spaghetti code
From CSSEMediaWiki
(Difference between revisions)
JaninaVoigt (Talk | contribs) (Page about spaghetti code) |
m (Reverted edits by Ebybymic (Talk); changed back to last version by JaninaVoigt) |
(One intermediate revision by one user not shown) |
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.