Wednesday 10 October 2012 — This is exactly 12 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. Surprise (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?"""

import math

import sys

if len(sys.argv) > 1:

people = int(sys.argv[1])

else:

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)

6 cheese

8 meat

11 veggie

1 vegan

26 total

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!

## Comments

Ben Rousch10:24 AM on 10 Oct 2012Peter Hansen11:00 AM on 10 Oct 2012The other neat thing is that "pizza.py" is the best file name EVER! ;-)

Joe11:06 AM on 10 Oct 2012tolomea.com11:13 AM on 10 Oct 2012We have problems with groups with a small fraction of vegetarians where we had enough vegetarian pizza for them but others ate it.

Nate Finch11:35 AM on 10 Oct 2012What 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.

Kevin Turner12:38 PM on 10 Oct 2012Martin12:53 PM on 10 Oct 20122. No Kevin, gluten-free (or any other actual allergy) is never statistically significant. . .Until they make enough noise to be noticed.

Sheila1:00 PM on 10 Oct 2012TruffleHunter3:46 AM on 11 Oct 2012I 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: