views:

199

answers:

9

I'm at a business college where we're doing a unit on presentations. Everyone's been asked to pick a topic and do a 2-minute presentation on that topic. I believe I'm the only programmer in the place, so I was thinking of doing a very simple presentation in which I write some very small programs and run them to show the output on the projector.

Here's what I was thinking of including:

  • Write a quick program which just prints a string, much like hello world but the actual string displayed would be something more amusing to get their attention.

  • Another quick program which would basically add up two variables, e.g:

    x=10; y=20; z=x + y; print(z);

  • And a final program which loops through 1-100 and displays the number, e.g:

    x=0; while (x <= 100) { x=x+1; print(x); }

But it might be better if there were any more amusing/interesting example programs which could be written in a 2 min duration and which would catch their attention better.

Any ideas?

+1  A: 

I'd include an IF statement and give more explanation about program flow.

Maybe you can play with the subject of the talk length, 120 seconds.

Make a loop with a countdown from 120 to 0 and do something with funny variables, for example mouthDryness++;

A list of stuff I'd include:

  • program startup (main method)
  • variables
  • loops
  • if statements
  • arrays
  • user input and response
Gerrie Schenck
A: 

Try to use some everyday metaphores. Nonprogrammes are not used to describe tasks is small steps.

But there are great metaphores, like for example a receipe for a meal. It starts with a declaration (what do you need, like salt, meat etc. ) and then the steps needed to create the meal. If they understand that, you can add the concepts of loops and selection. (heat until it is nice and brown, throw an exception when burned).

Gamecat
+1  A: 

Set of nouns, verbs etc in a set of arrays.

Code a phrase generator randomly chosing an item from each array to create random phrase.

AnthonyWJones
+2  A: 

A simple:

  • program asks for your name
  • if name equals yourName write "How nice to see you", else write "Go away i don't know you"

would probably do

tehvan
i like this, thanks
Click Upvote
A: 

I'm not sure if that's the topic I'd pick, for several reasons.

Firstly, programming (liek any science) is built upon concepts that are built upon concepts that are built on yet more concepts. In computer science's case, the first foundation is mathematic, which is usually outside most people's realm or comfort zone.

If you were going to do such a presentatoin I think a key factor is keeping it interesting to your audience. And the highest impact for lowest effort is to keep it visual. Print "hello world" on the screen and people will say "so what?" Show them how to build a little app or a Web page where they can putin a stock symbol and get a price and that's probably more up their alley (and not hard to do with all the Web services out there).

But I guess that depends on if you want to show them fundamentals of programming or show them what programming can do. Personally I'd go for the latter. The fundamentals just aren't interesting unless you have a reason to learn them.

cletus
+2  A: 

See Scratch for ideas on how very simple programs can do very complicated (and amusing!) things.

anon
+1  A: 

do something cool. display a fractal or do some more complicated text processing. even if you're showing things to non-geeks, I think they'd be more interested in seeing some computational brute-force over printing a string. determining the first hundred primes is a pretty simple algorithm to brute-force (abuse the modulus!) and on modern machines, takes just a few seconds to run. thats orders of magnitude faster than your entire room could calculate.

neoice
A: 

Depends what you're aiming at.

  • How about recording a macro in Excel or Word and showing them what it looks like? That would at least be useful - you could modify bits etc.

  • Or explaining that a program is also data - something that Windows tries hard to hide from users but they always come unstuck on.

What kind of level are you looking at? Do you want to talk about just programming, or the job of being a programmer, or how to interact with programmers in your job? Because if you dive directly into code you will end up explaining syntax, and the choice of language risks narrowing the vision your provide - procedural, functional, sql, etc.

It might be better to start a bit more "big picture" - programming is about getting computers to do what we want, but talking 'their' language (given that they are very fast but slightly dense, you have to be careful what you say!).

Benjol
A: 

If they are non-geeks, make sure the presentation does not go into technical details. If it's a very short talk, you can prepare beforehand by setting up a framework that e.g. opens up a window and contains some graphics primitives. Then in the two minutes, write a function that makes a ball bounce or something. Something graphical catches people's attention more than some boring calculator or hello world.

Emiel