Thursday 21 May 2015

Teach kids how to code by solving their own Maths problems

When i was participating the Hack the Curriculum event last month I realised that we risk doing to coding what we have done to Maths (see A Mathematician's Lament: How School Cheats Us Out of Our Most Fascinating and Imaginative Art Form, available as pdf or book)

We are trying to teach kids how to code in an abstract and 'technical' way, instead of letting them use programming to make the computer do 'something' (which is exactly how most of us learned how to code)

Teaching kids what is a variable, or a function, or an algorithm, is not going to make any sense to them, since those are just 'techniques' into achieving something. The reason kids love Scratch is because it makes programming/coding much more practical and real.

When I was thinking about what else could we use to teach kids how to code, I had my epiphany when I thought about the fact that Kids already solve complex programming problems everyday!!!

It's called MATHS.

The maths they do everyday in class is already advanced programming.

What we need to do is figure out how to get the kids to see and understand how they can use the computer (i.e. programming) to solve the same maths questions they have in their own textbooks (in their current or previous year's curriculum).

I look at the maths that my kids are doing (10 and 12 years old) and most of it is already as complex as most professional programming today.

I think we can tell the kids that they can 'cheat' and use the computer to help them with their maths homework :)

The logic is that if a kid is able to take an algebra problem and write a program to solve it, he/she will already be coding (without even realising)

And once we get into geometry (and other maths concepts they learn from 9 years onward) there are tons of great visualisation apis that could be used (wouldn't it be great if kids learn how to code the JavaScript InfoVis Toolkit or even D3?)

Add a couple Raspberry PIs to the mix and the concept/technique of using Unit Test as a runner for the kids scripts, and we will create a generation that not only will enjoy programming, but will have really strong foundations on software engineering (critically important for the ones that want to have a career in technology)

I actually have a strong personal experience around this topic. I remember learning Trigonometry as 'Maths topic' which meant that it really didn't made any sense to me (at the time), since I could not see any practical use of it. What happened is that the following year, I was coding assembly in the good old Amiga 500 and while trying to move a bunch of dots in the screen in a kind of 'carpet wave movement' (at the time the 'big thing' was to do really cool 10 to 20 secs Amiga animations :)  ), we (me and my local coding friends) stumbled across the concept that Sine and Cosine had 'something' to do with getting those dots to move in the desired 'wavy way'. Remembering that we had seen those symbols in our previous Math workbook, and we learned more about Trigonometry in one week than in a whole year of classroom teaching. Note that we actually had good Math teachers, BUT until I actually had to move a dot in a screen (i.e. a practical problem), I never 'got it'. The key was that I wanted to learn and at that moment I was able to really grasp complex concepts, visualise them and gain knowledge that I used through-out University and in professional coding jobs.


For reference here are the two pages I created during the Hack the Curriculum event: