spaghetti code(redirected from Spagetti code)
spaghetti code[spə′ged·ē ‚kōd]
Computer program code that lacks a coherent structure, and in which the sequence of program execution frequently jumps to a distant instruction in the program listing, making the program very difficult to follow.
McGraw-Hill Dictionary of Scientific & Technical Terms, 6E, Copyright © 2003 by The McGraw-Hill Companies, Inc.
A pejorative term for code with a complex and tangled control structure, especially one using many GOTOs, exceptions, or other "unstructured" branching constructs. The synonym "kangaroo code" has been reported, doubtless because such code has so many jumps in it.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
spaghetti codeProgram code written without a coherent structure. The logic moves from routine to routine without returning to a base point, making it hard to follow. It implies excessive use of the GOTO instruction, which directs the computer to branch to another part of the program without a guarantee of returning.
Although there are always ways around it, structured programming attempts to eliminate spaghetti code by using functions that, after being called and executed, return the computer to the instruction following the one that called it. See lasagna code, ravioli code and spaghetti development.
|There are tons of spaghetti code lurking in the millions of applications written over the years. Spaghetti code is often the result of being in a rush to make a change in the program or fix a problem.|
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.