The idea behind this blog post has always been to make peace between two things. One of these is my honest belief that sexism is unwise and disgusting, and all human beings are equally smart regardless of their gender. The other thing is dismal amount of women in programming profession I observed at that time and place. In 2010, a StackOverflow question (it provoked a flamewar and has been deleted, but you can view it if you have 10k+ rep there). finally gave me the idea how these two things are possible simultaneously, and I wrote a provocative and--as one of the commenters puts it--"needlessly argumentative" post about it. Here it is, slightly, rewritten.

Are women worse developers than men?

There are slightly more women than men among humans. However, there's just a small amount of women in software development, as observed and acknowledged by us daily. I observe this in the place I work, and I hear a lot from others that they observe the same at their workplaces. If you're a software developer, take a look who surrounds you: how much of them are women? Not much I guess, much less than 50%.

So does this mean that women are somehow inherently worse in programming? No.

I used to dismiss participation rates in countries that do not completely satisfy the definition of "free" (Qatar, Singapore, Malaisiya.) But women are disadvantaged in such countries, and forcing women into one of the toughest and well-paid STEM-related occupations doesn't really scream oppression.

A survey of participation of women in computing over the world demonstrates that it varies dramatically from country to country: from 6% in Denmark to 55% in Thailand (anecdotal evidence reports 60%+ participation in Qatar). If somehow women were worse at this, these rates would have much more similarity.

The thing, however, is that whether women are worse or better at it is completely irrelevant for most situations that occur in practice. That's right: even if you are somehow sure that women are inherently worse at programming, this does not warrant any kind of different attitude towards them in the workplace, and here's why.

Why shouldn't one just fire all women if one thinks they are inherently worse at programming?

Short answer: because conditional probability. Longer answer follows.

Assume you are doing an interview, and assume also that you are sure that women are worse programmers than men. Does that mean that the probability that a woman who comes to your interview is a good programmer is lower than the probability that a man in similar position is a good programmer? No, and the reason is that the group your interview candidates come from is no longer "all women" or "all men." Instead, these are "all women who chose their careers in computing" and "men who chose computing".

Conditional probability demo

Demonstration that the skill of job applicants or of those women who chose software development as their career had nothing to do with how good of a programmer an average woman is.

The probability that "a woman is a good programmer" (A) given that "a woman chose programming as her career" (B) is not equal to the probability that "a woman is a good programmer" (A). This probability can be both greater or less than this, according to conditional probability definition (see illustrations):

P(A given B) = P(A and B) / P(B)

The definition of conditional probability.

And something tells me, that this very particular group "women self-selected as professional programmers" will have more good programmers than general population. In any case, no matter how small the ratio of good programmers among all women you believe is, it tells you nothing about women in the profession. Any kind of unfair treatment of female peers can't be justified by reasoning about general population, and understanding of conditional probability gives us a mathematically solid proof why.

Why is there a debate about whether women are good at programming in the first place?

Because many people believe that participation of women in software engineering and the skills of women in general are correlated, while in reality these numbers have absolutely nothing to do with each other. The application of basic probability theory to this debate finally settled it down for me, but many are deluded by less relevant questions.

Some see low participation of women in engineering as a sign of their inferior skill, and therefore reason that women should not be hired, or should be not taken seriously. This line of reasoning is mathematically wrong, as shown in the previous section, even if it somehow turns out that women are indeed worse programmers, which I do not believe is true.

Others believe that women and men have equal programming abilities (which is a completely justified belief), and make a conclusion that they must be equally represented in the workplace regardless of other factors, thus interpreting the disparity we observe as deliberate diminishing of women's programming skills. This line of reasoning is as unjustified as the previous example because, again and again, skill and participation may have nothing to do with each other.

Errors in math observed in both sides make the debate much more heated than it should because everybody makes illogical conclusions from the wrong math, which receive justified critique. Instead of trying to eliminate bias in prior perceptions, which can't be eliminated completely as well as may have nothing to do with the debate, I would like to see more focus on fixing what is easier to fix, and is not mathematically irrelevant.

There still exists this vicious cycle when female programmers are considered uncommon, and this wards off women by itself, making them uncommon, again. People stop caring about women because there are none on their team, and there's simply nobody to care about; they forget--or even never learn!--that programming, like many things in this world, is a two-gender endeavour. Feminist websites like this have a lot of advice to offer to mitigate this.

Post Scriptum

I'm kind of tired of being used as an example of sexism in programming. You probably come here via a link on some website claiming that there's yet another chauvinist hampering participation of women in computing or whatnot. This is not true, and has never been true. The gist of both new and old versions of the article is that a lot of debate around "women in computing" revolves around badly applied mathematics. Refresh your knowledge about conditional probability, please.

By the way, none of the visitors by such links, totalling to 4000 throughout several years, have sent me a message or made any attempt to comment on this post and correct something. Not a single one! I can only explain this that a demonstration of sexism you can link to is much more welcome out there than a person who corrects other' math.

For those interested in getting the old version of the article, which you may need to point a finger to, I'll spare you from going to webarchive and getting it from there. The one you see here is an updated version.

Comments imported from the old website

Noon ("silky") on 04 May 2010 commented:

FWIW I think your post is needlessly argumentative. The reason there are useless flamewars on this topic is not because of a lack of understanding of math, it is due to the way it is framed.

Even your mathematically framing is not great. Consider that if you select, from the group of all male programmers in the industry for more than 6 years, and the group of all females of the same range, and compare. You may find that on average the female is better. Why? Because they've had to be more dedicated to stay in the field.

It's easy to bias the selection to get any outcome you want, really.

The question is more readily addressed by clarifying down to points. For example, who has better ability in maths? Who has better ability in translating desires (specs) into code? Who has a better problem-solving and debugging skills? Only this way can you get to specifics, and get useful metrics. Arguably useful anyway.

Pavel Shved on 04 May 2010 commented:

Come on, that was a joke, about math! When men think about girls, math is the last thing they're concerned about! :-) Anyway, I tried. Most people don't bother with framing, and just go with the way they believe. Both male and female, to be fair.

It's easy to bias the selection to get any outcome you want, really.

That can't be more true, but would any bias be sane? You can select female programmers and male persons with "F"s in math class, but such selection doesn't make sense.

You demonstrate a great example of a sane selection, and indeed it may be true what you say about such women. But, at the same time, women in general are still worse programmers. That's what the post is about!

As for specific points, such dissociation of programming into partials is argumentative itself. And if we introduce into this equation another variable, sex, it won't be any easier...

noon on 05 May 2010 commented:

But what my comment is about is you can claim anything; the problem is that people disagre over definitions. I disagree with you about women being "worse" because your "worse" isn't defined in a way I like.

Pavel Shved on 24 July 2010 commented:

Recently on The Stack Overflow was linked The Male Programmer Privilege Checklist. Very nice view on view on female in programming (yes, a meta-view of sorts).

Pavel Shved on 19 June 2013 commented:

Leaving this as a comment: the previous version of the post mentioned women who based their identity in the programming community on their gender, which I believed was unhelpful. Interestingly, they changed their nicknames and websites to something not calling for extra attention to their gender since then. I never encountered this any more, either, so this is irrelevant today, I guess.