[FoRK] ravioli code

damien morton dmorton at bitfurnace.com
Sat Nov 15 18:19:45 PST 2008


I learned a new phrase today. "Ravioli Code".

>From Richard Carlson, developer of "parametrised modules" for erlang, a kind
of object oriented programming facility:


In the Object Oriented Programming world, "ravioli code"
is what you get when you have factored your program into
too many small chunks of code, so that it becomes impossible
to keep track of where the actual work is being done.
(It's "all in the sauce", which of course is hard to get a good
grip of.) With abstract modules, these kinds of programs become
possible also in Erlang. In the worst case, a program
could start with instantiating hundreds of abstract modules,
nally creating an "application" module instance M and calling
M:start/0, and it could then take weeks to understand
(even for the original author) which parts of the code are
actually being called, from where, and at what time.
This kind of overuse of parameterizing modules should be
avoided. The strategy to be used mainly depends on the
programming problem: some problems map easily onto a
set of functions without any real need for parameterizing
the module itself { in those cases, the temptation to create
an abstract module should be resisted. In other cases, parameterizing
the module solves the problem in a very elegant
manner. Use abstraction with discretion.


More information about the FoRK mailing list