Last night I had one of my finest moments as a parent. Being a life-long programmer I always wondered how I could share my passion for building software with my child. Now that Anna is five and a half, and has learned so much at her marvelous Montissory school, I figured it was time to see what piques her interest. Thankfully she soaked up our first lesson eagerly wanting more!
I started with math. Computers do numbers all day and all night. My daughter had learned four-digit addition over the past year and I figured that was the association she needed to pull her in. I wanted Anna to reach that “ah-ha!” moment as we connected-the-dots. I built a simple two file project showing the very fundamentals of writing some code. All I needed is an index.html and a .js file included and run on page load/refresh. It’s simple and effective.
All the source is in a GitHub project and I encourage you to read and use it in any way you like for your own personal pursuits.
https://github.com/KDawg/AnnaTeaching
If you’re a corporation interested in this just throw a bucket of money my way and we’ll figure out how to make it work 😉
I started off teaching Anna what an editor is. We use JetBrains PHPStorm at our house. Far more than just coding I realized Anna learned:
Anna learned about the Google Chrome web browser and again, her education was fundamental and more than just programming:
Go to your system setting and slow down the mouse pointer. Way down. Almost to the point that it’s excruciatingly slow for you, and then move it another notch lower. A kiddo this age is still dialing in their eye-hand coordination and this helps them manage the mouse and pointer without frustration.
Such a simple little program but ripe with ideas and fundamentals excited and delighted my daughter.
(function() {
var i;
var value;
var start = 1;
var end = 10;
var by= 1;
value = start;
for (i = start; i <= end; i += by) {
document.write(value + '
');
value = value + by;
}
}) ();
I taught her how to change the starting number, then the ending number, and eventually the add-by number. Each time she ran our program the for loop spun through the ranges, accumulating the sum, and printed out the result.
The first few times I walked her through it, and with little prompting on editing, she took it from there experimenting and testing as her desire swept along. Seeing her curioustiy activated is the best thing ever for me as her father. Here’s some of her test runs:
At that point she stopped working and ran off for a few minutes. I took notes on the effort so far thinking this exercise is already winning. Anna really dug in there, had great confidence, and sorted out what’s up with this crazy business that I love so much.
Anna came back with the serving tray. “I made snacks for us daddy.” How my heart soared. How in the world does she know coders love snacking while they work? Is it instinct? Has she seen me do that a dozen times before? Is it genetic instruction passed on by DNA encoding?
I must admit her choice in snacks was far more healthy than mine at her age. A bowl of cherry tomatoes for her and half a banana for me. Paired with our own bottles of Mineral Water as well. God I love her.
Snack time over Anna continued and I wanted to show the final variable, “by”.
In the end Anna was completely elated by the experience and I was so satisfied sharing what I know and enjoy with my daughter. I realize it’s the first of many sessions if I can only figure out what to present next. I don’t want to overwhelm her but there’s much to share.
I can tell Anna is proud of her accomplishment. As we wrapped up she cheered loudly confidentially proclaiming, “When I go to school I’m going to tell my teacher and my momma that I can program the computer.”