“Learning to Code is Not Just for Coders” | Ali Partovi | TEDxSausalito

Ali Partovi, co-founder of Code.org, argues computer science belongs in every public school as a liberal art, not just job training. Only one-quarter of U.S. schools offer it now. He shows how CS teaches problem-solving and creativity to all students, not just future programmers.
Chapters
3 and a half years ago, my twin brother Hadi and I launched Code.org to promote computer science in public schools. But going back a little further, 20 years ago, Steve Jobs voiced a provocative idea that's still relevant today, that computer science is a liberal art.
I think everybody in this country should learn how to program a computer, should learn a computer language, because it teaches you how to think. And so I view computer science as a liberal art. It should be something that everybody learns, you know, takes a year in their life, one of the courses they take is, you know, learning how to program.
Now, going back even further in time, my story begins when my brother Hadi and I were kids. We grew up in Iran, and when we were 7 years old, there was a revolution and then a long war with Iraq. And we spent our days and our nights literally afraid all the time. Our home was near the television broadcast station, and that was a frequent target for Iraqi bomber raids. And so we'd spend many nights underground in the basement holding our ears in case a bomb might hit our home. Yet, I would still say that we were among the luckiest kids in the world because in 1981, when we were 9 years old, we received a magic gift. Our dad gave us a computer. He didn't put any games on it. He said if we wanted games, we would need to learn how to make our own. And so our dad introduced us to computer programming. And we fell in love. I mean, we really fell in love. We became great at computer programming. When our family moved to America, we got summer jobs programming. We paid our own way through college. By the time I was 25, I had started my own company and sold it to Microsoft. Now, today, back in Iran, almost every public high school teaches computer science. Yet here in the United States, and in most of the world, most kids don't have access to this magic gift. This is something we can change, and this is something that is changing. It's an enormous challenge and an enormous opportunity to update the curriculum of the world's schools. And in the last 3 years, there's been an unbelievable, unprecedented movement led by teachers 7 countries have declared computer science part of their national curriculum. 20 states across America have changed their education policies to embrace computer science. 120 school districts have partnered with Code.org, and several hundred thousand classroom teachers are now teaching our curriculum. Millions, actually over 100 million kids, have done the Hour of Code, which we launched 3 years ago. Now, all of this rapid change doesn't come without a few critics, and the idea of coding in schools has raised some legitimate and important questions. For one, public school kids are struggling with English and math. Shouldn't public schools stay focused on the fundamentals?
Right.
Then there's screen time. Kids these days get way too much screen time. Do we really want screen time in schools too? And perhaps most importantly, why does everyone need to learn how to code? After all, we have mechanics to repair our cars, we have doctors for medicine. Can't we just leave coding to the coders? Well, these are legitimate questions, and I'm going to address them today, starting with one important vocabulary change. Instead of talking about code, learning to code, let's talk about computer science, because the word code in public schools today really is just a popular nickname for computer science. Computer science, which is a legitimate and rigorous academic topic that's about much more than simply learning how to code. Learning how to write isn't just for people who grow up to become writers. Math isn't just for mathematicians. Every public school teaches these topics because they're foundational to other pursuits. Computer science isn't just for coders. Computer science is foundational, and every public school should offer it as part of the curriculum. Now, let me break this down a bit. Let's talk about math. I love math. Math— we don't send kids to school just to learn how to divide or learn how to factor polynomials. It's not because they're going to grow up to be factoring polynomials for the rest of their lives. It's because math is about logic and problem-solving. It teaches kids how to think. Well, computer science is also about logic and problem-solving and learning how to think. And it teaches some of the same advanced concepts as math in a way that's even more fun and engaging than math is. For example, this year, a survey of American high school students asked them which class they like the most. Computer science came in at the top, second only to the arts, ahead of every other subject in school. This is a course that teaches some of the same advanced concepts as math, yet makes them more tangible, more fun, and more engaging, and makes advanced concepts easier for kids to grasp at a younger age. To show you an example of that abstraction— abstraction means, for example, things like functions and variables. These are concepts that are introduced in 8th grade algebra, yet they're introduced much, much earlier in 5th grade computer science. Wait a second, you might be wondering, what's 5th grade computer science? They didn't have computer science when I was in 5th grade. Well, Code.org has created a complete curriculum for computer science beginning in kindergarten, and we give it away for free, and it's being taught in hundreds of thousands of classrooms today. Now, to give you an example of how the idea of functions are introduced to young kids, I'll walk you through an example. Imagine you were writing a computer program to teach a computer how to sing the song Old MacDonald Had a Farm. Everybody remembers the song, you know, E-I-E-I-O. This is a very repetitive song, and it's a very long song. In fact, it's infinitely long. I mean— The song literally never ends, right? You can exhaust all the farm animals, then the zoo animals, and keep going. Kids learn how to sing it in preschool. They're not memorizing an infinite number of lyrics. They're recognizing that there's a pattern that repeats. And recognizing patterns is a foundational part of computer science, and using patterns to break down big problems into smaller ones. So if you're teaching a computer how to generate the lyrics for this song, you don't have to give it the entire song. You just have to teach it one verse, and you define that as a function. Where all the words are the same except for 2 words that are different each time: the animal name and the animal sound. And now if you want to generate a virtually infinite song, you just invoke that function over and over with a different animal name and sound. This is how kids already learn how to sing. We're just putting some structure around it and making it a tool that they can use to take on larger, more complex problems. Now let me talk a little bit about English. We don't send kids to school because they have to learn how to punctuate. English isn't simply about learning to spell or learning grammar. Once you know how to read and write, you use those skills to learn new ideas, and more importantly, to create your own ideas and to share them. English stimulates imagination, creativity, and sharing new ideas. Well, the same can be said for computer science. Computer science isn't simply about learning how to code, Learning how to code is a start, just like learning how to spell or learning grammar. Once you know the language, that's when your imagination takes over. That's when you can begin to take on complex problems and to create new things. Studying English prepares kids for college and for life. It's indispensable to higher education. The same can be said for computer science. It prepares kids for college and life almost no matter what they're going to do. In chemistry, recently, the Nobel Prize was won by a team of computer scientists. In ornithology, which is the study of birds, the leading research is being done today by computer scientists. In medicine, one of the world's top doctors, the head of the Fred Hutchinson Cancer Institute, recently said that if you want to become a doctor, studying computer science is just as relevant to you as studying human anatomy. At Stanford University, there are 65 undergraduate majors. Almost half of them recognize computer science as satisfying graduation requirements. That includes majors like archaeology, human biology, and political science. Now, most of Stanford's majors are in the humanities, which have nothing to do with computer science. But what I didn't mention yet is there are 14 new majors that Stanford has created 14 new joint majors that are all of the form computer science plus a humanity, like computer science plus history or computer science plus Slavic literature, because Stanford recognizes that computer science is relevant to people even if they plan on studying Slavic literature. At Stanford today, 90% of undergraduates take a computer science class, 90%, regardless of what they're studying. And here's what the course catalog has to say about computer science. They say, this program prepares students for careers in government, law, the corporate sector, and graduate study. That means whether you want to become a politician, a lawyer, a businessperson, or a professor, computer science is for you. Computer science is a liberal art. It's foundational. Now, even if it wasn't foundational, there's another reason why schools ought to teach computer science. Think about it. Why do schools teach biology? For a few students, high school bio might lead to a lucrative career as a doctor or a veterinarian, but for everybody, it gives them a better understanding of the world. Imagine a school that didn't teach photosynthesis or the digestive system. Would you send your kids to a school where they would graduate not knowing how their own digestive system works? Would you call that an education? Well, kids these days are surrounded by computers and dependent on computers. Heck, I'd even say that high school kids these days use their smartphone more frequently than their own digestive system. It's true. And they deserve an education that teaches them how both work. To leave kids in the dark about this major part of their world is an unacceptable gap in their education. We should expect and demand that all schools Teach computer science. Now, concerns about screen time are valid. I have kids. I worry a lot about screen time. The good news is computer science is not all screen time. I majored in computer science at Harvard. Not a single classroom had a single computer in it. Computer science can be taught with pen and paper. A computer program can be written with pen and paper. Think of it this way. A computer program is like a recipe. You can create a recipe using your imagination in your brain and write it down without ever having a kitchen to test it. Of course, it's more fun if you have a kitchen to test it and see if it works, but you can do it all in your brain. That Old MacDonald song I showed you, that's an actual classroom exercise done on pen and paper by 10-year-olds, no screens involved. Do you know the history of computer science? I didn't know this. The first computer was invented in 1943. The first computer program was written by a woman named Ada Lovelace in 1843, a full 100 years before the computer was invented. Ada Lovelace didn't have a problem with screen time. Screens didn't even exist when she was inventing computer programming. She did computer science using her brain, using her imagination. Computer science is not screen time. Computer science is brain time. Computer science is brain time. Now, the reason screen time is bad— screen time is bad when it's used passively, when it's used to watch videos or to play games. Screen time is great when it's used for creativity and problem-solving. To limit that would be like depriving a child of time with her paintbrushes, Why would you want to put a limit on a kid's creativity? Just like art, kids love computer science and computer programming because it lets them create anything they can imagine. I remember when Hadi and I were kids, we were afraid of so many things. We were afraid of the Ayatollah, of the Islamic government, of the bombs, of the unknown. And in computer science, in computer programming, we found an escape. We found that we could create our own world, a world that was predictable, a world where the rules made sense, a world where anything was possible, a world where anything that went wrong could be fixed. It's no wonder that we fell in love with it. It's no wonder that kids all over the world are falling in love with computer programming today, and teachers are falling in love with teaching it. Code.org has trained more than 40,000 teachers. These are amazing teachers, math and science teachers, who come to us and then go back to introduce computer science into their schools. And they tell us that they love seeing their kids' eyes light up. From Brooklyn to Chicago to Oakland, kids are falling in love with computer science, not just because it's a vocational skill, not just because it gives them a better understanding of the world around them, Not just because it's a foundation for the rest of their life, but also because it's an escape from the pressures of being a kid. It's an outlet for their imagination. It's giving them a reason to have hope. And it's giving them a reason to fall in love with school. For a lot of public school kids, the ones who have access to computer science, it's their favorite subject because it makes school real and relevant. Now, the unfortunate thing is today only 1 out of 4 public schools in America offers computer science. This is fundamentally unfair. This gift, this magic gift, should not be a privilege for the lucky few. Every child in America deserves access to computer science. For a few, it might lead to a lucrative career as so-called coders, but for everybody, It'll teach them how to think, how to imagine, how to create. It'll provide a better understanding of the world and an indispensable foundation for life. Thank you.
More from Ali

Microsoft Chairman and CEO Satya Nadella on Empathy and Lessons He Learned the Hard Way

Uber CEO Dara Khosrowshahi on Leaving Iran, Hitting Rock Bottom, and a Costly Mistake at Expedia








