In a classroom at the University of Ontario Institute of Technology, future teachers learn about patterns, angles, measurements and estimating – all by programming an animated cat to move along a computer screen.

It was a lesson in coding, and at a time of growing concerns about how math is taught to elementary-school children, educators at this campus in Oshawa, Ont., believe that it will help their teacher candidates become more fluent – and more comfortable – with mathematical concepts.

“Because of culture, because of education, a lot of teachers don’t come in with as much comfort with math as we would like. So how can we disrupt that? How can we get them thinking about problem-solving, all of that rich math we want them to learn, which is all built on foundations?” asked Diane Tepylo, an academic associate at the university, who teaches the coding course.

“Coding is problem-solving that is engaging, and that is meaningful to students and builds connections with basic mathematical ideas.”

The university’s faculty of education is believed to be unusual because it mandates that student teachers learn about coding or the language of computer programming in a standalone course – a way, educators say, to help students understand problems, but to also foster creative thinking and collaboration.

It comes at a time when there are growing calls to both increase digital literacy in classrooms and change how math is being taught because of declining test scores in many parts of the country. Only a few provinces, including British Columbia and Nova Scotia, have incorporated coding into their elementary curriculum. In Ontario, Education Minister Lisa Thompson recently said that coding will be introduced in high-school business-studies courses, but could also be woven throughout the curriculum.

Prof. Tepylo said that when it comes to learning math, the evidence suggests that if it’s done well, coding can improve problem-solving and mathematical thinking for both teacher candidates and elementary-school students.

At her university, teacher candidates take courses on how to teach math, but they also learn the fundamentals, she said. The coding course comes afterward, and Prof. Tepylo said student teachers are generally nervous at first but grow more comfortable.

Coding, she explained, is the process of designing and building a set of instructions to solve a problem with a computer that involves analyzing, generating instructions and testing accuracy. Teacher candidates use programming languages such as Scratch to write commands to make the animated cat cross the screen.

“Everything we’re doing in coding is math. If we’re using it for storytelling, if we’re using coding for art, there’s a lot of math in the background. So it’s a way that we can get even more math time,” Prof. Tepylo said.

Anna Stokke, a professor in the department of math and statistics at the University of Winnipeg, said she sees some merit to teacher candidates learning about coding, but it should not take away from instruction around math fundamentals.

“As long as teachers who are required to teach math are also required to take math at university and this course isn’t taking the place of a math course, I don’t really see a problem,” she said. “Programming can help to reinforce logic skills, which is helpful.”

But, she added, “if we want people to learn certain math topics, we should be teaching them those math topics and not claiming that they’re picking them up through another course.”

At the University of Western Ontario in London, Ont., coding is embedded in one of the math classes for teacher candidates. George Gadanidis, a professor in the faculty of education who has a background in mathematics, said the student teachers are using coding as a tool to model and represent mathematical ideas.

Prof. Gadanidis said it gives student teachers a “more robust understanding of the concepts because they can see them in action.”

Nikki Carter, who graduated from the University of Ontario Institute of Technology in December, remembered how nervous she was when she first entered the classroom to learn about coding. She said math was never her strong subject throughout high school. But taking the class, as well as math in the teacher-education program, changed her perspective, she said.

She even helps run the coding club at the Oshawa elementary school where she’s teaching.

“You have no choice but to start appreciating math,” Ms. Carter said. “It helps you to get more comfortable with [the subject]. That’s what it really did for me, to become more comfortable with math. It kind of erased the fear that I had.”

The Globe and Mail, April 1, 2019