Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share

locked by Yannis Rizos Jul 31 '13 at 10:56

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as primarily opinion-based by Yannis Rizos Jul 31 '13 at 10:55

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

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! –  Tom Anderson Jun 17 '11 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 Jun 17 '11 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. –  Tom Anderson Jun 17 '11 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 Jun 17 '11 at 19:19
5  
@Tom: exactly. Many programmers started before age 15, so I don't understand the condescension. –  Neil G Jun 17 '11 at 21:33
show 14 more comments

34 Answers

up vote 131 down vote accepted

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..

share
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 Jun 17 '11 at 20:42
12  
hahaha I get that one all the time, if you know how to "hack people" hahahahaha –  John Connelly Jun 17 '11 at 23:46
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. –  Rei Miyasaka Jun 17 '11 at 23:57
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. –  Satanicpuppy Jun 21 '11 at 0:13
4  
Well, I generally come in at least fifteen minutes late, ah, I use the side door - that way Lumbergh can't see me, heh heh - and, uh, after that I just sorta space out for about an hour. Yeah, I just stare at my desk; but it looks like I'm working. I do that for probably another hour after lunch, too. I'd say in a given week I probably only do about fifteen minutes of real, actual, work. –  teambob Jul 4 '11 at 11:20
show 7 more comments

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.

share
add comment

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)
share
2  
@Alan Zeino you mean Emacs. –  rightfold Sep 13 '11 at 16:35
show 2 more comments

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.

share
add comment

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.

share
add comment

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.

share
add comment

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.

share
add comment

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.

share
add comment

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.

share
add comment

Creating a virtual world inside any computer that is dedicated to solve a given set of problems.

This is done by first understanding the problems, the modelling the required world, then explaining the computer what to do for given states of the world and inputs from the user.

This combines how I first understood it at a even younger age with the basics of the experience I have since gained.

share
add comment

First allow me to recalibrate everyone's expectations of what an educated fifteen year old can do or understand.

We're having one at my workplace for two weeks, who has no experience of programming. He knows how to operate a computer but is nothing like a “power user”.

We showed him how to query a database, and he's been answering questions and digging up factoids by writing his own SQL. We gave him a spreadsheet and had him compute some statistical indicators; math which was taught at school, but without the automation of a spreadsheet. And we gave him a bit of market research on potential suppliers, google-fueled stuff that must have felt pretty close to some of his school projects. At the moment he is working through a hands-on xhtml+css tutorial, which should allow him to edit some of our website next week. We did not try to impress him with our rocket science knowledge or magical powers, and he has been making himself useful to us doing things suspiciously close to programming.

Now with 30 minutes, you could start by asking her what she's seen that day, what she thinks you're involved with, explaining your role in the company, giving her a quick (prepared in advance) demo of something you work on (or anything with a quick edit-run feedback loop, jsdo.it was a good suggestion). Discuss things computers are involved with and find some she's interested in, or get her to contribute ways smarter programs could improve some activities. Half an hour is too short for practice but should be enough for a good discussion.

share
add comment

The fundamentals of programming that exist in basically every programming language are:

  • basic variable manipulation and usage (Allow for up to 10 minutes)
  • variable types(string, int, char, etc.) (Allow for up to 5 minutes, can be combined with the first part)
  • if's and comparative operators. (Allow for up to 5 minutes)
  • for, while, and (usually) until loops. (Use the rest of the time, but not more than 15 minutes)
  • Explain that the internet is an amazing source of information, and almost all languages have documentations on the internet. Explain a few common language's usages and give examples that they may have heard of, such as Java, JavaScript, C++, C, etc. (At the end)

*Should probably be done in respective order.

These are probably the most important things that could be explained. After all of this, if you have enough time, which you probably won't, try explaining graphics.

--The child(ren) is/are almost certainly perfectly capable of not being bored. Just give a few examples of things made by using programming.

share
add comment

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. ...
share
4  
+1 for getting her to try it herself too. –  testerab Jun 17 '11 at 23:37
2  
Using jsdo is a great idea, thanks @Andrea –  Dexter Jun 18 '11 at 12:05
1  
Or you could use jsfiddle, with no need to sign up: jsfiddle.net/WXVra –  rjmunro Jun 24 '11 at 16:56
show 1 more comment

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.

share
add comment

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

share
add comment

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...

share
add comment

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.

share
add comment

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!

share
add comment

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".

share
add comment

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.

share
add comment

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.

share
show 1 more comment

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.

share
2  
Good. You hit the nail on the head. Make it really simple, and make it fun. And BASIC is perfect for that. –  Mike Dunlavey Jun 19 '11 at 19:50
1  
Agreed, BASIC is great and GOTO is the best language construct to start with. My first program was very similar. –  TomA Jul 4 '11 at 10:57
show 1 more comment

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"

share
add comment

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.

share
add comment

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.

share
add comment

What if you got like a Arduino or Netduino and used it as an example. Or some lego mindstorm (or whatever it's called).

Kids have a short attention span. Things happening makes it less boring.

share
7  
It's a 30 minute conversation. Attention span (or lack thereof) shouldn't be an issue - unless you are lecturing and/or patronising them. –  ChrisF Jun 17 '11 at 19:16
2  
+1 For the Mindstorms, -5 for the "short attention span". –  muntoo Jun 18 '11 at 0:20
add comment

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...

share
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 –  Paŭlo Ebermann Jun 17 '11 at 22:14
show 1 more comment

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.

share
77  
lol @ teaching your kid that you are a wizard –  jhocking Jun 17 '11 at 15:49
23  
"No other profession in the world creates functional things out of nothing but words" - contract lawyers and legislators do. –  Tom Anderson Jun 17 '11 at 16:30
48  
@Tom They probably limit functional things more than they create them. –  Maxpm Jun 17 '11 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. –  Satanicpuppy Jun 17 '11 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. –  Tom Anderson Jun 17 '11 at 18:15
show 15 more comments

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.

share
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 :( –  FrustratedWithFormsDesigner Jun 17 '11 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 Jun 17 '11 at 16:27
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 Jun 17 '11 at 23:35
show 2 more comments

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.

share
add comment

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