Home  /  About   /   News & Updates

Computational thinking in math class

By: Lisa Anne Floyd

Computational thinking (CT) and the use of computer programming (often referred to as “coding”) to support math instruction has gained momentum in recent years. Many of the philosophical and pedagogical ideas behind this trend can be summed up by Seymour Papert’s claim that when a child programs the computer, they will acquire “a sense of mastery over a piece of the most modern and powerful technology” and will establish “an intense contact with some of the deepest ideas from science, from mathematics, and from the art of intellectual model building” (1980).

CT has many definitions but most researchers agree that it “involves the use of computer science concepts such as abstraction, debugging, remixing and iteration to solve problems” (Brennan & Resnick; Ioannidou, Bennett, Repenning, Koh, & Basawapatna; Wing as cited in Lye & Koh, 2013).
It is my belief that the use of computer programming as a context for the development of CT in the mathematics classroom has the potential to:

  • provide the teacher with an insight into student reasoning
  • improve student conceptual understanding of math ideas through the construction of tangible applications while engaging in higher order thinking
  • ensure the student appreciates that errors can result in greater understanding
  • support the teacher with creating differentiating learning opportunities for their students

CT and math reasoning
Most coding environments allow teachers to see the student’s code thereby providing a “behind the scenes” look into the thinking that took place to solve the problem. As Marilyn Burns (2005) suggests in Looking at How Students Reason, this visible thinking is important not only when the student’s answer is wrong, but also when it is correct!  When I ask students to explain their code, I feel I am getting insight into their thinking – they explain their approach to me and I can then make sense of their reasoning. This helps me to identify and address misconceptions and misunderstandings.

Geometry example: Next time you have students coding shapes to demonstrate their understanding of geometric properties, ask them to explain their code – you’ll most certainly hear key math terms and ideas expressed as well as be able to identify and prescribe next steps, adjusting your lesson accordingly.  After all, as Burns suggests “continual evaluation of instructional choices is at the heart of improving our teaching practice” (2005).

CT and conceptual understanding in mathematics through tangible applications 
I believe that CT is an active process. When students are coding to express their math ideas, I watch them making use of higher order thinking and problem-solving skills.  With computer programming, educators are able to shift from procedural mathematics, which De Zeeuw, Craig and You (2013) describe as being content knowledge that focuses on reciting algorithms and facts, towards conceptional mathematics – which “emphasizes students’ ability to interconnect mathematics across disciplines, critically thinking about the content, and communicate key components of mathematics” (Hiebert, J. and Lefevere; Linn as cited in De Zeeuw et al).

Cartesian plane example: Having students describe their classmates’ algorithms for modelling sprite movement on the x-y axes for example, will no doubt demonstrate a more conceptual understanding of the Cartesian plane.

CT and errors in mathematics 
In Mindstorms, Seymour Papert wrote that “typically in math class, a child’s reaction to a wrong answer is to try to forget it as fast as possible”.  How often do we see students frantically reaching for their eraser when they’ve made a mistake in math class?  With programming, the student “is encouraged to study the bug, rather than forget the error” (Papert, 1980).  Bers, Flannery, Kazakoff, and Sullivan have shown that errors when programming can help both students and teachers appreciate that failure is “expected and seen as necessary for learning” (2014).  This is a wonderful mindset for all developing and experienced mathematicians.

24-hour clock example: I’ve watched a grade 5 student’s application output “AM” repeatedly even when the time entered was 1300 in a 24-to-12 hour clock conversion program. She worked together with classmates to debug the program, noticing that a “less than” instead of a “greater than” sign was the culprit. This is something we see often in math class when students are engaged in coding – students support one another as they debug their programs, learning from their own errors, and the errors of others, in the process.

CT and differentiation in math class
Our classes are made up of unique and curious students with varying interests and levels of readiness.  We often feel overwhelmed with coming up with ways to differentiate tasks, while also being able to fairly assess their math thinking.  Having students write computer programs addresses this challenge – students can create programs that adhere to their various interests, while also providing them with a “low floor” and “high ceiling” to adhere to their varying degrees of readiness. Repenning, Webb and Ioannidou indicate that “computationally rich environments and effective CT tools for school children must have low threshold and high ceiling, scaffold, enable transfer, support equity, and be systematic and sustainable” (as cited in Grover & Pea 2013). I can’t think of a better learning environment than computer programming to support all of these recommendations!

Cash register example: Having students program a cash register for a store of their choice allows them to “sell” products or services that meet their interests. Students also incorporate calculations of varying degrees of difficulty.

Coding as a tool to foster deeper understanding of mathematics
Computer programming can be used as a context to not only develop CT in our students, but to also foster students’ deeper understanding of mathematics, providing them with “objects-to-think-with” (Papert, 1980).  Educators are often faced with decisions about what tools to use in their classrooms.  Papert cautioned us- using new gadgets to teach the same old stuff becomes “biased towards its dumbest parts”, namely “rote learning” (1972, as cited in Martinez & Stager, 2013).  Namukasa, Gadanidis, Sarina, Scucuglia, and Aryee recommend applications that go beyond apps that are prescriptive and surface level, and instead that are more aligned to curricula, fostering conceptual understanding with an interactive environment to enhance understanding of math ideas (2016).  Having students construct their own math applications through coding is a viable solution.

Lisa Floyd, Director of Research and Inquiry at Fair Chance Learning, is passionate about introducing students and teachers to the world of coding. She has her Masters in Mathematics Education and is a Computational Thinking in Math and Science Education instructor at Western University’s Faculty of Education, for which she has received awards for excellence in teaching in an undergraduate program.  Lisa has many years of experience teaching secondary Computer Science, Math and Science in the Thames Valley District School Board. She co-hosts TVO’s Teach Ontario Coding and Computational Thinking in the Classroom hub, along with her husband, Steven. As a leader in STEM education, Lisa is currently working with school districts, sharing her passion for creative coding and digital making tools with students and teachers across Canada. Connect with Lisa on Twitter or through email at lisa@fairchancelearning.com.