Pizza Inversion - a Pattern for Efficient Resource Consumption
by Brad Appleton
last modified 9/9/97
Also Known As
Quickly eat multiple slices of hot pizza without burning the roof of
your mouth, and without waiting for the pizza to cool down.
Frequently one needs to quickly eat one or more hot slices of round
pizza. This may be due to urgent scheduling concerns or simply to try and
consume the greatest amount of pizza in the shortest period of time.
The tomato sauce tends to be very hot, however, and the cheese on top of
it adds to the problem by forming an insulating layer which keeps the
heat in. To make matters worse, cheese contains non-negligible levels of
fat and, when melting, forms little pockets of grease which can reach
tongue-frying temperatures (a situation which is aggravated by fatty
toppings like ground beef, italian sausage, and pepperoni).
When trying to eat pizza quickly, the grease on the cheese and the hot
tomato sauce underneath can severely burn the roof of one's mouth. This
is not only painful, but can often damage the taste buds in this
sensitive region of the mouth, rendering them useless for a short
duration (which may sometimes be useful if the pizza tastes awful, but
you have to eat it anyway to avoid insulting your host).
Waiting for the pizza to cool down is deemed to be too time consuming.
The resultant increase in the scheduling latency between when the pizza
arrives and when it has cooled enough for human consumption imposes an
unacceptable performance penalty.
Even if one did wait for the pizza to cool, simply devouring it in a mad
rush is likely to cause a large and unsightly mess which might extend to
others within close proximity. The mere mention of such a breach of
etiquette might make Miss Manners cringe.
It is desirable to find a method for eating the pizza quickly without
burning one's mouth, and without making a cheesy-saucy mess all over
one's clothes. At the same time, one still wishes to be able to
experience the full taste and smell of the pizza consuming experience.
Use Pizza Inversion in a casual environment when you have multiple
slices of hot, tasty pizza and you want to consume them in a hurry
without burning your mouth, staining your clothes, or waiting for the
pizza to cool.
Take two pieces of pizza of roughly the same size and invert one of
the pieces on top of the other piece so that the cheese-sides meet
in the middle with the crust-sides becoming the top and bottom.
Pizza, Cheese, Crust, Hands, Mouth, Digestive Tract, Abdomen
The cheese layers of the two slices are physically co-located together
to provide an effective layer of insulation from the hot cheese.
In this "sandwich" structure, the two pieces are then consumed by
taking a normal bite. The bitten pieces are then chewed, swallowed and
Each bitten piece has crust on the top and bottom so the hot cheese
is encapsulated from the sensitive roof of the mouth while at the
same time enabling the individual to consume pizza at about twice
the usual rate.
The cheese, sauce, and toppings are each predominantly confined to their
own domains in the resulting layered hierarchy. This "separation of
concerns" serves as a kind of Facade which decreases the likelihood of
staining one's garments (but watch out for cheese and sauce oozing out
the side when you bite down, particularly if the pizza has extra cheese
or extra sauce).
The speed at which you take bites of pizza and chew the pizza is roughly
the same as for a single slice. This causes less of an etiquette concern
than trying to eat the same number of slices by increasing ones biting
and chewing rate. However, if the portion of pizza set aside for you to
consume has not been agreed upon in advance by all fellow
consumers of the pizza, there is an extremely high likelihood that you
will be perceived as a hopelessly incorrigible and gluttonous pig.
Trades off polymorphism in favor of endomorphism.
Latency time is reduced since you do not need to wait for the pizza to
cool down before accessing its surface.
Consuming excessive amounts of pizza may cause "object bloat" for
the consuming object or injure its digestive tract (especially if it
has very spicy toppings).
Pizza with a particularly thick crust, or stuffed pizza (Chicago style,
or otherwise) results in a very tall/deep hierarchy which may prove unwieldy
The resultant intake of high levels of cholesterol may result in
blockage of the arteries and may even cause the receiver of the
consumption message to initiate an "Emergency Cardiac Care" message
The emphasis on efficiency causes the consumer to miss out on some (but
not all) of the visual and olfactory experience of pizza eating: rather
than taking in the sight and full aroma of the cheese and the colorful
array of toppings, all you see is crust. In other words:
Tastes great, less thrilling!
If you have two slices of pizza, flip one piece on top of the other, or
(if they are already attached) you can fold them together sideways and
then invert the result. This latter technique works really well when the
pizza crust is soft or flimsy and/or when a lot of toppings are
involved. The technique is most effective using triangular shaped pieces
from a round pizza. It also works with square pieces, but if they are
very thick, the resulting Pizza Dagwood may prove difficult for
one's oral aperture to assimilate. It is not known if this pattern
works with predominantly dissimilar-shaped pizza slices.
If you have a single slice of pizza you can envision an imaginary
line lengthwise down the center of the slice that divides it into two
symmetrical halves. Fold one half of the slice over (and on top of)
the other half.
Another variation that works with a single slice (assuming you have a
round pizza) is to fold the pointed end of the slice of towards the
crust. You don't get full slice coverage this way but some have
expressed a preference for this particular implementation.
Note that one needs to be extra careful when using only a single slice
and/or when the pizza has extra cheese because then excess cheese can
easily ooze out the side and burn your mouth. In this case, press the
pieces (or halves) together before consuming to squeeze out the extra
cheese and detach any oozing portions before inserting into mouth.
A number of adjacent and attached slices may be folded over
onto an equivalent number of adjacent slices. Hence one could fold
two pieces onto two pieces, and so on. For "individual size" pizzas,
simply fold the entire half of the pizza over onto the other half
(it helps to inhale deeply before snarfing it down).
This works particularly well for collaborations involving large numbers
of consuming objects. Rather than trying to satisfy everyone's favorite
combination of toppings, simply get relatively few toppings on each
pizza and let each consumer use two slices with different toppings to
create the epicurean flavor combination of their choice.
[ a Smalltalk example seems apt here - or perhaps some Java
(to help wash down the pizza :-) ]
The historical origins which influenced this variant of pizza
consumption may be traced back to the "Pita" and the Earl of Sandwich.
- Used frequently at Domino's and Little Ceasar's
- Various scenes from the movie "Mystic Pizza"
- The opening sequence of the movie "Saturday Night Fever"
- A "calzone" is basically a pre-fabricated instance of Pizza Inversion.
Factory Method, Composite, Facade, Mediator, and Iterator from GoF
(see the description in the inside cover)
The "Layers" and "Whole-Part" patterns from POSA. In particular,
Hans Rohnert communicates the following:
[Pizza Inversion is related to] the 'Relaxed Layered System' variant of
'Layers' because the respective toppings and especially the cheeses from
the two slices cannot maintain a clear separation between the layers.
Rather, there is direct interaction between different components in both
layers. We even can safely assume that objects will migrate, mostly
from the top to the lower layer.
In a way 'Pizza Inversion' seems related to 'Whole-Part' as well ....
Intuitively speaking two slices layered on top of each other are the two
constituent parts. But 'Whole-Part' explicitly states that direct access
to the parts is not possible.
Definitely not related:
Flyweight, Singleton (except for the one-slice variation mentioned above).
Robert Martin, with whom I was dining (at Tonelli's) when it occurred to me
to express this technique in pattern form (and who suggested that I do so).
Eleanor J. Barnes suggested additional anatomical participants, as well
as related GoF patterns, and Java.
John Hartley motivated me to incorporate the word "polymorphism" into
the pattern somehow.
Richard P. Gabriel pointed out the health risks inherent in pizza-eating.
Kent Beck recommended the discussing the visual and olfactory
consequences of employing the pattern.
Thomas Gerth mentioned how the pattern may adversely affect the digestive
tract, and maintaining one's figure.
Eric Pearl noted the use of the pattern in "Saturday Night Fever", and
the lengthwise, single-slice variant
Linda Rising, and Jens Coldeway contributed many comments.
Hans Wegener suggested the relation to Facade for separation of concerns.
Hans Rohnert pointed out the relationship of Pizza Inversion to some of
the other POSA patterns, and also noted the use of "pizza calzone" as
an elegant known use of the pattern which is readily ordered off the menu
of some Italian restaurants.
Doug Schmidt noted the importance of "reduced latency".
Brian Foote suggested mentioning etiquette, and historical references to the
"Pita" and the "Earl of Sandwhich".
The participants in the PLoP'97 example writer's workshop for this pattern:
Brian Foote, Dirk Riehle, Linda Rising, Doug Schmidt, and Bobby Woolf.