4 ms·
Another pasta-flavored programming problem is "ravioli code". That kind of code has abstraction layers for everything and stuff is forced into objects and class
by exDM69 14y ago
Another pasta-flavored programming problem is "ravioli code". That kind of code has abstraction layers for everything and stuff is forced into objects and classes when all that's needed is a simple function or heck, even a goto statement. Code like this may seem elegant to the author but trying to read it is as futile an exercise as going through a pile of spaghetti code.
Given the popularity of OOP during the past few decades, ravioli may be a bigger problem than spaghetti these days.
- eps 14y agoNever heard of it.
- sageikosa 14y agoOnion code: as you peel back the layers your cry more.
- danielbarla 14y agoSure, ravioli code can be a problem, although you are supposed to be aggressively refactoring away trivial classes. Perhaps my experience is different to yours, but I've encountered "under-object oriented" code far more often than "over-object oriented". I guess it's based on the format of complexity you're used to - some people like their 20K LOC "classes". I prefer mine in the 100 to 500 LOC range, even if that results in "too many" classes.
- colomon 14y agoI think the article is trying to define what you call ravioli code as a modern version of spaghetti code. But I think ravioli is a handier, more specific name. Is it your coinage?
- exDM69 14y agoNo, I read about it somewhere years ago. Don't know the origin of the term, but googling for the term gives several links. The wikipedia page for spaghetti code actually has several pasta examples: spaghetti, ravioli, lasagna and spaghetti with meatballs! http://en.wikipedia.org/wiki/Spaghetti_code http://en.wikipedia.org/wiki/Spaghetti_code
- gbog 14y agoTo stay on culinary metaphors, I would call lasagna code any properly architected code base where a few layers neatly face each other with evenly spread meat in between.
- vonmoltke 14y agoAnd then there is baklava code[1], with too many thin, fragile, porous layers. [1] http://www.johndcook.com/blog/2009/07/27/baklav-code/ http://www.johndcook.com/blog/2009/07/27/baklav-code/