Diversity begets diversity. The only way to do that is to set up systems and infrastructure that supports and enables that and it requires support from community leaders.
An example: I'm a gay atheist from Idaho. I have extended family members that look like they belong on Duck Dynasty. Each family event, me and my husband are presented with a choice: we can skip the event and its awkwardness, or we can join the event and face it head on.
Each time we attend these events, we leave with the same impression. "That wasn't so bad," and from my husband, "Your family is actually super nice." And because of this interaction, they become less homophobic, and I grow to understand redneck values a bit better.
Besides, I've learned over time that what I think they're thinking about me is actually much worse than what they're actually thinking about me.
But each time I'm invited to one of these events, my first gut instinct is not to go, because it's work, and it can be awkward, and it's much easier for me to spend time around people who are more like me.
I think nerds and geeks are acutely aware of the costs of being outcasts. The period of their life when they typically turn to computers and programming is the same as the period in which they are socially marginalized (middle school / high school).
THIS. And this is the problem. People don't understand this. It HAS to be somebody's fault. It has to be black OR white. Gray is beyond the understanding of many.
Well, it's not really any one person's fault who set everything up. But we can change it. There are tools to undo the "death by a million cuts" that make it this way.
I would say that the people who don't do these things are partially at fault for not attempting to fix a broken system.
Not just in tech, but in our entire culture. As noted elsewhere, Americans are sorting themselves by demographics.
It feels awkward to be a woman in a predominantly male organization. It feels awkward to be a republican in San Francisco. It feels awkward to be gay in Mississippi. It feels awkward to be black in Portland. And so we place ourselves in locations (and organizations) where it's less awkward to be ourselves, and the problem gets worse.
What's difficult about this problem is that it's nobody's fault. There's no conspiracy behind this trend. (In fact there is a conspiracy to try and reverse it! But to little avail.) Counterintuitively, perhaps it's the fault of the people who choose the comfort of sameness over diversity, but that feels too close to victim blaming.