99
votes

I've been volunteered to sit down and talk about the life and work of a Developer with a 15 year old work experience student next week.

The catches are that

  • I've got just half an hour, and
  • I'll be just one of the people talking to her - other people in different roles in the business will also be running through the elements of their jobs with her throughout the day.

What should I cover, and what on earth can I hope to teach her in just half an hour?

I assume that she probably has no experience with development or programming.

19
  • 158
    It's depressing how patronising many of these answers are towards kids - they've got short attention spans, they don't understand things if they're not visual, they can't deal with anything complicated. We're talking about a fifteen-year-old here. Fifteen-year-olds are quite capable of understanding and doing complicated things, spending hours getting deeply involved in something, and having abstract thoughts. I'd take a smart fifteen year-old over any of you schmucks! Commented Jun 17, 2011 at 16:34
  • 8
    @tom On the other hand, I have personally experienced how most adults even find anything other than the visuals on a computer to be tedious. It depends on the kid and how much interest they have in computers.
    – jhocking
    Commented Jun 17, 2011 at 17:26
  • 6
    @jh: Heh! I suppose the question is not whether this person is fifteen, but whether they're intelligent and inquisitive. We may all (barring Maxpm) be old duffers now, but we were all fifteen once, and i rather doubt that those of us who are intelligent and inquisitive adults were dull and disinterested teenagers. Commented Jun 17, 2011 at 18:17
  • 33
    "First I get in to work a little after 10 AM, drink a lot of coffee, chase it down with Mountain Dew and energy drinks. I spend the next 2 hours checking my mail, exchanging recipes with the one and only female developer in the entire building, then a brief nap after lunch. Get up, check email again, surf youtube for cat videos, catch up on the latest dilbert and smbc comics. Before you know it, its 4:30, time to go home. By myself I can't do much, but 100 programmers put together doig the same thing every day 3 years, well, that's how video games are born."
    – Juliet
    Commented Jun 17, 2011 at 19:19
  • 5
    @Tom: exactly. Many programmers started before age 15, so I don't understand the condescension.
    – Neil G
    Commented Jun 17, 2011 at 21:33

34 Answers 34

128
votes

I interact with high schoolers a lot, so I answer this question quite often. Keep in mind that 15 year olds are much easier to explain programming to than 50 year olds -- so you need not dumb things down or use far-fetched analogies.

I usually start off with examples of what programs are:

  • Apps like iTunes, Photoshop, Chrome, and games including console games.
  • OSes like Windows, Mac OS, iPhone's iOS, Android. (Trust me, they'll know what you're talking about.)
  • Programs that crunch numbers or solve really complicated math problems -- weather simulations, biological simulations, calculating pi, AI, language processing etc.
  • Most sophisticated websites involve programming too.
  • Transit ticket vending machines and ATMs, microwave and fridge timers, car navigation.

After that, I usually go on to explain that we code programs in a formal language that the computer can recognize, often typing them up in something as simple as Notepad. The languages look like a cross between math and English, describing concepts and giving formulas and instructions for the computer to follow.

Then they usually ask if I'm on the computer all the time, if this is why I'm always on Facebook, and why my eyes haven't gone bad yet. Guys ask if I know how to "hack people", and girls ask if it's good money or how many girls there are in computer science classes.

After that, if they're still interested, they usually start asking specific questions that are a lot easier to answer (or at least to Wiki): things like how you would make a game, how Windows Messenger works etc.

If you have a computer around, you can show-and-tell some code -- something that would have tangible effects, like a button click handler from the settings dialog box in Firefox, the main loop or physics code in a game engine, some JavaScript source from a website etc..

7
  • 73
    Thanks for reminding me that explaining programming to a kid may be easier than explaining it to an adult. I keep forgetting that they've never not been surrounded by computers.
    – jhocking
    Commented Jun 17, 2011 at 20:42
  • 3
    @jhocking I also think a lot of them are brighter than much of the idiot box generation. Quality aside, the sheer amount of text they read is bound to do some good. Commented Jun 17, 2011 at 23:57
  • If its a guy, just open up a console and do some non-run-of-the-mill console commands; he'll think your 1337.
    – user14886
    Commented Jun 18, 2011 at 0:55
  • 2
    @Satanicpuppy They sort of suspect it, because the computer science classes at high school are already sausage fests too... I read a study/survey a while ago that said it's because programmers have a reputation for being coke-guzzling, acne-ridden, socially awkward slobs -- which is a bit true. Computer science classrooms smell different from other classes; they smell hormonal, for lack of a better word. I don't know if the lack of girls is a cause or an effect to the fact that so many guys in comp sci classes simply don't care about hygiene or presentation. Vicious cycle, I guess. Commented Jun 20, 2011 at 23:00
  • 4
    @rei: Well, I have advanced social skills, and I found it cringe-worthy the amount of attention that the few females in those classes received...It was well intentioned, but...alarming. If it had been me, I'd have run screaming. Being surrounded by a horde of sweaty mouth-breathers is bound to be a turnoff for any normal person, so either you would have to like the attention, or you'd have to really really like comp sci. So it certainly didn't surprise me that there were so few females. I imagine at smaller schools it's not so horrifying. Commented Jun 21, 2011 at 0:13
71
votes

I explained it to my five year old with the following:

Me: "You know how, in stories, people say magic words, and change things in the world?"
Her: "Yeaaa?"
Me: "That's what computer programming is."
Her(quietly): "Wow."

15-30 minutes isn't enough to explain anything real, and explaining the underlying complexity is a sure way to make them run screaming. You work in it every day, you forget how fucking cool it is. No other profession in the world creates functional things out of nothing but words...At some point, everyone else has to go out in to the world of meat, and start beating on things with a hammer. That's the only way they can make their idea into a working thing.

Not us.

13
  • 23
    "No other profession in the world creates functional things out of nothing but words" - contract lawyers and legislators do. Commented Jun 17, 2011 at 16:30
  • 48
    @Tom They probably limit functional things more than they create them.
    – Maxpm
    Commented Jun 17, 2011 at 16:37
  • 16
    @tom: No they don't. A legal brief is no more a functional thing than a story or poem. A law is like a blueprint: it sets out an idea, but then someone has to go out into the world of meat and enforce it. But code? I could write a program to buy or sell stocks based on it's own internal logic, and it would go do it's thing with no further input from me. I could write one to govern flood gates, reroute electricity, turn lights on or off depending on the time of day. It's unique among professions. Commented Jun 17, 2011 at 17:35
  • 15
    @Satanicpuppy: No, you couldn't write a program that would do any of those things. An electronic engineer could build a computer that could do them, though. If you asked nicely, perhaps he might have it go out into the world of meat and enforce your programs. Commented Jun 17, 2011 at 18:15
  • 4
    @Satanicpuppy: I evidently didn't make my point clearly. What i'm saying is that, like contract lawyers, all we do is write down instructions. Executing those instructions is someone else's work. I don't think that diminishes our work - writing those instructions is quite an art. But you can't dismiss lawyers' work on that ground without also dismissing our own. Commented Jun 17, 2011 at 21:24
55
votes

A 15 years old person can understand any concept. I myself started programming at 14. (at school, many many years ago)

30 minutes is enough for a demo. Show her the magic of programming with something as widespread as a browser.

  1. Find a PC connected to the internet. (more fun if it's not yours, and even more if it's hers)
  2. Go to http://api.jquery.com/jQuery.getJSON/
  3. Scroll down the page and find the HTML code for the cats example.
  4. Select the HTML code and copy it.
  5. Go to http://jsdo.it and click on Start coding.
  6. Open an account using an OpenID of yours. (one step process)
  7. Select the HTML tab on the left panel and paste there.
    • in a second a bunch of cats will appear on the right panel
  8. Cut the javascript and paste it into the JavaScript tab. (for syntax highlighting)
    • in a second the cats automatically refresh on the right panel
  9. Look for the tags property in the javascript and change it to "dog".
    • a bunch of dogs appears
  10. Make her repeat the process by herself with other tags of her choice.
    • suggest her to try with two tags, separated by a comma
  11. Change the line "if ( i == 3 )" to "if ( i == 5 )"; let her realize that
    • now there are 6 images and before there were 4
    • it would be better if the number in the code matches the number in the page
  12. Fix the bug together (swap that line and the one before)
  13. ...
2
25
votes

Steps

As an almost 15-year-old, I can confidently tell you that you should have a spectacular start.

  1. Explain what programmers make. (Games, simulators.) Show something cool you made. (On the computer. Please no command line - that seems to scare everyone.)
  2. Explain how you make it.

    • Tell them you don't type in 10101010 all day. Tell them you don't even know how to do that. (Lie. You do know what 10101010 means, right? ;)) Tell them that that was years ago.
    • Start up your IDE. Make sure it looks cool - MSVS2010, QtCreator, and NetBeans are all good. Be sure to remove some of the extra things to make it look less intimidating (less menus), but keep the visual effects in.
    • Show them a sample of some pseudocode. Make it easy to understand:

      Display Window
      Display "I like cheese!"
      Display OK button
      
      If user clicks OK button, close Window
      

      Go through that step by step. Tell them this isn't exactly how code looks like. Code looks like English + Math. But it's not hard to learn the "language" (read: syntax) you talk in.

    • Show them an example with a bit more "math", this time.

      User inputs A
      User inputs B
      
      C = A + B
      
      Display C
      

      Explain that that code adds two numbers together, like a calculator. Show them the "real" code for this. (Make sure you put the bulk of the UI and other stuff in a separate file, and keep the file you show them short and simple.) Change it to a subtraction program (by changing the sign from + to -) right before their eyes.

  3. Explain what they need to know to do programming. (On various levels.)

    • Basic algebra skills, like if x + 1 = 2, then x = 1.
    • Problem solving skills.
    • ["Advanced"] Higher level maths. This is for programmers working at places like NASA.

Terms you can use

We know more than you think.

  • Facebook, Twitter, Social Networking
  • Windows, Mac, Linux
  • Design, Faster, Testing, Starting/Running

Terms you should explain

Yeah, we still need some stuff explained.

  • Compiler: Converts code (like example in step 2) into 10101010.
  • Programming language: Looks like example in step 2.

Terms you cannot use

Some of us know this stuff, but please don't say it anyways.

  • Any kind of "system" other than Operating System
  • Optimization, Analysis (oh oh)
  • Input/Output (if you need to use this, try to make it as simple as possible)
0
17
votes

If you go in starting to talk about things like process, patterns, requirements, and the such, she is going to shut down immediately. Kids today are graphic and visually motivated, so I would bring something in to help promote those types of stimulus. Show her something snazzy on the web and then on a high level describe to her what makes THAT happen. I would even suggest taking your development laptop in and make something "cool" happen on the screen - change the code in front of her and then watch it change on the screen. At that age, they are VERY smart and anything visual will help spark interest.

5
  • oh yeah visuals are a great idea. At the risk of this being too much like a class, I'd be very likely to draw diagrams on the whiteboard to illustrate everything I say.
    – jhocking
    Commented Jun 17, 2011 at 15:32
  • 1
    Talking about visuals, how about showing her a small video or program of Alice? Commented Jun 17, 2011 at 15:37
  • 9
    @Carlos As a 15-year-old, I can personally attest that I hate Alice with the burning passion of a thousand suns. That's probably because I already know how to program, though. I'm not sure how total beginners view it.
    – Maxpm
    Commented Jun 17, 2011 at 16:36
  • 1
    +1 for "change the code in front of her and then watch it change on the screen" - start by showing her a direct connection between the 'real' thing and the code behind it. Something moderately deep, like the sorting or querying of some data, not just tweaking a bit of JSP or string formatting. Make that connection, then build out from it. Commented Jun 17, 2011 at 16:37
  • 1
    The ability to change the look of a program with just a few lines of code is what got me into programming many years ago - thanks for the suggestion
    – Dexter
    Commented Jun 17, 2011 at 21:01
13
votes

There are two great analogies I rely on when explaining the work of programmers. One is a recipe; that metaphor is useful for explaining on a small scale what each line of code is doing. The work of a programmer is writing the recipe, and the computer is the cook.

The other analogy is that a big program is like a big company. There's a whole bunch of different departments that focus on different areas and send messages back and forth, and the whole ends up accomplishing the aims of the company. The work of a programmer is designing how the organization is setup, and the computer is all the people in the company.

8
votes

I'd say keep it general. Programming and many other professions boil down to problem solving. Show her how you solve problems on a daily basis. You might tell her about a project you've been working on and how it's going to help your clients. Also include a little bit about why you (presumably) like your job.

In my case I've developed an educational video tutorial website where other staff members post tutorials. I'd explain about the motivation for the project (teaching others remotely without having to tie up people), the problems I faced (I don't necessarily have to view these as hard problems) and how I solved them. I'd also talk about why I like programming in the first place: I like to create things and the contribution of programming to the modern world.

8
votes

Give her examples of software you have worked on. Do you have a client who publicly uses your software? Do you develop an in house app that you could show her? Show her the end result of your work, what the end user sees and uses.

Then, explain that you helped write it. Go over the parts that you wrote. Show some code if you can. Outline how those lines of code make some part of the application work.

Talk about how much enjoyment you get from seeing your code being used by people.

That's how I explained it to my 14 year old cousin anyway. He was pretty impressed and decided to take a programming class the next term.

5
  • 5
    It works well if you work on software that looks cool to non-programmers. Many of my recent projects live in a database and "look" like a command line (and even the ones that weren't were in a web app that looked very dull - but as long as the data was processed OK no one cared). To a non-programmer, it's a blinking prompt that outputs a line of text every few minues, then stops. So boring to look at... sigh :( Commented Jun 17, 2011 at 16:05
  • 1
    Take a larger view of "end result of your work". That doesn't only mean the software you worked on; it could also mean the various client applications that are enabled by the back-end software you worked on.
    – jhocking
    Commented Jun 17, 2011 at 16:27
  • At least you're not a SharePoint developer like me, @FrustratedWithFormsDesigner.. I'm sure I can find something that looks cool amongst all my angle brackets!
    – Dexter
    Commented Jun 17, 2011 at 21:06
  • 4
    @FrustratedWithFormsDesigner I went on a "let's persuade school kids it's worth applying to CS" day when I was 15, along with several other bright kids from my school. Command line stuff LOOKED COOL. It looked super powerful to us, and that made it COOOOOL. Don't assume that 15 year old girls don't want to rule the universe :)
    – testerab
    Commented Jun 17, 2011 at 23:35
  • Surely you've programmed something fun in your spare time which you could show. I programmed a Tetris game, a fractal viewer and a sudoku solver. Any of these are fun to show.
    – Carra
    Commented Jun 20, 2011 at 9:34
7
votes

Are you familiar with the board game Robo Rally?

I've found that it is the prefect fun analogy for programming. You are basically programming your robot using simple commands (arrows mostly) to reach a certain spot in the game board before the others.

Man I wish I still had my BigTrak...

1
  • 4
    We play this semi-regularly in our gaming evening (up to 8 people, most are mathematics or CS students). It is good to show how multithreading can go wrong :-p Commented Jun 17, 2011 at 22:14
6
votes

Show something simple, but useful. A good example I think would be the following:

  1. Get a folder full or images (enough that they don't all fit on one screen in your folder explorer)
  2. Tell them your goal is to resize the images (maybe so you can email them to friends, or post online somewhere, whatever)
  3. Demonstrate resizing one image in the GIMP/Photoshop/whatever
  4. Now point out that doing that took at least 30 seconds, and you have a lot of images, you don't want to spend an hour doing this
  5. Write a shell script to resize them all using ImageMagick
  6. Have them be amazed that resizing all of the images with your simple 3-line program was faster than resizing a single image in Photoshop

The reasons I like this approach are:

  • You don't have to tell them why programming is useful, they just saw why
  • You can write the entire program in a couple of seconds while they're watching (I advise trying it beforehand, since demonstrations always go wrong)
  • You're not assuming they're idiots/need some sort of "kid" example -- This is a simple example, but it has real world uses.

You may be able to think of better examples, but I think the style is helpful for a "first intro".

5
votes

Most 15 year olds "these days" have a lot of experience with computers. I'd go for a more hands on approach. I'd show her a bit of code(don't try to explain it in detail, but maybe cover the extreme basics of the "flow") and show her what the result is. Even HTML will work for this kind of example. Then say "Everyday, I do basically that.. except for with tens of thousands of lines of code and a very large and complex program".

Then explain what kind of problems you solve by programming, and why you like doing it. For instance, I'd say I like programming because "I love seeing my code come to life in the computer as an application"

4
votes

Firstly, you have competition that you need to debunk.

Movies, popular culture, and even people in the field (and this question for that matter) attempt to portray programming (and the bulk of the computer science field) as some type of magic. It is not magic.

Programming is simply describing tasks and then combining those tasks to solve a problem. If you are trying to find a parallel, use math. A computer is like a math teacher that requires you to show all your work.

From a physical point of view, computers are not smart-- they only know as much as we tell them. So when a computer programmer wants to create a program that, for instance plays music off a CD, they 'simply' need to tell the computer how to read the data stored on the CD, then how to convert that data into sound waves and lastly, how to output those sound waves from your speakers.

Taking this idea to the next level, you can go on about how programming builds tasks on top of each other. Just like he/she had to learn arithmetic before they could learn algebra in math, computers also need to be told how to 'do the basics' before you can tell them how to do more complex tasks. Over the years, computer scientists and programmers have been able to 'teach' computers enough of the basics to the point were we can start 'talking' to them much closer to how we talk to each other.

Back in real life, your math teacher may tell you to solve "15 to the power of 3", but you only know how to do that because you were previously taught that "X to the power of Y" breaks down into the tasks of "Multiply X by X, and do it Y times" [technically Y-1 times, but eh.]

Much like your math classes, programmers have established a base of 'known' tasks so we don't need to focus on the details of the small things and can devote our time to solving the actual problems and not so much how to perform the underlying tasks-- we can now assume a computer understands how to do basic things.

3
votes

I'd do what got me hooked when I was about 9. Grab the C64 out of the loft, and do:

10 PRINT "YOU SMELL"

20 GOTO 10

(Thanks dad).

Then when the fun of that is over. I'd show her the number guessing game. Yep, all in BASIC. There's no dying need for a modern language to show a computer taking instructions.

0
3
votes

It might be helpful to start with something she does routinely, like Facebook, and explain to her how one simple aspect like logging in can be very complicated.

You could branch from here into databases, application design, and then into some aspects of security which is something helpful that she can take away.

You can even ask her something like, "If there was one thing about Facebook you could change, what would it be?" Then walk her through how you might make the change and how many people would be involved.

I first learned to program Pascal and I was all pumped that my program accepted my input, messed with it, and printed something different. I was hooked from there. Some people latch easy.

0
2
votes

I'd hope having gone for a work placement at somewhere that presumably develops software that she must have some interest in the field?

There's no set answer, I'd quiz her for 5-10 minutes on what she does know then just try and build on that as best you can.

2
  • Not sure @Chris - there are lots of different roles in a tech company, from accounting to HR to development and consulting. We're giving her a brief taste of a lot of different roles, so I don't think I'd make this assumption
    – Dexter
    Commented Jun 17, 2011 at 21:10
  • Well, to be fair you never stated why type of company it was. :p It'd be safe to say if somebody went for a placement at a guitar shop they'd likely be interested in guitars rather than being a wood luthier.
    – Anonymous
    Commented Jun 17, 2011 at 21:42
2
votes

Start high-level. Maybe explain that computer programming is about problem solving: taking a problem and devising a solution that is written out as a bunch of instructions that a machine can use and understand.

The hard part might be coming up with examples that a 15 year old girl would find interesting and relevant. Having never been in that situation and not knowing her, I am not sure what to recommend for that... Avoid code samples, until near the end, and except for very simple or interesting cases, such as a "Hello world" program or something simple and graphical (draw some shapes in a window, track a mouse, etc...).

3
  • I don't think I could teach someone about programming without showing them at least some samples of the code I'm working on..
    – Dexter
    Commented Jun 17, 2011 at 21:07
  • @Dexter: In 30 minutes, I'm not sure I'd want to dwell too much on what code looks like. I didn't mean to not show anything, but since you don't have a lot of time, I don't think code should be the focus. It could get very dry and boring. Talk more about ideas and concepts if you can. If you can find a simple example (maybe less than 10 lines) that's easy to understand, and also interesting, go for it! Commented Jun 17, 2011 at 21:12
  • agreed, but I think rather than going in for a simple chapter 1 example, I'd rather show a program that I developed and toggle a few lines of code in that to show an outcome.. ultimately I don't think I'm going to be able to teach her how to program, but perhaps I can inspire her to want to find out more..
    – Dexter
    Commented Jun 17, 2011 at 21:35
2
votes

Here's my take on it after a couple of failed and a couple pretty good attempts:

Programming is problem solving.

Start off with concrete things that are programmed that they use every day - internet browser (facebook), cell phone, cash register, etc. Get them to give you lots of examples. Establish that all of these things have a kind of computer in them. The heart of a computer is the processor.

The processor is like a very fast, but very dumb worker. If you give it some instructions, it will do them exactly as you say. It won't do anything extra and it won't tell you if something you told it to do was wrong. This processor does everything, though - if you tell it exactly how to do it, it can make a phone call or put a picture in an e-mail.

Ask her how she would tell a very fast but very dumb worker to buy a can of soda from a soda machine. As she starts describing the steps ("Put money in the machine and press the button.") start dissecting it like a program ("What is money? How do I put it in the machine? When I put money in the machine and press the button at the same time, nothing happens."). If you have a whiteboard, start on the left with her first set of instructions. As she revises them, place the new bigger list on the right side. When you have a good set of instructions, start generalizing the pieces ("Remove the money from your pocket and remove the soda from the tray sound similar - what parts are the same/different?") Take the generalizations and put them in the middle and cross off the pieces they now encompass. Try to eventually tie up the pieces to match with her original instructions, kind of like function calls. Other good exercises: mail a letter, go through a door, draw a circle/square/triangle.

So Programming is problem solving: breaking problems up into parts, identifying parts that are common, and grouping those parts back to solve problems. Soon, you find out that some parts are common across many problems, and then you start putting parts together to solve problems you didn't even know you had.

Okay, by this point she may understand but she's probably bored. Follow it up with a set of cool programming examples. Shaders and related visual code is easy to demo - you can put up a picture and start making changes to it with very small code changes. If she expressed interest in Facebook, show off talking to Facebook through REST to see friends of friends (6-degrees of her) data. If she likes video games, show off a couple open source game demos along with a few snippets of their code and how they help the game work. Finish it off by showing a couple of free tools and resources she could investigate at home. (Python, C#, etc.)

My failed attempts: trying to explain pi calculation (they were asking), the C-Jump board game http://c-jump.com/ (they didn't get it and the instructions were buggy), and live coding a 2d game (just couldn't hold interest, no matter how small of steps I was taking between demos).

Good luck!

2
votes

Make a simple program. No, not "Hello World!"

What'd I'd do is say that there are many types of programming languages -- ones that make games, ones that control robots -- but what you're going to be working with is HTML.

Make a web page with nothing on it, and then add an form that will send an email to her email address. She presumably has a cell phone that is capable of notifying the owner that they have a new email, so you could tell her that it's a great way for her friends and family to contact her. If she gets her own web site in the future, you can tell her that she can put the form on her web site, allowing her customers and business partners to contact her.

Alternatively, if she's a little mischievous, I'll tell you what got me interested in programing: hacking. Back in the day, I made the best program ever made for messing around on AOL (outside one program that outperformed mine in only one of the dozens of things that mine did) -- at the age of 14-15. On the white hat side, I also made one of the first spam-removal programs as well (1995.) I was able to make my online experience a lot more enjoyable, and we'll leave it at that. Everything that I wanted to do on a computer was an adventure or puzzle that I had to figure out, and the things that I wanted to do on a computer were endless. Sure, getting it to work was a headache at times, but writing a program that accomplished things better and faster than any human could, or doing things that were simply impossible to the general public, was like building a fine piece of machinery that one could be proud of. Now, you probably out to shy away from anything serious, but it would be extremely easy to make something in Visual Basic that could be launched on start-up (sitting on the side of the screen or the system tray,) and from there, you could make it launch her favorite web sites, her favorite programs, etc. You could introduce her to the commands needed to launch an exe and a web site, and then just ask her to make some buttons, then add the code to those buttons, putting in her favorite web sites (facebook, twitter, etc.) and programs (iTunes, word processor, etc.) If her computer's in her room, you could also toss an alarm clock on it for added functionality. Of course, 30 minutes is too short to walk her through that, so you'd have to already have it done. At the end, you'd email a little 2-3 page user manual, the code, and the .exe to her... and then leave her with a little sales pitch: it's not easy at first, but once you get the hang of it, it's not so bad, will be extremely useful in life, and will help develop her analytical thinking.

2
votes

I used to teach 18 year old college students, and I suppose 15 year olds are about the same. Don't expect success without practice. It took me some weeks in my first class to get "broken in".

The biggest thing I had to learn was that what I thought was so simple and obvious that I was afraid I couldn't fill the time was not at all that way to the students. I learned that you have to go in baby steps - otherwise it's just "gee whiz" magic.

How you fit this in 30 minutes I'm not sure, but the first thing I did was show them a little home-made computer I had built, which was programmed to play a little tune by clicking a speaker in and out. I explained that it could play a note by decrementing a counter, to act as a delay, between clicks. I just wrote the pseudo-code on the board, just like a recipe. Then, there was a little capacitor that I could hook under a wire that would have the whole thing run about 1000 times slower. Then they could hear click - wait - click - wait ... Then when I unhooked the capacitor, it burst forth with the little tune.

The point of this was to get across that computers only do simple things, and do them one at a time. They don't start each step until the previous step is finished. (Yeah, yeah, I know - pipelining and all that, but we're talking to newbies.) It's only electronic speed that makes them appear to do everything at once, which is what newbies tend to assume (along with mind-reading). That is one of the really basic concepts without which you can't begin to understand programming and computers. To us, this is so in-grained that we don't even realize that we know it, but beginners don't know it.

1
vote

I know its not programming language but I think HTML is a good place to start. Because you get immediate results.... start with

Hello World

Then do:

Hello <b>World</b>

Etc.

1
vote

If it were me, I'd tell her that programming is about splitting a task into little tasks in a way that helps you solve them; and then expressing those little tasks in a language that can't be misunderstood by an idiot computer. But you also have to do it in such a way that other programmers can understand it easily too -- and that's not the same thing.

That is, on top of what everyone else has said...

1
vote

This is more of my personal experiences than a straightforward "answer".

Why did I get interested? My parents bought an IBM PC XT in 1984 (I was born in 1984). It has 640kb RAM and 20MB HDD and a 5" FDD and ran MS-DOS v3.2. I was not allowed to touch it till I was in the 5th standard and when I was finally allowed to use it, I poured all my years of accumulated curiosity into it.

My sister on the other hand was allowed that same PC and a Quadra 610 mackintosh whenever she wanted it and she paid as much heed to it as she paid to the table it was set on.

Teaching my sister... I tried to teach my sister computer programming in BASIC. I made her to everything right from starting the computer to typing in the programme and executing it. It was a s line programme.

10 PRINT "CAT"
20 END

This took half an hour. When she finally executed it, it printed the word 'CAT' and she was furious. She had expected a picture of a cat to appear. She stormed out of the room and that was the end of programming forever!

Moral: The output better be proportional to the time and efforts they put in.

Teaching high school kids Labview and Lego NXT I was a mentor for the FIRST Robotics for a year and had to guide the kids in programming the robot in NI Labview. Frankly, the programming skill required was much above the level of a high school kid. But the competition was intended to get kids excited about engineering and raise their bar on the ability of taking on a challenge. As long as the programmes had just an if statement and one loop, things were okay. People dropped out of the programming section of the robot when they saw the code diagram I had created for the robot we had built the previous year.

As much as people are stating that 15 year olds can do complex things and can have attention span of hours, I found a strange lack of motivation in them to do so. They wanted to do easy things that did not tax their brains. They much preferred to CAD and mill parts on the lathe machine than write programmes.

0
1
vote

What is CS?

I think before you go into demos, it helps to briefly give your take on CS' place in the world. I liked Hal Abelson's description of CS relative to math: while math helps you describe the world in terms of laws, CS helps you describe how to do things. His example was the square root function: math will define it, but won't help you find it for any given input. CS will. At a lower level, electrical engineering and physics laid the groundwork for the hardware that enabled the internet, but left open the questions of how to get people using it.

What is it like to be a programmer?

Then there's the question of what it's like to be a programmer. What drew me to it was that it has a quicker turnaround of try-something, test it, fix it, than any other technical field. It's nonstop problem-solving, whereas in other fields the turnaround time for a single loop may be months. It's also useful to almost every other technical field, which is more than can be said for... most other technical fields. So if you don't know what you want to do yet (likely), it's a good thing to get good at early. In college, few things will make you more useful to more professors than being able to code up their experiments.

Eye candy, tied to code

Then of course, don't forget the demos. It might be cool to get a copy of quake (open-source), and make some one-line change (e.g. change the gravity strength) and recompile, for instance. Also have her look at the code. Reassure her that she shoudn't expect to understand much, it may seem like gibberish now, but then again, so do newspapers in foreign languages that she hasn't learned yet. You can say that nonetheless she can see that things are being assigned to things, objects are being told what to do, and here's where we set the gravity, etc.

1
vote

I started programming when I was 14. While most (47 of the 50 students who enrolled) either dropped out mid-year or just decided not to continue into the advanced course next year, I stuck with it and learned something very important:

Programming gives you the ability to create something from nothing. You have the power to turn words into a useful tool that fills a need, an entertaining activity for you and your friends, or just something you can show your friends and say, "Look what I did."

We were taught "Hello World" to begin with, but I had no interest until I could make my code interact with the user. The moment we were taught to read input with "cin" I set out to make a Mad-Lib program that we could play in class. My first hurdle was reading input containing spaces, followed by formatting output. Later I wanted to be able to save these stories to a file and so I needed to learn file IO. Tackling obstacles to accomplish my own goals was what kept me engaged.

Later on in the year we discovered that the network admins were logging our use of "Net send" and the Novell SendMessage client that we had been using to communicate during computer class, and they disabled it after students used it to cheat on a test. So I wrote a chat room to replace the one the admins disabled. It was the first truly useful thing I had created. I modelled it after Battle.Net's chat system, complete with user registration, moderators and even a basic encryption and shadow-file system to prevent users from tampering (all of the files had to reside on a shared network drive in order for the students to access and use the program). These were not concepts I was already aware of, but solutions I came up with on my own to solve a problem. To me, that was the joy of programming.

So to answer the question properly, beyond the discussion of what it means to develop software, an interactive demo is probably a great idea. Preferably something that solves a problem she has, such as resizing all those giant pictures from her camera automatically. While a little more complicated, she might have fun with a simple leave-a-message web page that she can share with her friends. You could have it email someone any time a new message is posted, and have her edit the code to send it to her email instead of yours. Also, have the page show the last X number of comments, and get her to adjust that number as well, and see what the results are.

1
vote

Where I used to work we sometimes had work experience kids coming in. Some were interested in computers, some weren't. We used to get them to sit them in front of a computer and get them to write a guessing game. (Computer randomly selects a number, user gets feedback on if their guess was too high/low.) It's simple to do and it's genuinely a fun result. Nothing is more powerful than showing them tangibly what THEY can create.

1
vote

When you want to get --and keep-- someone's attention, then ASK, don't TELL. Ask how they would perform a simple task, such as getting a drink of water. Then show them how following the instructions that they provided (Such as "Go down the hall") don't actually handle the problems of when to turn left, turn right, stop, etc. Understanding and handling those boundary conditions, that's the business of programming! Then you can show how a "do-until" loop can handle the "walk until you come to the wall" kind of situation, to make meta-tasks out of the one-foot-in-front-of-the-other task of walking.

1
vote

I'm not sure if this is a legend or a true story, but I was reading about why the lucky stiff one day. Part of a story was how he showed programming to a kid (or maybe even kids) he met on a train.
As some of you might know, _why was a Ruby guy (and Ruby is, well, being quite friendly to regular humans). He was working on some game in Ruby, while some kid approached him to see what was he doing. He showed them the result first - the working game. Then, he showed the kid how he can modify things in code to change the result. Then he let the kid play with the code and see modified result.
I think that that should be your general workflow - result, modify, play. You should find some project (game would be the best choice) in human-friendly language and show it to the kid.

As I've sad, I have no idea whether this story is true or not. It's still very cool.

Also, one more thing. I remember my first experience with programming - MessageBox in Delphi. It was cool, because I could make computer do what I want and immediately see the result.
Then, microcontrollers appeared. They were even better, because my code could change the real world. I mean, assigning some value to variable stopped being so abstract, as it caused a voltage to appear on output port, which then caused my engine to move. It was cool. You may want to choose this way - show the kid something like Arduino.

You see, I think it's all about changing and seeing the result.

0
votes

Show her the end result of some of the things you have done. Talk in general about your role in the projects. Maybe even help her do a hello world if she seems interested.

0
votes

My favorite analogy for programming is wizardry(harry potter style), like Satanicpuppy. I use this for nontechnical peers as well as kids, it seems to work pretty well, and definitely conveys the power that computers give us.

Computers are our magic wands. They allow us to perform magic given the right flick of the wrist and incantations. As programmers, we have access to spell books (libraries) worked and refined by our predecessors. We can create new spells and incantations or work with existing ones. Some are easy, some take more practice to really use effectively, there are often trade-offs and many different ways to solve the same problem (should I use a good potion or an incantation?).

This extended metaphor can really be stretched well and it often allows me to convey my passion for programming in a way that's accessible to people outside the field.

0
votes

The best way to understand kids is to be a kid first.. ! As a kid I used to hate doing homeworks,impositions etc.. ! so there are entry points where in you can grab their attention. In 30 minute span though we cannot explain everything, we can try to give them a kind of exposure where in interested kids find it as inspiration. Start with their related topics like homeworks etc.Tell them how a computer can write imposition in just few seconds etc.

I wish you all the best.. ! good job

Not the answer you're looking for? Browse other questions tagged or ask your own question.