Study: Female Coders Better Than Men, But Perceived As Worse
Credit: Jacob Lund / Shutterstock.com

Female coders tend to produce better computer code than men, but are penalized if their gender is common knowledge, new research suggests.

Female coders who submitted proposed changes to publicly available and freely modifiable software through a platform called GitHub had their work accepted more often than men did, according to a new study.

But all that changed if other users knew the person behind the code changes was a woman.

"Our results show that women's contributions tend to be accepted more often than men's. However, when a woman's gender is identifiable, they are rejected more often," the researchers wrote in a study that was published Feb. 9 in the preprint journal PeerJ. "Our results suggest that although women on GitHub may be more competent overall, bias against them exists nonetheless." [12 Amazing Women Who Totally Rocked At Science]

Women and computer science

Past studies have found differences between men and women's behavior in collaborative online projects. For instance, a 2013 survey found that just over 10 percent of open-source code contributors were women. (Open-source refers to software that is freely available and that anyone can modify or distribute.) Another study, presented in 2011 at the Proceedings of the 7th International Symposium on Wikis and Open Collaboration, found that Wikipedia's editors skew overwhelmingly male.

These differences also show up when it comes to career advancement and cold hard cash. For instance, a 2005 study in the Economics of Education Review journal found that women in math and science careers are paid only 88 percent of what their male counterparts earn.

Open-source community

But in those studies, the researchers couldn't evaluate whether women's lower levels of participation or success were due to gender bias or other differences between men and women. To get closer to answering that question, Josh Terrell, a computer scientist at California Polytechnic State University, and his colleagues looked at one of the largest repositories of open-source code, a service called GitHub. Terrell and colleagues trawled through the profiles of more than 4 million GitHub users, then used a program to link the users' Google Plus social media profiles with their GitHub accounts. About a third of those users specified a gender on Google Plus.

The team then analyzed how often the coders had their pull requests, or proposed changes to software code or documentation, approved or rejected. Overall, women made up a relatively small fraction of the coders using GitHub: Women had made about 140,000 pull requests, compared with men's nearly 3 million pull requests.

But the women's requests seemed to fare a little better: About 79 percent of their pull requests were approved, compared with about 75 percent of men's pull requests. The team evaluated the reasons for this discrepancy. For instance, GitHub is a community made up of fairly prolific editors who may all know each other, as well as more occasional or peripheral participants, who may tweak the odd line of code here or there, but are not central to the community. Insiders typically tend to get their code accepted more frequently. So perhaps women have their code accepted because outsider women who see their code rejected end up quitting, and the remaining few women are likely to be insiders? However, the team found no evidence for this type of trend.

What's more, women weren't just getting their changes approved because they were playing it safe. They were making larger changes that affected more lines of code — a riskier proposition that is likelier to lead to bugs, or errors in the software programs.

Also, the women dominated the men in every single coding language, from Java to C++, refuting the notion that women are overrepresented in less "hardcore" coding languages. In short, women's code seemed to be more competent — at least as judged by the community of their peers, the study found.

Gender reveal

However, the numbers flipped when it came to women whose profiles identified them as female. While "insider" women did not seem to be penalized for their gender, women outsiders saw their acceptance rate dip from 72 to 62 percent when their gender was identifiable from their user profile. Men with identifying details in their profiles also saw a drop in their approval rate, but the trend wasn't nearly as strong.

The findings hint that sexism may play some role in women's success rate, at least on GitHub, the researchers found.

"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," the researchers write in the paper. "The frequent refrain that open source is a pure meritocracy must be reexamined."

Follow Tia Ghose on Twitter and Google+. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.