|
Slang used to describe a program's source code that is difficult to
read and/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,
always commenting your code,
and if possible, breaking your code into sections.
Also see: Kludge,
Obfuscation,
Programming
definitions, Quick-and-dirty
|
|
| Resolved | Were you able to locate the answer to your questions? |
|
|