Science·Q&A

Study raises questions about gender bias in the world of coding

When it comes to writing computer code, women may be more competent than men. That's according to a new study that's identified a troubling gender bias among those who write and approve software. CBC Radio technology columnist Dan Misener explains.

Suggests women may be more competent coders, but ideas are rejected more often when gender is clear

A young girl practices basic coding at the Girls Learning Code class hosted by Calgary's Chic Geek. A new study suggests women may, on average, be more competent coders, but a bias against them still exists. (CBC)

When it comes to writing computer code, women may be more competent than men, suggests a new study from California Polytechnic University and North Carolina State University.

But the same study identified a troubling gender bias among those who write and approve software. CBC Radio technology columnist Dan Misener explains what the study found.

What exactly did this study find?

It focused specifically on open-source software development, meaning development of software where the source code is publicly available.

The idea in many open-source projects is that software development is — and should be — a meritocracy. Good ideas are adopted and bad ideas are rejected, regardless of who originated them.

This study found that when women contribute to open-source software projects, their contributions are more likely to be accepted than men's — but only if their gender isn't obvious.

Disturbingly, the study found when a woman's gender is known — because they identify as female in their online profile — their software contributions are rejected more often.

A lot of the coverage around this story suggests we now have evidence that women are better coders than men, and that there is gender bias in open source communities.

While those things may be true, it's a lot more subtle than that. And it should also be noted that while this study is very interesting, it is currently awaiting peer review — so it does need to be considered with that in mind.

How did the researchers measure gender bias?

The researchers looked specifically at a website called GitHub, which is one of the largest collections of software code in the world. It's home to a large number of open-source software projects, where — in theory — anyone can contribute. Anybody can sign up for an account and propose a change to a piece of software, whether that's fixing a bug or adding a feature.

So the researchers looked at a huge number of these proposed software changes — called pull requests — on GitHub. They analyzed the contributions from about 1.5 million Github users, and looked at whether contributions from women were treated differently than contributions from men.

They expected to find a bias against women's contributions. But surprisingly, when they dug into the numbers, they found the opposite — that, as the study reports, "women tend to have their [contributions] accepted at a higher rate than men."

Do the researchers know why?

They don't for certain, but they did evaluate several possible explanations — including the idea that a woman's software contributions might be accepted more often because she appears to be a woman.

An event in Coquitlam brings together high school girls and women working in computer science and technology. Women are still under-represented in computer sciences, both in education and the workforce. (Faculty of Applied Science & Engineering, U of T/Flickr)
The researchers looked for this type of gender bias by examining women's GitHub profiles and checking if their usernames and profile pictures that were identifiably female, versus gender-neutral usernames and profile pictures. Profile pictures can be the user's face, but may also be other pictures, such as objects or symbols.

What they found was that women's contributions were accepted more often than men's when women used gender-neutral profile pictures and usernames.

This has led to the theories — mentioned in the study — that women in open source are, on average, more competent than men and that discrimination against women does exist in open source.

It's also led to headlines like "Women considered better coders — but only if they hide their gender." And there has been some criticism of the way the study has been reported in the media.

How does this relate to the number of female coders more generally?

It's true that women are under-represented in computer science. According to a 2013 survey, as few as 11 per cent of open-source developers were women. Here in Canada, women in computing are in the minority, both in education and the workforce.

The paper suggests that if the theory is true — and women working in open-source software are more competent than men — it could be explained by what's called "survivorship bias."

Women switch out of STEM (science, technology, engineering and math) education at a higher rate than men, according to a study cited in the new paper, so the women who remain may indeed be more competent, on average. That could explain why their software contributions are accepted at a higher rate.

What's next for this research?

Again, it's important to keep in mind this study is awaiting peer review, so we're waiting on that. And the study's authors are also calling for more research, saying in their paper, "...it's imperative that we use big data to better understand the interaction between genders. While our big data study does not definitely prove that differences between gendered interactions are caused by bias among individuals, the trends observed in this paper are troubling."

Setting aside whether women are more capable coders than men, there's been research that suggests diverse teams of people are more productive, and yield better results. 

So that would strongly suggest a lack of gender diversity in computer science is a problem, and what may be important about this kind of research is that it gets beyond anecdotes about gender bias, and tries to take a rigorous, data-driven approach.

And as the researchers say, though coding is held up as a meritocracy — where good ideas win and bad ideas die — it's worth re-examining how true that really is.

ABOUT THE AUTHOR

Dan Misener

CBC Radio technology columnist

Dan Misener is a technology journalist for CBC radio and CBCNews.ca. Find him on Twitter @misener.