Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

150304_CA_WOMENTECH
Corbis

These are tough times for women in technology. Female workers are flooding out of tech company jobs, a phenomenon blamed in part on the industry's patterns of sexism.

A recent Center for Talent Innovation study found that women in science, engineering, and technology are 45% more likely than male peers to leave their industries. Many cite a feeling of being stalled in their careers and excluded from their workplace's culture; a whopping half say their coworkers believe men have a genetic advantage in math and science. And 44% agreed with the statement, "A female at my company would never get a top position no matter how able or high-performing."

Meanwhile, a gender discrimination trial now under way has highlighted the ways female employees can be shut out of high-level positions in Silicon Valley. Reddit interim CEO Ellen Pao is suing her former employer, venture capital firm Kleiner Perkins Caufield & Byers, alleging that senior managers systematically excluded her and other women from promotions available to less-accomplished male colleagues.

Though it's unclear whether Pao will win—the bar is high to prove gender discrimination, and the firm is arguing that she simply was not qualified for the role—her story has undoubtedly struck a chord among many women with experience in the tech world.

If these scenarios resonate with you (or someone you care about), there's still some good news: Despite the odds against women in technology, both research and anecdotal evidence suggest there are approaches female techies can use to rise up. Here are five of them.

1. Be Assertive, Not Aggressive

Most women in tech are pretty used to holding minority status at work. But that doesn't make being the only female among many male peers any easier, says Kellye Sheehan, a Hewlett Packard senior manager and president of professional association Women in Technology.

"A lot of times I would be the only woman in the room, and I would notice patterns of male colleagues testing me," Sheehan says. "One once tried to steal my employees and give me bad business advice."

Being put in that sort of situation can feel like a Catch-22: If you fight back, you might be seen as overly sensitive or shrill, but if you do nothing, you could come off as weak.

Indeed, a recent study suggests that women with more "masculine" traits like self-confidence are seen as more competent than stereotypically "feminine" women—but they are also seen as less "socially skilled" and therefore suffer backlash effects.

The good news? The researchers found that when a "masculine" woman also exhibits social grace and self-awareness, she gets more promotions than other women and men. So while both men and women should of course keep it classy when they stand up for themselves, women have even more to gain by doing so.

As for Sheehan? She held off on responding right away and chatted with her husband, a fellow engineer, about how he'd handle the situation. He suggested she "throw a brushback pitch," a move pitchers make in baseball to get batters to stop crowding the plate. That advice worked out, says Sheehan.

"In front of the group I said, 'No, you can't have Joe and Tom, and here's why your advice doesn't make sense,'" she says. "I spoke plainly and wasn't overly aggressive and he stepped back immediately and said, 'No harm meant.'"

2. Dream Big

A common mistake that female entrepreneurs make, says Women Who Code CEO Alaina Percival, is getting too hung up on the plausibility of their ideas. It makes sense: Being prepared with facts and figures seems like an important defense against those who don't take you seriously.

"Women pitching to investors can be overly analytical, focusing more on reality than their vision," says Percival. "The truth is you have to embrace a kind of 'fake it til you make it mentality' in tech. If you say your idea is worth 100 million dollars, an investor won't ever imagine it as one billion."

In fact, pitching yourself as a risk taker can really be a great move for women leading startup companies, a new study suggests. Researcher Sarah Thébaud of U.C. Santa Barbara found that switching a male name for a female name on a business pitch made people rate the idea lower, suggesting a bias against female entrepreneurs. But when she did the same experiment using proposals for especially unusual or novel startup companies, that bias was reduced significantly.

Such a finding is not immediately obvious. You might think that if a woman presents "a business idea that's particularly risky, it might further undermine her ability to gain credibility and support," says Thébaud. But instead, she found, "innovation signaled possession of the stereotypically 'entrepreneurial' traits and abilities women are otherwise perceived to lack."

The takeaway? Don't be afraid to share your bigger visions—they might just earn you big money.

3. Don't Promise—Surprise

Conventional career wisdom is that you should always underpromise and overdeliver when trying to impress at work. That may seem especially true for women in STEM (science, technology, engineering, and math) fields, who already have to overcome beliefs that they are less competent as leaders.

"You'll often see, in a meeting of equal engineers, that women are asked to take notes," says Percival. "Or when discussing a new position, people will use gendered language and say, 'We need to hire a really awesome layout guy.'"

As a consequence, women may feel they have to do additional work to get the same recognition a man would get. But all extra effort is not created equal: Recent research suggests that you aren't helped by going above and beyond what you commit to doing. That's because the very act of making a promise mutes the potential happiness your boss or client will feel when you deliver—even if you exceed expectations.

The solution, according to study authors Ayelet Gneezy of U.C. San Diego and Nicholas Epley of University of Chicago: When you really want to impress, hold back on making any promises and just surprise people with your finished product.

4. Brag Better

It is often said that women in technology need to be better at "selling themselves" to compete with male peers, who typically find it easier to trumpet accomplishments. But that is easier said than done.

"Women are culturally expected to still come off as especially humble," says Percival. "That makes it hard to overcome the embarrassment associated with bragging." Sheehan agrees: "We stay quiet and hope that if we work hard and have lots of output, we will get promoted."

The problem is that staying silent about your accomplishments often means you'll get passed over, as others are rewarded with more responsibility and higher salaries.

Of course, the idea of boasting might make you uncomfortable—and rightfully so. (One of the criticisms Ellen Pao faced from her employer was that she was arrogant.)

One way to overcome your discomfort with bragging is to do it in writing, suggests Sheehan. You could send your boss an email, for example, documenting your team's successes for the year, making it clear that you played a leading role. The benefit of email is that you can have a few trusted friends or colleagues read over it first, to help you fine-tune your tone.

And worst-case scenario, if you ever find yourself having to prove you were the victim of discrimination, it can't hurt to have messages about your accomplishments—as well as your boss's response—in writing.

5. Find Sponsors, Allies, and Resources

Many accomplished women in tech cite mentors and "women-helping-women" channels as key factors in their success. But getting ahead takes more than a little networking or advice. Having good relationships with your colleagues in general and garnering support from higher-ups makes a huge difference, says Sheehan.

"A mentor is someone who will teach you and help you learn and grow," she says. "A sponsor is someone convinced of your abilities high up in the organization who will advocate for you when you are not there."

A key factor in winning the support of bosses and coworkers is showing you are a team player and have a thick skin. Society teaches women to be sensitive to criticism, Sheehan says, so it's especially important to show you are the bigger person after a disagreement. You might even want to take a page from the stereotypically male playbook and invite a difficult colleague (plus a group, if that's less awkward) to grab a beer after work, which could allow you to hash things out in a more laid-back way.

Finally, consider the power of new female-friendly initiatives sprouting up all throughout the tech world. Half of women who leave the science, technology, or engineering industries keep using their training, whether at a startup, government or nonprofit job, or working for themselves. That suggests that opportunities outside of the box are growing more common.

For example, there's PowerToFly, a company that matches women in technology with jobs they can perform remotely. Cofounder Katharine Zaleski has explained that she created the business in part because she felt biased against mothers in the workplace—until she became one herself.

"There’s a saying that 'if you want something done, then ask a busy person to do it.' That’s exactly why I like working with mothers now," she wrote this week in a FORTUNE commentary. "If they work from home, it doesn’t matter if a kid gets sick."

If you have tech skills you want to improve or showcase, there are engineering schools explicitly for women, such as Hackbright Academy, and contests like a new hackathon restricted to female entrants—starting today, March 6—in which women can compete for prizes like a MacBook Air or iPhone 6.

And when all else fails, don't overthink it.

As Kelly McEvers at NPR wrote, perhaps the best way for women in tech to approach obstacles isn't to "Lean In," but "Lean To The Side, And Let It Pass By." If you're tired of all the unsolicited advice given to women in tech—as well as the balancing acts you're asked to perform—just take a breath and remember you're already beating the odds.

Read next: The 5 Best Ways Men Can #LeanInTogether to Help Women Get Ahead