Why all teachers should learn to code a little

All teachers should learn to code a little. Learning to code as a adult requires one to become re-acquainted with steps of learning, which we have mastered, grown out of, and then forgotten.

The ability to leap past the “primitive” steps that children take helps us become independent and efficient learners, and, as a result, we, especially those of us who have spent years learning (and then teaching), have a hard time reconstructing the steps learners take to master certain skills. Things that may seem to belong to “common knowledge” or require “common sense” to understand may not in fact be so common to someone new to a particular piece of information, either because of gaps in knowledge, or different points of reference.

When I first began learning Python on Codecademy, I remember being baffled by a tip (on the Help Forum, no less): “…call the function…” I remember thinking: How am I supposed to call the function? (“Come here, kitty, kitty!” came to mind.) And why should I call a function? If it is a function, shouldn’t it perform such function?

A week or two later, when it got sorted out (not completely, as it turned out), I laughed at my own ridiculous befuddlement over such an obvious thing. Gradually, I realized why I got confused – and why time and again newcomers to Python get stuck on it. So let me first give you a simple example:

   Code in Python                      What it means
greetings():                     (A function by the name of “greetings” is created.)
print “Hello!”                         (This is the action the function named “greetings” will
take when it is called, i.e. becomes active.)
print greetings()                    (Now the function is being called: It is asked 1) to
become active, and 2) the execute the action “print”.)

When Python runs the those 3 lines, the outcome on screen is:
Hello!                                   (This is what the function is asked to do.)
none                                    (This is Python saying, “All done!”)

This is what I realized: “function” in Python does not mean “function” to me, the learner. It means “potential actions that can be taken.” “greetings” is defined as a function, but it does not act. It only acts when a real command, “print” calls its name – hence the expression “call a function.”

print“, on the other hand, is what we would normally consider to be a function, because it leads to an immediate action (such the output of “Hello!” in my example above.) But “print” in Python is not a function. (I am yet to figure out what it is.)

The point is: I must re-interpret every single concept I come across when coding, so that I can gradually grasp them and use them. This makes it possible for me to learn to program. Incidentally, I can declare that Python is interesting and actually simple to learn (says the one who has just mastered the equivalent of writing the lowercase letters “a”, “b”, “c”.) This week, my Coursera class, Programming for Everyone, will cover looping and list (and stuff). So I am excited to move onto the Python equivalent of letters, “A”, “B” and “C”.

For me to get this far with coding was not easy. I brought my years of learning and teaching experiences to bear: cross-referencing, re-inerpreting, “translating”, parsing… the materials I come across. When I get stuck, I backtrack step by step until I get it right. There are so many resources that eventually I can patch together a cogent explanation for myself.

But here’s the catch: I am on summer break, taking a Coursera class for fun. I have a whole week to do the work on my own schedule. I don’t need a grade to get a job; in fact, no one cares if I finish the course (though I most certainly will). My family doesn’t need me to complete the course in order to bring food to the table. And Python has no relation to my professional work whatsoever.

But I can’t imagine being a real student (especially one with strong interest in humanities) taking a programming class for the first time: The materials makes no sense to me. The teacher’s explanations makes no sense. I don’t know how to begin asking questions. Worse still, many fellow students seem to have no problem with the class (“Sure, just call the function”, they say.) As a real student, if I didn’t complete the class, there’d be serious consequences.

I’d hate to find myself in that situation.

As an educator, I’d want to do everything I can to help such a student. But how am I going to break through to someone who seems to be impervious to help (as I was on the Codecademy Help Forum)?

I think about how to break through to students when I teach, but I find myself thinking ten times harder about how to do it when I am learning to code. The beauty of learning to code is: There are no pre-requisites. Learning a programming language is like learning a foreign language: It is a new experience, stimulating and fun. Anyone can do it. I may never make a living programming, but it demystifies my understanding of everything that underlies the technology of modern day life. And I certainly get a renewed sense of what it’s like to be a beginner again and even simple things can be mystifyingly challenging to a learner.

For this reason, I think all teachers should learn to code a little.