Tina Huang had finally decided that enough was enough. After being passed over repeatedly for promotion, the former software engineer sued Twitter for allegedly having a promotion process that favors men. Her fight against gender discrimination made the news.

Although she was ultimately fired, the brazen professional landed on her feet, becoming co-founder and CTO of Transposit, which recently raised $12 million in funding.

Let's face it: Many women in tech feel significant discrimination when it comes to promotions—and for good reason. According to research by HackerRank, women in tech are struggling to advance in their careers and languish in junior-level roles, regardless of age. Worse, only five percent of leadership positions in the tech sector are held by women.

While there is no magic formula for resolving this complex, long-standing problem, Huang shared her lessons learned, encouragement, and advice for female tech pros facing gender discrimination in the workplace.

Evaluate Your Options Carefully

First of all, you need to determine your motivation, goals and personal satisfaction level to decide the best way to proceed, Huang explained. Each person’s situation is unique, and it’s important to consider the outcome you want to achieve and the consequences of your actions.

For instance, do you want to shine a light on unfair practices and discrimination, or simply get a better understanding of what you need to do to get promoted?

If your goal is to escape the pigeonhole or a bad manager, simply transferring to another team may provide a fresh start. Alternatively, in some companies, sending a letter alerting the CIO and head of HR to bias or unfair promotional practices may launch an investigation and some sort of resolution.

But if the problem is systemic and bringing you down, you need to assess the likelihood of the company reversing course should you choose to forward your complaint up the chain of command.

A company led by all-male executive teams and board of directors may not be motivated to recognize or address gender bias in pay or promotional practices. Moreover, challenging the status quo in a male-dominated organization can be risky, and you may face retaliation, Huang warned.

Although a lawsuit is not always the best option, it’s a good idea to seek legal advice before taking any type of action. Many attorneys will provide a free consultation, review your evidence and assess the merits of your case, should you decide to pursue litigation or file an EEOC complaint.

Before you approach HR about discrimination, you need to know their role in solving an issue related to promotional practices, as well. Many employees believe HR exists for their benefit—but the truth is that HR is there to protect and advocate for employees and the company.

“In retrospect, I wish I would have known how HR tends to handle these matters,” Huang said.

“Ideally, you should voice your concerns well before it becomes a make or break issue.” That way, you can see what you’re up against and protect yourself by exploring other career options before speaking up.

Say ‘No’ to Silence

Surrounding yourself with a network of sympathetic colleagues can give you the courage to tackle a discrimination issue head-on. “You don’t need everyone to agree with you’re doing,” Huang said. “You just need a small group of supporters and one company that would be willing to hire you if the situation can't be resolved and you are forced to resign.”

Having alternatives can turn a negative situation into a positive one, she added. Companies rolling out programs or policies that encourage equality in pay and promotion practices is a good start, but if you really want to get ahead as a woman in tech, look for a company that has strong female representation in all leadership roles, including management, C-level and the board or directors. This may help mitigate the discrimination that creeps into some management structures.

Huang points to a study by McKinsey that shows that, when women find themselves alone in a group of men, they are far more likely than others to have their judgment questioned, be mistaken for someone more junior, and be subjected to unprofessional and demeaning remarks. It’s no wonder they get overlooked for promotion.

Research also shows that silent suffering in the face of discrimination can be even more damaging to your career than speaking up. In fact, according to a TNS Research survey, when an employee feels that his or her value is based on gender rather than job performance, they'll feel demoralized, develop a bad attitude, perform poorly, and ultimately look for a different job where gender discrimination does not exist.

“Being passed over was depressing," Huang said. “Ultimately, I felt that speaking up was the right thing to do.”