Non-Ob Blog

Fail Safe - How the Fear of Failure from Keeps Women from Coding

"A study by Stanford sociology professor Shelley Correll found that when women believe they are being tested for an ability for which males are more naturally gifted... [or] are put in situations where they are aware of negative stereotypes about their gender, they become more anxious about failing and proving those stereotypes right." (Why Women are Afraid of Failure)

It's often discussed how women are lacking in STEM fields, especially in Programming and Computer Science.

Like, really often discussed.

Like, if a woman has at all considered starting programming, the first thing they probably heard was along the lines of "Oh, it's hard in that field as a woman. It can be rather sexist. Good for you though."

Not "Oh, do you have a project in mind?"

Not "Oh, what language are you learning?"

Not "Oh, are you making websites, apps, scripted server deployments, mad-crazy Excel macros?"

Nah. It's 'Well, that's going to suck."
How encouraging. Really selling it.

"Perhaps that looming fear of failure is a factor explaining the growing body of scientific evidence that women are less likely to engage in competitive or difficult tasks than men when given the option to opt-out. Rather than eagerly searching for opportunities to challenge themselves, women tend to be anchored in their comfort zones, in large part, researchers say, because they don't believe they can succeed." (Why Women are Afraid of Failure)

The most important thing about learning to program, in my opinion, is not being afraid to break things. Just utterly destroy them. Learn by failing.

What happens if I do X? It crashes. Cool.

What happens if I do Y? It crashes. Cool?

What happens if I do Z? It crashes...

Over and over again.

And then it works!

And then the next thing doesn't.

Over and over again.

Failing again. Succeeding rarely.

It's insanely frustrating, especially when you're first starting to program.

"In the early 2000s, a new gender difference in how kids experience failure was identified. 'Stereotype threat' — the burden girls face when dealing with the stereotype that they are 'bad' at math and science — has been linked to their underperformance in science, technology, engineering and mathematics (STEM)…. [W]hen girls buy into the stereotype that they're bad at math, they don't see a missed problem or poor grade as a correctible issue. Instead, it confirms what everyone else knows — that they simply have less ability. " (Why Failure Hits Girls So Hard)

You've already been told countless times that you're at a disadvantage as a woman for programming. But you want to try, so you decide to major in Computer Science. It seems cool. And people seem proud of you for trying. There's even, like, special clubs and scholarships. Quite a lot of support actually. Being a girl programmer isn't bad.

Sadly, you appear to utterly suck at it.

And you're NOT getting better. Because the tasks keep getting harder, and it just keeps crashing and you've been at this for four hours and you are out of ideas and everyone around you in the computer lab is getting it done so much faster than you and you're not even halfway done and you just want to quit.

So you do. Cause screw it, this is only going to get worse and you're no good anyway.

"Often, students will avoid failure in academics or other educational settings to prevent shame from failure (Elliot & Thrash, 2002). Students that experience elevated fear of failure may attempt to establish objectives or aspirations that are geared towards avoiding tasks that may demonstrate their incompetence and will utilize those goals that avoid mastery or performance." (Gender Differences in Fear of Failure amongst Engineering Students)

I started an undergraduate degree majoring in Computer Science in 2007. For the Introduction to Programming course, our professor was pretty laid back. It wasn't easy, but it felt doable. There were about 8 other women when we started, and about 4 when the course finished.

For the class starting in 2009, the professor for the Introduction to Programming course was notorious for being the toughest professor in the department. We retained no women than semester.

That is not a coincidence. Programming is a skill that is built on failing and can be frustrating even at the best of times. If you're afraid of failure, as most women can be, that's a huge hurdle to jump over.

And once they've learned to code, the grand reward is to enter a field where women have been consistently, loudly told they'll be looked down upon or outright abused because they're not 'one of the boys.'

Unless you're extremely passionate or confident about coding, why would you power through that?

The key to getting women learning to code is some encouragement. And I don't mean in a 'Let's bond together, fellow girl coders. We got this' support system that are commonly set up. Those are important, but typically exist for when you already have a foot in the door.

Women aren't going to enter a field solely because it needs more women, especially when it keeps getting emphasized that it is not women-friendly. Women are not going to keep practicing a frustrating, fail-centric task like programming when failing goes against all of their core instincts.

Women are going to enter a field when it's approachable and they feel confident in their abilities. Feeling confident and secure starts with how we talk about and teach programming.

Stop saying it's so hard to be a woman programmer, especially as a first response when a woman seems interested in learning.

For one, it's AWESOME to program and not want to do it as a job. Programming is used in many fields and to do many things, and you don't need to move to Silicon Valley for it be useful. Anyone who read my earlier comment about mad-crazy Excel macros and scoffed has a very narrow viewpoint on how integrated programming is to everything.

But if a woman does decide to make it a career, help establish some confidence in the field. It's not all bad. There are problems, and some major companies have clearly demonstrated you should not ever work there. But most of what women end up hearing is only the negative stuff, and that's scary and intimidating.

Try highlighting the positives: there are good companies, and there are more women then you're lead to believe. Not a lot, but more. If you do get into a bad company, your skills will be desired enough elsewhere where you can leave, and you absolutely should. You're better than that.

Learning to code also needs to be way more approachable and confidence-inspiring. And by that, I don't mean easier. We need to teach new programmers that they can fail safely and fight their fear of failure.

So many new programmers, gender-regardless, hit their first several error messages and just freeze. The error messages make no sense, and they don't have any idea what to do. They just tried to write what was in the example, and apparently didn't even do that right. What now?

That fear is not a 'girl problem;' it just has greater effect on women because they've been raised to believe that failure is nothing short of unacceptable.

I'm placing my bets that a majority of woman (and most others) who started to learn to code weren't prepared for programming to be a constant stream of failures. Failure is scary to the point it causes a flight or fight response. And when confronted with failure or potential failure, women tend to flee.

Anyone learning to code needs to learn that failing is expected and is perfectly fine. An error message is not a personal reflection on your skill or intelligence; it's just how programming works.

Start teaching programming by setting the expectation of failure and by establishing confidence that any failures can be fixed.

The first program should not be writing Hello World from scratch. I'd argue that sets everyone up to believe that programing is typing the words and then the thing happens for some mystical reason.

The first program should be 'Why is Hello World broken and can we un-break it?' Train for troubleshooting.

"It's going to give you an error message. This is OK. We're going to figure out why."

"Let's see what happens when we change this."

"What else can we try? Have you tried using Google?"

"Hey, the error changed. That's something."

Students need to be taught, with conviction, that any code they're writing is going to fail but they CAN make it work. Without that trained, supported, confidence, the fear of failure will take over, and we'll still have women who tried learning to code running away thinking they're no good.

Shattering confidence in your abilities and constantly being told the world is working against you is not how to get women to learn to code. But if we start teaching how to fail, and that it's OK, and how to recover from a failure, that baseline confidence can be built slowly, and failure becomes less scary. Building confidence and a sense of security is key to encouraging women to learn and stay programming, but is not something that happens automatically. It needs to be deliberately integrated in any programming education.