Amazing what kids can learn

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Amazing what kids can learn

Post by RobertGonzalez »

So my 10 year old daughter asked me to teach her how to write programs 'like you do at work daddy'. So I brought her into the room, opened up and editor, had a brief discussion on servers and server-side language scripts, then explained what PHP is and how it works on the server, then had her write her first program.

Code: Select all

<?php
echo 'hello world this is sarah';
?>
This evolved into

Code: Select all

<?php
$text = 'hello world this is sarah';
echo $text;
?>
At about this point my nine year old came and asked to participate along with us. So we got to throwing some stuff out and this is what we ended up with after about 20 minutes:

Code: Select all

<?php
$text = 'hello world this is sarah';
$num = 10;
$joiner = ' and I am ';

if ($num == 10)
{
    echo $text . $joiner . $num;
}
elseif ($num == 11)
{
    echo 'I am 11';
}
else
{
    echo 'I am totally not 10';
}

echo '<br />';

$counter = 0;
$limit = 100;
$inc = 10;

while ($counter < $limit)
{
    if (!($counter % 10))
    {
        echo '<h2>10 is a modulator of ' . $counter . '!</h2>';
    }
    else
    {
        echo '<p>I am only ' . $counter . '</p>';
    }
    
    $counter += $inc;
}

$now = time();
echo date('l F jS, Y', $now);
?>
My daughters, in about 20 minutes, now understand how to declare and assign a variable, how to tell PHP what a string is and what an integer is, how to write a conditional (if/elseif/else), how to write a while loop, how to increment a counter, how to use a function (and what a function is) and how to read the PHP manual. Frickin amazing.

Me: How does PHP know when it is the end of the line?
They: The semicolon.

Me: What do the quotation marks on a variable value mean?
They: That the value is a string.

Me: If we loop do a while loop where a var is less than 100, what is the maximum value we'll see when echoing the increment value?
They: 99.

Me: And if we change the increment value to 10, what is the largest value we'll see?
They: 90.

Unbelievable. Even a 9 and 10 year old can get this pretty quickly.

/ apologizes for the blog like post, but I just wanted to encourage those folks that think this is too hard to pick up on. Start slow and it can be learned. Just ask my kids.

EDIT | I should note that they are by no means pros at this. But they have a strong understanding of the concepts, as evidenced by their ability to tell me what would appear on the screen as they read the code line by line.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

So are we going to have a couple of new Everahess members here then?
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Yay for Everah's kids!

I really don't think age has anything to do with intelligence once > 7 or so. Knowledge is built on top of knowledge which usually makes adults able to learn more quickly but when it comes to learning your first programming language whether 9 or 20 its likely to be alien enough to give the 20 yr old no significant edge.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I can only agree with Everah... A couple of years ago i found some old code (some Basic dialect for the Radio-Shack Personal computer with a lightning speed of 1Hz and 16K memory ;)) written on paper that i had written as an 8y old... I can remember that it was relatively easy to get the grasp of the basic structures...
User avatar
Trenchant
Forum Contributor
Posts: 291
Joined: Mon Nov 29, 2004 6:04 pm
Location: Web Dummy IS

Post by Trenchant »

Thats awsome.

For your next "project" you should see if they can build a simple login area.(no db just if $user kinda thing)

I remember when I was younger that was the biggest thing I wanted to be able to do. Once I got that I was hooked on PHP.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

timvw wrote:Personal computer with a lightning speed of 1Hz
1Hz eh? Sure that wasn't a clock you were working on there timvw :P
User avatar
sweatje
Forum Contributor
Posts: 277
Joined: Wed Jun 29, 2005 10:04 pm
Location: Iowa, USA

Post by sweatje »

I blogged a bit about coding sites for my kids. Later we were making a quiz site for Harry Potter questions as well, in which she participated in the coding much more.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Amazing what kids can learn

Post by jayshields »

Everah wrote:Me: What do the quotation marks on a variable value mean?
They: That the value is a string.
Make sure they know that if they go into Java that single quotes surround chars and double quotes surround Strings!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

All Java learning for them comes when (or after) I learn Java. Which will probably be rather soon.

Thanks for all the positive posts. I think they will enjoy them when they read this.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

So they learned in 20 min what took me 2 weeks?

That's it, I'm switching to another profession. Any ideas? Carpentry seems fun. Mmm, or maybe forester or something ...

Good luck to the Everahs, I wish you all the best! (do make sure they take sensible user names like Everah jr 1 + 2 so that we can know who's writing what :)
User avatar
visonardo
Forum Contributor
Posts: 136
Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.

Post by visonardo »

mmm, so good. but remember that you are reading (he) your native language or him. Its so different to who talk other language like mm french, spanish or other because first need to learn english to understand the code as your kid ( "almost" all language as far as i saw are in english language their sentence) , if its not thus, will take more time of course because is reading words that doesnt know whats does for (for example) means, for example "switch" (to spanish talker native).

But So good by your kid eh, i guess that´s so intelligent :P
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I totally understand where you are coming visionardo. So in addition to PHP, I am teaching them Spanish and Sign Langage (and even though English on our native tongue, we are still learning it from the Latin and Greek roots, which makes understanding French, Spanish, Italian and Portuguese a little easier to understand for when we start teaching them those).

But thanks for the vote of confidence for the kids.
User avatar
visonardo
Forum Contributor
Posts: 136
Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.

Post by visonardo »

(i didnt tell you,..)

Congratulation! :D
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

yea...kids are like sponges bro....i say if you kept it up they would be just as good as you...plus or minus a couple of coding tricks or techniques...the only thing ive noticed though is that when kids are exposed to something at a young age sometimes they tend to grow out of it...ive seen other examples though...where parents was like they used the type of learning as a reward and the kids grow up awsome at it...it would be cool to have them join us on the boards...lol...although i have a feeling that if they keep picking up at the rate their picking it up now...im gonna feel like a programming noob more often :lol:
Post Reply