# Why Women in Psychology Can't Program

They could if given the chance, of course! Sadly basic coding skills are being gatekept due to elitism and sexism from the teaching side with arguments along the lines of: "they just cannot cope with learning how to code".

About two months ago my brother, who works in data science on social psychology data, asked me why his colleagues, who are women and have PhDs in psychology, cannot code and why they use SPSS. He was obviously just venting because when I replied he was surprised. I told him that it was because of sexism and because of lack of proper skills-training (both for statistics and coding) in many psychology departments. That got me thinking about this more…

"[That feeling when] your plant friends die cause you spend way too much time in virtual realities" by écharpe

Why can’t they code? Because they aren’t taught how to code. Why aren’t they taught? Because of two main, related, reasons:

• Rhetoric and pressure from formal societies like the BPS as well as gatekeepers who worry about how the field might/could split as it is true that a undergrad degree (especially) is essentially zero sum. We just can’t fit it all in and coding is seen as not that relevant or worthy of being inserted into the curriculum.

• Researchers and educators have internalised ideas about what undergrads, who are predominantly women, can and cannot learn. And they list off, based on their ideas, reasons about why it’s just not possible to teach students to code.

Me and my aforementioned brother. Note how I'm unable to share the computer (hand on mouse, remember white PCs?) and he's close to tears! Don't worry he grew up to be a data scientist, so I can't have traumatised him too much.

Every time I try to impress on others how important and useful (and fun!) coding is in my field (broadly psychology, cognitive science, neuroscience) there is pushback from very specific people. The good thing is that students in my experience (all levels, from undergrad to PhD) in psychology overwhelmingly agree with me, giving me hope that my messages on this issue get through. As do others of course too! The bad thing is this specific nay-saying group — they tend to be senior, e.g., profs, male academics (more senior and male are inherently correlated of course given the demographics of the field) who have the power to change things and introduce coding to students in a useful way: in a directly applied sense, for example, to create experiments (replacing, e.g., E-Prime, which also is not open source nor free) and to analyse data (replacing, e.g., SPSS, which again is not open source nor free). Replacing closed science tools with open science tools should be in and of itself a useful act too (recall my issues with Matlab).

*makes hissing noises at SPSS*

Before I jump in and address the arguments against teaching students, who are mostly young women of course, how to code, I’d like to explain a few things. Firstly, I want to underline that many universities do indeed teach coding to psych students very successfully. UNSW (Danielle Navarro), Glasgow (Dale Barr) and Edinburgh (Martin Corley), for example, all three of which teach undergrads R. This is something the nay-sayers all think is literally impossible and will cause undergraduates’ heads to implode or something, so much so they ignored Danielle’s book and work in this monster Twitter thread, which kick-started me into finally writing up this blog post.

Secondly, saying (indirectly of course) that women can’t code is an infamous trope related to the stereotype of the male geek. In other words, systemic sexism (undergrads “can’t be expected to learn how to code”, most undergrads in this field are women) plays a huge role. The male geek trope and related ideas contribute to driving women away from coding and generally STEM subjects in the West.

I am not from the West originally and did not have to suffer the effects of this pervasive trope growing up. I did however study computer science in the UK, which really hammered home to me the effects of gendering subjects. It had never occurred to me before that “women aren’t good at maths” or “women can’t code”. It was just not a concept I had come up against. My computer science undergraduate course was about 90 men and 6 women, 3 of whom were from Cyprus like me. That is even more surprising given there are only about a million Cypriots in the world. More stats on this whole, very depressing, situation here. Even more depressingly, coding used to be done predominantly by women. Removing them — yes, actively removing them — not only harmed and harms women to this day but also back then killed the UK tech industry.

*makes hissing noises at the BPS*

Thirdly, there is a specific issue with the BPS in the UK. It makes it hard for various reasons to make changes in the curriculum as it controls accreditation. It also biases undergraduate degrees towards training students to all be clinical psychologists and therapists. But can you really choose what job you want to do for the rest of your life at 18? Anyway, that’s another huge issue, but suffice it to say psychology and all undergraduate degrees would serve their students better if they were broad as possible and gave students the most widely applicable skills, like coding!

So why do these gatekeepers, people who have the power (even if just 1% more than myself) to change undergraduate and graduate teaching, say “no to coding”? Why do they think the students in psychology just can’t cope? In my opinion, there is an aspect of sexism at play. As I mentioned above the idea that women (recall undergrads in psych are basically all young women) can’t code is deeply embedded in culture and in people’s minds. But I would like to put aside whatever inherent biases they are holding onto and address the explicit reasons stated. I will paraphrase the various arguments I have heard, over the years as well as in the monster Twitter thread, below and provide reasons why they are not appropriate.

People choose psych as an easy undergrad, adding in coding makes it hard, ergo we will lose students.

"Back in the grimdark pre-Snapchat era of humanity (i.e. early 2011), I started teaching an introductory statistics class for psychology students offered at the University of Adelaide, using the R statistical package as the primary tool. I wrote my own lecture notes for the class, which have now expanded to the point of effectively being a book." — Danielle Navarro.

This kind of claim is a little strange because the same goes for stats. In fact I would argue stats is harder but that is my bias given I did an undergrad in compsci and had no stats training till I was pulled through stats against my will by my cognitive science MSc. I feel like “against my will” is true for a lot of things I eventually ended up liking, and that seems to be the case with people in general who responded to that thread, like the undergrads at Glasgow who demanded an even more advanced stats module or at UNSW where they have many options (R or Python). Also don’t forget, especially with things like coding and stats, those who are interested tend to begin teaching themselves more as they get more comfortable.

This kind of claim is also a bit off in a more general sense. I would argue somebody wanting to be a clinical psychologist or therapist (which is what the claim is: that most people seem to choose psychology for becoming a therapist or doing clinical work) is not necessarily choosing the easy life.

Students want or need GUIs, otherwise they don’t like the course and/or they can’t learn as well.

Assuming the reader is aware of what I think about GUIs, see my infamous Matlab post if not, you know already why I don’t think this is a good idea. Students might want GUIs but that is not a reason in of itself to teach them to use a GUI. Of course, GUIs are not all bad, they have their uses. RStudio, for example, is a very appropriate GUI/IDE to teach stats.

Often students tend to hate having to rote learn SPSS menus, after which anyway nothing seems to stick. I wonder why! Anyway, at the end of the day: students can learn well without a GUI. For example, at Glasgow they fell in love with markdown. I learned how to do loads of things without a GUI as did loads of people, I’m not special. Rote learning has its uses when the thing being memorised is generalisable, very specific stats GUI menus are not, multiplication tables, for example, are.

They just CANNOT learn to code. They just can’t. Not everybody can learn to code.

"Maddy Petrovich, 14, of Wellesley, Mass. first started learning how to use the programming language Scratch when she was 10 years old", see Computer Programming For Kids 8 And Up.

Coding is hard. Yes. Teaching people anything is hard. Teachers are undervalued. Why are the slightly more to much more powerful than me so against teaching them to code? Are they worried they will be held accountable for teaching? Do they not want to teach because they might be exposed as frauds in terms of their low teaching skills? Maybe…

English is hard. Not everybody is Maya Angelou or William Shakespeare. Not everybody is going to win a Nobel in Literature. We still learn English grammar at school, write essays, learn how to spell, etc.

Maths is hard. Not everybody is Grigori Perelman or Maryam Mirzakhani. Not everybody is going to win a Fields Medal. We still learn arithmetic and elementary algebra at school and some lucky people (I had no idea the US is this bad at teaching maths) learn calculus and linear algebra too.

Saying that some people can’t learn to code is a ridiculous, pessimistic, and elitist argument that only results in gatekeeping. If other subjects can do it, we can too.

Everybody already knows the very basic concepts of coding pretty much as they are derived from maths and linguistic structures that we learn at school and even before that. If-statements are pretty standard linguistic constructs, for example. Yes, there are more complex things, of course, but so what? There are more complex uses of language and maths too, but we still teach literacy and numeracy to kids. I can’t conjugate εκπλήσσομαι (to my shame) especially in the past tenses in Modern Greek and I’m a native Greek speaker.

Also, yeah, sure, some people can’t learn anything but the most rudimentary English or maths. So what? Does that mean nobody should be taught these things because some people can’t learn them? Of course not. The sooner we start teaching kids to code, the better. I think everybody should be taught to code in primary school and thankfully so do quite a few countries.

Teaching students to code is zero sum and that means removing other parts of the course.

Yes, and no — depends on what course! In my opinion, it’s a price we should be willing to pay to give students useful transferable skills for which to get a job with. Knowing how to code is so vital to be a productive member of the workforce. We owe it to our students, both in a moral and a “they pay us” way, to equip them for the job market properly. Being able to code is a useful skill both to get a postdoc or to get any other job pretty much. It’s also possible to teach them coding as a direct means to an end, as I mentioned: to design experiments, to run statistical analyses, to do computational modelling, etc. This by the way is exactly what the nay-sayers think is impossible/implausible even though both I and Danielle have taught and designed exactly these types of classes.

Teaching students to code is really hard and nobody in my department knows how to teach them probably.

Margaret Hamilton pretty much invented the modern concept of software as well as writing the code that got humans to the moon. "For Hamilton, programming meant punching holes in stacks of punch cards, which would be processed overnight in batches on a giant Honeywell mainframe computer that simulated the Apollo lander’s work" from Wired.

Yup, it’s hard. All teaching is hard. It takes time and is going to require sacrifices. It’s a massively undervalued and underpaid profession (again no coincidence it’s undervalued and it’s feminised generally). But you know what? We do it just fine at UCL. With a lecturer teaching them to code experiments in Python and Javascript (Christos Bechlivanidis, check out his teaching section). And they do it just fine at Glasgow, at Ediburgh, at UNSW, like I mentioned, where they teach them R for stats. Teaching will never be perfect, like anything in life — and always those doing the teaching will learn stuff themselves as they teach.

We can’t expect clinical people to learn how to code.

We can and it’s really useful for them, they say so often themselves to me and on Twitter (go look at the monster thread in the places they spoke up, e.g., here). Also see my replies to all the other points especially thinking about the fact we do teach them statistics even though clinical people will not need statistics to, e.g., perform their duties as a therapist.

Also there is no reason to assume all undergrads want to be clinical all else being equal — maybe they would fall in love with coding and computational modelling if they were exposed to those parts of psych? Just like they fell in love with markdown?

Who are you to say we should or could teach them to code?

Firstly, of course, I’m nobody and you don’t have to listen to me. But, also secondly: I’ve done it. I’ve taught psychology A-level students to code. I’ve taught undergraduates in their second year to code in Python to the point where they learned to code their own neural networks from scratch (that was the explicit goal). I’ve taught PhD students to code, mostly by begging them to teach themselves. I’ve also taught MSc and PhD students to code in a class as a TA (no begging there). It’s very possible and they actually enjoy it. Funnily enough and in my opinion all the hype around coding and machine learning and artificial intelligence makes them want to learn.

We can’t teach them to code because scoping [or any other programming concept] is really hard and time-consuming to learn.

When I taught a small class of undergraduates neural networks from scratch (no library, just for-loops) we didn’t do scoping, or indeed anything more than variables, conditionals, and loops pretty much, and they [s]coped just fine. They had zero programming experience in Python and only 2 of 15 had coded before. They all got a first or a 2:1 (two highest grades in UK system), and not because I’m too nice.

From a pedagogical perspective it’s not ideal to introduce scoping or other complex stuff straight away anyway. When I was in high school and during my separate computer science A-level, I recall scoping was not introduced until much later. This is a common pedagogical principle. You teach, for example, about 3 states of matter (solid, liquid, gas). You don’t go “oh, yeah, there’s also Bose-Einstein condensate”.

You can’t teach them how to code during a stats class because some students will have a “handicap” if they have not coded before.

Olivia from the before [pre-Dr] times at ICCM in 2012, photo by fellow coder and computational modeller, Burcu Arslan.

Somebody will always have a “handicap”. That is life, sadly. Whether it is maths in your native language versus in English or just the new jargon for a sub-area of science. One always learns new English words in every course as the technical terms and expressions are often totally new. I would not have known what, e.g., abscissa means in maths if I had not done maths in English before moving the UK. On the other hand, I do have an advantage over people who just speak English because I know all the Greek letters we use in maths and I have prima facie access to the meanings of scientific words made-up based on Greek, e.g., prosopagnosia.

It’s normal for the skills of students to be varied and a good teacher can and should cope. It’s also why a good teacher should shield students from biases like the male geek trope.

To end, I just want to say that I really appreciate the massive unwieldy thread even though I feel in places people have not read what I said and then repeated it back to me. Unfortunately, in some spots I do feel the thread went a bit too sexist. The women in the thread (me and Danielle, possibly others) also seemed to have direct experience on most of the issues brought up (she even wrote a book on it!), so it was in spots pretty egregious. I guess that is why this post needs to be written, the field has issues that need to be addressed (as does society in general).

Anyway, especially to the undergrads and other students who spoke up: thanks all for the feedback both before in the monster thread and after! This idea for a post has been in my mind for a few months now, so I am glad to have been given an extra boost of inspiration to write it all out.

## Cite

@misc{guest2018programming,
author = "Olivia Guest",
title = "Why Women in Psychology Can't Program",
year = "2018",
howpublished = "Blog post",
url = "http://neuroplausible.com/programming"
}