What I learned from teaching to code

Ravikiran R
3 min readOct 22, 2017

He was super excited to learn to code. He hung on to my every word and asked me a ton of questions. He soon began to write his own programs. I was really happy.

I wish I could say all this. But it wasn’t true.

Day 1 — Attack of the codes

It began with my friend asking me to help his 9th grade cousin with some questions in Java. He had an exam coming. I supposed it wouldn’t hurt to clarify some doubts, and I agreed. When I met him the next day, he pointed at a question in his textbook and asked me to explain. It was a program to find the largest among three numbers. I started explaining the logic. That was when I first felt that he wasn’t really interested. When I finished explaining, I asked him if he understood and he nodded. We moved on to the next question — find the roots of a quadratic equation. This time I went slower and encouraged him to ask me any question he had, however silly. A minute later he asked me why we used an ‘if’ in the program. I then realized that he had a lot more to learn before trying to solve these questions.

And so began a top down teaching session, going from why we use an ‘if’, to how input is taken from the user and what a variable was, and how the control flowed in a program. It was the opposite of how I (or anybody for that matter) would have wanted to teach the basics of coding. He seemed more confused by the end of it than when we began. I asked him to meet meet me again the next day.

Day 2 — Revenge of the switch

The previous night I had spent introspecting what it was that had got me interested in Computer Science. So when I met him again, I started by trying to inspire him about how one could learn to code and empower the lives of millions around. We then proceeded in small steps, learning new syntax and constructs along the way. A few hours and several programs later, although we had covered enough of the basics, I still wasn’t confident I had taught well enough. This became evident when he was unable to explain to me how a simple branching statement worked. Although I did manage to help him understand by the end of the day, I had begun to question my ability to teach.

Day 3 — A new hope

I understood that teaching or motivating someone was not my biggest strength. It didn’t have to be.

I showed him code.org’s video about “What Most Schools Don’t Teach”. I told him about the joy I experienced when I began to write my first programs. I showed him how he could learn from newboston and freecodecamp , and how stackoverflow could help one out of the worst situations. By the end of it, we had hardly had any measurable progress but there was a noticeable rise in his level of enthusiasm.

I didn’t know how well he would do his exam, but I knew then that irrespective of it, he would have the will and ability to learn.

Lessons

In hindsight, these are the things I wish I had known —

  1. Understand before you begin
    Find out the level of understanding before deciding where to start.
  2. Motivation comes first
    Its okay to spend a good amount of time on why one should learn what they are learning.
  3. Make frequent checkpoints
    At regular and frequent intervals, ensure that all concepts are clear.
  4. You cannot teach coding in a day
    Or maybe you can, if you teach the right way.
  5. Teaching teaches you
    When you teach, you learn something new.

--

--