Wednesday 10 October 2012 — This is over ten years old. Be careful.
I’ve been organizing the Boston Python user group for a few years now, and I like it a lot. Except for ordering pizza. But finally I’ve brought some technology to bear on the problem!
First, I’ve taken a poll of people RSVP’ing for tonight’s project night, so I now have an empirical basis for deciding what fraction of the pizzas should be meat, vegetable, cheese, or vegan. Suprise (to me): vegetable wins.
Second, I’ve written what may be the world’s most useful Python program: pizza.py!
"""How many pizzas do we need?"""
if len(sys.argv) > 1:
people = int(sys.argv)
people = int(raw_input("How many RSVPs? "))
# The MUC (Meetup Universal Constant)
attending = people * .65
print "%d people will show up (guess)" % attending
# Appetite estimation
slices = attending * 2.5
# Basic pizza geometry
pies = slices / 8
print "%.1f pizzas (or so)" % pies
# From answers to the 10/2012 project night:
# 81 answers
# 26 meat 32%
# 37 veg 45%
# 16 cheese 20%
# 2 vegan 3%
vegan = int(.03 * pies) or 1
meat = int(.33 * pies) or 1
veg = int(.45 * pies) or 1
cheese = pies - vegan - meat - veg
if cheese < 1:
cheese = 1
cheese = int(math.ceil(cheese))
print "%2d cheese" % cheese
print "%2d meat" % meat
print "%2d veggie" % veg
print "%2d vegan" % vegan
print "%2d total" % (cheese + meat + veg + vegan)
The hard truth here is the Meetup Universal Constant. The MUC has been empirically determined, and says that no matter how much you wheedle people to show up if they say they will, and vice-versa, about one-third of the RSVPs will not attend. This number has proven remarkably stable over the 25 or so events that we’ve measured.
As an example, for tonight’s event, we have 127 RSVPs:
How many RSVPs? 127
82 people will show up (guess)
25.8 pizzas (or so)
Your numbers may vary. Perhaps Boston is a vegetarian hotbed compared to where you are. Maybe your city has more-predictable weather and fewer people abandon their intention to attend. Tweak pizza.py as you see fit!
The other neat thing is that "pizza.py" is the best file name EVER! ;-)
We have problems with groups with a small fraction of vegetarians where we had enough vegetarian pizza for them but others ate it.
What always always always happens at work is that the leftover pizzas are the vegetarian ones (or otherwise "weird" choices). The meat pizzas generally going in the blink of an eye, maybe because the meat eaters instinctively realize they have to grab as much as they can before it runs out.
I would err towards more meat pizzas, more cheese pizzas, and fewer vegetarian.
2. No Kevin, gluten-free (or any other actual allergy) is never statistically significant. . .Until they make enough noise to be noticed.
I wonder whether grasping carnivores and laid back vegetarian grazers are differently evolved. The omnivores are the ones to fear, though. They'll eat you or your food source.
Add a comment: