My son, Jayant, would be 8 years old soon. I started teaching Python programming to him 2-3 weeks back. He wants to help me out in my work :-). When I sensed that he is serious about it, I took it up as  a weekend exercise. I plan to cover software testing along with this as well.

Today was Day 3. I was initially capturing this information on Facebook. But as he has shown seriousness, I decided to write about it as a blog series as a reference point. It would help me to look back at how things are progressing. It might help me to improve as a teacher. I can not look into the future, but it might be interesting for my son in future. As a by-product, it might be able to provide inputs to others who want to teach programming to their kids and/or advice me on how I can do better.

To confess, it’s a difficult task for me. I don’t consider myself as a befitting teacher for this purpose. So, I have to learn as I go along.

Nevertheless, here are the things discussed so far:

  • On Day 1 (30 minutes), we experimented with Python shell. The experiments were confined to printing strings and numbers. It started with hard-coded data withing print statement. Later, it shifted to variable assignment and referencing variables in print statements.  He still needs to get comfortable with creation of a new script and nomenclature here and there. But that’s fine.
  • On Day 2 (30 minutes), we discussed about arrays. Computer counting vs human counting. I suggested how he can subtract 1 from human count. The term ‘index’ is not yet introduced to him. I call it a ‘position’. He later continued on his own. I was happy to see his variable names. When writing a list of pets, he named the variable as ‘pets’ and the array elements were indeed pet names. The concept of loops is not yet introduced to him. He retrieves a value using ‘computer count’ 🙂

Day 3 (About one hour)

During my discussion with Vipul, he suggested that kids can learn Object oriented programming more naturally than adults. I have decided to experiment with that. For the programs that he writes, we would follow the OOP styles. So, today onwards, the same is reflected in the discussions. Following are the questions/discussions from today that we indulged in:

  • What is data? What are different data types? As he is yet to learn division in school, I briefly explained the notion of a decimal point. I explained based on time measurements, how some numbers fall in between whole numbers, and left it there. So, we focused on integer, string and boolean. To explain the boolean concept, I asked ‘Are you a good kid?’. He remarked, ‘Don’t know, you tell me!”. I said ‘True” 🙂
  • I asked him to look around and list down what he sees. Then I picked up a small container and asked him to talk about it. Based on that, I asked ‘Do you realize that whatever you listed is a noun?”. He said yes. I said that in computer world, we call a noun as an object. Then from the example of container, we discussed how objects contain other objects. I asked him to apply the same concept to other things in the room. From there we discussed the ‘Has-A’ and ‘Is-A’ relationships between objects based on basic sentence formation. Every time I formed a sentence that contained a wrong relationship, for example, ‘Animal is a Cat’ or ‘Screen has a laptop’, he laughed. I said, whenever you laugh at it, it’s wrong design. Then we talked about how design and programming are different things. He added, ‘Yes papa, for example, if your pocket is put in reverse, all things would fall, pointing at my shirt pocket. We briefly discussed about the non-noun observation and the concept of messages, by taking the example of a switch and fan. There was also a brief discussion about how in the absence of the objects that an object contains, it would become useless.
  • The concept of dictionary data type was discussed. Too complex for him as of now. I would refrain from it for next few sessions, unless he decides to do some basic experiments on his own.
  • One of the most important discussion today was about arrays as a data type. He has already explored this earlier. Today I explained to him how to create meaningful arrays. I wrote the following array and asked him, is there something odd:

utensils = [‘spoon’, ‘fork’, ‘plate’,’mummy’]

  • He remarked mummy is not a utensil. I was surprised, he said ‘Odd man out’. So, I explained that when you create an array, keep two things in mind: the data type must remain the same and the context of data must be same. I gave some more examples. Then he created some examples of his own, deliberately putting an ‘odd-man-out’ entry and laughing out loud about that.
  • For the first time, we discussed a little bit on testing. I asked him to compare the two tablets he has owned so far. One was a Karbonn Android-based tab and his current one is an iPad. He said, he had to remember too many things in the first one. I didn’t associate it with any formal term like usability/user experience etc. I let him speak his heart out.
  • We also had a brief discussion on how the knowledge to be gained is immense and how nobody can ‘know-it-all’. Why we should keep looking for opportunities to learn. How his teachers, his mother, his father are all imperfect human beings. I explained to him that there may come a day when he wants to work on something and it is so unique that there is nobody available to guide on that. That doesn’t mean he should give up. That just means, that he would need to try harder on his own.

Lessons for Me

  • One key lesson for me is that unless I can make him laugh and enjoy programming by being selective with examples, unless I am empathetic towards his age & context, he could loose interest. I need to be very very patient. The last thing I would want to do is to kill his interest in programming because of any of my behavioral flaws.
  • I don’t know whether he would remain interested in programming. I must consider this as an opportunity to build other softer traits like humility, constant learning, open-mindedness, creativity, questioning, expressing and so on.

Frankly, I don’t know how long it would continue. I am not sure for how long programming would hold his interest. Till it does, I plan to capture these moments in these blog posts.

Do you have any ideas about how I can teach him in a better way? Please share.

6 Responses to “Notes from Teaching Programming & Testing to My Son – Part 1”

  1. Rashmi

    Rahul , this is great !! My son has been wanting to program seeing us parents work on our laptops. I did not know how to go about introducing the programming concepts to him , although I know he is a quick learner. Thanks for sharing your ideas and insights. This will definitely help me in starting to introduce him to programming concepts.

    • Rahul Verma

      Hi Rashmi,

      Thanks for the comment.

      Good to hear that this blog series would be beneficial to you. As you go along, I look forward to hearing about your experience and experiments.

      All the best!

      • Dave Qiu

        Very interesting, you are so patient on communicating with your kids and tried a lot different ways to explain these programming methodologies to your kids, I’m trying to teach my 5 years old boy too, but don’t know how to start yet, maybe starts with a simple drawing program that gets different shapes, musics, motions, colors involved, would be more interesting for little kids and will keep learning longer? Tried Hopscotch on iPad before, he’s very interested but seems hard to understand programming methodologies.

      • Rahul Verma

        Hi Dave,

        Apparently, over the course of next months he’s no more interested in programming (am I the reason :-(, I would never know). But this is something which I don’t want to push.

        He became more interested in reading books on plants, planets and science. So, I paused this and started encouraging that.

        Having said that, please check Scratch ( You might find it interesting for your kid to teach programming in a visual manner.

        All the best!


  2. Jakob Hvitnov

    Hello Rahul
    This is an interesting topic. I have myself started to teach a bit of programming to my children (who are 8, 6, and 4)
    I agree that it is definitely best to be patient and let the child build up their own enthusiasm. And I would not worry too much about your son loosing interest – his curiosity might well return.
    Also I have found that the site has done a good job of gathering both lessons and programs that can teach children (and others) about the nature of computer programming.
    There is a very active community surrounding the site, and they offer translations of many of the exercises, contributed by the user community.
    I think you would probably find it inspiring of you do not know of it already.

    Good luck in Teaching programming principles and computer literacy.
    It is fast becoming part of the public school curriculum in countries all over the world, and could possible be part of a normal education everywhere in the coming years.

    • Rahul Verma

      Hi Jakob,

      Thanks for the comment and sharing information about I didn’t know about it.

      I’m eagerly waiting when he expresses interest again. He found a new interest in the form of reading books about plants and planets and enjoys Lego blocks these days. As long as he has such constructive hobbies beyond his regular school, I have nothing to worry about 🙂

      All the best to you and kids.

      Warm Regards,

Leave a Reply


1 2 12
June 30th, 2020

Arjuna 1.1.0 Production Release

July 23rd, 2017

The Last Keynote on Software Testing

July 23rd, 2017

The Agile Qtopia

July 23rd, 2017

Reflections:: Persistent Learning

February 28th, 2017

Reflections :: Servitude

January 9th, 2017

Reflections on Testing: Dignity

May 10th, 2016

The Pluralistic School of Testing

May 9th, 2016

Don’t Ignore Your Special Users

May 9th, 2016

The Dogmatic Agile – A Critique of Deliberate Blindness

October 9th, 2015

Pattern Thinking for Performance Engineers