The C.E.O. of Girls Who Code Wants You to Know That It’s O.K. to Fail

Image may contain Electronics Computer Laptop Pc Human Person Furniture Desk Table Computer Hardware and Keyboard
Reshma Saujani, the founder of Girls Who Code, in March.Photograph by Nicole Bengiveno / NYT / Redux

There’s an unofficial rule in the tech world: every C.E.O. must have a formative anecdote of failure. Reshma Saujani has an imposing résumé—she has delivered speeches at the White House and on Richard Branson’s private island; she knows Sheryl Sandberg’s personal phone number; her nonprofit, Girls Who Code, has given free computer-science instruction to forty thousand young women—and yet she often leads with her failure story. In 2010, Saujani ran for Congress, in New York’s Twelfth District, against a popular incumbent. “Every pollster told me, ‘You can’t possibly win this race,’ ” she said. “I ran anyway. I raised money from everyone from John Legend to Jack Dorsey.” Saujani, who is now forty-one, has a gap-toothed smile that she deploys to self-deprecating effect. “And then I lost. Humiliatingly. Not even close.”

Before Saujani was born, her parents, Indians living in Uganda, were driven out of the country and resettled in the United States as refugees. “They were, understandably, very risk-averse,” she told me. “They didn’t encourage adventurousness, especially in their daughter. So for me to fall short so publicly—well, it sucked, but it made me get over my fear.” The moral of her story: young women should be rewarded for bravery, not perfection. “Girls Who Code tries to teach, Don’t worry about getting a hundred on the test; just start messing around with Python,” she said, referring to a coding language. “Trial and error. That’s how you learn.”

Girls Who Code sponsors after-school clubs in all fifty states; Saujani, who lives in New York but is bicoastal-curious, has visited dozens of them. One afternoon in 2016, not long before the start of summer vacation, she was driven to the small neighborhood that lies between the footings of the Brooklyn and Manhattan bridges. She got out in front of a four-story red-brick building—Public School 126, also called the Manhattan Academy of Technology, where students range from pre-kindergarten to eighth grade. The P.S. 126 chapter was throwing an informal end-of-year party. “I hear they’re gonna present the projects they made!” Saujani said, with the requisite enthusiasm.

As students poured out of the school, Saujani, walking upstream, made her way to the fourth floor. Long before she got there, she could hear a Rihanna song playing at full volume; it turned out to originate in a supply closet, where a janitor was dancing while he wrung out a mop. “That’s the party we should be going to,” Saujani said. She proceeded to a classroom at the end of the hall, where G.W.C. students and a few of their parents were setting out food: trays of noodles and dumplings, bags of tortilla chips, a summer-roll station with shrimp, carrots, and hoisin sauce. There were about a dozen girls and three boys, who called themselves “friends of G.W.C.” The mother of one of the boys complained about the program’s name, on gender-exclusion grounds, to Hau-Yu Chu, a technology teacher and the club’s coördinator. Chu responded, “Don’t worry, next year we’ll change it to Tech Club,” which Saujani, entering the room, either did not hear or pretended not to hear.

“Sit quietly!” Chu said, and the students obeyed the first half of the instruction. Saujani stood at the front of the classroom. “I’m Reshma, the C.E.O. of Girls Who Code,” she said. “We want girls to think about majoring in science or tech when they get to college. But that’s hard, and so we want you to be comfortable with imperfection.” This was paraphrased from her TED Talk. There, she’d received a standing ovation; here, the line barely caused audience members to glance up from their summer rolls. “Let’s go around the room and say one thing you’ve learned this year,” Saujani suggested.

Tina, a shy sixth grader with thick glasses, said, “I learned that one little mistake can mess everything up.”

“So, you learned how to fail?” Saujani said.

“I guess,” Tina said.

“Time for presentations,” Chu said. “Go quickly!”

The first student had made a gadget out of littleBits, small circuits connected wirelessly to the Web. “This is a vibrator,” she said. Saujani suppressed a laugh. “You put it under your pillow, connect it to the timer on your phone, and it works like an alarm clock.”

Tina went next. As she connected her laptop to a projector, the computer stalled. In a panic, she covered the projector with her hands, preventing the class from seeing the frozen screen.

“It’s O.K. if it’s not perfect,” Saujani said.

“Aaargh!” Tina said, putting her hands to her cheeks, as in Munch’s “The Scream.” Eventually, she was able to present her idea: a proposal for a hypothetical app she called Study Buddies, which would match up potential study partners remotely.

“That looks amazing,” Saujani said. “Did it make you want to start a business?” When Tina demurred, Saujani addressed the rest of the class. “Who here wants to start a real business?” she asked. A couple of hands went up, tentatively. “Who wants to buy a big house one day?” One or two more hands. “Who wants to buy a big house for Mom and Dad one day?”

“You’d better raise your hand for that,” one mother said, elbowing her son. His hand went up.