Here's Why I'm Going To Teach My Math Students To Code

Why teach coding?

Simply put, coding can change and impact people's lives.

Getting Better TogetherThe effect technology -- as a result of computer code -- has on this world is incredible. What used to be thought of as impossible is now made possible. What's more amazing is that our technological accomplishments always open up new realms of possibilities. Cellphones, for instance, didn't stop at phone calls -- they led to streaming music and eBooks and brain teasing games and the ability to map the night sky.

This suggests that learning technology and its underlying language -- coding -- is extremely powerful.

Coding In the Math Classroom

Coding isn't easy -- learning it or teaching it. But I think we can all agree that this skill will become more and more important over time. President Obama said it himself, that American students should learn computer science if we want to stay on the "cutting edge" and remain competitive. Recently, I asked my students, "Do you think people will use computers more in the future, or less?" "More!" they all replied.

If all of this is true, then what am I doing as a math teacher to prepare these kids for what lies ahead?

I began the year reflecting on the importance of learning the 21st century skill of coding. In particular, I wondered how I could integrate coding into my classroom. This was a challenge. A couple of questions immediately came to mind:

  • How can I teach coding without forfeiting math content?
  • Rather than teaching code as a stand alone subject, how can coding be useful in supporting students' understanding of math concepts?

Coding as a Bridge to Mathematics

I tinkered around with a few types of coding software that allowed me to build a game, so I could see what the possibilities were. I built a simple game, and I do mean simple, but the development process took hours. My self-learning project began with one objective: make a cat on the screen dodge falling watermelons. That's it. It sounded simple enough in my head, but it wasn't long until I realized that even coding a simple game required a lot of thinking. How will I make the cat move? How will the watermelons fall? How will the computer know that I won? In general, how can I tell the computer to do what I want?

I realized that coding requires many of the same skills that we use in math, such as critical thinking and problem solving. Developing my simple cat game required me to "make sense of problems and persevere on a task," which sounds a lot like one of our eight Common Core Mathematical Practices. This led me to think about the rationale behind the eight practices. Teaching the mathematical practices are just as important as teaching the math content. We want students to learn math and solve problems, but we also want students to learn how to approach problems. We want students to make sense of problems, critique the reasoning of others, analyze errors and solutions, contextualize and decontextualize problems -- the list goes on.

Coding can help students make sense of these eight mathematical practices. Of course, coding is just one suggestion, and I'm not saying that it's the best way to make the mathematical practices concrete for students. However, there is certainly an opportunity for math educators to integrate coding into their instruction. Besides reflecting the eight mathematical practices, coding may also help students improve their attitude towards problem solving. Just like completing any challenging math problem or finishing a difficult puzzle, the final product of my simple cat game left a satisfying impression. I felt proud of my accomplishments and hungered for a much more challenging project. In fact, this is what "learning" should feel like. I hope that in my math classes, students feel proud of their accomplishments and seek out new challenges.

My "Getting Better Together" Project

Are there other ways to integrate coding into the math classroom? I absolutely love utilizing technology in my instruction, and I'm constantly looking for ways to do more. I'm currently using resources from and ScratchED to get students to understand the behavior and language of coding.

Here's a little bit of context about who will be involved in this coding work: Students in my algebra support class -- students who need extra support in that subject area -- will be participating in coding once a week. These students take two math classes a day, and they were originally put in these classes to enrich and support their algebra work. I will be observing to see if teaching my students how to code will result in student growth. This will require some data collection to show evidence of effective instruction.

There are three projects that I want my students to finish by the end of the year. First, my students will create artwork using the platform. Second, I want students to draw connections to math concepts learned in their Algebra classes with their projects in coding. Lastly (if time allows), I want kids to create their own game using the ScratchED platform, present their final product, and share it with their peers. Through these projects, I want students to achieve these learning goals:

  • Reflect on the power of coding and how it can affect people's lives
  • Explain why learning how to code is important and relevant
  • Use constructive feedback to modify and analyze errors in coding
  • Share and critique games and code to enhance the user's experience
  • Persevere on a difficult task, especially if a problem seems unsolvable
  • Take ownership of their project and learning
  • Make connections and apply their coding skills to other classes

I'm looking forward to getting this project off the ground and I'm seeking guidance and feedback from the Tch community. I'm reaching out to other educators who have taught coding in their classrooms. I'm also wondering if there are any math teachers who have experience integrating coding into their classrooms to support students' understanding of mathematics. I feel that this is an ambitious project for me, a novice at teaching coding, and a project with an unforeseeable ending.

I anticipate many challenges ahead, but the whole point of Getting Better Together is to create a project that is impossible to do alone. Why should we settle for something small, when we could be dreaming big?

Josh Kwon teaches math at Mariner High School in Everett, WA. He is affiliated with the Martinez Foundation, which provides support programs to teachers of color in underserved public schools. He's devoting his time to finding innovative ways to teach math that will reach and engage diverse students. Connect with Josh on Twitter: @Jkwon0608.


I love this idea. I stumbled upon this post because I am contemplating the same thing. I'm a new teacher coming from a tech background. I teach Algebra 1 to highschool freshman and my students are ready to start growing up. Part of that is that they desperately want to see the value in the knowledge they are working towards.

For a long while we are working with linear relationships, and the students get that. I work 40 hours a week and have 300 in expenses. What hourly rate should I shoot for if I want to net 2000 each month? But I know that once quadratics come up, students will have trouble seeing the "why". And for that I cannot blame them.

I know why students should study computer science. It can get you an excellent job. For many of them, that is all that they are able to currently appreciate. Later, they will be thankful for the problem solving, logic, reasoning, comprehension, and plethora of other invaluable skills it helps develop. But sometimes I am not true to myself when I think about why algebra 1 is important. My issue is that its purpose is admittedly for its side effects: if you get good at math, then you get good at problem solving, logic, reasoning, comprehension, and all those same skills that CS develops. However, you cannot get paid to work math problems by hand.

It's remarkable how similar of a situation I am in as you. I also teach the extra support class, and have my students for 2 class periods. That extra time allows us to slow down a bit and make sure everyone very solidly understands the content. I love it. It has definitely got me thinking though - could I do my students even one better, and by integrating some content-aligned CS work, not only further strengthen their algebra understanding, but give them exposure to an employee-starved profession? I hope so!

Recommended (1)
Hey there Josh, I'm really interested in what you are doing...I was wondering what kind of results you had discovered and what your data looks you have any data that is supportive that learning coding did actually help your students? I am a previous programmer now teaching at a local university, writing a grant trying to get coding into middle and high schools and was wondering if you had any data that you could share...thank you - Karen
Recommended (0)
I really like what your trying to do here, is great, but for trying to connect mathematics and programing I highly recommend using bootstrap ( which is something designed specifically to make that bridge, I have worked with dozens of tools to teach CS and bootstrap is by far the best one for teaching math and coding. they also have fantastic teacher support.
Recommended (0)
paraphrase provides high-class paraphrase service at a low price – no software is used. We proudly say that we are the introducers of this unique concept of providing only paraphrasing services to our valuable customers.
Recommended (0)
@ Yvette I never heard of trinket and online python tutor. I'll take a look into these. Thank you very much! @ Kevin Olson. It's just fascinating how much of the practice standards "comes to life" in coding. In regards to the coordinate grid, it wasn't until I built my first game that I found that understanding the coordinate grid is essential in creating placements and actions. I'm seeing more relevance to math as I play around with it more.
Recommended (0)

Tchers' Voice

Tchers’ Voice is filled with great ideas from passionate educators just like you. Let's get better together!