
Ask HN: How to teach my kids programming? - bavidar
Has anyone tried doing this? I want to them to be interested but not force it on them.
======
em00guy
When I was in the 3rd grade some time ago, an amazing teacher decided to bring
in his personal apple IIe and allow interested students to hack after school.
He taught us "Logo", a simplified lisp variant that I remember being very
intuitive. After we understood the basics, we began building robots with
Lego/Logo, a Logo variant you could use with an external controller that
operated motors an sensors embedded in lego bricks. It was a transcendent
experience for me. What's more, as a kenyan immigrant living in midwestern
suburbia in the early 90's, it was one of the first times I felt as though I
had a meaningful place in the world. I never stopped programming and its why
I'm an engineer today.

Logo Project: [http://el.media.mit.edu/logo-
foundation/logo/programming.htm...](http://el.media.mit.edu/logo-
foundation/logo/programming.html)

Lego Logo Project:
[http://www.ucls.uchicago.edu/students/projects/1994-95/Lego-...](http://www.ucls.uchicago.edu/students/projects/1994-95/Lego-
Logo/ProjectDescription.html)

~~~
speeder
Logo is very old, and interesting, and since its invention it was about
robots, the first logo robots usually were a circle with wheels and a pen in
the middle, and logo students made geometry or trigonometric applications that
you would see the results drawn on the floor.

------
jason_slack
Well, what age are they? I'd say age and abstractness of their thought process
dictate how to teach them.

I'd argue that you start learning programming concepts in everyday life, early
on, just nobody explains them to you.

The lunch line at school. Line Up, first in, first out. Right? -Array/Vector
(depending on if you know the number of kids in line, like a single class of,
say, 30 or if kids just all get in a line together.) What about "Budging",
kids getting kicked out of line for bad behaviors....

For the cafeteria workers this is a While Loop \- While there are kids in
line, serve them.

I can think of so many everyday life happenings that would teach kids computer
science fundamentals if presented in such a manner to them.

I have used: [http://www.amazon.com/Hello-World-Computer-Programming-
Begin...](http://www.amazon.com/Hello-World-Computer-Programming-
Beginners/dp/1933988495/ref=sr_1_1?ie=UTF8&qid=1358563128&sr=8-1&keywords=Hello+World)
(Not an affiliate link, FYI)

~~~
aleprok
The lunch line is awesome example of real world programming concepts.

Myself I have taught few people how to understand object orientation like
this. Though my example is not good for kids, but older people.

Told them to think about a beer can and asked them what kind of properties
they have. Amount of beer in it, the color of the can, the material of the
can, the labels and icons. After they realize these properties I have
explained them that how they could code these as class variables.

If they understood that I asked them what kind of functionality beer can has.
They have answered, opening it and drinking from it. I told them these are the
two functions for the class. The opening of beer can is void method with no
parameters and drinking from it is a method with parameter and possibly with a
return value.

If they understood that I could go into the relationship of beer can and beer
crate.

------
jkaykin
Create a development "playground" for your children. The way children learn
anything is by trial and error, remember them trying to learn how to walk?
Remember how many times they fell before being able to walk?

Do the same with teaching them to code. Pull HTML source code from a simple
website and paste it to your text editor. Then let your child play around with
the code and see how it renders in the browser. It will be fun and exciting
for them because they will actually get to see their work right away (instant
gratification).

Once you have done this, move on to css.

Good luck!

~~~
dragonbonheur
The reasons I recommend against HTML+Javascript+CSS are because they don't
teach algorithms and data structures. If a kids learns HTML first he/she will
not now anything about algorithms. To learn that she/she will have to move on
to another language: javascript.

Another reason is that those web language combos are forever being extended.
There is no way children will be able to hold the entire language in their
heads. Some people may not agree but even C's success is due to the ability of
one person to remember the entire language all at once.

Still another reason is compatibility or the way those languages behave in
different browsers. Everyone has his own proprietary css extensions these
days, what will a kid need to learn next? JQuery? Ext-JS?

Start with simlicity. Learn a language that really offers instant
gratification, with graphics, sound,and file keywords included. Have them
learn BASIC. They'll perfecly be able to move on from there.

~~~
ScottWhigham
_If a kids learns HTML first he/she will not now anything about algorithms._

That's just weird to me. Do you have children? Did you teach them this way, it
worked successfully, and now you're passing that information along as a public
service? Or are you just talking on a public forum about something in which
you have no first hand knowledge? I'm always suspicious of taking advice from
someone who just _thinks_ something should work rather than from someone who
has actually practiced what they are preaching (and, in particular, I'm
suspicious of "parenting advice" from someone who doesn't have children). HN
seems to be full of "This is what my parents did for me and I turned out okay,
therefore this must be the right way" type of talk.

 _Start with simlicity. Learn a language that really offers instant
gratification, with graphics, sound,and file keywords included._

I fail to understand how HTML/JS/CSS does not meet this guideline. I don't
understand why you think that programming in BASIC is a better start than JS.
JS has algorithms and all the basic implementation that something like BASIC
is going to have.

 _There is no way children will be able to hold the entire language in their
heads._

There is no way you or I at our age can keep the "entire language" of any
sufficiently advanced language in our head. I don't see how this matters.

Sorry - I just don't like it when someone positions them self as an expert
during a reply yet there is no context provided therein that would
improve/prove their position.

~~~
dragonbonheur
I've learned by meself when I was 12, I had no one to teach me. It took me two
days to understand BASIC and one week to adapt to DBASE III+

As for context, says Paul Graham: "Use succinct languages. More powerful
programming languages make programs shorter. And programmers seem to think of
programs at least partially in the language they're using to write them. The
more succinct the language, the shorter the program, and the easier it is to
load and keep in your head.

You can magnify the effect of a powerful language by using a style called
bottom-up programming, where you write programs in multiple layers, the lower
ones acting as programming languages for those above. If you do this right,
you only have to keep the topmost layer in your head."

More here:<http://www.paulgraham.com/head.html>

How many months does it take to master the HTML+JS+CSS mess?

------
brudgers
This question gets asked alot. I've never seen a good answer.

The only good reason I've seen for teaching a child programming is that the
child is interested in it...and that tends to be several orders of magnitude
less common than a parent who wants to teach their child programming.

------
dragonbonheur
Teach them BASIC first, not the HTML+CSS+Javascript mess.
<http://www.freebasic.net/get> Then let them loose on this site:
<http://www.petesqbsite.com/>

~~~
phaus
What what you say is a good age to try and introduce a child to programming?

~~~
OafTobark
I've seen people claim to have started as early as 4 so really whenever both
you and the kid feels ready

~~~
phaus
Well my daughter is 5, and she's above average, developmentally speaking.

The problem we keep running into is that my daughter sounds excited about
learning something, but when it comes down to actually doing it, she loses
interest fast. We haven't tried programming yet, so far we have been
experimenting with other stuff because we plan on homeschooling her.

I'm hoping that isn't a trait she inherited from me. I was a terrible student
from about 3rd grade until I "finished" high school. Sometime in my early 20s,
I suddenly became interested in electronics, math, and programming. Now that
I'm a 30 year old, 3rd year college student, I wish I hadn't wasted so many
years.

~~~
OafTobark
I agree, it's a tough balance. I'm a dad and a technical geek myself so I
completely understand. Just remember, while we may wish our kids to be
interested, they might just have plans of their own. Best we can do is try to
introduce them to these things, show how cool it can be, and hope they are
willing to learn. I don't believe in forceful learning (not suggesting that's
what you are doing).

I know even from personal experience most people don't retain majority of
things they've learned growing up or in college unless its something they care
about or have done continuously. So maybe your daughter might be ready now,
maybe not quite yet. Maybe she'll never be interested. Do the best you can but
don't take your ideals upon her if she isn't interested. Believe me, more than
anything I hope my kids will have a love for these things too, but its
something they must discover to be interesting to them.

On that note, perhaps you could try it from a few different angles and see how
it works. Five is still a pretty young age and the average is probably usually
a few years older so don't lose hope if she isn't interested just yet

------
speeder
When I was six, my father gave me a GWBASIC and those magazines with game
source codes.

------
phektus
Just let them enjoy Minecraft.

