According to Wikipedia, the term was originally coined by a database expert Joe Celko in 1982 and here's a quote from his 1997 article revealing what he meant by it: "The standard [structured programming] solution was to replace the GOTOs with nested IF-THEN-ELSE statements and switches that were layered so deep and had so much redundancy that you had a path of control that looked like a plate of lasagna instead."
The same Wikipedia entry however, defines the term differently, clearly referring to multi-layered applications: "... different subsystems, such as ... web application code, business logic, and a relational database." The term's meaning has thus evolved as programmers developed new methodologies and architectures.
I can think of two modern definitions of "lasagna code":
- layers of a software application that are excessive, over-engineered or trivial (obviously)
- layers of a software application lacking unit tests with proper isolation. The developers only tested the system by slicing through and consuming multiple layers at once.
The term obviously means criticism (much like you may criticize my stuff by calling it "spaghetti code"). But what does it mean to you and when would you use it?