Where's the Math in Coding?
Updated: 5 days ago
I was recently asked by @autismplusmath (go follow him if you don't already) through Twitter to contribute a discussion post about math education in my context. Go to https://www.cake.co/conversations/2dswhvg/where-s-the-math-in-coding to join in the discussions about this post.
When I was first asked, I wasn't really sure what I would write about. I'm not exclusively a Maths teacher and to be honest, I don't really
do a lot of explicit teaching of it in my role. I teach STEAM (Science, Technology, Engineering, Art and Maths) to students from Prep through to Year 4. Any math I teach is incidental but it does play an important role in what I do.
My curriculum is made up of a lot of robotics and engineering projects, but coding plays a huge role, so I want to share how coding encourages mathematical thinking in order for students to be successful.
I really enjoy seeing what students can create with code and my two favourite apps to use in my STEAM class are Scratch Jr (Prep to Year 2) and Hopscotch (Year 3 and 4). They are both block based, graphical coding platforms designed to help children develop the basics of computer code. When we specifically look at Math content, it's not hard to find some really wonderful, engaging links.
The first links you usually find with these apps are directional language, algorithms and repeated patterns. Students quickly develop an understanding that algorithms are important in developing actions for objects they code. They find out how to move these objects in certain directions or ways and that it must be in the right sequence to work. In order to be more efficient, they notice that they can use repeat blocks to do the same thing in less steps (pictured), which is a great visual for understanding grouping of objects. For example, they may code three different characters to each move four spaces. They will understand that each group must have code with four steps in it.
One of the benefits to Scratch Jr is that you can overlay a grid so that students can develop an understanding of co-ordinates, estimation, addition and subtraction. You can begin to introduce key concepts like 'x and y axis' as students graduate from Scratch Jr and move to Hopscotch.
With the ability to rotate objects in Scratch Jr, you are able to introduce informal language relating to angles. Once they are used to the turns, you can formalise the language and describe each turn as 90 degrees. As they move on to Hopscotch, they can start using numbers to represent the turns their objects make and that we can move an object any number up to 360 degrees.
The pictures here shows the coding screen in Hopscotch and it's easy to see the math
involved. On these two screenshots alone, students are developing an understanding of x and y axis and coordinates, percentages, time, length, width and negative numbers. When my students are exploring these blocks, they are generally using a trial and error approach which challenges them to think deeper about what they need to succeed. They aren't really aware they are being mathematicians, nor are they aware they are developing skills beyond what the curriculum says they should be learning about.
This is merely a snapshot of what my students are exposed to every week. I am always amazed at how quickly they learn and what they are able to create. If you're struggling to find ways to engage your students in maths, then I hope that this post convinces you to give it a shot.