DEV Community

Cover image for I got bored with asking my son for multiplication tables, so we programmed together a little game with Scratch.
Davide de Paolis
Davide de Paolis

Posted on

I got bored with asking my son for multiplication tables, so we programmed together a little game with Scratch.

Last Sunday my son had to prepare for a Math test in primary school. We spent the week asking him the Ein-mal-Eins ( the multiplication tables) and that morning, while I took some time off any screen and was reading a book, I noticed that my wife spent lots of time to write on a couple of sheets of paper tens of math questions.

Since my son was playing out with Scratch (he got a Scratch programming book for Xmas and he likes it a lot), I had an idea.

Why not combine the two things? Why not save our precious time and be more efficient, have him learn the multiplication tables and learn / play programming at the same time?

Let´s build a very simple Math game with Scratch together!

Math Scratch Game

Of course, it´s a very very simple game:

just the character asking random Math operations and making yeah or boo sounds when you enter the results and jumping forwards or backward until you reach the end of the screen and win or lose.

but both my kids had lots of fun implementing all the features and it was very interesting to see how they approach the typical coding workflow and share with them some of the joys and pains of our job.

Expectations vs Reality

In the beginning, they had very high expectations of what they wanted to achieve, but you have to start small and proceed with small iterations.

You can´t immediately have a flying cat with smooth animations and sparkling explosions while a clock is ticking and randomize math tables with increasing difficulties!

You have to think at the basic functionality, implement it then improve it and add more details and features:

  • Keep it simple.
  • Make it run, make it right, make it fast
  • Stop, Think, Iterate

We already built some other small projects, but I found this more challenging and fun to do with them because they could be introduced with lots of concepts:

  • timers
  • loops
  • concatenating string
  • randomize the values to be used in the multiplication questions
  • organizing the code to avoid duplication
  • broadcasting messages

While programming it was amazing to see their determination, their creativity - after the basic implementation (just asking a question ´check the result and respond with a sound/jump) they immediately wanted to add a ticking sound and a countdown, an Entry and Game Over screen, etc, how they were disappointed when they found bugs and did not want to leave the computer to have dinner until they smashed that bug.
( Actually they did not want to stop at all, wanting more and more details. At some point, I had to tell them laughing that that was just a prototype, an MVP - Minimum Viable Product and that if they want, they can start writing down ideas, and implement them one by one in the future.)

And the look on the face of my little one realizing that the computer can do the Math! was priceless.

wow

In the end, we had lots of fun and they learn a lot, both for programming and math, and the next day my kid showed it to his teacher that was very impressed... and invited me to hold a workshop for the entire class.

I will be 25 kids, in german... quite scary. but I am definitely thinking about it.


Photo by Chris Liverani on Unsplash

Latest comments (50)

Collapse
 
nikola profile image
Nikola Brežnjak

Great idea!

It would be super if you also included a link to your project.

Anyways, I assume most of the people here are programers and would know how to do this. For those that just want to 'press enter' and play, here's a super simple project I threw together: scratch.mit.edu/projects/659109873

Collapse
 
catalinradoi profile image
CatalinRadoi • Edited

That is really cool.

I am a volunteer with CoderDojo, teaching small kids Scratch, but I also teach Scratch at my kids schoool (also volunteer).

If you want I have several projects that would work well for kids 6-10 yrs old, but they are in romanian, though... (the pdfs)
e.g. drive.google.com/open?id=12Q7JdU5s...

here's one of my kids stuff, maybe you'll find something interesting scratch.mit.edu/users/mihnea_ro/pr...

Collapse
 
dvddpl profile image
Davide de Paolis

that's very kind of you! thank you. I guess that I will manage to get some ideas from the pdfs despite the language barrier, and in case, I will ask a Romanian colleague for some help.
I will definitely have a look inside the scratch projects with my kid!
thanx

Collapse
 
sinewalker profile image
Mike Lockhart

Definately go for it!

You are an experienced programmer and a dad, which means that kids don't freak you out like other grown ups.

I had a blast in my son's class for a few months. We worked on the CodeClub material, but you already worked out the most important parts: keep it simple, provide a motivation, keep it fun. I found the girls to be a bit more timid to begin, but they were the most creative and quick of the class, so get them paired together and they'll amaze you.

Collapse
 
dvddpl profile image
Davide de Paolis

thanx for the tips and motivation. how long do you suggest a similar "workshop" should be? they are 3rd grade (8 yo) - the teachers told me that they could block the computer room for as long as I need - 1 hour or the entire morning... and they are 27 kids.
I was thinking about splitting the class in two groups for 2 hours each., but i am not so sure how much we could achieve in 2 hours..

Collapse
 
sinewalker profile image
Mike Lockhart • Edited

The code club lessons are about an hour, which was all I had with a full class of 25+, and that felt about right for 10-year-olds. After that, you get some kids being bored and disruptive. You will be overwhelmed with that many on your own though! I had competent help from a teacher who knows how to control a class! So if your are going solo, I would say no more than about 8 to 10, in pairs sharing a computer.

So, if you can spare a whole morning, break them into groups, and do the same project with each group. You'll learn where the sticking points are. Also try a project out at home first, use your own kids as Guinea pigs, so that you can see what is difficult and be ready to fix technical issues so you can let the kids troubleshoot programming bugs, not issues with school wifi or saving to network shares.

Thread Thread
 
dvddpl profile image
Davide de Paolis

i will go solo. but my kid is already very excited about being my helper ( and therefore, somehow teaching his friends how to use scratch) :-)

thanx for all the advice!

Collapse
 
nverinaud profile image
Nicolas Verinaud

Awesome story ! How old are your kids ? :-)

Collapse
 
dvddpl profile image
Davide de Paolis

8 and 11 years old.

Collapse
 
perty profile image
Per Lundholm

Thanks for the inspiration. Very timely for me as I started the other day with my grandchild, 8 years old. Found a book in Swedish and Scratch is also available in Swedish.

Collapse
 
dvddpl profile image
Davide de Paolis

nice! have fun with scratch and granchild :-)

Collapse
 
avishekp86 profile image
Avishek Patra

Wow awesome

Collapse
 
aarone4 profile image
Aaron Reese

Don't overlook other development environments for kids. Roblox design studio, minecraft, blender (awesome open source 3d rendering package) , python, even OBS and video editing tools to make them into creators rather than consumers. Lego technics and Nintendo cardboard.

Collapse
 
dvddpl profile image
Davide de Paolis

absolutely.
I have a draft sitting there for months about that.
my bigger one already plays a lot with IMovie to make videos of schooltrips or helps me with those of our vacations.
They both love lego technic and last year we built together Lego Mindstorm Eve3. Still need to start programming with it.

being creators instead of consumers is one of the key points my wife and I stress so much.

even in the rare occasions when they watch some "famous" youtuber we always point out the details (tech setup, video editing, sounds etc, it is never just passive staring ... we could be very boring parents :-) )

Collapse
 
drodol profile image
David R

Just last night I was speaking to my 9 year-old about coding and what one can do with it. I think I managed to spark some interest in him. I will for sure be trying this out with him!

Collapse
 
janikjczcz profile image
Jaroslav Janik

I've made app for my girlfriend's daughter in the past. It's not scratch, but gDevelop. Browser, Windows and Android is supported: matematika.jaroslavjanik.cz/englis...

Collapse
 
dvddpl profile image
Davide de Paolis

Nice!!

Collapse
 
xowap profile image
Rémy 🤖

This is so cool. When I was about 10 that's also what I coded with my dad, in VisualBasic at the time.

20 years later here I am, looks like it was a good thing to start with :)

Collapse
 
xowap profile image
Rémy 🤖

Fun fact though. It taught me programming but not multiplication tables. Those I still don't know.

Collapse
 
dvddpl profile image
Davide de Paolis

:-) why learn them if we can build software to do the heavy weight...

Thread Thread
 
andreasjakof profile image
Andreas Jakof

My math teacher always said „You don’t carry a calculator with you all the time.“

Well, it was the mid-80s and 90s before mobile phones were common and way pre iPhone.

Thread Thread
 
dvddpl profile image
Davide de Paolis

I guess math teachers still keep on saying that. :-)

Thread Thread
 
sinewalker profile image
Mike Lockhart

True, but my year nine math teacher said "one day, you probably will have a computer in your pocket which can answer any question. You still need to understand the answer so you can spot if you hit the multiply key when you should have pressed plus. You at least have to have some idea of the answer, not blindly accept a wrong one just because that's what the machine calculated". Best advice that year.

Thread Thread
 
dvddpl profile image
Davide de Paolis

that´s the same for us googling answers in the internets. you can´t copy paste code blindly, you must understand what you read and understand if that could be the right solution or make things worse..

Collapse
 
jrdevforlife profile image
Daniel Mohr

I really like this Story. Glad you are teaching your kids valuable things and not just letting them watch YouTube to have them be quiet. Thank you.

Collapse
 
dvddpl profile image
Davide de Paolis

Thanx for the appreciation

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

Only 3 years to go... I can't wait to get started.

Collapse
 
dvddpl profile image
Davide de Paolis

be prepared. I guess I have to buy another computer. Now it´s hard to find a minute when they are not sitting playing with scratch :-)

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

A new computer, no no, that's an opportunity, build one together or make a raspberry pi machine embedded in a cute enclosure 🤷‍♂️

I wonder if I can compile scratch to Wasm 👨‍🔬

Thread Thread
 
dvddpl profile image
Davide de Paolis

Raspberry pi is definitely on my list.

Collapse
 
alebiagini profile image
aleBiagini

Congrats! Introducing children to informatics is not that easy :)

Collapse
 
dvddpl profile image
Davide de Paolis

it depends, computer science or coding syntax probably. but scratch is very easy, with those logical building blocs.

As long as they can read they can start building things. And it is just a matter of reducing a "problem" to a small thing/ step.

Collapse
 
ben profile image
Ben Halpern

Super cool!

Collapse
 
bricefriha profile image
Brice Friha

I want to do the same when I gonna have children!