The Pasta Theory of Programming is the idea that various programming structures can be likened to the structures of well-known pasta dishes. The first and most famous example of the theory is spaghetti code, which illustrates the unfortunate tendency of unstructured procedural programming to result in code with little or no structure, making it difficult to understand and update.
In contrast, lasagna code is said to resemble structured programming, which has an easily understood, layered structure. However, because of unpredictable interdependencies between modules or units of code, the program may be difficult to modify. And ravioli code is analogous to object-oriented programming (OOP), because it is made up of small, separate, and loosely coupled objects that can be individually modified without affecting the other components or the structure as a whole.
The Pasta Theory of programming is attributed to Raymond Rubey of SofTech Inc. In a 1992 letter to the editor of CrossTalk magazine, Rubey exhorted developers to "go beyond the condemnation of spaghetti code to the active encouragement of ravioli code."