Tuesday, May 26, 2015

Teaching Kids to Fail through Code

Throughout my career, I've worked with students from low-income communities. My students have wildly different experiences of success and failure than their peers from better neighborhoods in better schools.


Failure in privileged communities means a poor test score, a rejection from a college, or in the tech world -- having your startup fail.  At the end of the day, these failures are usually not an existential threat. People in privileged communities tend to have safety nets when they fail. Until recently, Facebook’s famous motto was "Move Fast and Break Things.”  People from privileged communities have the luxury of moving fast and breaking things because they have a safety net. They rely on family, friends and other networks when times get tough.


The students I’ve worked with can’t move fast and break things in their lives.They don’t have the same safety nets.  A wrong look, one error in judgement, even just wearing a hoodie in the wrong situation -  the tiniest slip up can have life-altering, or even life-threatening effects.  


Or as one ScriptEd student explained:


“I was born into a setting where one problem could stall people from moving forward for an unreasonable amount of time.….This environment led me to believe that it was as bad as sin to not get it right the first time or that after you tried once and didn’t succeed there was no solution to the problem.”


It’s hard to take risks when no one is there to catch you when you fall.  The results of growing up in these circumstances are highly detrimental to learning. For example when I was a teacher, instead of crossing out a typo in a hand written paper, my students would crumple up their papers when I pointed out a small mistake and would refuse to try again.


The same things happened when I proctored exams. I saw student put their heads down and stop completing tests when they ran into difficulty.  After all, you can’t fail if you don’t try.  Students who are unwilling to make mistakes or give up at the first sign of difficulty can’t make a lot of progress when learning.


The effects of this are compounded by standardized tests. Students are taught that they must do things right the first time. Trying and failing and trying again is not really allowed or accepted in the world of standardized tests. With tests being so high-stakes around the country, fear of failure is reinforced.


It turns out that this mindset is especially challenging when trying to teach students to code.  Learning to code involves failing over, and over, and over again.  Below, I’ll explain some strategies that we use at ScriptEd to teach students that it’s OK to fail.


Modeling
We encourage our volunteer teachers to model their thought processes -- especially when they’re failing. If a teacher makes a mistake in his or her code while explaining something to a class, this is a perfect learning opportunity. We ask our volunteer teachers to point out their mistake and explain why they made it and how they’ll solve for it.


Be Human
To take this one step further, Our students want to see themselves in our volunteer teachers.  We tell our volunteers to not portray themselves as superhumans.  We ask them to share both their successes and their failures. This helps kids relate and say “I could be that person someday.”

Video Games
Using the video game analogy is powerful when teaching kids to code.  We explain that playing video games and coding are similar.  In video games you die over and over again until you reach the end -- the same is true of coding. You have to try over and over again until you get it right.

Debugging
Debugging is another great way to teach kids about failure.  Asking kids to help fix broken code teaches them that other people make mistakes in their code, and that they need help fixing it.  Having kids correct other people's mistakes gets them more used to the possibility of making mistakes on their own.


Iteration
The process of software development teaches students to iterate on their code and ideas.  It’s not a black or white or a pass or fail system in software development. It’s an evolution, and our kids are starting to learn that the process of creation is filled with failures and successes. They learn to  try things over and over until they work.


It turns out that these strategies are working. As Bill (the student quoted earlier) explains:


“I was presented with a vast array of problems. At first I feared these problems because their solutions used both logic and math. But as time went on I gained confidence and became more comfortable with the idea of solving complex problems.”


Teaching kids to code teaches kids persistence, it teaches them grit and and it teaches them determination.  It teaches them that "success is the ability to move from one failure to another without losing enthusiasm" (Winston Churchill).

Our students can't afford to move fast and break things ... except that they can in their code. And that's what we are trying to show them at ScriptEd. That coding offers an existential alternative where our students share the same luxuries as their better-off peers.

2 comments:

  1. Not fearing failure is one of the biggest advantages a person can have. In fact, thinking of failure as the expected outcome of each one of a series of experiments that eventually result in success is one of the primary things I hope to impart to my own kid.

    ReplyDelete
  2. One of the biggest reason for startup failure is having a narrow vision and focusing on only short term goals and visions. As quoted by varun manian "Entrepreneurship is not only about making Profits". An entrepreneur should always be broad minded and vision focused. He/She should always be ready with backup plan for any failures.

    ReplyDelete