Teaching JavaScript Through Math

JavaScript and HTMLIf you've ever seen my TEDxTokyoTeachers talk, The Guitar and the Smarthphone, on the importance of teaching programming in schools, you'd know that I think teaching programming in schools is...well...important!  In that spirit, I recently co-taught a grade 10 math lesson with one of my talented colleagues - our goal was to increase student understanding of mathematical functions through programming and to have them apply their knowledge and demonstrate understanding in a new context, in this case, web programming.

The students had been studying how to calculate mathematical functions; their challenge here was to take that knowledge and apply it by converting their mathematical formulas into working JavaScript code. This was their first experience programming anything, so I created the basic framework of the webpage, complete with working examples.  It looked like this:

Framework

The first three functions were programmed, but the last four were not.  The students were challenged to create the code that would allow the final four functions to work.

This was accomplished in class under my guidance that of their math teacher, Mr. Ito.  The students did an excellent job and managed to get them working within the class period.

Mr. Ito, being quite ambitious, challenged the students even farther.  He asked them alter not only the JavaScript, but also the HMTL code so that their page included the following:

Advanced Assignment

Notice the complexity of the program just went up considerably.  To be honest, I thought Mr. Ito was being overly ambitious and that despite my excellent JavaScript introduction (ha ha), they couldn't do this on their own.

 

I was wrong.

 

Here is what Mr. Ito had to say:

Last class, we ran each student's code on the projector and tested to see if it worked (and there was applause each time!) All but two worked but then they had other students look over their code and point out some errors.

This really says it all - students literally applauding each other's accomplishments - and peer learning at its finest.

This is a great lesson to introduce a true 21st century skill - and as far as 21st century skills go, programming beats blogging any day!

If you'd like to try this lesson yourself, you can download the PDF with the instructions and the basic framework as well. Don't hesitate to contact me if you have any questions about this lesson.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.

@TokyoEdTech

Poll

What LMS does your school use?: