In September 2007, 75 students walked into a classroom at Stanford. Ten weeks later, they had collectively amassed 16 million users, $1 million dollars in advertising revenue, and a formula that would captivate a generation.

The class—colloquially known as "The Facebook Class"—and its instructor, BJ Fogg, became Silicon Valley legends. Graduates went on to work and design products at Uber, Facebook, and Google. Some even started companies with their classmates. But a decade later, some of the class’ teachings are in the crosshairs of our society-wide conversation about phone addiction.

Fogg's research group, the Persuasive Technology Lab, looks at how technology can persuade users to take certain actions. Early experiments centered around questions like, “How can you get people to stop smoking using SMS?” But when Facebook, then a three-year-old startup, opened its platform to third-party developers, Fogg saw a perfect opportunity to test some of his theories in the wild.

After a few lectures on the basics of behavioral psychology, students began building Facebook apps of their own. They used psychological tools like reciprocity and suggestion to engineer apps that could, for example, send your friends a virtual hug or get your friends to join an online game of dodgeball. At the time, Facebook had just begun promoting third-party apps in its news feed. The iPhone launched in the summer of 2007; the App Store would follow the year later. Fogg’s teachings became a playbook on how to make apps stick just as apps were becoming a thing.

“Within the first month, there were already millions of people using these apps,” says Dan Greenberg, a teaching assistant for the class who later went on to found the ad-tech platform Sharethrough with some of his classmates. After some students decided to monetize their apps with banner ads, apps like Greenberg’s began bringing in as much as $100,000 a month in ad sales. Fogg had a secret sauce, and it was the ideal time to serve it.

In Silicon Valley, Fogg's Behavioral Model answers one of product designers’ most enduring questions: How do you keep users coming back?

A decade ago, Fogg’s lab was a toll booth for entrepreneurs and product designers on their way to Facebook and Google. Nir Eyal, the bestselling author of the book, Hooked, sat in lectures next to Ed Baker, who would later become the Head of Growth at both Facebook and Uber. Kevin Systrom and Mike Krieger, the founders of Instagram, worked on projects alongside Tristan Harris, the former Google Design Ethicist who now leads the Time Well Spent movement. Together, in Fogg's lab, they studied and developed the techniques to make our apps and gadgets addictive.

Now, we are navigating the consequences. From Facebook's former president claiming that Silicon Valley’s tools are “ripping apart the social fabric of society” to France formally banning smartphones in public schools, we are starting to reexamine the sometimes toxic relationships we have with our devices. Looking at the source of product designers’ education may help us understand the downstream consequences of their creations—and the way to reverse it.

Engineering Addiction

BJ Fogg is an unlikely leader for a Silicon Valley movement. He’s a trained psychologist and twice the age of the average entrepreneur with whom he works. His students describe him as energetic, quirky, and committed to using tech as a force for good: In the past, he's taught classes on making products to promote peace and using behavior design to connect with nature. But every class begins with his signature framework, Fogg’s Behavior Model. It suggests that we act when three forces—motivation, trigger, and ability—converge.

In Silicon Valley, the model answers one of product designers’ most enduring questions: How do you keep users coming back? Say you're a Facebook user, with the Facebook app on your phone. You're motivated to make sure photos of you posted online aren't ugly, you get triggered by a push notification from Facebook that you’ve been tagged, and your phone gives you the ability to check right away. You open the Facebook app.