As we walk, Dan Zigmond pulls on a black baseball cap. The sun is high, and the trees give little shade. It's a big park—stretching across a good nine acres of grass, mulch, shrubs, and gravel paths—but from where we are, it looks much bigger. Beyond the nine acres, all we can see are more trees, more green, and the mountains in the east, so the park seems almost endless. "That always amazes me," I say. After all, we're on the roof of the newest Facebook building, a Frank Gehry creation called MPK20, right next to Highway 84, the Dumbarton Bridge, and the sprawling urban marshlands of Menlo Park, California, where the bog is decorated with so many power lines, transmission towers, and electrical substations.

Zigmond works in the building below, overseeing data analytics for the Facebook News Feed and other parts of the world's most popular social network. That means he analyzes the massive of amounts of online data generated by News Feed, looking for ways to improve the service and other parts of Facebook. He's also a Zen priest who studied with the same Buddhist monk as Steve Jobs. And that means he's part of a long tradition inside Northern California tech circles. As we walk through Facebook's rooftop park, he hands me a copy of a 1986 academic monograph called From Satori to Silicon Valley. A thin paperback small enough to fit into my back pocket, it explores the link between Silicon Valley and the American counter culture of the 1960s and 70s, including so many hippie attitudes lifted from Buddhism. On the cover, two black-and-white symbols merge together: the ying-yang and the transistor.

'There's that same spirit of seeing technology as a way of getting us to a better future.'

As Zigmond tells me, the conceit is that the counter culture helped drive the evolution of the personal computer as it emerged from Silicon Valley and challenged the dominance of giant techno-corporations like IBM and AT&T. People like Jobs—a long-haired hippie Buddhist fruitarian computer maker—didn't just look forward to a future driven entirely by technology. Instilled with the hippie ethos—the notion that we could find something truer, healthier, and simpler than the post-industrial mega-capitalist society that emerged in the 20th Century—Jobs and his peers also looked back to a more natural past, hoping they could use personal computers to empower people and bring them together and reclaim some of the humanity the modern world had taken away. Zigmond believes these same attitudes continue to drive Silicon Valley, including tech giants like Facebook (a company intent on "making the world a more open and connected place") and Google ("organize all the world's information"). "There's that same spirit of seeing technology as a way of getting us to a better future," Zigmond says.

Ross Mantle for WIRED

So, it’s only natural that Zigmond, one of Facebook’s top data analysts, just published a book of his own called Buddha’s Diet. It mixes three of Northern California's biggest obsessions: science, Eastern philosophy, and food. Yes, it's a diet book. The subtitle is: The Ancient Art of Losing Weight Without Losing Your Mind. But there are greater lessons to be learned from this slim volume, not just about science, Eastern philosophy, and food, but about Silicon Valley.

Of Mice and Zen

Dan Zigmond has been a Buddhist for nearly 30 years. He discovered the Eastern religion while studying computational neuroscience at the University of Pennsylvania, and after graduating, he moved to Thailand, living in a Buddhist temple while teaching English at a nearby refugee camp. In this temple, the monks ate between dawn and noon, according to the rules of the Vinaya Pitaka, the original teachings of Buddha. They ate whatever was available and as much as they wanted, but only within that window. And they remained slim. In the popular imagination, the Buddha was a fat man. But he too was slim.

After two years in Thailand, Zigmond returned to the States, and eventually, he wound up at Google. He worked as a data scientist, hunting for ways of improving services like YouTube and Google Maps, and he was part of the Buddhist culture that ran right through the company. After an early engineer named Chade-Meng Tan promoted meditation groups across the company and wrote a book called Search Inside Yourself, Google became a destination for monks from across the world. When Meng gave tours to these visitors, he would bring them by Zigmond's desk, showing off Google's unique brand of Buddhism. "I remember more than once working on some tricky statistics code and looking up to see a band of Tibetan monks in full Buddhist robes hovering over me, always smiling," Zigmond remembers.

'I remember more than once working on some tricky statistics code and looking up to see a band of Tibetan monks in full Buddhist robes hovering over me.'

In 2014, Zigmond moved to Hampton Creek, part of the new wave of Silicon Valley startups intent on using technology and modern know-how to return the world to a better way of eating—another echo of the world Theodore Roszak explores in From Satori to Silicon Valley. "For many in the counter culture," Roszak writes, "the result of high industrial technology would be something like a tribal democracy where the citizenry might still be dressed in buckskin and go berry-picking in the woods: the artificial environment made more artificial would somehow become more...natural."

Hampton Creek used the yellow Canadian pea to create a reasonable facsimile of the chicken egg, something it used to make mayonnaise and cookie dough. The idea was that Zigmond and his team would analyze all the data Hampton Creek scientists collected about plant proteins and how they interact, so the company could find new ways of building cheaper, safer, and healthier food.

Ross Mantle for WIRED

In the Valley, most companies are packed with foodies—people just as concerned with quinoa and kale as code—and at Hampton Creek, this was true in the extreme. "Instead of there being software engineers at every desk," Zigmond says, "it was plant biologists and biochemists and people who are always thinking about food." This pervaded not just their work, but the breaks in between their work and the Internet links they traded over email. One day, someone sent around a Salk Institute study that explored the eating habits and metabolism of mice.

In the study, mice that were given an unlimited amount of high-fat, high-calorie food gained an unhealthy amount of weight. That was to be expected. But the study also found that mice given an unlimited amount of food only during certain times of day consumed about the same number calories and stayed slim. That caught Zigmond's attention, and not just because it went against common perception. It reminded him of those monks in Thailand.

Buddha Was a Data Scientist

Soon, Zigmond shifted his eating habits in the same direction. He decided that Buddha's dawn-to-noon schedule was impractical, given the demands of modern life in Silicon Valley. But he limited his eating to a nine-hour window, much like the regimen explored in the Salk study. "The idea—and the motivation—were basically the same. Each day, I was combining a period of eating and a period of fasting," Zigmond says. "That's consistent with the overall message of Buddhism and Buddha, which is always looking for this Middle Way—avoiding these extremes on one side or the other."

Zigmond lost about 25 pounds, while consuming about the same number of calories. He considered this a data-gathering exercise. He was gathering personal data in support of those 2,500-year-old Buddhist teachings. This, he says, is what Buddha would do. Buddha was born a prince, but spent years living an ascetic life. Ultimately, after a lifetime of data gathering, he settled on something in between. The Middle Way. "One of the hallmarks of Buddha's teachings—and the way he lived his life—was this insistence on evidence, on data. He didn't want anyone to take anything on faith," he says. "Buddha was a data scientist."

'He didn't want anyone to take anything on faith. Buddha was a data scientist.'

In the end, Zigmond wrote a book about all this, together with a Stanford University online content manager named Tara Cottrell. Using data from that Salk study and subsequent research, it shows the value of the Buddhist attitude toward food. As the book explains, the Salk Institute later ran similar metabolism studies in which people limited their eating to a 10-hour window and lost a modest amount of weight. Plus, they sleep better at night and felt more energetic during the day.

According to Dr. Satchin Panda, who oversaw the Salk studies, in each human organ, 10 to 20 percent of our genes turn on and off at certain times of day. The theory is that the modern world has upset our circadian rhythms, and that limiting meals and snacks to specific windows of time can help restore them. "We found clocks all over the body," he says. "The hypothesis is that human physiology, metabolism, behavior—all of it—must have some circadian component. Staying up late into the night, having less light during the daytime, having too much light at night, or even eating at the wrong time or taking medication at the wrong time can have adverse health consequences."

But Zigmond's book also adapts Buddhist attitudes to the modern world, suggesting ways of dealing with stuff like hamburgers, whiskey, and sodas. Buddha was a vegetarian and he didn't drink alcohol, but Zigmond's book doesn't recommend abstinence from meat or booze—only moderation. The Buddha allowed monks to drink liquids whenever they like, but Zigmond argues that this has led to obesity and diabetes among monks who now have things like Coca-Cola. His book also finds a Middle Way between Buddha and today.

Forward and Back

The irony is that Zigmond works for one of the world’s largest Internet companies, a company that bears no small responsibility for why everyone's circadian rhythms are off-kilter. With their online services encouraging us to stare at screens all day and well into the night—and their increasingly pervasive work ethic keeping people on the job at all hours—these companies are contributing mightily to the problem Zigmond hopes to solve.

But this is the irony that always accompanies Silicon Valley. It changes lives for better and for worse. It moves both forward and back. It combines hippie attitudes with attitudes that couldn't be less hippie.

Silicon Valley changes lives for better and for worse. It moves both forward and back. It combines hippie attitudes with attitudes that couldn't be less hippie.

Facebook's social network connects us with people across the globe, but it also separates us from people right next to us. Companies like Google promote a culture where people spend an extreme and sometimes unhealthy amount of time at the office, but they also seek to improve the time spent there, through things like locally sourced organic food, Buddhist-inspired "compassionate management," and, yes, meditation groups. Hampton Creek wants to create a better way of eating, but like so many Silicon Valley companies, it apparently pushed too hard as it reached for the almighty dollar. It now faces a federal investigation after allegedly buying up its own mayonnaise in an effort to impress investors and turn itself into a billion-dollar unicorn.

This is the same dialectic described in From Satori to Silicon Valley. It's never going to resolve itself. But it's a good thing. Looking both forward and back is just what we need. The trick lies in knowing how the old ideas can help the new, when to heed the meta-lessons that run through a book like Buddha's Diet, when to look for the Middle Way. This is particularly true now that the Internet is so completely changing the nature of our political system, now that virtual reality is taking us even further from the physical world, now that artificial intelligence is set to replace so many human tasks. "The stuff we do in technology really can make the world a better place," Dan Zigmond says. "But at the same time, there are some fundamental things about life and being human that don’t really change, that technology doesn’t touch and shouldn’t touch."