The most plausible explanation for the imbalance is that women don't lack the innate ability, they're discouraged from developing it. Why do I say that?
- Some professions requiring comparable skills (eg actuaries, accounting) contain many more women.
- There's no known mechanism or evidence to explain why women might be innately bad at programming, but there's lots of well-documented mechanisms by which women could be discouraged from joining the community.
I'd be happy to learn from evidence that contradicts this argument, but in the absence of that, the simplest explanation is that we're wasting the potential of thousands of proto-programmers.