The world imagines the Google workplace as an environment as light and playful as the company's colourful logo.
From the outside, Google is that "Don't be evil" company, run by geeks in T-shirts and jeans, sitting on beanbag chairs.
The world imagines the leaders of Google to be nerdy techno-idealists -- people who want to use the company's money and power to build self-driving cars, put a computer on every face, and launch Wi-Fi blimps over Africa.
[image url="http://static.businessinsider.com/image/4b1d4e9b0000000000e15726/image.jpg" alt="Google cofounder Sergey Brin and Larry Page, circa 2000" link="lightbox" size="xlarge" align="center" nocrop="true" clear="true" caption="The way the world imagines Google"]
This vision of Google is accurate. But it's also incomplete.
Past the veneer of primary colours, inside the walls of Google's Mountain View campus, Google is a hotbed of sex and political infighting.
And it always has been.
A source who spent most of his career at Google put it this way:
"Inside Google, it's a 'Game of Thrones.'"
"Game of Thrones" is a series of novels and an HBO television show. The plot is wildly intricate, but the main story is about how several families from all over the Kingdom are competing to take over the throne.
The show and books are full of violence, sex, and political intrigue.
There is no violence at Google. But sex and politics?
"Game of Thrones" is known for its casual and frequent depiction of sexual encounters among characters who are vying for, or in awe of, power.
Any honest telling of the history of Google has to mention that the encounters between the powerful and power-hungry have happened at the company since its earliest days.
In Douglas Edwards' book about Google's startup days, called "I'm Feeling Lucky: The Confessions of Google Employee Number 59," Google's original HR boss, Heather Cairns says that "hormones were flying and not everyone remembered to lock their doors."
Edwards recalls one specific tryst in his book:
"We had a crash cot in a windowless nap room for those who had reached the edge of endurable fatigue and lurched beyond it. One afternoon, a staffer peeked in and found two engineers on the bed, engaged in an act of noncomputational parallel processing."
Setting a precedent that lasts to this day, Edwards says, Google did not punish the couple.
"No stern policy reminders [were] sent out. Those who might have cast stones couldn't find adequate purchase on the moral high ground, and so unofficial UI experimentation continued, just later at night and relocated to offices lit only by passion and the glow of multiple monitor screens."
In the years since, sexual and romantic relationships between Googlers have developed throughout the company's ranks.
Typically, these relationships are healthy and normal -- scandal-free and boring. A pair of Googlers will date for a while and then break up or get married. Hardly anyone notices.
But sometimes there's scandal.
Recently, the staid news outlet All Things D reported that Sergey Brin is separating from his wife, who happens to be the sister of another Google executive, and that Brin is having an affair with a younger Google employee who had recently dated another Google executive named Hugo Barra. Barra has now left Google for a big job at Chinese smartphone-maker Xiaomi. Sources insist the timing is a coincidence, but no one can deny that it all looks very messy from the outside.
And the truth is, the Brin sex scandal is hardly the only one at Google.
There's one story about a powerful executive who would ask his assistants to schedule trysts for him. There's another story about an executive who just schedules trysts with his assistants. There's another about a pair of Googlers, each married to other people, secretly having a child together. A couple of years ago, The New York Times profiled Google chairman Eric Schmidt's wife, and asked her about the rumours of her husband's infidelities. She said, "I do live fairly independently."
The place is permissive.
One Googler who had a relationship with another says the company is just being "reasonable" with its policies.
"In a place like Google, which has strong technical talent as well as business talent, it's very natural that people are going to be attracted to one another. You have amazing combinations of intelligence and wit in one place. You can't fight that people are going to be attracted to each other."
"Facebook," this insider insists, "is exactly the same."
This source says Google's human resources division doesn't ignore relationships entirely. In cases where one half of the couple is reporting to the other half, HR will step in and "suggest that someone change jobs and do something else." Sometimes those suggestions have to be firm.
But sex, though common at Google, is not how people gain power and expand their territories at the company.
They do that through -- as one source put it -- "geo-political warfare."
In February of this year, Google's senior executives gathered from around the world at a rustic resort called the Carneros Inn, which is situated amid the hilly vineyards of Napa Valley.
They were there for Google's annual two-day retreat for senior executives -- vice president and above.
Among the attendees was Susan Wojkicki, who is responsible for Google's massive advertising business; Andy Rubin, then still the big boss of Android; Salar Kamangar, the CEO of YouTube; Sundar Pichai, the head of Google's Chrome division; and Vic Gundotra, the Google Plus boss. Each executive brought their own most-senior staff entourages.
The meetings at the conference were secret. There were no Google logos outside any of the resort's conference rooms.
Most of the resort's staff and guests did not know they were sharing two days with the senior executives of one of the world's most powerful companies.
Nor did the gathered Google executives know how pivotal that those two days would turn out to be.
They began to learn, when on the first day CEO Larry Page gathered his direct reports and their direct reports into a room and began to give a speech.
[image url="http://static.businessinsider.com/image/5239ebef69bedd3021f5a200/image.jpg" alt="Carneros inn" link="lightbox" size="xlarge" align="center" nocrop="true" clear="true" source="Carneros Inn" caption="The lobby of the Carneros Inn"]
His speech was part admonition and part pep rally.
In his signature, raspy, weak voice, Page told the room that Google's ambitions were incredibly high, but that it would never reach its goals -- his goals -- if the people in that room did not stop fighting with each other.
Page said that, from now on, Google would have "zero tolerance for fighting."
Page admitted that Google, in its younger days, had demanded its leaders be aggressive with each other. But that, Page said, was when Google's problems were "linear" problems. Google had needed to grow the market share of all its products from 0% to competitive to winning.
Now, with Google leading the world in most of the product categories it competes in, the company faced what Page called "n-squared" problems. Google, Page said, needed to grow by "10X." It needed to create whole new markets, to solve problems in as yet unimagined ways.
To solve "n-squared" problems, Page said, Google executives would have to start getting along with each other better.
Finally, Page laid down the law: "If you keep fighting, we'll be very happy to send you to the competition."
During the speech, one of the executives who was in the room turned to a friend and whispered:
"Did he just say, 'zero tolerance for fighting? I've been here for years. All we do is fight."
He was right.
As another longtime Google executive put it: "If the princes [are at] war, it's because the king tolerates it."
The Kings of Google had been tolerating fighting for a very long time.
Google's co-founders Larry Page and Sergey Brin have always made their most important decisions through heated debates, even as far back as their first days working together in the late 1990s.
In Douglas Edwards' book, early Googler David Krane is quoted as saying that Brin and Page "would be downright rude to each other, confidently dismissing ideas as stupid or naive or calling each other bastards."
As Google grew, Page and Brin hired and promoted other people who were able to "debate" this way.
In meetings with all the new hires, one of the two co-founders would provoke an argument over a business or product decision. Then they would both sit back, and watch and listen as their new lieutenants verbally cut each other down. As soon as any argument started to go circular, Page would call a winner and start a new fight.
At the time, the company also lacked a formal management structure.
There was "no structure, foundation, or control," says Heather Cairns as quoted in Edwards' book.
"Even if someone had a manager, that manager was inexperienced and provided no leadership. People weren't used to authority and wouldn't adhere to it -- it was a completely unmanaged workforce that was bouncing off the walls like a tornado."
So, in the place of a formal structure, there grew two hierarchies at Google.
Quietly, Google's engineers began deferring to the most talented coders among them. People like Jeff Dean and Urs Hölzle built the bulk of Google's technology, and earned massive fortunes and companywide prestige for doing it.
Less quietly, Google's managers judged themselves by who most often walked out of Brin and Page's debate-oriented meetings a winner.
Slowly, those who won the most arguments got the biggest management jobs at Google -- and with those jobs, control over huge territories such as search, YouTube, mobile, or social.
Google's argumentative meetings continue to this day. Page holds one every Monday morning with his direct reports. Usually they last all day.
This Thunderdome-style ordering of the company has had three effects.
The first, and most important, is that since Page took over Google again in 2011, the company has performed remarkably well. In 2010, with the company's stock in the tank, employees were panicked about their option strike prices. Now Google's stock is once again hitting all-time highs. Two years ago, pre-IPO Facebook was the hottest company in the Valley. Now, everyone in the industry is once again gushing over Google, which has managed to become both a money-making machine and a "moonshot factory."
The second impact is that executive arguments often extend beyond strategy review meetings, morphing into turf wars fought through hallway lobbying and email flaming.
The third has been the development of personal animosities. It turns out that when two people have to argue with each other all the time in order to get anywhere with their careers, they sometimes stop liking each other.
Perhaps the most whispered-about rivalries at Google over the years was the one between search and product executive Marissa Mayer, now the CEO of Yahoo!, and Salar Kamanjar, an early Googler who wrote the company's first business plan and later rose to become CEO of YouTube.
[image url="http://static.businessinsider.com/image/5238d204eab8ea9640d28236/image.jpg" alt="Game of Thrones Google Glass" link="lightbox" size="xlarge" align="center" nocrop="true" clear="true" source="Illustration by Mike Nudelman" caption="The Mother of Dragons would do very well at Google"]
Mayer was one of Google's toughest debaters. According to sources, she had three key skills: an ability to recall vast amounts of specific data, an ability to talk very fast, and the ability to talk very fast for a very long time.
Kamanjar bristled at his inability to get a word in with her during debates, and would complain about it to his own direct reports.
But Kamanjar had his own skills -- in particular, an ability to pull Larry Page or Sergey Brin aside, away from Mayer's verbal onslaughts, and convince them his ideas were the best.
In fact, it's safe to say that, among those competing in the Google version of "Game of Thrones," Kamanjar is a clear winner.
Kamanjar's official title is CEO of YouTube, but he is far more influential than even that big title suggests.
Besides a sharp analytical mind and an eye for strategy, Kamanjar's secret weapon has been a very close relationship with Larry Page. What Kamanjar whispers, Page hears.
In his book, Edwards describes Kamanjar as "a Porsche packaged as a Dodge Dart. ... Dark haired with large, limpid brown eyes and a shy, infectious grin, he could have stood in for Sal Mineo in 'Rebel without a Cause,' but despite his disarming demeanor, he argued his positions with passion, persuasiveness, and persistence. For a thin man, he was very hard to get around."
Kamanjar has also bettered himself over the past few years by submitting himself to exhaustive executive coaching. Apparently, he also relies heavily on a talented lieutenant named Shishir Mehrortra.
It was Kamanjar's idea for Google to buy YouTube in 2006. Then, as YouTube continued to hemorrhage cash, Kamangar protected it from being co-opted by other managers. Finally, he took the thing over, and now it's a gem in the Google crown.
Another champion in Google's "Game of Thrones" is Vic Gundotra.
Gundotra runs Google+, the social product built into all of Google's products. Gundotra honed his political skills at Microsoft, a company notorious for its turf wars. Gundotra's biggest strengths are his story-telling ability and an incredibly high Emotional Quotient (EQ) -- the ability to empathise with others.
"Vic is the best people-handler Google has," says a former colleague. "He knows exactly how to talk to every different type of person, irrespective of their agenda or his agenda."
One trick Gundotra learned at Microsoft is something a former colleague called "licking the cookie." The phrase comes from the way a little kid will take two cookies from a plate, licking one then eating the other, thereby assuring none of his friends will eat the first while he eats the second.
Gundotra, we're told, would "lick the cookie" at Google by putting future products and features into presentations about Google+, long before his teams would be able to get to building them. For example, to YouTube executives, it might have made more sense for Google Hangouts to have been a YouTube product. But Gundotra claimed it first.
Gundotra's biggest win: A few years ago, Google+ did not exist. Now it is built into every Google product, whether the people who run those products wanted it to be or not.
There have been changes at Google since Page's speech in February.
They are most evident in the case of former Android boss Andy Rubin.
Following an acquisition that brought Rubin into the company in 2005, Rubin built Google's mobile operating system, Android, into the world's most popular computing platform.
He did it by convincing huge handset-makers, particularly Samsung, to use Android. Rubin believed that to get Samsung and other big phone-makers to agree to use Android, he had to convince them that his Android division operated independently at Google. And so he protected this independence fiercely.
Meanwhile, as Android's market share soared, Rubin was able to get everything he wanted from Larry Page -- "because he was delivering," to use a source's words.
Rubin wasn't always pleasant with his power. If Kamanjar is a whisperer and Gundotra is a storyteller, Rubin is a table-banger. He picks fights. He stonewalls.
A source who spent years working in another Google division told us, "Sometimes it was easier negotiating with Apple than Android."
Eventually this confrontational style cost Rubin.
Just weeks after Page's speech at the Carneros Inn, Rubin stepped down from leading Android. Publicly, Rubin said he would join Google's R&D labs, Google X. But some Googlers wonder if he's still even working there.
In Rubin's place, Page put another Google executive, Sundar Pichai.
Pichai made his career at Google convincing computer manufacturers to install the Google Toolbar, which put a Google search window on the desktop of hundreds of millions of computers worldwide. Pichai is a dealmaker, a consensus builder. Perhaps his ascension is a sign of the kinder, gentler, more cooperative Google to come.
None of this is to say that the fighting at Google has stopped. It has just changed.
Says a source who heard the Larry Page sermon at the Carneros Inn: "What he meant by 'zero tolerance for fighting' is don't go overboard."
This source says there is a "healthy way" to fight at Google.
"The healthy way to fight is to wear two hats."
"You've got to wear your YouTube or Android hat," the source says. "But the mature executive at Google knows when to put on the Google hat."
Time will tell if that means no more "Game of Thrones."
Follow Business Insider Australia on Facebook and Twitter
NOW WATCH: Tech Insider videos
Want to read a more in-depth view on the trends influencing Australian business and the global economy? BI / Research is designed to help executives and industry leaders understand the major challenges and opportunities for industry, technology, strategy and the economy in the future. Sign up for free at research.businessinsider.com.au.