So, You Want to Run a Young Coders Class?

Teaching Future Coders

Ever since PyCon 2013, the interest in the Young Coders class has been intensifying. Practically every Python conference since then has asked about doing one, and several have run their own. Classes outside of conferences have sprung up, as well, from one time workshops to after school clubs.

As more classes happen, more people have been asking about running their own. These classes do take quite a bit of effort to set up, but the payoff is enormous. Also, once you do one, doing subsequent ones gets easier and easier.

Getting started

Once you realize you want to do a class of your own, it’s time to start looking at your resources. There’s some important questions you need to answer.

Where

Do you have access to a free or nearly-free classroom? Many libraries have classroom areas built into them, and office buildings often have extra space. A school may be willing to keep a section of their building open during the weekend, or a community building may be willing to donate their basement.

Don’t be too quick to accept the first room that becomes available to you, though. Check it out, in person. It absolutely must have:

  • Power for each student (Can you get power strips to each desk without running cords everywhere?)
  • Environmental control (some places shut down AC for the weekend)
  • Desks and chairs
  • A projector and screen
  • Access to a bathroom (many places lock this down during off hours!)
  • Access to food, or permission to host food

If you go the Raspberry Pi route, you must have access to this room the day before (see Setup). You should also have access to the room an hour before the class starts, to set up the teacher’s laptop.

You’ll note that networking is optional. I’ve done classes with and without Internet, and I have to say, I prefer doing them without Internet. Facebook and Twitter have a strong pull, and this urge is even stronger if the students are using their own laptop.

Who

Obviously, you’re going to need a teacher. If your teacher is local, awesome! You’ve solved a huge number of problems! If your teacher isn’t local, though, you may consider getting someone local to shadow them, so you can have someone in the area that can start carrying the torch.

It’s also possible to do this class with two teachers. This eases the stress on the teachers, allowing them to switch after each module.

You will also need volunteers. How many? More. You will always need to bet on the side of too many hands versus not enough. I don’t recommend turning anyone away because you think you’ll have enough. Plans change, or people forget.

A ratio of anywhere from 3:1 to 5:1 seems to work well. Any higher, and it can be hard getting the classroom ready, or getting the kids through a particularly tricky bit of code.

The kids

Age range is extremely important to mind. I tend to run my classes from the ages of 12 to 17. I push back hard when it comes to going below twelve. Why? Typing speed.

No matter how smart a kid is, no matter mature, if they can’t type quickly, they will fall behind. If I have to wait for a small child to hunt and peck, the older students get bored and distracted. Also, hunt and peck seems to lead to more typos, which are harder for younger children to catch because they’re not terribly fast at scanning a screen of text.

If you want to teach kids under twelve, I recommend putting them all in the same classroom. You also might want to check out Scratch, which requires less typing and can still teach the same concepts. You should also check out the turtles module, included in the Python standard library.

Sign-up and promotion

I don’t recommend opening up the sign-up any sooner than two weeks beforehand. Trust me, you will not have any trouble finding students. If you open it up too far in advance, though, you stand a higher chance of no shows.

It’s okay, however, to make ‘Save the Date’ announcements. When posting those, think outside of where you normally go. It can be tempting to just post them at a Python MeetUp, but you should also consider calling local schools and youth centers to see if they want to push for your class. The idea of these classes is to reach out, not to keep hitting the same communities, over and over.

When

The class is one day, but you’ll need access to the room the day before. Don’t forget to factor this in. You don’t want to try to set the room up the day of, then discover that half of your HDMI cables are bad. You will also need people to help set up.

If you’re the teacher, remember that you’re going to need a full night’s rest. Don’t be shy about asking others to help get the classroom done by a decent hour.

Money money money

All of this can cost money. The most obvious solution might be to charge the students, but this usually only serves to complicate matters. Money requires special handling and reporting. It can also change people’s attitude. No-shows go up, as do negative attitudes.

A better option is to ask for donations from sponsors. You might ask for money, or space, or if someone has extra monitors in storage that can be used for a weekend. PyOhio got their funding and monitors from an organizer’s company, and their space from the university. PyCon got their monitors and Pis from a PSF grant.

If you can’t find anyone locally to help out, please, don’t be shy about asking the PSF for money, hardware, or teachers.

The set-up

You have two options when it comes to the set-up: Raspberry Pi, or bring-your-own-laptop. Deciding which one you go with changes your entire set-up, so make sure to give this careful consideration.

Raspberry Pi

Pros Cons
  • All machines are the same
  • Increases interest (free stuff!)
  • Students go home with a working environment
  • Demystifies computer innards
  • Exposes students to Linux
  • Cost of class goes way up
  • Requires more power outlets (Monitor + Pi, and no battery power)
  • Must be set-up in advance
  • Requires more equipment

 

BYOLaptop

Pros Cons
  • Students go home with a working environment
  • Students are working on a familiar environment
  • Less costly
  • Less set-up
  • Machines must be set up beforehand
  • Working with many different OS’s
  • A teacher or volunteer had better be a Windows person
  • Could be distracting for kids

Supplies rundown

If you go the Raspberry Pi route, here are the materials you will need for each student:

  • A Raspberry Pi (Model B is preferred)
  • An HDMI cable
  • A USB keyboard
  • A USB mouse
  • A monitor
  • A power cable (microUSB)
  • An SD card
  • Access to two power outlets
  • Table space
  • A chair

If you decide to go the laptop route, each student will need:

  • A power outlet
  • Table space
  • A chair

Finally, for the room, you will need:

  • A projector
  • Power for the teacher
  • Materials for the algorithm demonstration:
    • Bread
    • Non-peanut butter (for example, soy or almond)
    • Jelly or jam
    • A bread knife
    • A plate
    • A small table or clear spot
    • Wet wipes

Shopping for the Raspberry Pis

Make sure you have tons of lead time when it comes to getting Raspberry Pis. They’re often on backorder. Element14 / Newark usually has the most in stock. You’ll want to get power while you’re there, as well.

In general, any keyboard and mouse will work as long as they’re USB. Simpler tends to be more reliable, so skip the fancy keyboards or wireless setups. These kind of keyboards and mice also tend to be more expensive, and can quickly kill your bottom line.

You may want to consider, if there’s room in the budget, buying cases for the Pis. They can help protect the Pis once they leave the classroom.

It may be possible to rent monitors (and keyboard and mice!) from an office supply rental company. If one doesn’t serve your area, don’t be shy about asking businesses if you can borrow monitors for a day.

The set-up

The day before

The day before the class, you will need three to four hours to set up the room if you’re using Raspberry Pis. This goes much faster if you have one person per five seats. Even if you’re using laptops, try to get in early, so you can set up power strips and make sure you have enough working outlets.

Room setup

Try not to cram all the desks you can into the classroom. Unless you and your volunteers have super vision, you’ll need to be able to walk behind all the students so you can see what’s on their screen. Make sure you can do this without knocking over monitors.

Also, be liberal with the electric tape. Taping cords to the table edges and floors helps prevent toppled monitors and flying Raspberry Pis, as well as trips and falls.

Make sure to test the teacher’s laptop with the projector. If you don’t have the right connector, make sure to get one that evening. You’ll need the slides the second the class starts.

Localization

Make certain that every Pi boots, and, even more importantly, make sure that the keyboard has the right localization. If you purchased pre-loaded SD cards, chances are, they’re set to “gb”. This means that some of the key bindings will be wrong.

To see if you need to change the localization, try to type a double quote. If an at symbol (@) appears, your localization is GB, and you’re going to need to change it.

The most failsafe way to reset the locale is through the GUI. Because keybindings are off, it can be difficult to work with vi, and the configuration managers don’t appear to affect the keyboard bindings, in spite of what some tutorials say.

  • Start X windows (startx), then, with the text editor (Accessories > Leafpad), open the file /etc/default/keyboard
  • Save that file to the desktop, then, with the terminal, move that file to /etc/default/keyboard
  • Reboot the Pi by removing and reinserting the power supply. Using reboot sometimes causes the keyboard file to reset.

If your time is limited the day before, get someone to do this well in advance. You just need to have one RaspBerry Pi to make all of these changes, since you can swap SD cards in and out.

Things to print

You’ll want to make sure you have someone assigned to printing out:

  • Release forms for the students (from the repo)
  • Cheat sheets (from the repo)

Things to skip

There are a number of time sinks that you can get pulled into. Time here is often precious, so here are some things you can skip:

  • Cleaning up the trash. This can be done the day of.
  • Networking. It’s not needed for the class, save for one module, and that can be demoed on the teacher’s laptop.

The teacher’s laptop

The teacher should make sure PyGame is running on their laptop, and that IDLE is working. I prefer working in the same tool as the students. If I work in a different tool, we often get sidetracked talking about IDEs and shells and tab completion.

The teacher should also get the games that are on the Raspberry Pi onto their laptop. You can find them here: http://inventwithpython.com/pygame/index.html

The day of

The day of the class, you should probably show up an hour early, if you can. First, you’ll want to tidy the desk areas. Second, some parents tend to show up early.

One person should have a list of students signed up for the class. Each student should have a filled out waiver (included in the Young Coders Github repo). It helps to have a printed copy of the people signed up, so the list can be passed around from volunteer to volunteer as needed. Parents will often want to ask about pick-up times or lunch, and you don’t want to hold up the sign-in process.

Make sure to have a stack of blank waivers nearby for students or parents who forget theirs. If a student doesn’t have a waiver and the parent is already gone, I usually allow them to fill it out and hand it over after a quick phone call to the parent. The most important part of the waiver, after all, is the contact information.

I recommend letting the students in around fifteen minutes before the class start time if your classroom is small. Let people in before that, and the room can get fairly chaotic, especially with thirty or more bodies wandering around (some parents don’t leave until the class is underway).

At ten minutes after class time, I usually let anyone on the waitlist in to take extra seats, with the ones who signed up first getting priority. Once they’re settled, the class begins.

The class

The slides are self-explanatory, so I won’t be going over most of their contents. There are a few things you should watch out for, though.

Volunteers

I usually ask volunteers to stay at the back of the room, looking for errors on the monitors, and watching for body language that might indicate that a student is discouraged. Slumped shoulders and hanging heads are hard for a teacher to see when they’re hidden behind a monitor.

I usually warn them away from interfering with a student who is quietly distracted (for example, looking at Facebook), because we get students of many levels. Some may already be familiar with variables and are waiting for a section that is new to them, or for a hands-on demo.

The teacher

I know the standard uniform for most tech people is grey or darker grey. It’s better to wear a bright shirt when teaching, though, especially if the students aren’t used to you, or you’re teaching a younger class. It grabs the eye and helps hold attention.

Peanut Butter and Jelly demo

The slides refer to a PB+J demo. This is an interactive demonstration that is used to explain algorithms. The idea is take a rather scary sounding word and de-mystify it, all the while showing that computers need very, very specific instructions.

You start with an unopened loaf of bread, a jar of jelly, a jar of non-peanut butter (due to allergies), and a butter knife. You then ask the students how to make a sandwich.

The idea is to follow their directions exactly. If a student opens with ‘Put the peanut butter on the bread’, you place the unopened peanut butter on the unopened loaf of bread. If they say ‘get two pieces of bread’, paw at the bag until someone shouts to open it. Once the students start shouting out very specific instructions, you can move on.

For an example of how this demo might work, check out this video:

[youtube=http://www.youtube.com/watch?v=-FC2USu3BnQ]

Breaks

Kids are not machines, and neither are you. Take frequent breaks. I usually break after every few concepts, which ends up being a break every twenty minutes. This gives the kids a chance to ask questions, go to the bathroom, or get some water. It also rests the teacher’s voice, which can start getting hoarse before long.

Snacks and lunch

Adults need coffee breaks. Kids need snack breaks. Make sure to break around mid-morning for a food and drink break, and again mid-afternoon. It doesn’t need to be anything fancy. It’s just there to give them some energy. Also, if a student gets hungry before then, don’t forget, you should still have the makings for PB+J in the room!

For lunch, you’ll want to let the students know where the food is being served, and make sure, if it costs money, that everyone has cash. If a student hasn’t been released to get their own lunch, make sure someone can stay behind to wait for the parent.

And, most importantly, make sure the teachers eat! A woozy teacher is no good to anyone.

Energy

With younger students, I’ve noticed that their energy is high in the morning, but lower later in the afternoon. This trend reverses with older students. After 14, the students are usually quieter in the morning and more energetic in the afternoon. Your students aren’t disinterested in the topic, and they’re still getting all of the information. They just have different energy cycles.

Calling on students

Make an effort to call on students from all over the class. You will almost always get one student who will want to answer each question, but it’s important to engage everyone.

If a student never raises their hand, calls out, or engages, make an effort to chat with them during breaks. Some students are simply more shy than others.

If you have a quiet class, don’t worry about asking the class to shout out an answer. Instead, ask for a show of hands. For example, instead of asking “What’s the result of this expression?”, ask “Show of hands: Who thinks this is True? False? Not sure?”

Games

At the end of the class, you should leave at least an hour to go over games.

Number guessing game

In general, I start with a number guessing game. All of the students will know how to make one of these by now, but I still like to give them somewhere to start. This is the initial code:

secret = 5

guess = raw_input(“What is your guess? “)
guess = int(guess)

if guess == secret:
    print “Right!”
else:
    print “Wrong.”

I run the code once, and then start taking requests from the class. How can we make this game better? Going requirement by requirement, the game usually morphs into a game that generates its own random number, gives hints, and runs either a certain number of times, or until the user guesses the answer.

Inventing with Python

Another thing you can dive into is changing the games included on the Raspberry Pi. Chances are, the students have had a chance to play with the games by this point, so ask them which one they’d like to change.

You’ll need to make sure that the games are already on your laptop. You can find them here: http://inventwithpython.com/pygame/source/

Start small, when it comes to changing something. For example, change a color, or the title text. Then move onto larger things. Have the students guess what they should be looking for, and encourage them to open the code and play with it themselves. Don’t be afraid to break the code, and have the students try to figure out what’s wrong from the error message.

Other games

There are other games in the Young Coder’s repository as well, such as a state guessing game, and a link to a very simple roguelike. Don’t be afraid to take suggestions from the class, either. Sometimes, they’ll come up with something simple enough to hack through in a few minutes.

End of class

Fifteen minutes before the end of class, it’s important to show the students how to unplug their Pis, and how to set them up again. Make sure to have everyone disassemble their Pis, reassemble them, and log back in. Pass out the cheat sheets.

If you have extra time, don’t be afraid to let the kids just hack for few minutes while parents show up, or kids check themselves out.

Once everyone is gone, make sure you have help breaking down the room. Recruit all the strong backs you can, because moving 25 monitors is no joke.

And that’s it!

Once the room is broken down, you’re done! If you made changes to the slides or added materials, please, send a pull request to the Young Coders repo so we can all benefit. And if you can, blog about your experience. We can always use a signal boost!

tags: , , , , ,