In computer programming, code which flagrantly violates the principles of structured, procedural programming. Usually this means using lots of GOTO statements (or their
equivalent in whatever language is being used) - hence the term, which suggests the tangled and arbitrary nature of the program flow.
Spaghetti code is almost
impossible to debug and maintain, and rarely works well.
Programmers who write spaghetti code usually learned to code in an unstructured language such as BASIC, and never bothered to update their technical
knowledge when they progressed to more serious languages.