189

Original Question

I was invited to the kindergarten group of my elder daughter to talk and answer the kids' questions about my profession. There are 26 kids of age 4-6 in the group, plus 3 teachers who are fairly scared of anything related to programming and IT themselves, but bold enough to learn new tricks. I would have about 20-30 minutes, without projector or anything. They have an old computer though, which by its look may be a 486, and I am not even sure if it's functioning (Update: it isn't).

My research turned up excellent earlier threads, with lots of good tips:

My situation is different from each of the above though: the latter ones are concerned with older children, while the first one is about talking to a single kid (or elder person) — a group of 20 is a whole different challenge.

How can I teach the kids and their teachers about programming in a fun way?


Plan Based on Answers

Thanks for all the amazing answers, guys :-) I don't think it makes sense to accept a single answer, but I like Jim's the most, just as the majority of SOers apparently do. However, a lot of other answers contain useful hints and ideas (some of which I will surely use on future Career days in the school...).

I put together a rough plan:

  1. Briefly explain what programming is, like in this answer.
  2. Tell that computers are everywhere, and collect examples with the kids (as suggested in several answers below).
  3. Do Jim's presentation with the sandwiches.
  4. If time allows, build it further:
    • explain that the strength of computers is that they remember exactly what they are once taught (and demonstrate it by preparing a second sandwich, repeating all the faults of the first attempt)
    • have a second round trying to fix the bugs in the process
    • explain the concept of loops: you can make the computer prepare n sandwiches with a single instruction

This is my plan - I am pretty sure it will turn out very differently, so I will improvise according to the situation. The presentation is scheduled in about 2 weeks time - I will update the post afterwards and tell how it actually went...


Results

Finally the day of the presentation arrived today... in brief, all went fine and it was a huge success :-)

The group turned out to be quite restless and energetic this time, so the conversation occasionally went a bit chaotic. I had to cut it short and get to the Big Sandwich Maker Show. Just as Jim described, the kids loved it.

There was one unforeseen side effect though: after the first slice of bread finally got ready, everyone wanted to eat! So for a while - during which I tried to keep up the conversation and explain more about programming - we had to install a sort of emergency service line with the kindergarten teachers to produce immense amounts of marmalade bread and feed the hungry crowd (this was half an hour after breakfast, for the record :-). Then we ran out of bread, which clearly meant the end of the presentation. The biggest burst of laugh erupted when after cleaning up the mess, the kids noticed that the poor computer stepped on a patch of marmalade which ruined his sock :-)

The teachers themselves were also very positively impressed - judging from the feedback, this was the best and funniest Career day in this group so far. Thanks again to all of you for the great ideas!

Things that could be improved (next time):

  • When I asked "do you think computers are smart?", to my surprise most of them answered "no". I then asked who thinks computers are smart, and why. However I neglected to ask who thinks computers are dumb, and why - thus I think I missed some potentially intriguing answers.
  • Inviting the kids to come around the table got them actively involved... but maybe a bit too actively at times. Bread slices started to disappear from the table and some of the audience mimicked the computer as closely as dipping their own fingers into the butter and the marmalade :-) So it is better to keep some distance.
  • To keep the hungry crowd under control, the kids should be clearly told in advance: "you can eat all the bread, but only after the demonstration!"

But overall, I am quite happy with the outcome. And I am sure the kids got the core message: as a programmer, if you avoid creating a mess, you can make your bread (even with marmalade :-)

Community
  • 1
  • 1
Péter Török
  • 114,404
  • 31
  • 268
  • 329
  • 1
    I look forward to hearing how it goes! – Jim Kiley Mar 29 '10 at 14:50
  • 1
    Start with number 3 and only discuss áfter the demo! – Gerard Apr 01 '10 at 12:04
  • 4
    Who on earth has a career day for 5-year-olds?! Everyone knows kids can't talk until at least 6 or 7. – Mr. Boy Apr 08 '10 at 13:59
  • 4
    Now I want to do a career day just so I can make sandwiches like a robot. – glasnt Apr 08 '10 at 22:37
  • Peter, I'm glad to hear it went so well. It hadn't occurred to me that younger kids might want to eat their own bread and jam, that is pretty funny. When I did this it was for, I think, third graders (8 years old or so). They had a little better control of themselves. :-) – Jim Kiley Apr 09 '10 at 12:14
  • I used this technique at my son's kindergarten, and it worked great! I substituted sugar cookies, icing and sprinkles because of nut allergies. – Matt Casto Mar 25 '11 at 16:57
  • I used a lot from this thread.. Documented my experience and included my slide deck here: http://www.alexdresko.com/2014/11/21/my-20-minute-software-developer-presentation-for-7th-graders/ – Alex Dresko Nov 21 '14 at 19:34
  • 1
    I know this question is a bit off-topic for Stack Overflow, but it just saved my life! I've been banging my head against a wall trying to figure out how to beat the firemen and pilots at career day. Ha! Victory: me. – Jonathan Benn Feb 21 '19 at 14:39
  • 1
    @Péter Török The link "in this answer" does not work. It points to a "This site does not exist". – Mike Jul 14 '20 at 11:36

18 Answers18

280

I've done this before.

I laid down a lot of paper towels on a table, and got out a loaf of (cheap) bread, a small tub of butter, a small jar of jelly, and a plastic butter knife.

I said to the kids, "How many of you think computers are smart?" Most of them raised their hands. I said, "Computers are really dumb. People are smart. You have to tell a computer everything. It doesn't know how to do anything. I'm going to show you what I mean. I'm going to pretend I'm as dumb as a computer, and you guys tell me how to make a sandwich."

And when the first kid said "open the bag of bread!" I ripped the bag apart and let bread fall randomly all over the table. That got a lot of giggles. I continued to take the kids literally at their words until they learned to give short, specific commands, and eventually we ended up with a butter and jelly sandwich. There was a lot of laughter but they came away understanding, at least a little, what a programmer does for a living.

(I should note, I've also done this demonstration with adults in an "intro to programming" class, and it works just as well with them.)

Jim Kiley
  • 3,632
  • 3
  • 26
  • 43
  • 111
    +1 kids love it when grownups are silly AND they get to tell them what to do :) – Chris McCall Mar 16 '10 at 19:00
  • 5
    Sounds like a great idea for promoting fun and having them learn through a hands-on approach. Wish I'd had this demonstration in kindergarten! – Peter Mar 16 '10 at 22:24
  • 14
    That's quite the procedural programming approach tho. ;-) – herzmeister Mar 17 '10 at 10:57
  • I'm sorry to comment just with a laugh, but @herzmeister der welten: you just made me laugh really, really hard. I've really enjoyed this question. This (Jim's) is a GREAT answer. – lance Mar 17 '10 at 14:46
  • 10
    I once participated in a similar demonstration with grade school kids. The kids howled with laughter when they neglected to mention using the knife to spread the jelly on the bread. – jschmier Mar 17 '10 at 15:36
  • jschmier: Did you stick your finger in the jelly jar? :) – John Mar 17 '10 at 16:15
  • 2
    @herzmeister - On the contrary! Nothing could be more **OBJECT** oriented ;-) – Péter Török Mar 17 '10 at 20:26
  • 6
    This is one of the best answers I've seen to any question, anywhere. Thanks. – Mike Dunlavey Jul 16 '10 at 14:30
  • Beautiful!!! Hope these kids/adults do not give any other mischeivous commands like EXIT, QUIT he he.. – bragboy Jul 20 '10 at 15:46
  • 5
    At least none of the kids called out DROP TABLE. – Moses Mar 17 '11 at 15:46
  • This is one of my favorite all-time answers on SO. I adapted it for a 7th-grade career fair and it's been a big hit for several years running. I wrote about my adaptation here: [7th Grade Career Fair: Drawing a Rainbow to Teach Kids About Coding](https://nolongerset.com/7th-grade-career-day/). – mwolfe02 Nov 23 '20 at 03:29
47

What about doing a kinesthetic version of Logo?

Say you have two kids side by side. Can they figure out how to switch places using only the commands Step Forward, Step Back, Turn Left 90 Degrees, and Turn Right 90 Degrees? I'm sure there are other games like going through a maze, etc.

I'd think you'd keep their attention if you can keep them moving. This will spark the interest. They'll figure out later that the job is sedentary. ;)

John
  • 15,990
  • 10
  • 70
  • 110
  • 6
    "I'd think you'd keep their attention if you can keep them moving." Couldn't agree more. – Péter Török Mar 16 '10 at 16:16
  • 6
    Put the two kids standing at the front of the room, but let the kids in the chairs give the commands. The standing kids don't have a say in what they do -- they have to follow the commands given from the class (obviously you'll want to control the crowd somehow). The entire class is engaged. – lance Mar 16 '10 at 16:21
  • Also, if you decide the kids are particularly bright, you could show them how to improve the commands they come up with (assuming you're smarter than the kids -- that can be a risky assumption sometimes!). Create some incentive for the command-givers (candy, praise, whatever) that motivates them to make the commands "better" by some measurement you introduce (fewest steps to completion, etc). – lance Mar 16 '10 at 16:22
  • I like this the very best. You could have kids (forgive me if this is the point of Logo anyway, I've never used it) program series of actions for a number of kids (go ahead 2 squares, turn right, go ahead 5 squares...) in a way they don't crash. An advanced level would be having separate teams build "programs" that need to run alongside without crashing (Kind of like API programming.) It would need some additional incentive component - not to just do steps, but to reach some sort of goal. Maybe getting a flag in a grid of squares and bringing it to a different spot on the grid.... – Pekka Mar 16 '10 at 17:39
  • Pekka: Logo is a programming language that I used Way Back When in my middle school computer class (on a Commodore 64 IIRC). You command this turtle to go forward, turn X degrees, pick its pen up, put it back down, change the color, etc., and you can draw things with very simple commands. – John Mar 16 '10 at 19:01
  • At first, you could have people direct the turtles by telling them what to do -- then when they've got that figured out, make them write down the instructions on the blackboard first! This could even segue into branching/looping. ("What happens if there's a chair is his way? What if you don't know where the chair will be?") – Ken Mar 16 '10 at 22:37
  • @Ken: Remember, this is for five-year-olds. Most of them won't know how to read. – Michael Myers Mar 17 '10 at 15:43
  • mmyers: They won't know how to read English, but that's not the only way to write things down, and probably not even the best way to write it. (Even us professionals don't write programs in English!) I'm sure they can recognize a sequence of arrows indicating which direction to move next. – Ken Mar 17 '10 at 17:19
  • Thanks SO community for my first content-related silver badge! ;) – John Mar 17 '10 at 19:43
  • I like this idea as well – Kenny Cason Oct 24 '10 at 19:49
29

Don't try to show them anything on the computer. Watching someone else type is boring for adults. For 5-year-olds, it's a recipe for anarchy.

Instead, make it interactive. Some form of "Simon Says," but have them be the programmer.

Anon
  • 345
  • 2
  • 6
  • Nice comment. I doubt if they have the attention span or zeal of a developer trying to keep his/her job or fighting for a pay raise. However, kids love games. – Phil Mar 16 '10 at 15:52
  • 14
    So it would be "sudo" instead of "Simon says"? ;-) Seriously though, it is a good idea, I will think about it more... thanks. – Péter Török Mar 16 '10 at 16:12
  • 2
    sudo make me a sandwich http://xkcd.com/149/ – Bratch Oct 01 '10 at 00:28
12

I've never tried this, but it might be fun.

Physically demonstrate an algorithm by using some attribute of each kid as the input data.

For example, get them to form a line (in whatever order they go to initially), side by side. This might work better in a semi-circle so they can see each other doing the exercise, but there has to be a break in the line somewhere. Then, starting at one end of the line, get them to take turns doing "if the classmate on your left is taller than you, switch places; otherwise, stay put." The game ends when you go through the line and no one switches places. Get them to observe the results. (Hint: bubble sort!)

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
  • 1
    This is called role-playing and it has a firm place in the teaching of CS. Good idea. – Konrad Rudolph Mar 16 '10 at 19:04
  • Good idea, and (for somewhat bigger kids) could be used together with e.g. a demonstration of binary search in similar fashion... but that would be too much for these kids yet. Another worry for me is that I can't see a good way to explain why and how we use sorting, to link it to the main theme... I feel it may require too abstract an explanation for these kids. – Péter Török Mar 16 '10 at 23:02
8

Make them write short programs for you to do simple things (like enter the room and take a seat) and then execute them literally to demonstrate the "bugs" -- where they were not specific enough or didn't take something into account, so that you will do things wrong. Try not to hurt yourself in the process. It should be funny and will get them a pretty good idea of what an algorithm is.

MK.
  • 33,605
  • 18
  • 74
  • 111
7

To turn the kids onto programming, you drive up to the kindergarten in your Rolls Royce and walk in with your gorgeous significant other.

If you're not Bill Gates, then you'll just have to explain that you sit in boring meetings for 4 hours a day, print cover sheets for TPS reports for 2 hours, and stare at stupid stuff written by preceding clueless programmers for the other 6 hours. (No need to mention that then you field calls from people who are maintaining your last program and who think YOU are the preceding clueless guy).

No, i'm not bitter, why do you ask?

Seriously, (I am sure I'm plagiarizing from one of those 3 threads subconsciously), have them play "give instructions to me on how to do Y", with you doing things the Genie way - all wrong unless instructions are very precise and clear. Actually mention genie as good example assuming the kids saw Aladdin.

;^)

DVK
  • 126,886
  • 32
  • 213
  • 327
4

I think you could do the following demonstration in 20 minutes. Maybe it's more suited for older children. I don't really know what kindergarteners are capable of. I'd personally avoid trying to explain programming, and instead describe a problem that we as programmers solve. For example, if there are enough children, you can demonstrate the Internet to them interactively.

Part I: How it Works

First describe to them, preferably with props, how the Internet works. Bring in a laptop connected by a cable (for visual effect) to a home router. Tell how computer programmers make all sorts of devices, including the programs on the laptop, the program in the router, and applications in other devices connected to the Internet, like cell phones.

Explain how computers aren't connected directly to each other because it's impossible to connect a cable from every computer in the world to every computer. You'd need a billion cables in your house. So instead, computers connect to routers. And routers give packets of data (for example, e-mails, pictures, or videos) to other routers until it finally gets to the other computer.

Describe the rules for a computer to talk to another:

  1. A computer can only give a packet to its router.

  2. A router can give a packet to the computers connected to it, or to the nearest router.

This explanation should be very short, but emphasize the rules. You should probably equate packets with e-mail or pictures.

Part II: Interactive Time

Then have 3 children volunteer to be routers. Everyone else is a computer and divide them up evenly. It'd help to have colored cards they can hold. Like the person holding the dark blue card is router that can talk to all the people holding light blue cards. Let's say you give out blue, red, and yellow cards.

Arrange the "routers" in a line, blue, then red, then yellow. The blue router will then have to give a packet to the red router to give it to the yellow router. Group the other kids around their routers.

Bring "packets" for each child. Mix it up with photos, letters, a print-out of tic-tac-toe to symbolize a game, or whatever. Start by having a single red computer send to a yellow computer.

"Ashley, pick a yellow computer that you want to send your picture to. OK, to send the picture to Brian, you have to give it to your router, Kelly. Tell Kelley who should get the picture. Kelley, you are blue, so you can't give the picture to Brian. You have to give it to Timmy. Tell Timmy who should get the picture. Timmy is red, so he can't give it to Brian. He has to give it to Renee. Renee, you can give the picture to Brian since he is a yellow computer and you are the yellow router."

Then have everyone think of one person to send their "packet" to, and watch your impromptu network in action.

Part III: Relate back to computer programming

To conclude, ask the routers whether it was easy to be a router, or hard because there was a lot of people trying to give you pictures at one time. Point out where things went wrong and tie it into real problems that we solve.

"I could see that Timmy was overloaded with packets because everyone had to send their packet through him. As computer programmers, we have to solve problems like this every day. One way we could solve it is to give Timmy 4 arms. Or maybe add another router so that if Timmy has too many packets to deliver, you could give it to a different router instead." Or "Maybe we want pictures to be delievered faster, so we could ask the router to deliver the picture first before delivering any other packets."

indiv
  • 17,306
  • 6
  • 61
  • 82
  • @Péter Török: Hah, I realize after going through the comments that I must have subconsciously seen your comment about internet routing and stole the idea. – indiv Mar 16 '10 at 17:36
  • That's fine, thanks for elaborating the idea. I haven't got this far with it :-) – Péter Török Mar 16 '10 at 20:27
3

To kind of borrow from the other ideas already posted, a game of Simon Says may be the way to go. However, you can stress how computers will do EXACTLY what you tell them to do. So, if the kids are Simon, and they say, "Simon says sit down." then you just sit down on the floor (not in a nearby chair or anything). Follow instructions to the letter and not to the spirit. (Of course, this may be tricky getting the kids to give ambiguous instructions, but I'm sure you can come up with something.)

Other than that, you could also talk about video games or other computer "things" that the kids may have used and you can say that programmers, like yourself, create those. And then maybe jump into the Simon Says to show how it works. Of course, this could result in a bunch of kids growing up thinking that you spend your entire day at work playing Simon Says with a computer...

JasCav
  • 34,458
  • 20
  • 113
  • 170
3

I sometimes regard my job as playing with Lego bricks. You start with a set of bricks of different sizes, shapes and colors, and from that you build larger things. You can build castles or star wars robots using the same set of bricks.

And, it's about the same amount of fun!

  • Totally unrelated but maybe relavant: as far as my kids are concerned, they have no clue (and don't care) about the distinction between internet and computers. –  Mar 16 '10 at 15:59
  • Yeah, one of the ideas I am actually toying with is to let the kids play how packets are routed over the net. – Péter Török Mar 16 '10 at 16:10
  • I like the Lego analogy. However, my 5 year old has just inherited the Technic Lego Bulldozer I had as a child, and after spending a couple of hours helping him to build it, all I can say is, Lego (still) Rocks! – Skizz Mar 16 '10 at 22:37
3

One of the major perks of programming is the ability to create things. To make dreams come true. I don’t think this will appeal very much to small children who have no problem to let their imagination roam free anyway. What do computers bring to the table?

Instead, you could probably interest them in problem-solving, puzzles. The kind of thinking that is needed for programming. I probably wouldn’t use a computer at all; instead, let them solve an engaging mathematical puzzle. It doesn’t have to be hard but it should involve creative thinking.

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
  • 1
    Could be interesting, but I can't easily think about math puzzles suitable for 4-6 years old kids. My own are right now happily counting things all over the place, and the elder one just started to grasp that 1 + 2 = 3 and 5 - 1 = 4. – Péter Török Mar 16 '10 at 16:26
  • Let's find out how well small children perform in solving a TSP ;) – Dario Mar 25 '10 at 18:27
3

When I try to explain programming in a short amount of time to people who aren't familiar with programming, I explain it using Legos. With Legos you have a bunch of simple pieces, this is like the programming language. Then you can piece them together however you want and make anything that you can imagine as long as you have the correct pieces.

To adults and kid this is likely to be a very interesting analogy and it still demonstrates the concept of programming.

Also, you could even build a Lego car poorly, then also display a Lego car with very nice design, and show them that programming is just like this. You can program cars or robots or whatever you can imagine, but there's not only one way to do it, there are many ways to do it. some better than others.

I have gotten so many people to begin programming and even switch their majors with this analogy. :)

Kenny Cason
  • 12,109
  • 11
  • 47
  • 72
  • This is a nice idea which surely works for adults, and most probably for school age kids as well. However, I think that it requires too much abstract thinking for a 5 year old. Their mind is just not at that level yet. – Péter Török Oct 25 '10 at 08:02
2

I think I'd begin by talking for 2-3 minutes about computers, and that they follow instructions about what to do.

Then I'd demonstrate with a prebuilt LEGO Mindstorms robot and program it a couple of times and run it, just to show them that it follows the program. Mindstorms programming is pretty visual and simple to grasp.

Finally I'd try to explain that there are computers running programs almost everywhere, even in traffic lights, microwave ovens and their favourite toys.

Guge
  • 4,569
  • 4
  • 35
  • 47
  • 1
    I have newer owned a LEGO Mindstorms kit, neither I do know anyone who has one. Will probably take the excuse to buy one as the kids get bigger though ;-) The other ideas are useful, I am thinking along a similar line. – Péter Török Mar 16 '10 at 21:02
2

Talk about how pervasive computer programming is - it guides airlines, phones, cars, how you buy your tickets online etc.

Then teach them to write a simple program symbolically - 1.Draw a grid on the blackboard.
2.Draw cheese at one end, and a mouse at the other end. 3.Have them "program" the moues to get the cheese!

Walk them through their failed attempts as a class, maybe have the mouse fall in traps or something in the grid. They would get a thrill out of it.

Core
  • 840
  • 11
  • 24
2

How to teach kids what programming is?
Well, the first step is likely to get some cows involved!
Download a simple programming game (like IQ Marathon) onto the laptop and hook that up to a projector. While you're doing this you can talk about how being a programmer often means working with recent technology (and thereby giving a demonstration of you doing so).

Once you've got it set up (practice so you can make it work in 5 minutes or less), you can use the game to show very visually (and with cows!) how the computer only does exactly what you tell it to, and how you (the programmer) have to figure out what instructions are necessary to make it do what you want. When you get it right, everybody is so happy about your success that there are dancing cows!
From there you can answer any questions, or perhaps just let the kids try and figure out how to program cows themselves. Wherever they want to go, really.

Cows!

Péter Török
  • 114,404
  • 31
  • 268
  • 329
Task
  • 3,668
  • 1
  • 21
  • 32
  • As I mentioned in the post: no projector, no laptop. Even if I had a laptop, there is no way 20 kids can see the screen at the same time :-((( – Péter Török Mar 16 '10 at 20:54
  • 1
    Well, we tried it with my wife and love it... maybe I will bring a laptop anyway :-) – Péter Török Mar 16 '10 at 22:19
  • 8 D The beauty of the cow solution is that it's fun for everyone and it demonstrates excellently what programming is all about in a format that *anyone* can understand. When you said "no projector" I assumed you meant "no overhead slides". When I say "projector" I mean "plugs into your laptop screen output port and lets everyone see the screen projected at 10'x10' size". Which not everyone has, but a lot of techies can get their hands on one if required. Often you can sign one out at work! "It's for demo purposes" should do the trick. 8 ) – Task Mar 17 '10 at 13:24
1

Give each child a cut out shape; circles, squares, triangles, different colors etc. Explain how programming is giving instructions in specific order. Hold up a picture of a smiley face and walk the kids through how to construct it. Yellow circle, black dot, black dot, arc. Then show a more complicated picture, and have the kids come up in order based on your instructions. You can even make a mistake (like putting the yellow circle over the black dots) to show how 'Bugs' creep into a program.

WombatPM
  • 2,561
  • 2
  • 22
  • 22
1

Demonstrate a simple lego mindstorm robot and its corresponding flow chart. You wont have to show then any code and they can see the end result of your logic by watching the lego execute your program.

Athens Holloway
  • 2,183
  • 3
  • 17
  • 26
1

Kids likes things that "do something" and flashing lights.

For my sons birthday, I made a safe (box with electric lock and lots of leds) that was connected with the PC.

They had some questions to answer, and each response resulted in flashing leds (green for good answers and red for wrong answers). If they answered enough questions right, the leds started a simple animation which ended with a loud "clonk". The safe was now open and they could collect their rewards.

It was fun to build and the kids loved it.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
0

Sell them on the value of unattended automation. Have a kid walk to the front of the room and show the class what he does each night when he's brushing his teeth. Then have that same kid show you what he'd be doing during that time if he didn't have to brush his teeth.

Then tell that kid that you know how to move that brush across his teeth while he's doing that other thing that he'd rather be doing, and tell him he'll never even feel it. His teeth will just magically be clean next time his mother goes to inspect them.

Then maybe write some pseudocode on the chalk board that shows the Brush API accessing the Tooth resource in a background thread behind the Favorite activity.

lance
  • 16,092
  • 19
  • 77
  • 136
  • 2
    Hmmm.. this might have consequences the other kids' parents may not be happy about... And only _some_ of the kids can read _some_ uppercase letters (no words yet!), so pseudocode is a no-op :-( – Péter Török Mar 16 '10 at 16:08
  • Got it. So, code of any kind (indeed, the thought of code) is out. And I see your point about the toothbrush thing. The point is to sell the kids not on programming, but rather on the value/conveniences it creates for people's lives. I upvoted John at CashCommons's answer, as that highlights the logic of programming. If you could figure out some way to show them the logic (again, see John's answer), and *then* highlight the automation of programming and the way it makes life more convenient for people, you might have a hit on your hands. – lance Mar 16 '10 at 16:17