Her instinct was to broadcast her astonishment on Twitter, but friends talked her out of it. “‘It’s not going to be worth it,’” Medina, a 20-year-old computer sciences major, says they told her. “It was a kind of ‘shake it off, let it go’ thing.” 

That can be part of the bargain for high-tech minorities, the female, black and Hispanic engineers in a business that’s been one of the greatest wealth-creation machines ever for white and Asian males. Medina got the advice Lloyd Carney always gives to newcomers. “I tell women and people of color directly, ‘Don’t you dare advocate for diversity,” says Carney, who’s 52, black and chief executive officer of Brocade Communications Systems Inc. “‘Your career would be over.’” 

The diversity issue is being dissected and debated as never before, and industry leaders have been broadcasting their dedication to making pluralism a priority. Tim Cook was Apple Inc.’s CEO for three years before coming out as gay two weeks ago. Microsoft Corp. CEO Satya Nadella fanned the discussion last month when he suggested women not ask for raises.

The men and women solving the problem — by getting hired and promoted — can be the least comfortable talking about it. 

Sounding White 

All the attention being paid to the lopsided statistics hasn’t diminished the everyday strangeness of being one of the few, according to interviews with two dozen minority engineers with experience at more than 20 companies. They say they’ve found the way to deal with many of the odd and exasperating questions, assumptions and situations is to brush them off. 

So Caitie McCaffrey just laughed when the men she was chatting with at an industry party took her for someone’s girlfriend, not a developer for Microsoft Corp.’s Halo video game. Makinde Adeagbo learned to cut his own hair as an Apple Inc. intern because he couldn’t find a black barber and there was nobody in the office to ask. 

Kate Matsudaira only sighed when industry acquaintances saw she was pregnant and asked if she was going to close her startup. Harry Sims, a wireless technology engineer and expert witness in patent trials, shrugs off the flashes of worry when trial lawyers see him in person for the first time. “My name sounds white,” he says, “and I don’t sound black.” 

No Anger 

On the patio at Coconuts, a Palo Alto restaurant where the Jamaica-born Carney spends so much time the owners named a drink after him, he explains that he gets it, he’s not suggesting there’s no issue. Customers often shake the hand of his white salesman first when they’re out on calls, never guessing the black guy’s the CEO. 

“If that stuff makes you angry, it will hold you back,” he says. “You can’t be angry. You have to be better than that. I wish it wasn’t true, but it is.” 

About 1 percent of engineers at Facebook Inc., Google and Twitter Inc. are black, and around 3 percent are Hispanic. For all the success of women like Sheryl Sandberg, Facebook’s chief operating officer, and Marissa Mayer, CEO of Yahoo! Inc., men fill nearly 70 percent of jobs and more than 80 percent of technical positions at leading tech companies. 

More than a dozen have disclosed in the last six months how their payrolls break down. They’ve rallied around diversity, reviewing promotion practices, stepping up recruiting and holding workshops on combating unconscious bias. It took Nadella less than a day to declare he was “completely wrong” when he said women should refrain from asking for raises, advice that caused a Twitter firestorm of outrage and snickering. 

Super-Minority 

Brown University graduate Emuye Reynolds is a super-minority: a black woman. She’s worked as a software engineer at companies including Apple and Zite Inc. In a long-sleeve T-shirt and jeans, perched on a couch pushed up against a brick wall in a startup office, the 30-year-old says software development is an ideal job, as crazy-making as it can sometimes be to never work with a person who looks like you. 

Explicit acts of discrimination and harassment aren’t the concern. Those Reynolds knows how to handle, and they’re practically nonexistent at work. It’s the isolation and the wondering that can drive you nuts. Why didn’t I get that job, why did that new hire question my authority? 

“It’s death by a thousand cuts,” Reynolds says, many self-inflicted by the internal debate she has. “I see things and I think, is this because? Is this not because?” Sometimes the debate ends with, “Maybe I’m just being crazy.” 

Female Geek 

Kate Matsudaira understands. She would tell Reynolds that she’s not crazy, and to keep quiet about it. She takes a page from Lloyd Carney’s book. 

“As soon as you put yourself in the camp of the people that talk about ‘the issues,’ you’re no longer the person that works hard,” she says, “you’re the person that spoke out.” 

At 34, with Amazon.com Inc. and four other companies on her resume, Matsudaira’s practically one of the old guard. When she started at Microsoft in 2002, she wore cargo pants to blend in; when she was at Delve Networks Inc. in 2007, she joined a fantasy football league because that was how guys bonded. 

Over the years she’s had run-ins with sexism, some amusing, like the time someone in the room at a board meeting asked her for a cup of coffee, not realizing she was a director. 

Now she owns a company in Seattle, career counseling site Popforms Inc., and is in dresses and heels whenever she likes — quite deliberately at industry parties, where she wants to stand out as a female geek. 

Being Memorable 

“If you speak intelligently and you’re technical and you look like a woman,” she says, “you’re memorable.” Being a woman in a boys’ club helped her career, Matsudaira says, earning her speaking gigs at conferences when organizers wanted to improve the gender ratio. She proved she knew what she was talking about, she says, and was invited back because of her knowledge, not her two X chromosomes. 

While she mentors female developers, she doesn’t post about what she calls “the women in tech issue” on her blog, doesn’t publicly agitate for workforce diversity. 

“I don’t want to be grouped into that category of activists,” says Matsudaira, who has computer science degrees from Harvey Mudd College and the University of Washington. “This sounds so horrible, but there are certain people who say, ‘I didn’t get the job because I’m a woman,’ and I’ll look at their resume and know they didn’t get the job because they don’t have the experience. I never want to be in that group.” 

‘Awkward Conversations’ 

In San Francisco, at a conference table near one of the floor-to-ceiling windows at Pinterest Inc., Makinde Adeagbo says he understands what’s behind the concern about being seen as an activist: Companies under pressure to come up with the next big product want talent that can get them to the release, not rebels who’ll distract from the mission. 

Still, “participating in the change you want to see in your industry shouldn’t cast a shadow on your commitment,” he says. He’s involved with groups such as Code2040, which helps blacks and Hispanics land internships, and just switched jobs at Pinterest, where he started in 2013 as an engineer, to work on fine-tuning the recruiting and training processes. 

A graduate of the Massachusetts Institute of Technology, Adeagbo learned fast what he was up against when he arrived in Silicon Valley. Racism? Not really. 

“What you do have is a lot of uncomfortable, awkward conversations,” he says, because so many in the industry just “aren’t used to having black people around.” 

Color-Blind Code 

Two of his most unforgettable exchanges were with white interviewers for companies he declines to name, one who asked why blacks sit at the same lunch table, another who inquired about the evolution of terms for his race, including the n-word. Adeagbo says he politely ended the conversations and declined the job offers, in one case telling a recruiter that he wasn’t interested because of a “severe cultural mismatch.” 

That was before he got his first full-time job, at Facebook in 2007. Now 29 and established, he figures he won’t have to go through that again — and maybe, today, it wouldn’t happen. The vaunted Silicon Valley meritocracy may not make it easy for people who don’t look like Mark Zuckerberg, he says, “but if you kick ass, it’s recognized.” After all, “If my code doesn’t work, it’s not because I’m black or white.” 

Laughing, Adeagbo runs his hand over his close-cropped hair and says yes, he continues to cut it himself. He tried a white barber during his Microsoft internship in 2004, when he was the one black person on a 100-plus-member team. “My hairline survived, but just barely.” At Apple the next summer, “I finally decided, hey, this is the environment I’m going to find myself in for a long time to come, so I better learn.” He biked to Target to buy some clippers, and still uses them. 

‘Not OK’ 

“The thing about being black in Silicon Valley is that you’re not only a minority in your workplace, but you’re a minority in your community as well,” he says, ticking off statistics: Blacks are 6 percent of the population in San Francisco and 2 percent in Palo Alto; his girlfriend was one of a handful of black women in her Stanford University class; there are seven blacks on Pinterest’s 450-person payroll. 

So what’s the solution? It should be simple, according to the engineers: hire and promote more people of color and women. 

Ana Medina, a junior at the University of California, Santa Cruz, plans to be one of those getting hired. She attended the Google I/O conference in June on a scholarship that covered the $900 ticket price. Now she’s ready to talk about what happened to her, because the just-let-it-go admonition from her friends in the industry doesn’t seem right. 

“The advice leaves you to think you’re probably not the only one who experiences things like this,” she says, and she feels she has a responsibility to speak out. “The industry shouldn’t be like this. It’s just not OK.” 

To contact the reporters on this story: Sarah Frier in San Francisco at sfrier1@bloomberg.net; Peter Burrows in San Francisco at pburrows@bloomberg.net

To contact the editors responsible for this story: Pui-Wing Tam at ptam13@bloomberg.netAnne Reifenberg,