You say it isn't all that different, but having experienced too much of both, it is.
Both are real, and sometimes both occur at once, but to say a white guy in a predominantly non-white and high-crime neighborhood would gain empathy for a non-white coder in a predominantly white tech company, would be as absurd as claiming the reciprocal.
That feeling really (really) sucks. It must suck ten times as much when it's happening in your own country. I really feel for people who are forced to experience this.
Further, career stresses are frequently underplayed in the tech environment. Certainly, I would feel very little worry about saying, "Adios, and I'll leave my badge on my desk on my way out." On the other hand, if you are not part of the tech culture and everyone you know is either unemployed or working, say, outside the tech field, the potential of being punished simply for standing out is a bigger worry than I suspect you really think.
In other words, it isn't the same thing, but it's not as absurd as you might believe.
* as a man anyway.
I've also experienced a great deal of both and I disagree with your read. It's easy to think up non-racial examples as well; someone who's gay in a frat-themed work environment, or a middle-class guy ending up at a bar populated by Hell's Angels or suchlike. The differences with race and gender, obviously, are that it's almost impossible to obscure those facts about yourself so you can't even fake that you fit in.
Social anxiety is real, but do you really find the fear of imminent injury/death no more terrifying than social harm?
And this matches the literature - the more ethnic/racial diversity in a community, the less civic engagement and trust (1). I'm not sure what the answer is, but the research suggests diversity is not a universal panacea. Like anything else, there are benefits and liabilities involved - and there are other considerations to take into account.
For example, I wonder if her co-workers had been more like her in other ways, such as matching her taste in video games, dress, attitude and so on - if her experience would have been different. In my department I suspect it's mostly these other things (work and personality styles especially) that are the reason for the lack of cohesion.
The best groups I've been a part of are those that mixed the right amount of same and different. We need to feel some commonality with others to form bonds, but we also need enough differences to challenge and stimulate us. Effective hiring practices require attention to both, else company and employee will suffer.
(1) http://www.boston.com/news/globe/ideas/articles/2007/08/05/t...
*Edited to expand on the point/add clarity.
"The mere presence of diversity in a group creates awkwardness, and the need to diffuse this tension leads to better group problem solving... while homogenous groups feel more confident in their performance and group interactions, it is the diverse groups that are more successful in completing their tasks."
(1) http://insight.kellogg.northwestern.edu/article/better_decis...
There is also the "problem" of mixing professional and personal relationships. There is absolutely nothing wrong with this, but some individuals absolutely do. not. want. For teams where the workplace is the social hub for most but not all, those stuck at the social periphery are most likely going to suffer professionally. And this doesn't even get into class differences (as in, those protected classes, not socioeconomic) and feelings of not belonging.
I'd say that's the start. You're creating favorable conditions. The important step is to have open and honest communications, even around issues as sensitive as race.
(also, try not to ever say "binders full of women")
I don't think "try not to say" political correctness is intellectually compelling. In fact, I think it's counter-productive to open and honest communications. The implementation of hair-trigger job loss and social stigma is only going to create fear and stifle communications.
I'm not trying to defend toxic speech here. Instead, I'm trying to be clear about comprehension and motivation. Instead of a social context that mindlessly implements pattern-matching hair-trigger sanctions, I'd rather have a support group that understands me and where I'm coming from, so they understand how I would feel about this or that social situation. I'd rather be surrounded by coworkers that know me well enough, they probably won't say something that offends me, or if they happen to do that, I know well enough to talk to them constructively about that.
Rather than engage in this collective delusion that everything is always OK, I wish firing was a more commonplace thing. I also think how it's framed matters a lot: "this isn't working out for either of us" vs. "you aren't welcome here, don't come back".
Additionally, Slava (coffeemug) is right, personnel decisions are the loudest, most unambiguous signals about what's valued in a work culture. Posters on the walls are bullshit - look at who's advancing, who's getting the raises, titles, and what kind of person is getting hired, to know where an organization's priorities really lie.
In countries where getting fired doesn't cause immediate financial distress and doesn't remove you from, say, access to medical services for your kids, people don't have such a stigma and actually are willing to simply move on if it isn't working out of if their relationship with teammates matches the bad parts of the original post.
A bit of personal perspective: I'm a 30 year old, I earn well into six figures/yr, but I still live relatively far below my means. Concretely, this has required making some very tangible lifestyle choices that haven't always been pleasant, including living with roommates in a somewhat bad neighborhood, not buying high-end clothes, etc.
The reason I do this, and it's something which somewhat annoys my long-term girlfriend, is that I absolutely refuse to live paycheck-to-paycheck. I've done that for a while after a failed startup, and it's terrible. It takes a huge psychological toll and the idea that you have to stay at a crappy job, and be afraid every day of being fired, is something I'm working very, very hard to avoid.
Doesn't really matter how it's framed, when the reality is clear in almost all interactions: the employee is getting the short end of the stick. It's very simple, really: the ratio of employee's salary to his/her total income is very likely to dwarf the ratio of the cost of the employee to the companies total costs. Hence, keeping an employee is very low-risk for the company, while getting fired is very high-risk for an individual. Even if you say "it's not working for us", what you really mean is "I'll slightly improve my profit margins by turning your life on it's head!".
Besides, if you thought that the point of a company was to provide you with a job and sustenance, you were delusional to begin with. The fact that they're paying you is a side effect of the fact that you're doing things for them that they need. I'm not saying it should be that way, I'm just saying that no one's really hiding that fact.
How this ties in to what the parent is saying: not everyone is fired because they inherently suck. It's possible to not suck and still not be useful to the company. So the stigma here is a bit irrational. I know a company who hired a C-level executive and then very soon realized that they didn't need that person yet, and went through many pains to keep that person onboard on the paperwork. They made it look like they left after a year on their own accord, all in order to not ruin the person's career.
Except, that's not what the parent was doing. It was a partisan dig, thinly disguised: even worse.
Now, if hiring a diverse team forces the old team to start realizing their biases and become more accepting, that a great way to start to overcome those barriers, but I think the understanding is far more important than just having a higher percentage of people of other races.
I discuss my opinion on this in my comment below.
People work together, and project assignments aren't made to put friends together, but to group the skillsets needed and to help people do the work that interests them.
Of course there's some time spent hanging out in the break room or possibly after-hours, but most socializing (in my experience) happens around work, in groupings that are work-project based.
The small talk is quite different (and honestly, much more interesting!) when you have a more diverse group, automatically.
The Experiment: Go to whatever is considered to be the worst neighborhood in your town. At night. Alone. Do something completely normal. For example, buy something from a gas station, walk into a nightclub, etc. How do you feel? Out of place? Scared? Not sure how to act?
Well, that's the feeling the OP is describing. The immediate defensive response is usually to think "that's different...those neighborhoods are DANGEROUS. I could be killed." Granted, black people can certainly be in danger just for being in white neighborhoods (think unprovoked police shootings), but even if your biggest fear is losing your job or something of that nature, it isn't all that different.
I think, ultimately, the best way to promote an inclusive workplace is to hire a diverse team. Really put effort into finding candidates from diverse backgrounds. That means expanding your circle even when you aren't actively recruiting. (also, try not to ever say "binders full of women")