Teaching Teens To Code

· 1266 words · 6 minute read

Let’s face it, teenagers for the most part suck. Teaching them to code (or anything for that matter) is nothing but a distraction that keeps them away from their favorite video game or reality tv show. Nonetheless, doing it is a noble cause that makes us feel good about ourselves because we know how to do something cool that they cannot.

In my eyes, teaching is more of an art than a science. I view it as an exercise in distilling the complexity of a subject into simple digestible chunks of information in ways that even a drunk five year old with the mind of a goldfish would understand. However, this is just a tiny part of teaching, conveying such information in a way that sparks interest and curiosity is probably more important. Hence, for those willing to embark on a computer programming teaching endeavor here is a collection of my best advice.

Make It Easy To Setup 🔗

Most people suck at asking questions and teenagers tend to push the limits. Often the question behind the question tends to be more important. This is the case when someone asks you “how can I use this in the real world?” and what they really mean is “how can I flex this to my friends?”. Being able to answer this question will have a long lasting impact on the level of curiosity you’ll get during your teaching sessions. Therefore, if what you are teaching requires a complex setup that is not easily reproducible at home you will miss out on what is likely to be the most important incentive.

It is always tempting to use the newest hotness such as the most feature rich IDE, what you think is the best programming language, or your favorite operating system. But don’t be fooled, the objective is the learning project itself not the lack of sexiness of the tools being used to build it. Picking something that can be easy to tinker with and most importantly takeaway will be substantial in determining the learning success of the young minds consuming your knowledge.

As a heuristic, pick learning projects where the set up can be reproducible, restartable, has few steps (more than 10 is too much) and only requires a laptop or desktop with internet access. Using pre-setup environments in browser based IDEs such as c9.io is fair game. Utilizing Raspberry Pis or Arduinos is usually good as well.

Dopamine Matters, Make It Frequently Gratifying 🔗

Most people learn best through hands-on experience. As such, teaching teens to code has little to do with the language of choice or difficulty of the project itself but more so with how quickly a newbie can put together a working application.

Do not shy away from teaching how to write Java or C++ applications, just make sure the steps from transforming your pre-cooked code example into a personalized application consist of a few and simple lines of code.

Teenagers nowadays strive for small and consistent doses of dopamine (hence the success of social media). As a general principle, after just a few minutes of teaching (usually no more than 10) your pupils should be able to make a contribution of their own. Ideally their contribution should display results in a meaningful way and instill curiosity with regards to what will come next.

Introduce Concepts As Tools 🔗

Programming is not easy. Your students will have a blast copying and pasting blocks of ugly and poorly written code over and over again without care or respect for any programming concept.

You will be tempted to prevent code obscenities by either teaching them how to do it the “right way” beforehand or correcting their code after they have written it. Teaching everything beforehand is only going to be boring, confusing and overwhelming for the short focus span and dopamine hungry teenage minds. On the other hand, correcting their code will only demoralize them and kill any sensation of pride they got from building something on their own.

Instead, what I like to do is to let them solve the problem however they see fit and every so often introduce a programming paradigm just as you would a tool in a workshop. For about 5 to 10 minutes you’ll demonstrate the use of the new tool (programming concept) and let them fly with it. It is important to explain why using the paradigm is useful and more importantly what it helps prevent. Which at this point is probably something they already did, so encourage and allow them to go back and fix their code as they see fit.

Keep in mind that each student is unique. Some students will enjoy correcting their code, some will leave their code as is and try to improve it as they go, and others simply won’t care. As such, this approach will work well for most students. This is assuming you won’t get a panic attack from seeing the ugliest, most intelligence questioning and mind boggling code you’ll ever see.

Make It Cool Instead Of Making Cool Things 🔗

What you find cool may not necessarily be cool for teens and what teens find cool (mostly video games) are not as easy to develop as they think. The trick lies in finding the balance between feasible and interesting and in your ability to sell a simple project as an application of infinite possibilities.

Once you have a simple project, challenge teens to add their own touch. This is in the vein of letting the creative juices flow and making them feel like they have full ownership of the future and quality of their project. Brainstorm ideas with them and listen to what they have to say, even if it is dull and does not make sense (which will be the norm). It is important that they feel supported and not alone so let them know you are there to help out. When giving them advice or poking holes at their ideas do not suggest things directly but rather ask questions that force them to think about the things they might have overlooked. The most important thing is that they care for what they are building. Once you get them to this point, they’ll start to tinker around, make mistakes and figure things out. This is where learning happens, which means that you’ve already made the world a better place.

Have Low Expectations 🔗

Keep in mind that we live in a world where most people think the Federal Reserve is a Native American reservation and where The Black Eyed Peas are more admired than Dennis Ritchie, Ken Thompson and Alan Turing. Just assume that each and everyone of your students grew up on the top of a secluded mountain, was raised by a pack of meth addicted coyotes, and whose only encounter with technology has been with a potato running Windows 95 and you won’t be disappointed.

Teenagers are still kids and have most of their life to learn how to code properly if they want to. Your task is not to launch the next big startup or hack into the Kremlin. Instead it is to introduce these young minds to the magic of computing and the world of opportunities it provides. Present computer science and engineering as fun hobbies that can turn into fulfilling and rewarding careers. Get them addicted to the high of building something and seeing it serve a purpose in the real world. The secret for anyone to do something great is to get started. The main goal is to just help these naive, annoying and often smelly souls get started.