loading...

Why you should teach someone to code.

tacomanick profile image Nick Shattuck ・3 min read

Earlier this year, I picked up a part-time job as a "Stem Outreach Advisor" at my local community college. The primary focus of my job was to get local high school kids involved in coding using a Raspberry Pi. At the time, I hadn't touched a Raspberry Pi in a few years, but I was intrigued by the challenge of relearning and also wanted to try my hand at teaching. I learned that teaching a classroom full of absolute beginners requires you to reevaluate what you consider to be routine, which leads a deeper understanding of your programming skills.

Teaching solidifies your understanding.

The first thing I realized is that I took for granted what I considered to be "easy". Once we had our computers set up, I did a quick demo of some Python code, and I required students to build a simple tick-tack-toe game. This assignment went along with a tutorial just in case anyone got stuck, but I encouraged them to try it on their own before they got help. "Try it for 15 minutes. Don't worry if you get stuck, or blow up your console with an infinite loop. That's part of the fun. Once your 15 minutes are up, you can ask for help."

After 15 minutes, literally every students' hand shot up. I knew the blank stares on their faces all too well. At this point, I pulled up a tutorial they could use to check their work, and I went around the room to help each student I could get to. One student, the only young woman in the whole group, managed to get something working! I was impressed, but she was quick to notice something was off. After a few seconds of troubleshooting, I figured out what the problem was. She was using if conditionals instead of elif, which was causing her code to behave incorrectly. After making the fix, her program worked beautifully.

I went to the front of the room to demonstrate what was happening to her, and a number of other students, when I realized something. I didn't actually understand the difference between if and elif!
I knew how to use them, but I couldn't explain it without confusing myself.

Teaching forces your outside your comfort zone.

To my horror, I had to do the unthinkable. I had to use the internet in front of my students. But this is a good thing! It's important for newbies to see even experienced programmers still look things up. This would be a great troubleshooting opportunity for them. They also need to see people they look to for help handle themselves under pressure. After a few minutes, I figured out where my confusion was. An if statement checks if a condition is true or false. If it's false, this is where the elif comes into play. Anelif block behaves independently from if statements, which means they will check some other condition if our initial if block is false. I was able to bring most of the students to an understanding, and I helped others individually who were still stuck.

Teaching, however small, makes a difference.

Sadly, the coronavirus cut our weekly sessions short. As much as I would like to believe my students were there to be the next generation of brilliant engineers, I assume most just wanted to have something to do, and a free Raspberry Pi. On my last day, the same student who asked me about if vs elif all of those weeks before that because of that one instance, she wants to go to university to be a web developer in her home country. Her high school here had a CS class, but she mentioned she found the material really dry and difficult to connect with. I, she told me, made it fun. I don't consider myself to be a particularly great programmer, but even moderate CS students like myself can inspire.

I highly encourage everyone to take the time to teach someone something at some point. It doesn't take a genius. All it takes is patience, positivity, and some self-deprecating humor when necessary. Teach a teammate, friend, family member, or a stranger. You never know who you might influence.

Posted on by:

tacomanick profile

Nick Shattuck

@tacomanick

Computer science student and software developer.

Discussion

pic
Editor guide
 

Thanks for sharing, Nick! :)

During this pandemic I had to teach C++ from scratch to a friend to prepare him for an exam, they were 1 on 1 online classes, I had to study quite a bit to prepare my material and be ready for questions.

We covered all the basics in a couple days (plus a bit on pointers and classes), he passed the exam! which was huge a win for both of us, I found out that I really enjoy teaching :D

 

Power to you!

 

Thank you for taking the step to help educate the kids!

I have been working for my local school district to teach small classes of younger high school kids various programming and they always surprise me with either skill or their curiosity about programming.

For skill, we had been going over creating games in Unity for 5 months and one of the kids managed to recreate his favorite fall guys (a new game on steam) level recently! I was pretty impressed to say the least.

As for curiosity, they always ask about the coding conventions that I've come to accept but never really looked into why. So they force me to learn more to be able to answer everything!

 

It’s easy to take for granted the concepts we consider easy until someone asks you to explain it to them in concise terms. You realize how much you don't understand with just a single question.

 

Yes, I agree. Also makes me more careful of using jargons that may confuse them further.

In fact, writing posts on DEV gives me that same feeling to write as clearly and concisely, assuming nothing of anyone.

And it’s appreciated. Even after 3 years of computer science, I still get deterred when I read documentation with excessive jargon. It’s important to be fluent with vocabulary, but it’s deepens our understanding when we explain things clearly.

 

When one teach, two learns

 

I will start introduction kids to programming world!

 

I highly encourage it! You don't have to start at high school (secondary) as well. Any level is just fine. There are loads of projects for all age levels.