The onus here isn't on women. And the right solution is not to preferentially favor women in the tech field. What you'll end up with is a situation where asshole misogynists consider themselves even more justified in treating women in tech as second class citizens. This time because "they only got there through charity".
The solution is simple. People in tech need to treat other people in tech like human fucking beings, regardless of gender, race, or age. And more importantly, when we see people treating others based not on the quality of their work but on superficial qualities like gender, religion, national origin, sexual orientation, or what-have-you we need to call them out on it. Loudly. Publicly. Repeatedly.