I'm not sure that's entirely what's to blame when the countries with the least gender discrimination (Scandinavia) tend to be about 20% female in tech. I think that when people are free to choose their fields based purely on personal inclination, without major financial incentive, tech lands at about 20% female and early childhood education ends up being the opposite.
Now of course, a lot of software in the US is below 20% female and we easily end up with spirals where departments end up lower than that and develop a toxic environment that pushes each new woman out. I personally ended up majoring in math instead of cs because of that process at my college.
I would hesitate to advance any theories as to cause based on that data (e.g., Denmark - part of Scandinavia - is >50% and Finland - not part of Scandinavia but next to it - is <30%).
Yeah I'll be the first to admit that I don't have the answers. You might be right.
I guess the interesting point of discussion here is "personal inclination". A lot of my female friends have stories about how their parents encouraged their brothers to fix things around the house, get their hands dirty, read manuals, and set up new appliances. They tell me how they were, conversely, encouraged to make friends, maintain relationships, and steered toward more aesthetic pursuits like art, drama, or music.
My sister, at an age when she had no strong interests of her own, was given paintbrushes and nice paper as gifts by our parents but not Legos because they felt like girls were more likely to enjoy aesthetic things than mechanical things. Funny enough, as an adult she has neither mechanical nor aesthetic interests. The question I guess is how much of "personal inclination" is driven by these small decisions of what options we give to kids.
I will say my experiences are colored by the fact that my family is a low-income immigrant family in the US from a culture with definite gender discrimination and so they hold stronger gender prejudices than probably a high-income Scandinavian family. My guess is also that younger generations have grown up with a much better idea of gender equality and will raise their kids with less of this prejudice.
I also observed in my school that a lot of women felt more comfortable in the math department than CS (though CS had much less prestige compared to now), so thanks for your story and background.
I think I may also have somewhat of a blind spot here because I grew up with a mom who is a software engineer herself and I was bought a bunch of electronics/building toys by engineer relatives on both sides. When I was 13 or 14 I was given the parts for a computer under the instruction to put it together and make sure to dual boot linux. I knew a fair number of other girls my age whose parents really wanted them to be engineers/devs and did similar things, but a lot of them were uninterested and went on to happy careers in other fields.
The math vs CS dept thing is concerning because at the foundations they're very similar fields. It's such a strange phenomenon that my graph theory elective in the math dept was 30 or 40% female, yet algorithms was 5% female. Definitely at my institution there were structural issues in the CS dept that didn't exist in the math dept.
Now of course, a lot of software in the US is below 20% female and we easily end up with spirals where departments end up lower than that and develop a toxic environment that pushes each new woman out. I personally ended up majoring in math instead of cs because of that process at my college.