Slang used to describe a program's source code that is difficult to read or follow by a human because of how the original programmer wrote the code. Spaghetti code is often not organized and has portions of code that may belong at the bottom of the code at the top of the code or vice-versa. Spaghetti code may also skip to other portions of the code numerous times making it hard to track down issues within the code. Finally, some users consider programs that contain several goto statements spaghetti code because they have to try to follow each of the goto statements throughout the whole program.
Spaghetti code is considered bad practice because a program may be more prone to experience errors, and if errors are experienced, it is more difficult to locate what is causing the error to occur. Spaghetti code can be reduced by keeping your program organized, formatted properly using indents, always commenting your code, using subroutines, and if possible breaking your code into sections.