Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I taught my 9 year old sister how to program, at a very basic level, using PHP.

She understood the simplest parts, variable assignment, simple loops, errors, if statements (children seem to understand these naturally, since she is always saying "Shane, if blahblah did blah blah, what would happen?" so it was a breeze to introduce else statements.)

The trouble came when we started on arrays, she understood the concept of variables well, but the idea that multiple variables can exist inside of a single variable, and more inside of that, etc, really confused her, until I managed to explain it using a rather simple tree diagram.

Then there is the fact that numeracy in primary school begins at 1, there is no 0 as far as I know which is taught until later (unless of course, she simply wasn't listening during that lesson) so to hardcode it in to her I got her counting her spending money from 0 instead of base10.

Once we had this out the way, database manipulation came, and this was really difficult as she didn't understand how the computer knew these things when it was so far away and the idea that it could be transferred across the world in seconds was fairly mind blowing (mind you, she thinks the world ends at the south of England so it probably wasn't that amazing) so I got her to take part in a practical taking lemons to and from the garden shed and keeping a tally of what was in each. Not only was it fun but it was a great learning experience.

Fast forward 1 year and she is extremely intelligent for her age, can do advanced algebra and is the only child in her class to be able to do maths in her head near instantly.

I'm proud of her, but my point is this, children don't need brightly coloured graphical languages, sure, they may help, but to nurture their minds all they need is a little ingenuity and a whole lot of love. (not to mention patience, you're gonna need buckets of patience.)



When I learned programming, getting arrays was one of my first "aha" moments. Moving from x0, x1, x2, x3 to x[0], x[1], x[2] was definitely enlightening.

My guess is that for simple programs, you almost never have to index an array by a dynamic expression, so you don't see a need for that.


Same here, I remember when I was learning, before I knew what arrays were I had a bunch of variables like that: $x1, $x2 and I was trying to find a way to convert a number like $n into the variable name so I could do $x$n to reference $x1, $x2. I knew what I was trying to do, just didn't know how to do it correctly at the time because I didn't have any exposure to arrays before.


Exactly ! Syntax and meta-syntax are sometimes easy to mix.


I learned math before programming. I already knew sequences and matrices written a_i and a_ij, and arrays were obvious.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: