Ex-Facebooker reveals how the ‘cult’ of Silicon Valley really works

With an inside look at Silicon Valley’s “cult”-like culture, one author poked some holes in how technology gurus get ahead.

"If I were to criticize anything about Silicon Valley, it's this sort of assumption of meritocracy: that if someone succeeds, it was due to skill alone," said Antonio Garcia Martinez, author of "Chaos Monkeys: Obscene Fortune and Random Failure in Silicon Valley." "When the reality is that happenstance, faith, luck and timing all play a role."

Entrepreneurs know how to craft a narrative that depicts their journey from steely-eyed vision to flawless execution, Garcia Martinez told CNBC's " Squawk Alley " on Friday. But behind the scenes, there's a lot of flailing and floundering, he said.

In contrast, Garcia Martinez said he saw plenty of gritty, dogged entrepreneurs who didn't become success stories — and some who did.

"Watching this process happen was really one of the more courageous and inspirational things that I saw in Silicon Valley," he said.

"Chaos Monkeys" aims to be an "irreverent" expose from a founder-turned-Facebook employee and Twitter advisor. But he did have reverence for one of his old bosses in particular:

"I think [Facebook CEO Mark] Zuckerberg is a genius," Garcia Martinez said. Facebook did not immediately respond to CNBC's request for comment.

He also had high praise for Facebook's chief operating officer Sheryl Sandberg , who he said manages all of Facebook's "competing egos." Still, while the enthusiasm at companies like Apple and Facebook may be "cult"-like, Garcia Martinez said it works.

"I believed in it just as much as anyone else at Facebook," he said. "In fact, that, I think, is Mark Zuckerberg's genius: He created this company and culture where everyone is motivated to give everything for a really ambitious vision."

JefferiesAnd the Best Place to Work in the global financial markets 2018 is...

Register for HITC Business News