Google has fired an employee who wrote a controversial memo opposed to diversity programmes and hiring practices. The company's chief executive said the "offensive" text advanced "harmful gender stereotypes". Did Google do the right thing?
First things first: What did the memo say?
A senior Google employee, named in US media as James Damore, argued in an internal memo that perhaps tech companies that try diversity programmes to get more women in to the industry are looking at things the wrong way.
It's not just because of recruitment practices or education or discrimination that more men than women work in the tech industry, he argued, but because of biological differences.
Women are "on average more interested in people" as opposed to things, he said, "more co-operative" and "more prone to anxiety" - all things that stop them going in to the tech industry or rising to the top of it.
And he said this couldn't usually be said by people who worked for Google, because of an "ideological echo chamber" and a "shaming culture and the possibility of being fired".
You can read the full memo here.
After the memo received a few days of international attention, Mr Damore was fired. He is reported to be considering legal action.
The memo and now his sacking have been much discussed on social media, with some agreeing with him, some offering him jobs, and others aghast at his views.
Google was wrong to fire him, say some
"I think it's wrong for a company to fire someone for simply expressing their opinion," said Jodie Ginsberg of the Index on Censorship pressure group.
Asked whether Mr Damore being fired was censorship, she said yes.
"Yes, in that the message it's sending is that people are not free to express their beliefs and opinions. The message is we should just shut down the views with which we disagree.
"A much better way is to discuss those opinions openly."
Geoffrey Miller, an evolutionary psychologist at the University of New Mexico, said Google had gone down in his estimation when it fired Mr Damore.
"It was reasonable of this author to expect that his argument would be respected, that he would be able to air it with some safety," he said.
"It's just embarrassing for Google," he continued. "I used to think Google was one of the coolest companies on earth. I use a lot of their software of all kinds and now I just feel like I'm supporting this ideological juggernaut.
"If the reaction to being told that you are an ideological echo chamber is that kind of defensiveness to me it's pretty strong evidence that it probably is biased."
Google was right to fire him, say others
On the other hand, says technology writer and broadcaster Kate Bevan, the memo created a hostile environment for female staff.
"I'm not very keen on the mob going for people to get the sack," she said. "But in this case he was acting in a way that was detrimental to his colleagues.
"If you stand up and declare in public that you think a large number of your colleagues are unfit to do the job because of their chromosomes, you're telling your colleagues 'I don't think you're good enough'."
That echoes the argument made by Google's CEO Sundar Pichai in a letter to staff: "To suggest a group of our colleagues have traits that make them less biologically suited to that work is offensive and not OK."
Does Silicon Valley have a sexism problem?
The women challenging sexism in e-sports
Ms Bevan continued: "The best engineers are not necessarily male. If you continue to restrict your hiring pool to one type of people you're going to get some mediocre people in there."
She argued that a more diverse workplace would be better for business, too, saying: "If you've got a limited workforce you're going to limit the products you make."
So the science he cited - was it legit?
Geoffrey Miller, the evolutionary psychologist, told the BBC that Mr Damore got "most of the science right" and showed "pretty good judgment about what we know and what we don't know".
He wrote that the memo "would get at least an A- in any Masters psychology course".
But Gina Rippon, the chair of cognitive brain imaging at Aston University in Birmingham, England, disagreed.
She told the BBC: "The key thing for me is that he's got quite a lot of the science wrong.
"The basis of his argument is wrong. I don't know who he's been reading."
In fact the author of a study mentioned in the memo has responded to the furore, saying that using someone's sex to work out what you think their personality will be like is "like surgically operating with an axe".
Professor Rippon said: "It's one of those areas where science moves on perhaps more quickly than the communication of it.
"He seems to be suggesting that because something is biological it can't be changed."
She said ability at spatial tasks - often cited as a way in which men and women's brains work differently - can be affected by how many videogames the people being studied have played. And playing more videogames or getting a different environment can influence an individual's brain.
Is my brain male or female?
Do men and women really have different personalities?
She continued: "But even if you accepted the idea that there are some biological differences, all researchers would assert that they're so tiny that there's no way that they can explain the kind of gender gap that's apparent at Google."
Just 20% of Google's technical roles are filled by women, according to the company's own figures. Nearly half of non-technical staff are female.
Angela Sain, author of Inferior: How Science got Women Wrong, agreed: "The differences aren't as big as we think they are and the gender gap as it exists in society is not explained by biological differences."
But the fact remains that there are many more men than women working in tech companies like Google.
And a 2016 study of women in Silicon Valley found that half of the women asked had repeatedly been told they were too aggressive, and nearly half had been asked to do low-level jobs their male colleagues weren't asked to do, like taking notes or ordering food.
These are issues that Google will undoubtedly turn its attention back to once it has come down from walking the PR tightrope in the wake of the anti-diversity memo.