The NYT has a good history of the shifting dynamics of gender parity among programmers since the ENIAC days. A mentor of mine at UNC put energy into investigating and combatting this, so I’m familiar with a lot of it, but they bring up an interesting aspect that I haven’t encountered before: when personal computers started appearing in homes, boys tended to get more time and guidance on them, and so as students started showing up to CS classes with programming experience — really for the first time, historically — (some) boys tended to be the ones with that experience, and so they had a real advantage that then built stereotypes about boys being better at it, and increasingly drove girls away, and so the gender parity that had previously existed in the field started to drop, and then that became a vicious cycle.
(There were lots of other factors involved, and the article gives a good overview; that just happens to be one I found interesting and unfamiliar)
Source: The Secret History of Women in Coding – The New York Times