Don’t teach like you code

As programmers, how do we go about teaching people well?

After all, coding has many of the same traits as teaching. Underneath the fancy patterns and elegant frameworks, code is just a set of concrete instructions to do something. Even if one, seemingly obvious, detail is left out, you’ll know soon enough. Code has an order too. You can’t implement a concept before it’s been defined yet, just like you couldn’t teach someone how to multiply before they understand how to add.

But, good coding isn’t like teaching at all. It promotes habits that are entirely counterproductive to the art of teaching. A really good programmer just might make for an awful teacher.

First, rarely do we code linearly. You don’t start from the top and just work your way down to the end of the story. Along the way, a clear concept in your head turns into a half-truth. Part way through writing a method, you might decide you need to track things in an array. After a few minutes, you’ll decide a hashtable works better. If coding against a platform is at all like talking to a student, you’d sound rather unsure of yourself.

Second, coding lets you cheat on the details. We compile our code not because we think we’re done, but because we want to find out what we may have missed. You can usually bucket most compiler errors in the “I was just being lazy” category. A missed instantiation here, a data-type mismatch or non-returned value there. I’m a habitual compiler. A compiler is a lazy programmer’s best friend. Ditto for unit tests, code-hinting and auto-completion.

All these niceties are great for programming. They give us softly padded walls to bounce our code off of. They let us focus on the hard stuff first and not worry too much about perfection in our code-speak. A good programming platform is simultaneously wiping our chin, correcting our grammar, and telling us what we really mean while we spew out semi-coherent lines of instruction. And, the faster and more efficient we are at coding, the more we rely on the platform to steer us in the right direction.

Teaching a newbie is entirely different. Every missed detail is a lost detail. You can’t start your sentences expecting your student to finish them — at least not early on. And unlike a compiler, who invariably will forget your missteps once you correct them, people don’t have as much luck separating the wrong details from the right. You may compile your code a dozen times before you finally get it right, but imagine correcting yourself twelve times before your teaching lesson finally makes sense.

You, my friend, make a terrible teacher.

How do you teach people well? It starts by knowing that what may make you a great programmer will not make you a great teacher.