I taught iOS Programming for teenagers, and it was the best experience ever!

Screen Shot 2015-06-07 at 4.38.40 PM

I have never thought of teaching as a profession my entire life, teaching just never appealed to me; school teachers and university professors were also not my favorite people to hang around with.

This summer; like many Computer Science students, and while I was looking for a job or an internship so I can acquire some professional experience. I got this email from my school about an opportunity to teach students iOS programming in a summer camp in New Haven, CT. I applied, and sent my résumé, and didn’t think too much about it.

Fast Forward, I found myself in the class with a bunch of teenagers talking about their favorite Apps, and why they like certain Apps. I tried my best to make my classes as teenager-friendly as possible, and show them how App

Development work in real world. I taught Objective-C and Xcode for 6 weeks, and I ended up learning about humanizing coding, by making it social, interactive, and communicate it to students; who are novice to this magical world.

Motivating people is a skill

Most of the students in my class were high school students, and a lot of them didn’t need to learn coding at all, they, or their parents decided for them to spend two weeks of their summer vacation to learn iOS Development. iOS Dev isn’t really the easiest topic in programming, and students weren’t all motivated to code or research.

All instructors in the camp were given raffle tickets which was the currency there (kids can collect tickets, and at the end they enter a raffle for prizes). At the beginning, I thought that giving tickets, and using an enthusiastic tune should be enough to motivate my class to work; it worked for a little while, but at some point, I had to find new means to motivate my students.

Teenagers have varied interests, and they are in the process of forming their personalities, and you have to take this into account while teaching, and the same way a teenager like to personalize their room, closest, they like personalize their projects.

In my classes I tried my best to make the projects as personal as possible, I didn’t make a one generic app, instead I showed a functionality likeUIWebView, and asked students to use this element to build various stuff according to their interests and hobbies. I had a student who liked Led Zeppelin so much, so I asked him to make an app about the band which is made of buttons that take you to various Wikipedia pages about the band albums, and history. He felt so happy building the App, as if he was hired by the band to build it.

Remember Gender

Most of us, I hope, are aware of the gender problem in the Software Industry in the US, and how important it is to motivate women into programming. Fortunately iOS programming was one of the most popular classes among the females in the programming camp.

By the end of the camp, students are expected to work on a final project that encapsulates all the knowledge they gained during this camp. I, as an instructor made students suggest multiple projects, and made a vote to pick a single project for the students to work on; all guys in my class wanted to make a SpriteKit game, on the other hand, the ladies in my class wanted to build a social networking App. Even though, supervising multiple projects isn’t an easy job for me as instructor, I cancelled the vote, and made each of the students work on the project they suggested at the first place. Because I totally understand that making the girls work on an uninteresting project, would be unjust, and might make them hate programming, and I don’t want to be standing on the wrong side of history of Computer Science like many people did (Recoding Gender is a recommended read).

Open Source

Not all of my students were beginners, I had some students who had experience with iOS Dev, and Objective-C, and wanted to learn more, I made those students work on more complex projects, but I made sure that these projects go in the same context of the projects that their friends are working on.

For example, most of the students were working on a project called My Profile, which showed few labels, a UITextView for their bios, and a UIImageView for their avatar; However, avatars lately in most iOS Apps are shown into circles, and UIImageView shows image in a rectangle, so I asked one of the advanced students to research the issue, and create a category of UIImageView with a function to crop the view into a circle, and after he successfully created it. I shared the category with the rest of the class, made the other students import it in their projects and use it, and said our friend created this so we can all use it, and this is what we call open sourcing. The advanced student felt happy that he contributed to the community (the community is the class in this case), and felt more motivated to create, and share code with others. I could have easily asked my students to copy the same code from my screen, but this would certainly defeat the purpose.

Teaching teenagers is different

Teenagers are usually more attracted to games, and colors, they aren’t always attracted to concrete concepts. It’s important to explain some really fundamental ideas in programming, but don’t try to limit teenagers from being creative, and expressing themselves through colors, and pictures. I can tell you that UIColor, UIImageView, and SKSpriteNode, were their favorite things to play with. One of the Xcode extensions that I found so handy, was ColorSense for Xcode the kids started playing with colors, and creating really creative applications. I also showed my students how to clone the extension from Github, and how that people in the open source community make our lives easier as developers.

Debugging Skills

It’s easy for us as developers to forget about the simple, but yet annoying errors we faced while learning a programming language. However, just because we are experienced developers now. It doesn’t mean that we know all these errors, and how to resolve them, surprisingly enough, you will just realize that you forgot how to make these mistakes, but when it comes to solving them, my students made sure to remind me of all of them!

The Students’ favorite to make was importing .m files instead of .h files in Objective-C Projects.

First time I encountered the problem in the class, I was horrified to see the clang error (Image below) . I totally forgot the existence of such a problem, and actually it took me few minutes to fix it.

Screen Shot 2015-06-07 at 4.38.22 PM

Because Xcode won’t tell you in a simple language that you imported the wrong file, instead that’s what will show up when you try building your project.

The students made a lot of bugs, and mistakes, like not deleting connections from outlets in Storyboards, using variables before initializing them, naming variables after Pokémons, and so forth. But honestly these bugs made me laugh most of the time, made me realize how certain good programming practices are important because

Zen mind is beginner’s mind

and it’s good to relearn those very fundamental ideas again, and practice them in your own code, and setting an example for my students, was an amazing way to get the habit of using these best practices.

The greatest thing you can teach is compassion

I know that my students will probably forget a great part of what they learnt, if they don’t come back home to their machines, and open Xcode, and try experimenting with some projects, or downloading some projects from GitHub, and tried to figure out how they work, but they will never forget the way it felt when they fixed a very annoying bug that took them hours of debugging, or the way it felt when they played their own game on their own devices, and how they showed it to their friends, and felt proud of it, they will also never forget how they helped their friends by sharing their code.

I always taught my students that you as a developer, you have a moral responsibility toward the user, you need to make sure that users are having great time while they are using your App, always make sure that the buttons in your App are big, the colors are good, the interface feels clean, and that your product works like magic, and that you need to be compassionate to users, and other developers in the community.

For me as instructor, I felt a great pleasure whenever my students built something amazing. Teaching gives you this amazing feeling that can only be expressed, like a part of your brain was transferred into theirs, and now they have the knowledge you acquired after years of practice.

And the coolest thing about teenagers is that unlike adults they don’t compliment, and if they like something very much they just say it.

My nickname there was Flowers after Tommy Flowers (All Instructors had nicknames of people who contributed to computers)

Jamal Kharrat

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s