5 Principles for Teaching Programming to the Next Generation

When I say “next generation,” I generally mean those currently aged about 8 to 12: the kids who are just starting to enroll in summer programming classes because they have an interest in what programming can do, but no idea how it works. Having spent one of these summers as an assistant teacher, I’ve come away with 5 key rules/premises/ideas/philosophies/principles to follow in teaching children how to be both excited and knowledgeable about programming. While this list is more of a means for me to quickly recap my learning experience that happened over 2 years ago now, I hope it can be for anyone who is looking for guidelines to follow when teaching programming.

Always, always start with a realistically achievable end goal.

It’s the difference between creating an enthusiastic “let me at it” mentality and a blank stare (no, not the kind in amazement). As Zain Shah wrote in his now semi-famous Medium article, “How I learned to code,” learning to program was all about taking incremental steps outside of his comfort zone — pursuing problems just difficult enough to push the extent of his understanding but just easy enough for him to use what he had learned in the past as a base. I’ve found similar success throughout my own informal programming education, and in teaching students inside a formal setting. Someone pursuing a coding project they have a realistic chance of finishing has a much greater drive to learn than someone pursuing a massively daunting project where they don’t even know where to start.

Not only is pursuing realistically achievable projects a much better way of reinforcing previous learning, it also combats the chances of a phenomenon psychologists call “learned helplessness” — the nature of the human brain to give up on tasks that it has had difficulty with in the past. In short, learned helplessness is the enemy of any successful programming teacher: it robs your students of the delight they get by finishing projects and often forces them to quit before they even really begin.

Keep the syntax out and leave the magic in.

Show me a 10 year old who is excited by coding syntax and I’ll — oh wait, very few of them exist. Kids get excited by the possibility of typing commands into a computer and getting it to do as they say. It feeds their curious, hungry little minds because — to them — it’s pure magic. But as soon as you try to start explaining why yes, you really do need to capitalize the S in System.out.println() or why no, the computer sadly doesn’t understand what “move player right” means, that magic is gone. You’ve quite literally smashed a children’s dreams all over the floor. You’re a monster.

Granted, syntax is a “need-to-know” concept in programming. Students need to learn it at some point, but it’s just not the most likely concept to hook people on the magic coding creates. There are solutions to this, and although they aren’t intended for me, I still get excited about them. Take Project Bloks, for instance. The idea of taking a realm of play that children are already familiar with (connecting blocks and building things) but adding a new layer for them to explore (computing) is absolute educational genius. I’m glad Google has picked it up, but this idea isn’t a new one. In fact, it was pioneered by Seymour Papert of MIT in the late sixties. People laughed at him for bringing it up then, but, I hear he’s the one laughing now.

Enable outside supplementation of classroom learning.

When I was about 12 or 13, I went to my father’s workplace at a cyber security consulting firm for take-your-kid to work day. Walking through hallways of servers and terminals certainly increased my fascination with computing, but it was the action of a random co-worker that sealed it. After learning I had never heard of a “geeks-only” operating system called Linux, he took 10 minutes to burn me a CD of the latest Ubuntu server edition telling me to “explore it myself”. I came home with the CD clutched in my fist and my mind set on learning how it worked. A month later, I had set up a Minecraft server for my friends to play on — a skill I never would have even thought of learning had I not been encouraged to explore on my own. Be that coworker. Be the teacher who burns Linux CD’s for their students.

Teach that frustration, especially in programming, is part of the learning process.

Trial and error is the key to good learning. Rather inconveniently, the “error” part of it happens to be the foundation of life’s greatest frustrations. Yet if there’s anything programming requires — especially in a young person — it’s the perseverance to “try”. Everything. To try writing that app they have that idea for. To try tackling that daunting coding challenge they saw on the internet. Sure, this may be violating the first principle of always aiming for an achievable end goal, but ambitious students will rarely aim for an achievable end goal. Take advantage of this, but brace for the impact of frustration. Nobody is an expert programmer off the bat. Almost everyone starts off wondering why their code is full of syntax errors and their algorithm doesn’t do what they thought it would. The sad realization is that — most of the time — these issues cause too many people to turn away from coding, proclaiming it’s “not for them.” (See again: Learned helplessness). By constantly reiterating that frustration is part of the learning process, you can help turn your student’s frustration into a positive, propelling experience.

No dream too big.

I hinted at this in the last principle, but it’s such an important key that I believe it deserves it’s own identity. When I was an assistant teacher at the George Mason Game & Technology Academy, students would talk about building super-intelligent AI, creating their own video games, or becoming famous graphic artists. At least, they would talk about these things until they realized that programming was a skill built on trial-and-error, frustration, and high-levels of perseverance. In short, they figured out that programming is hard and began to think they had dreamt a bit too high when they had thought about creating a real-life HAL 9000. The key to keeping kids on a life-long track of learning to code is to tell them their dreams are not too lofty. With the rate at which technological progress is being made, it’s entirely possible they could be the person who discovers the next key to AI or the next revolutionary breakthrough in computer graphics. They could do all of these things: but it all starts here.

-Carter Zenke
carterzenke.com