Design Patterns for Cooking

Last week Alexey introduced the idea of cooking patterns:

A recipe is basically a fixed set of actions and ingredients, while cooking techniques are just the possible actions. If we invent cooking patterns – an abstraction on top of each ingredient / action pair – we could have more understanding of the dish we are preparing while keeping the flexibility in ingredient and technique choice.

Let’s take fritters as an example. Wikipedia says the following:

Fritter is a name applied to a wide variety of fried foods, usually consisting of a portion of batter or breading which has been filled with bits of meat, seafood, fruit, or other ingredients.

A pattern in its most obvious form. Notice the “wide variety”, a fixed ingredient (batter) and a list of possible variables (meat, seafood, vegetables, fruit) that could influence the fritters you end up making.

I find this idea very exciting, because I enjoy cooking and am also in the process of learning more about software design patterns.

Cooking patterns seem like an accessible way to introduce beginners to more abstract ideas about software, too. Algorithms are often described as “recipes,” and this is a nice way to build on that concept.

For leveling up your cooking skills, ChefSteps looks promising. Their resources include classes, projects, and an ingredients wiki. I have signed up for one class and plan to follow up on this recommendation after completing it.

If you are interested in cooking patterns, check out the Github repo or read the full article.

The Economics of Movie Popcorn

The Smithsonian’s Food & Think blog recounts a long history of movie theaters’ objections to popcorn. They wanted to be as classy as live theaters. Nickelodeons didn’t have ventilation required for popcorn machines. Moreover, crunchy snacks would have been unwelcome during silent films.

But moviegoers still wanted their popcorn, and street vendors met their demand. This led to signs asking patrons to check their coats and their corn at the theater entrance.

Eventually, movie theater owners realized that if they cut out the middleman, their profits would skyrocket.  For many theaters, the transition to selling snacks helped save them from the crippling Depression. In the mid-1930s, the movie theater business started to go under. “But those that began serving popcorn and other snacks,” Smith explains, “survived.” Take, for example, a Dallas movie theater chain that installed popcorn machines in 80 theaters, but refused to install machines in their five best theaters, which they considered too high class to sell popcorn. In two years, the theaters with popcorn saw their profits soar; the five theaters without popcorn watched their profits go into the red.

Much more here, including how movie theater demand changed the types of popcorn that are grown.


Popcorn and other concessions are important to theaters because a large percentage of ticket sales (especially during the first couple of weeks after a movie premieres) go to the studio. Recent figures I’ve seen are that concession sales are 80-90 percent profit, whereas in the opening weekend only about 20 percent of the sale price goes to the theater. This means that concessions can make up nearly half the profit for a theater–no wonder they try to keep viewers from bringing in their own refreshments.

Small bags of popcorn have now turned into buckets, perhaps in an effort to justify charging $8-10 rather than the nickel such snacks sold for when “talkies” were new. This transition is covered in the book Why Popcorn Costs So Much at the Movies and an interview with the author is here.


The Problem with Tipping

Association between tipping and corruption at the country level, by Magnus Torfason. I have no idea what's going on to the left of zero.

Association between tipping and corruption at the country level, by Magnus Torfason. I have no idea what’s going on to the left of zero.

The topic of tipping has been on my mind since a dinner in San Francisco this April, when Allan Dafoe brought up the difference between Sweden and the US. In Europe, the pattern seems to be that workers are paid more and tips are not expected. Sometimes (eg in Germany) a waiter would likely be told to keep the change from a cash payment, but the reason given for this is that making change is demeaning. In the US, most waitstaff are paid a paltry $2.13/hour and make the rest up in tips. Why has the micro-institution of tipping endured in the US, and what are advantages and weaknesses of it?

One advantage of tipping is that it helps solve the principal-agent problem between the restaurateur and the staff. It is difficult for the restaurant manager to monitor the quality of servers, but much easier for the customers to do so. Thus, having customers set the compensation level for servers encourages them to be responsive. This in turn keeps customers coming back to the restaurant, which is the manager’s goal. However, tip-pooling can undermine this effect, as can the opportunity for servers to offer lower quality service to a higher volume of tables.

A major disadvantage to tipping is that it seems only weakly correlated with service quality. In an informal, small-n poll of fellow grad students on the same San Francisco trip, most of us tip a relatively fixed percentage of the bill (20-25 percent) regardless of service. This tends to be associated with work experience in the service industry, which can also lead to higher tipping percentages. Furthermore, small “nudges” such as paying on an iPad that offers tips in round dollar amounts rather than percentages can have a strong effect on the tips received by staff.

Another problem with tipping is uncertainty about when it is or is not appropriate. In a country where it is never appropriate, there is no uncertainty. When tipping exists in some settings but not others, there can be a great deal of uncertainty about when to use it. Restaurants and taxis seem like obvious tipping situations. But what about when you order food for carry-out? (I vote yes, but a smaller percentage.) And why not tip the attendants on a flight, who provide beverage and sometimes food service?

These and other problems with tipping are well-known, yet the micro-institution seems fairly ingrained in American society. If there were one profession where I would add tipping it would be my pharmacist–they often provide fast and friendly service for something I could not do myself. On the whole, though, we would be better off without this confusing and inefficient practice.

See also:

Why Do We Tip? (Planet Money podcast)
Should Tipping Be Banned? (Freakonomics podcast)
Research by Michael Lynn (over 50 papers)

This is Your Brain on Hunger

hungerIn his book Thinking Fast and SlowDaniel Kahneman describes the brain as made up of two systems. System 1 is fast, emotional, and almost automatic–I think of this as “intuition.” System 2 controls more logical, deliberate processes. There are many factors that can influence which system you use to make a decision (anchoring, availability, substitution, loss aversion, framing, etc.) and Kahneman’s book discusses these. But other environmental factors can influence which system takes over. This post discusses how hunger shifts the balance from System 2 to System 1.

First up is a study on Israeli judges’ parole decisions broken up by time of day by Shai DanzigeraJonathan Levavb, and Liora Avnaim-Pessoa (edited for PNAS  by Kahneman). Here’s the abstract:

Are judicial rulings based solely on laws and facts? Legal formalism holds that judges apply legal reasons to the facts of a case in a rational, mechanical, and deliberative manner. In contrast, legal realists argue that the rational application of legal reasons does not sufficiently explain the decisions of judges and that psychological, political, and social factors influence judicial rulings. We test the common caricature of realism that justice is “what the judge ate for breakfast” in sequential parole decisions made by experienced judges. We record the judges’ two daily food breaks, which result in segmenting the deliberations of the day into three distinct “decision sessions.” We find that the percentage of favorable rulings drops gradually from ≈65% to nearly zero within each decision session and returns abruptly to ≈65% after a break. Our findings suggest that judicial rulings can be swayed by extraneous variables that should have no bearing on legal decisions.

The Economist summarized the paper and produced a graphic with the main takeaway:


The second paper, by Ilona Grunwald-Kadow and coauthors, analyzes the neural behavior of fruit flies when deprived of food (via @tylercowen and @IFLscience). Their results are explained in this press release from the Max Planck Institute:

The results show that the innate flight response to carbon dioxide in fruit flies is controlled by two parallel neural circuits, depending on how satiated the animals are. “If the fly is hungry, it will no longer rely on the ‘direct line’ but will use brain centres to gauge internal and external signals and reach a balanced decision,” explains Grunwald-Kadow. “It is fascinating to see the extent to which metabolic processes and hunger affect the processing systems in the brain,” she adds.

Remember this next time you’re trying to decide between working through lunch or grabbing a bite to eat. Do your body and your neighbors a favor by taking a break.

See also: 

More on Food Truck Regulation

Popular Durham-area food truck Chirba Chirba serves dumplings. Photo via livewell.

Popular Durham-area food truck Chirba Chirba serves dumplings. Photo via livewell.

More on the plight of food truck operators in NYC, from the Times:

There are numerous (and sometimes conflicting) regulations required by the departments of Health, Sanitation, Transportation and Consumer Affairs. These rules are enforced, with varying consistency, by the New York Police Department. As a result, according to City Councilman Dan Garodnick, it’s nearly impossible (even if you fill out the right paperwork) to operate a truck without breaking some law. Trucks can’t sell food if they’re parked in a metered space . . . or if they’re within 200 feet of a school . . . or within 500 feet of a public market . . . and so on.

Enforcement is erratic. Trucks in Chelsea are rarely bothered, Nafziger said. In Midtown South, where I work and can attest to the desperate need for more lunch options, the N.Y.P.D. has a dedicated team of vendor-busting cops. “One month, we get no tickets,” Thomas DeGeest, the founder of Wafels & Dinges, a popular mobile-food businesses that sells waffles and things, told me. “The next month, we get tickets every day.” DeGeest had two trucks and five carts when he decided he couldn’t keep investing in a business that was so vulnerable to overzealous cops or city bureaucracy. Instead, DeGeest reluctantly decided to open a regular old stationary restaurant.

We’ve discussed food truck regulations and the competition between vendors before. There is certainly a place for regulation, but inconsistent and seemingly arbitrary enforcement undermines the goal of clarifying expectations between all parties.

America and Food Trucks: A Proud but Troubled Relationship

Food trucks in Durham, NC from

Food trucks in Durham, NC from

America has a proud history of mobile food vendors who have gone on to become magnates of industry. Marcus Goldman, founder of Goldman Sachs, found his first job in America peddling food from a horse-drawn cart on the streets of Philadelphia. JW Marriott, founder of the hotel chain, had an A&W root beer franchise in Washington, D.C.

Now the town that gave Marriott his start wants to make life more difficult for today’s version of Goldman’s cart–food trucks:

D.C. Food Truck Association chairman and Red Hook Lobster Pound co-owner Doug Povich says trucks could end up winning proposed locations with little weekday lunch traffic like Navy Yard, Historic Anacostia, Minnesota or Benning avenues NE, and Friendship Heights. Because they’ve spent $150 for the spot, they’ll likely go the first time. But if they’re losing money there, they may not want to come back the following weeks, Povich says. The result would be empty parking spots that nobody else could use for four hours….

And then there’s the possibility that food trucks may not get a spot in a mobile vending zone at all. In that case, finding a location to vend in the central business district could be tough. Last fall, the D.C. Food Truck Association measured sidewalks throughout the area and found that eight of the 10 most popular vending locations had fewer than 10 feet of unobstructed sidewalk, which would make them off-limits under the proposed rules.

New York City already has a tangle of legislation that effectively makes food trucks illegal there, despite their popularity. It is illegal to sell merchandise from metered parking in the city, and the state Supreme Court ruled in 2011 that this applies to food as well. Food trucks are uniquely mobile, allowing them to relocate in response to regulation:

If the D.C. Council passes the regulations as they are now written, Basil Thyme may not be the only food truck putting the brakes on business. Several food truck owners say they are considering shutting down or moving their operations to Virginia, Maryland, or other states if the regulations prove too limiting.

If D.C.’s proposal passes there may be no more food truck lunches in the District–free or otherwise.

Micro-Institutions Everywhere: The Meals We Eat

Photo credit: Jer Thorpe

Across the country yesterday, Americans engaged in a massive coordination game. Most people in the US took the opportunity to spend time with friends and family during the one of the busiest travel periods of the year. Expectations about the meal varied from the tried and true (Turkey, pumpkin pie) to the exotic, but most Thanksgiving dinners were high calorie affairs in the late afternoon or evening. This break from the usual three meals a day pattern offers a chance to ask: how long has the breakfast-lunch-dinner schedule been the norm?

Not that long, as it turns out. Eating patterns in history have often been shaped by three factors: politics, economics and religion. Take breakfast, for example. Food historian Caroline Yeldham reports it was not always seen as the most important meal of the day:

“The Romans believed it was healthier to eat only one meal a day,” she says. “They were obsessed with digestion and eating more than one meal was considered a form of gluttony. This thinking impacted on the way people ate for a very long time.”

Certain religions are known for dictating what you can and cannot eat, but they also influence the time of day that meals are consumed:

In the Middle Ages monastic life largely shaped when people ate, says food historian Ivan Day. Nothing could be eaten before morning Mass and meat could only be eaten for half the days of the year. It’s thought the word breakfast entered the English language during this time and literally meant “break the night’s fast”.

Religious ritual also gave us the full English breakfast. On Collop Monday, the day before Shrove Tuesday, people had to use up meat before the start of Lent. Much of that meat was pork and bacon as pigs were kept by many people. The meat was often eaten with eggs, which also had to be used up, and the precursor of the full English breakfast was born.

Economically speaking, eating patterns often “trickle down” from the wealthy to the poorer classes:

In about the 17th Century it is believed that all social classes started eating breakfast, according to chef Clarissa Dickson Wright. After the restoration of Charles II, coffee, tea and dishes like scrambled eggs started to appear on the tables of the wealthy. By the late 1740s, breakfast rooms also started appearing in the homes of the rich.

Industrialization also shaped the way we think of midday eating:

Middle and lower class eating patterns were defined by working hours. Many were working long hours in factories and to sustain them a noon-time meal was essential….

The ritual of taking lunch became ingrained in the daily routine. In the 19th Century chop houses opened in cities and office workers were given one hour for lunch. But as war broke out in 1939 and rationing took hold, the lunch was forced to evolve. Work-based canteens became the most economical way to feed the masses. It was this model that was adopted by schools after the war.

The last meal of the day, dinner, has a longer pedigree but has been powerfully influenced by two more recent innovations: electric lighting (which made it possible to eat later) and television (which popularized cooking shows). There is more at the BBC, from which the quotes above are taken.

Patterns of daily life that we take for granted are often shaped by much larger factors–more evidence for a politics of everyday life.

Micro-Institutions Everywhere: Food Truck Wars

“Following all the regulatory constraints that are currently enforced at this moment, there really is not any place for a food truck to park,” says David Weber. He’s the other owner of the Rickshaw Dumpling, and he just wrote the Food Truck Handbook.

Food vendors avert a full out war through an informal code of conduct. You respect the guy who got there first. If you’re a jerk, the other guy can make your day miserable. A hot dog cart, say, can block your truck window and keep you from doing any business at all.

“We’ve gone to spots before,” Lao says, “where the falafel guys and the shish kebab guys will come up and say, ‘What’s your menu? Do you sell chicken? … You can’t sell chicken on this block. I’m the chicken guy on 52nd St.'”

Source: Planet Money.

Cigarette Taxes and Unintended Consequences

One of the best questions you can ask a social scientist is, “and then what?” Thinking about second-order effects is essential to smart research and policy-making. Research on the unintended consequences of cigarette taxes helps to illustrate this point:

Besides resulting in a shift in purchasing choices, cigarette sin taxes also indirectly result in illegal activities like smuggling. Each of the fifty U.S. states taxes cigarettes at different levels, and this uneven price distribution opens up market avenues for nefarious wrongdoers. Cigarette trafficking does not appear to be extremely prevalent within the U.S., but it’s estimated to be a $1.5 billion industry in Canada. Traffickers commonly smuggle cheap cigarettes purchased in the United States across the border. It’s one of the few illegal drug trades where the U.S. is an exporter, not an importer.

Interestingly as well, a recent study just published in the journal Substance Abuse Treatment, Prevention, and Policy reported that boosts in state cigarette prices were associated with increases in binge drinking among persons aged 21-29, specifically a 4.06% increase for every dollar increase in cigarette price. Drinking also rose among those aged 65 and older.

Not all of the effects are negative, however. Recently I was talking to a colleague who will take up a position at University College London at the end of the year. I asked whether the poor reputation of British food was deserved, and he replied that it has improved substantially in recent years. Since smoking was banned in pubs, he explained, they had to improve the cuisine to keep customers there longer. How’s that for an unintended consequence?
Update: Going through my RSS feed, I see that Adam Ozimek wrote a related post on Bloomberg’s soda ban a few days back.

Wednesday Nerd Fun: Where Things Come From

Sourcemap for a Laptop Computer, by Leo Bonanni

Where did your shoes come from? Your coffee? Your laptop? One of the beautiful things about the modern world is that you can hold a piece of technology in your hands–or wear it on your feet–without having to know the answer to this question.

As anyone who has read or heard “I, Pencil” knows, the genealogies of even the most banal products are immensely complicated. The punch line of that story is that pencils have too many components for one person to make or even fully understand, but through innovations like the price system they can be produced without central planning. In the author’s words, the moral is to “Leave all creative energies uninhibited.”

On today’s nerd fun site, Sourcemap, you can see cool visualizations of where all kinds of things come from. The maps for pencils are probably a little oversimplified, but some others are really neat, like the ones at the beginning of the post. My favorite are the food sourcemaps–check out Tropicana, Chicken of the Sea tuna, and Nutella. Now you knowl.