Margaret Sullivan is The Washington Post’s media columnist.

The blood-chilling email from Mark Zuckerberg arrived in every Facebook employee’s inbox at the same time. Its subject line: “Please resign.” As Antonio García Martínez tells the story in his book “Chaos Monkeys,” the Facebook founder was furious. He was looking for an employee, identity unknown, who had leaked information about a new product to the tech press, and he wanted his minions to know that he regarded this employee’s action as the basest kind of betrayal. Although the story sounds apocryphal, it has the ring of truth for those who have experienced the overblown world of Silicon Valley. García Martínez heard it soon after he joined Facebook in 2011. For him, Zuckerberg’s extreme reaction became the basis of “a parable.” The lesson: At Facebook, secrets are many and they must be kept; employees forget that at their peril.

What happens in Silicon Valley has affected — or maybe infected — every moment of modern life. But what do we really know about the Northern California subculture that lurks behind our collective inability to put down our iPhones, tear our eyes from our Twitter feeds or stop posting every snack to Instagram? Mostly, we know the caricature: Silicon Valley is where CEOs wear hoodies and where nerdy coders have been able to get filthy rich without ever developing any social skills.

García Martínez wants to give us the skinny and fill in the gaping holes. In this techie tell-all, he dishes up all the intrigue, foibles and inside information he gathered as a former Wall Street strategist who put a 21st-century spin on Horace Greeley’s advice and went West to join the digital gold rush. He founded a digital ad company, AdGrok, and began living the Silicon Valley life — where founding a start-up, he observes, can amount to nothing but a warm-up for a job interview at Facebook or Twitter, and where the HR-friendly term “cultural fit” masks sexism, elitism or racism. Just about every start-up, he writes, featured the same unsavory ingredients: “Backroom deals negotiated via phone calls to leave no legal trace, behind-the-back betrayals of investors or cofounders, seductive duping of credulous employees so they work for essentially nothing.”

"Chaos Monkeys: Obscene Fortune and Random Failure in Silicon Valley" by Antonio Garcia Martinez (Harper)

What Tom Wolfe did for New York society and George Plimpton did as goalie for the Boston Bruins, García Martínez tries to do for the digerati. Scattered, fast-paced and overwritten, this memoir of his Silicon Valley adventures doesn’t approach that rarified literary quality — but it does entertain.

As the founder of his start-up and later a product manager at Facebook and an adviser at Twitter, he exposes the Valley subculture from the inside — including the zealously protective corporate culture at Facebook. He recalls his “on-boarding,” which aimed to turn new employees into disciples. As a Facebook newbie, he received not only a signature blue T-shirt and parables like the scary email story, but also a lecture: Forget anything you learned working elsewhere. The all-in approach, García Martínez writes, was “designed precisely as the sort of citizenship oath that new Americans took in front of a flag and a public official.”

And, he reports, it worked: “Even in a culture brimming with irreverent disdain, I never heard anyone utter a word of cynical trollery about Facebook and its values, either at on-boarding or during my years of work there.” That was partly because nobody dared, since disloyalty was considered treason — and a firing offense — and partly because they’d all drunk the corporate Kool-Aid. As García Martínez explains, “Facebook is full of true believers who really, really, really are not doing it for the money, and really, really, really will not stop until every man, woman, and child on earth is staring into a blue-framed window with a Facebook logo.”

García Martínez’s writing veers from amateurish, as he recalls his courtship efforts (“Weirded out by my bonding with her ex, she decided to end the budding romance”), to irreverently original, as when he describes trying to raise venture capital while being sued: It’s “like walking into a singles bar with a T-shirt announcing, ‘I’m HIV positive. How about you?’ ”

There’s a whiff of Hunter S. Thompson in García Martínez’s frenzied pace and bad-boy exploits, though his prose is inferior. But who can object when the insights are so pointed and the details so juicy?

Here’s García Martínez on the infamous H-1B visas that allow tech companies to hire hordes of talented foreigners at low wages: “Everyone’s on the take, including the government, which charges thousands in filing fees. The entire system is so riven with institutionalized lies, political intrigue, and illegal but overlooked manipulation, it’s a wonder the American tech industry exists at all.”

And on the sporting life of venture capitalists: “Investment bankers have their golf, Wall Street traders have their squash, and the new VC/entrepreneur tech elite has kiteboarding,” which involves “getting on a floating snowboard attached to a U-shaped kite the length of a small plane wing, which threatens to whisk you off to Never-Never Land.”

García Martínez’s Silicon Valley life began when he left his staid Goldman Sachs job to join a digital-ad start-up. Soon, he left that company to conjure one of his own. With much drama along the way — hostile takeover attempts, backstabbing rivals and financial sleight-of-hand — he eventually skipped to Facebook’s ad team, only to get forced out and land as an adviser to Twitter.

Along the way, he became one of the “chaos monkeys”: tech entrepreneurs who destroy everything in their path on their way to untold wealth and the next digital brainstorm — Uber, Airbnb, Netflix — that will change the world. The term “chaos monkeys” also refers to the kind of testing digital products must endure and how well they survive random mishaps. “Imagine a chimpanzee rampaging through a data center,” García Martínez writes. “He yanks cables here, smashes a box there, and generally tears up the place.” It’s an inspired metaphor for digital disruption — and a pretty great book title.

Reckless and rollicking, “Chaos Monkeys” has a lot to recommend it but could have used a tough-minded editor to prune away the self-indulgent excess. How much do we really need to know about the day-to-day machinations at García Martínez’s start-up that eventually goes nowhere?

Although this would have been a better book at 300 pages, instead of more than 500, it’s still perceptive and funny and brave. García Martínez doesn’t seem to worry about permanent excommunication from the digital congregation or about Silicon Valley’s version of Hollywood’s “you’ll never eat lunch in this town again.”

And his vantage points — from a Goldman Sachs desk to the 40-foot sailboat on San Francisco Bay where now lives — couldn’t be much better.

The resulting view of the Valley’s craziness, self-importance and greed isn’t pretty. But it’s one that most of us have never seen before and aren’t likely to forget.

Chaos Monkeys
Obscene Fortune and Random Failure in Silicon Valley

By Antonio García Martínez

Harper. 515 pp. $29.99