In December 2016, I wrote about my experience teaching my 10-year-old son to code. A year-and-half later, his journey continues with many ups, downs and plot twists.
âPapa . . . Iâm bored!â
If youâre a parent or teacher, youâve probably heard it many times. Childrenâââlike most peopleâ have short attention spans, resulting in brief bursts of high-engagement with new toys, games or activities followed by long periods of disinterest. Once the novelty wears off things get boring and they search for something newâthis actually sounds similar to front-end web developers đ. My son is no different.
The Vacation: January 2017âââJuly 2017
My sonâs enthusiasm for coding waned soon after I published the first story in December 2016. By January 2017, he was up against the steep learning curve of web development.
If youâre unaware of how daunting web development is for beginners, scroll through the freeCodeCamp curriculum (an amazing resource BTW!) and review the completion time estimates âand thatâs just for front-end webdev! Itâs like reaching a mountainâs peak only to find yourself at the base of another mountain. Not very motivating for an 11-year-old.
You might be thinking . . . âWhy did I start him with web development?â
After Scratch and a brief stint with Python, I ultimately settled on Javascript and HTML because Iâm a web developer and itâs what I know. âWhat could be better than an in-house mentor available at any time?â I thought. Turns out, many things.
Web Development is Not So Great for KidsIn hindsight, I think web development is not an ideal starting point for kids transitioning to text-based coding. Children are naturally great at reverse engineering; but in modern web development, seeing a website you like and building it is a lot harder than it looks. Replicating modern web sites from scratch requires many complementary skills beyond Javascript and HTML: CSS, JS frameworks, build tools, databases, server-side languages, and more. The complexity of modern webdev is tough for beginnersâââlet alone an 11-year-old with limited time. Thereâs always something else you need to learnâââitâs very hard to keep up.
How I Fit Into The Picture
âLearning to codeâ should never feel like a job. I never force my kids to code. Iâm a working parent and have no interest in running a coding school. Learning to code is always secondary to free play, reading, schoolwork, or just doing nothing sometimes (yes . . . itâs OK for kids to do nothing once in a while). Learning to code needs to be a self-driven activity or it wonât last. My role in the process has evolved into part-time curator, mentor and motivator.
A New Opportunity
By January 2017 my sonâs coding progress came to halt. After learning a good amount of HTML and starting Javascript Road Trip Part 3 on Codeschool (RIP), there was no light at the end of the tunnel. He stopped coding and started reading fiction againâââspecifically, the Rick Riordan series of books. No complaints on my end.
It wasnât until July 2017, during a serendipitous discussion about baseball statistics, that the switch turned on again . . .
âWhatâs a batting average?â he asked.
âItâs the number of hits divided by the number of at-bats.â
âWhat does it mean?â
My son doesnât play or watch much baseball, but he likes basketball. So I switched the conversation to something more relevant . . .
âItâs similar to a shooting percentage in basketballâââtotal shots made divided by the total shots attempted. Itâs a simple measure of how well a player shoots the basketball.â
I could see the wheels turning again. âMaybe weâre on to something here.â I thought.
âFacts are stubborn things, but statistics are pliable.ââââMark Twain
For the next few weeks, I pointed out examples of statistics in action wherever I noticed them, gauging his interest along the way. TV commercials, YouTube Ads, billboards, booksâââstatistics are everywhere! In my new role as motivator, I closed the dealâ by purchasing the âCartoon Introduction to Statisticsâ by Grady Klein/Alan Dabney and his next adventure began.
My son finished the book around August 2017 and I put my curator hat on in search of the next learning resource.
Being an advocate for any self-driven learning by your children involves careful content curation. There are limitless online resources for learning almost anything. Your job is to find quality resources that best match your childâs learning style. I recommend testing out the material yourself first (watch a few video lessons, read a few chapters) to avoid selecting something too boring, fast, slow or poorly produced. Bad learning materials could negatively affect your childâs opinion of on entire topic. Be sure to choose wisely.
The Return of Python
I signed up for an annual DataCamp membership during a holiday sale back in December 2016âââData Science was trending in the tech media at the time and I wanted to branch out as a web developer. I browsed through some of the courses and really enjoyed their platformâââvery high-quality with lots of depth. I thought DataCamp would work well for my son . . .
âRemember Python?â I asked him.
âA little,â he replied with a suspicious look on his face.
âDo you know that Python is used all over the world by statisticians, scientists and even Google (I had to mention Google đ) to work with data and statistics? You also donât need to type brackets and semicolons đ. Do you want to try it again?â I asked.
âNo more Javascript?â He asked.
âNot for now,â I replied.
âOK,â he agreed.
August 2017âââOctober 2017
He started with DataCampâs Intro to Python for Data Science (a freely available course) in August 2017 and made great progress (working primarily a few hours on the weekends). He finished the first course by September 2017.
The Intro to Python for Data Science course is great for beginners; covering a lot of material in manageable chunks with live coding exercises directly in the browser. By the end of the course, he was comfortable with Python syntax, lists, functions, packages, and NumPy.
Another Hill To Climb
He moved on to Intermediate Python for Data Science but hit a wall around October 2017ââârarely logging in and eventually stopping completely.
I intervened . . .
âHow is everything going with the DataCamp course? Are you stuck on something?â I asked.
âI like it, but I donât really get how all this is used.â
A Context for Coding
Thereâs actually a lot going in the dialog above, but the keyword is âhowâ. One problem I consistently notice with the coding for kids movement is lack of context. Learning about programming structures and algorithms is fine, but abstract concepts donât stick with kids unless connected to something in their world.
Scratch is very popular with kids not only for itâs âconnecting blocksâ metaphor, but for how itâs designed around the context of creating and sharing stories, games, and animations with the community. Itâs fun and has a clear purposeâââa win-win for kids. One of the hardest obstacles when transitioning from Scratch to text-based programming is that loss of that context. Youâre no longer building fun things for the community; youâre on your own in a world of plain text, code editors and âHello World!â. Itâs a big shift.
What my son was really asking was: âWhatâs in it for me? How does Python give me superpowers?â
In Search of New Hook
I needed something that would pique my sonâs curiosity. A way to get him back into his coding adventure.
AI and Machine Learning dominated tech media in 2017 and I shared many interesting news articles with him throughout that year. He ignored most of them (kids donât seem to like reading email đ), but here are some of the stories he found interestingâââat least based on discussions to/from school:
- AI learns to re-create Super Mario Bros. by watching someone else play it
- This Artificially Intelligent Speech Generator Can Fake Anyoneâs Voice
- A New AI Can Write Music as Well as a Human Composer
- A Japanese AI program just wrote a short novel, and it almost won a literary prize
Notice a theme?
All of the stories are examples of machine learning code doing the work of humans. Giving us superpowers!
âWhat if you could build a program to do your writing homeworkâââall those summaries and journal entries?â I said.
âReally? How?â His face lit up a bit.
âYou can learn about AI and Machine Learning using Python.â
Can Kids Really Understand Machine Learning?
Letâs be honest. Very little machine learning content is designed with kids in mind. Kids like to dive right into things, but really understanding Machine Learning requires a lot of prerequisite knowledge in math and statistics.
As a web developer, my linear algebra and statistics knowledge is a bit rusty (to say the least đ) making it harder for me to curate content and come up with fun code analogies. So I put on my research hat for a few weeks and learned as much as I could about the basics of Machine Learning.
The volume of resources available for machine learning is overwhelming: videos, blogs, books, conferences, courses. After some testing, I narrowed the choices down to Udacity, Coursera, or DataCamp. I focused on structured learning and a good practice environmentâââespecially important when getting started on a vast topic like Machine Learning. After a final review of the courses, I selected Udacity due to their highly-targeted Nanodegrees and clearly defined prerequisites and set a long-term goal for him of completing the Deep Learning NanoDegree, knowing it could be years before he even starts that course.
First Things First . . . Back to Stats
The Deep Learning NanoDegree is above my level (let alone my son), so I built a course map; working my way down using the prerequisites and requirements. Hereâs the first iteration:
First iteration of the machine learning course map.
Intro to Python for Data Science is shaded green since my son completed the course and it meets the Python prerequisite. He started with the statistics courses right away.
A Major Milestone
My son really liked statistics. He finished the Descriptive Statistics course on Udacity in September 2017 and started the Inferential Statistics course.
This was a big moment. For the first time, he was venturing into a subject area beyond my level. I only took one stats course in college and that was quite a few years ago. I wouldnât be able to immediately answer his questions anymore; he would have to seek the answers on his own. Itâs the moment I fully-transitioned out of my role as his coding teacher đ˘.
As expected, he struggled with the material, but worked very hardâââmuch harder than I expected. By January 2018, he hit a wall about two-thirds through the Inferential Statistics course. At this point, he took a well-deserved break until April 2018.
A New Opportunity
I received a promotional email from Udacity in April 2018 announcing their new AI Programming with Python Nanodegree program (yes, email marketing still works). It was a few months since my son coded anything and the course looked like a great way for him to review Python concepts (NumPy, Pandas, Matplotlib) with a short introduction to some additional machine learning prerequisites (Linear Algebra and Neural Networks).
He was also very motivated at the thought of receiving an actual certificate of completion (Gamification FTW) and started working on the course the day we enrolled.
Revised course map with updated progress as of June 2018
Reality Sets In
Udacity courses and labs are pretty rigorous and he quickly fell behind the recommended completion deadlines. I wasnât surprised since Udacity recommends a 10 hr/week commitment to complete the course on-time, but I didnât want to curb his enthusiasm. He averages about 2â4 hours per week during the school year, since the material is very dense.
I hope he qualifies for Udacityâs free 4-week extension. If anyone from Udacity is reading this . . . pretty please!
My son working on a Jupyter notebook lab from Udacityâs AI Programming with Python Nanodegree.
Realistic Expectations
For parents just embarking on the journey of introducing coding to their kids, try to treat it like any other extra-curricular activity. Coding shouldnât take priority over other activities such as schoolwork, free play or just being a kid. Itâs a bit abstract and not always fun, but very rewarding in the long-term.
Personally, the fact that my son is willing to work on this at all makes me proud. Iâm not expecting him to become a superstar programmer anytime soon. Hopefully, he is able to build new mental models enabling him to approach future problems from a different angle.
Most of us grew up in the world of imperative programming; where solving a problem involved defining each step in sequence. His world will be different. The ubiquity of AI/Machine Learning will enable computers to define the steps given the proper data and algorithms. Hopefully heâll be ready for this reality.
The Road Ahead
For those interested, Iâm planning a follow-up post in about six months, summarizing my sonâs latest progress and struggles. Who knows, maybe heâll move on to something new at that point . . . kids these days.
I also plan to start writing about my experience teaching my younger daughterâs to code (ages 6 and 9). My older daughter is currently working in Scratch and the youngest in Scratch Jr.
Follow me for updates, tips and advice on teaching your kids to code. Iâll also be documenting my experiences at CodingDad.io. Stay tuned!