Spaghetti code

From CSSEMediaWiki
Revision as of 03:54, 20 July 2009 by JaninaVoigt (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

See also

Personal tools