Studies have shown that self-doubt can potentially be a major hurdle to women's success. There's evidence we might not ask for a promotion, apply for a job we're absolutely qualified for or execute on a big idea because we're not as confident in our abilities as men.

Reshma Saujani isn't buying it.

She's the founder of Girls Who Code, a non-profit that will help 40,000 girls across the United States learn to code this year. She works with brilliant, confident girls every day. Their self-doubt is not holding them back. Instead, Saujani thinks a more concrete problem is that girls are socialized to be 100% perfect, 100% of the time.

Last month, Saujani took the TED stage in Vancouver, Canada to offer her insight on how to truly champion innovative thinking. Her message was clear and to-the-point: Stop encouraging girls to strive for perfection. Because perfection and innovation simply don't mix.

"Most girls are taught to avoid risk and failure. We're taught to smile pretty, play it safe, get all A's. Boys, on the other hand, are taught to play rough, swing high, crawl to the top of the monkey bars and then just jump off head first."

In other words, Saujani says, even though we raise boys to be brave, we raise girls to be perfect. As girls grow up and become adults, they gravitate towards subjects and eventually careers they already know they will be great in -- that they will be perfect in. This is a true detriment to women's success and innovation.

Time and time again, we hear about innovative companies whose "secret" to success is getting comfortable with risk and failure. President of Pixar Ed Catmull says failure is a part of their culture.  Steve Jobs experienced several failures throughout his career, including being fired from his own company. In her talk, Saujani jokes that you can't be taken seriously in Silicon Valley unless you have two failed startups under your belt.

Learning to code is learning bravery

Saujani founded Girls Who Code in 2012. Her ultimate goal? Close the gender gap in tech but teaching girls the computing skills they need to land technical jobs as adults. As the organization has grown, Saujani has observed girls learn more than technical skills. Through coding, they learn bravery, even when they don't know the answer or clear path forward.

When girls start the program, Saujani notices many have an already-established fear of not getting their code perfectly right. Yet it's impossible to be perfect, especially when you're trying out your coding training wheels. Uncovering mistakes is how one learns.

She tells of a Girls Who Code teacher whose student says she doesn't know what code to write. The teacher looks at the girl's blank, blinking screen. At first, it looks as if the young learning hasn't even tried. Just a few undo commands of the keyboard later, the teacher discovers that the student did write code, but then deleted the whole thing. "Instead of showing the progress that she made, she'd rather show nothing at all," Saujani explains. "Perfection or bust."

Her experience is similar to that of professor Lev Brie, who teaches Java to computer science students. His male students come to him when they need help because they think there's a problem with their code. His female students think there's something wrong with them.

Coding, it's an endless process of trial and error, of trying to get the right command in the right place, with sometimes just a semicolon making the difference between success and failure. Code breaks and then it falls apart, and it often takes many, many tries until that magical moment when what you're trying to build comes to life. It requires perseverance. It requires imperfection.

Accepting that mistakes will happen -- and that it's part of the process and not a fault of your personality -- is beneficial to anyone who's learning to code.

"For the American economy, for any economy to grow, to truly innovate, we cannot leave behind half our population. We have to socialize our girls to be comfortable with imperfection, and we've got to do it now."