More than 50% of my law school class (top ten law school) were women. In law school the know-it-all assholes were still mostly men. And that didn't seem to dissuade the women one bit from pursuing a career in law. In my first legal job, more than 50% of the first year associates were women. In my wife's firm, 70% of the first year associates were women.
When I was an undergrad (early 90s) there were about 40-50% women in the CS introductory classes, but by the 200 level classes, there were only about 10-15% women. I was pre-med for a time. Pre-med classes were just as hard ... the attrition did not change the sex ratio in the pre-med classes.
Why do people insist on making up all kinds of just-so stories to explain the discrepancy in numbers of women and men programmers. Isn't it possible that women might not be interested in programming in the same numbers as men. Even within the male population, those genuinely interested in programming seem to be a pretty small number.
Most of my classmates in the CS program did not stay programmers. Many of them went to work for places like Goldman, McKinsey, etc. In fact, those were the preferred jobs in those days. Only a very small number of us wanted to actually program for a living.