Join 3,366 readers in helping fund MetaFilter (Hide)

How do I explain programming to a 12-year-old?
March 17, 2010 12:14 AM   Subscribe

Looking for some resources for explaining a programming career to middle school kids.

I volunteered to speak to some local middle schoolers during a Career Day next week. The good news is that I have a morning off from work and I get 30 minutes to hang out with some young people. Cool! Unfortunately, I have no idea how to engage them regarding my job.

I'm a programmer at a software company, about a year out of college. I know enough about programming, but I know very little about the typical 8th grader. Should I talk about algorithms by having them explain how to make a peanut butter sandwich? Pose some simple discrete math puzzles? Talk about UI testing? I had programming classes at my middle school, but I'm assuming that these students probably do not.

The program that I'm volunteering with has given me some generic advice, like create discussion / come up with an activity instead of lecturing for 30 minutes. So while any advice on the situation is welcome, I'm mainly looking for what to talk about in a technical sense.
posted by tantivy to Education (8 answers total) 2 users marked this as a favorite
Don't talk about the details of what you do, talk about why you do it. So what kind of software do you make? What's it's function, what problem does it solve? Most 12 year olds will understand what software is so you should be able to talk about what your particular version achieves. Also talk about overall processes, like do you work in groups to plan things? How do you solve problems? Do you have lots of meetings or do things on your own? Give them some kind of sense of how you spend your time and how that might differ from being, say, a fireman. If they're really interested or computer savvy you can talk about languages or how you build those tools or what cool toys you get to use but start broader to hook them in.

As an example, my boyfriend's a software engineer too and if a lay person asked about his job he'd tell them he builds business solutions, projects or bits of software that help his parent company go about their business. They include things like tracking how old each computer is and when it needs upgrading or planning tools to make sure there are enough resources available when bidding for a new job, it's tangible and most people get the point of what he's doing.
posted by shelleycat at 12:37 AM on March 17, 2010

The thing that most people don't understand about computer programming is that it isn't so much digging through piles of unreadable text (only sometimes), but more taking a big problem and then breaking it down into smaller problems and then solving these independently. I think an example that might work for younger people is to have some kind of scrambled picture which you can unscramble though a series of discrete steps. You could show them a few simple examples and then combine them to a more complicated one at the end of your time.

For example, show a picture with black bars inserted. When the black bars are removed, the picture is "normal" again. Show another picture with the pixels shifted on the diagonals. And another with the colors reversed. Then combine them and have the students try to figure out the best "algorithm" for restoring the picture.
posted by beerbajay at 3:38 AM on March 17, 2010

Double-check the ages of the kids. It will be a lot harder to engage a typical 8th-grader (13-14 years old) than a 12-year-old. Twelve-year-olds still tend to be agreeable and enthusiastic. Eighth-graders, not so much.

I've explained the idea of programming as telling a really really dumb dog|robot|alien what to do. (Pro tip: DO NOT say a really dumb baby, or a really dumb kid. Learn from my mistakes.) An exercise I've done to demonstrate this: I stand at one end of the room, and ask the kids to tell me how to get to the other side of the room. Much hilarity ensues when I walk into walls or fall over my feet because their instructions weren't explicit enough. What does "turn to the left" mean? What does "walk" mean? It also helps to illustrate the idea of breaking large tasks down in smaller ones, like beerbajay mentions.

I've also done this: tell the kids to write out the directions to their next class or how to open their locker or how to make microwave popcorn or the like. (Choose something relatively easy, but where the steps involved need to be performed in a certain order or the results will be wrong.) Then I say "Congratulations! You just wrote your first program!"
posted by SuperSquirrel at 5:37 AM on March 17, 2010 [2 favorites]

Another physical idea is to have the kids line up along the wall, then bubble-sort themselves into an ordered line based on height. Each kid compares himself to the next kid and the taller one swaps places to the left, then do it again with the new kid you're standing next to.

As a programmer, I can't say I've ever actually used a bubble sort, but it's a programming concept with a physical component that can be used to engage kids. You could talk about the idea that programming is not only for finding a solution, but for finding the solution with the best efficiency with regard to resources (a bubble-sort is not very efficient). Or talk about how lots of these lower level problems like sorting and date calculations have already been "solved" and saved into black-box components, so now programmers work more on the big picture.

But I'd probably do SuperSquirrel's idea of walking across the room. And I've seen the instructions lesson used with the instruction being to make a peanut butter sandwich - "well how do I get the peanut butter if you haven't told me to open the jar first?"
posted by CathyG at 6:42 AM on March 17, 2010

google lightbot. super fun flash game based on the principles of programming - you control a robot (!!) using a palette of available instructions, string them together in reusable sub routines, and then string those sub routines together into complex original behaviors.
posted by nihlton at 10:06 AM on March 17, 2010

I switched between 12-year-olds and 8th graders (not generally identical demographics, I know) because I don't remember what grade I'll be visiting. And I hesitate to talk about my work from a business perspective because I wouldn't have cared about that when I was a kid. Would kids care about CRM software?

I've seen "how to do a simple task" used to explain algorithms. Any thoughts on the best variation of that? Talking about PB&J sandwiches makes me hungry but I wouldn't try to bring them snacks. I've done paper airplanes and that was a recipe for chaos in a class of 12-14 relatively more mature students...
posted by tantivy at 10:41 AM on March 17, 2010

I forgot to mention that I won't have access to a computer or projector during my visit, so I can't actually run programs and show them the output in real time. I can bring in handouts, but I don't think screenshots would be a great use of paper.
posted by tantivy at 10:42 AM on March 17, 2010

As for algorithmic games: I did an activity once involving teams of 3 making the longest possible paper chain (I.e. Where you interlock loops together) in 5mins. Suprising slow. Equipment: scissors, tape/glue, paper. And time to clear up!

You could maybe do some sort of simple cipher. A=1, b=2... which would show inputs, outputs and processes/functions and loops distinctly. I would have loved that at 14.

The suggestion made above about getting the kids to line up in height order is good. Another one is asking them to line up based on birthday, I.e jan 1st at one end dec 31 the other. As it's far less obvious. And will make them consider the 'test' a bit more. Ymmv.
Most importantly don't talk nonstop for the 30 mins.
posted by 92_elements at 1:59 PM on March 17, 2010

« Older Why are boxes and packaging so...   |  Video cognascenti: Why is it t... Newer »
This thread is closed to new comments.