News for hackers. Stuff that matters.
Re:Ask HN: What should I teach a class of low-income kids ab... by Jun8 on Monday March 18, 2013 @12:55PM (#5395411)
I've done this in Chicago. You didn't specify their ages, I'm assuming these are high-school kids. The important point to stress, I think, is that computers and programs are all around us, and not just as computers, either. Ask them to name a computer they use daily, then surprise them with the usage in dishwashers, cars, etc. (these are more microcontrollers but the distinction is not important).

From there you can go to the theme of "be a programmer of be programmed", i.e. everybody needs to know some coding. Tell them that math is not a prerequisite (a usual worry about programming) and show them some cool but simple game programming examples using Scratch, pygame and the like. In fact, it would be great if you can create a game during the presentation, with ~10 lines of code.

Re:Ask HN: What should I teach a class of low-income kids ab... by AlexCyrlex on Friday March 29, 2013 @05:52AM (#5459923)
Just out of curiosity, could you provide a link to a simple game written in ~10 (ten!) lines of code? My understanding was that for anything close to interactive game at least 50-100 lines of code are needed: to draw something, make it move and react to user input in a meaningful way.

I am not familiar with frameworks such as Scratch or pygame; still 10 lines of code look like too few for a game.

Re:Ask HN: What should I teach a class of low-income kids ab... by lsiebert on Wednesday April 10, 2013 @04:38PM (#5527989)
You can do a simple terminal program in 10 lines. 10 commands probably not, but this is still fairly readable. in perl, a simple guessing game that runs in linux/unix

#!/usr/bin/perl $SIG{ALRM} = \&timesup; my $random_num = int (rand(10)); print "Guess my number (0-9) in less than 10 seconds!\nGuess: "; alarm 10; while(1){ my $guess = <>; if ($guess == $random_num){alarm 0;print "You Got it! Well done!\n"; last; } else { print "Nope; guess again: ";} } sub timesup {die "Uh oh! Time ran out while waiting!\n";}

Re:Ask HN: What should I teach a class of low-income kids ab... by ccallebs on Monday March 18, 2013 @12:57PM (#5395434)
Sorry, they're middle-school aged. I should have specified. I think your advice is still applicable though.