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.
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
I knew how to use them, but I couldn't explain it without confusing myself.
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. An
elif 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.
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
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.