Live data from Hacker News

Ask HN: How should I teach code to kids?

news.ycombinator.com

1–10 of 138 posts

Ask HN: How should I teach code to kids?

#1
My little cousins are 7 and 9 years old. I have been thinking a lot how can I get them started with building and designing for the web.

I just finish my first attempt https://www.youtube.com/watch?v=BiwWT2CERA8

I wanted to ask the HN, what other ideas or what type curriculum I can do to make it more fun and interesting for them. All ideas are welcomed.

Re: Ask HN: How should I teach code to kids?

#3
I've taught kids using https://www.codeclub.org.uk/ - they have a great Scratch based set of exercises. You sell it as "Design your own video games!!!!"

Also moves into HTML, Python, etc.

I had great fun teaching using their curriculum. They're rolling out worldwide and all their materials are CC licensed.

Re: Ask HN: How should I teach code to kids?

#7
I teach.

I have the kids learn Python between age 9 and 11 depending on when they are interested. We write games and learn the fundamentals of CS by following the curriculum of Rice's "Introduction to Interactive Programming in Python" class designed by Rixner and Warren. It has a Python interpreter and game library that compiles in-browser into javascript, which is a very helpful design for a first class, and for sharing their results with myself, their families, and each other.

Afterwards I encourage those who really enjoy it to learn Java, also using web sources primarily. I intercede when they are stuck but generally they help each other out.

Some of them used to use the Java to write Minecraft mods but that has become a bit more tricky.

There was one student who started to learn Java at age 7, but in general that's too young. If you push things too earlier they don't get a head start. They get burned out and don't want to have anything to do with it any more. You really need to be sensitive to what they are interested in and let them lead.

Most kids when they see others making their own games want to try their own hand at it themselves, so I have managed to create a self-perpetuating cycle.

Learning languages to make games makes sense. Pushing languages to force concepts will be resisted and is counterproductive.

The games approach is nice too because they rapidly learn trigonometry, basic physics, and linear algebra by age 10 or so, and are teaching themselves Calculus on Khan Academy by age 12, as well as researching optics, writing their own shaders and generally doing what most would consider college or graduate level mathematics. Their Java skills also often lead to writing for Android. Some selling their games and other software at a certain point, which helps their families.

It helps that on the reservation I have a great deal of autonomy in what I can do. I've worked in public outside schools before. None of this would be allowed there.

I don't really care for the idea of dumbed down toy languages that can't really be used for production software. Python and Java are well designed enough that they are understandable and usable from the age where they are able to do programming thought. Python is a simpler one to read and use and so we start with that. But Java is very similar and the lessons of Python directly transfer. Java ends up being much more useful for distributable and saleable software, though it is harder as a first language.

Re: Ask HN: How should I teach code to kids?

#9
Maybe try to use their own interests and relate the code to a kid's story. How are you going to make the little lamb move 5 steps?

Sample to move 1 step:

function move(steps) {

  $("#lamb").css({

    'right': steps + 'px',

    'transition': 'all 1s'

  });
}

move(100);

becomes

move(500);

I don't know haha, do they even want to code in the first place.

Doesn't even consider requestAnimationFrame or proportional scale. Also I'm starting to realize jQuery is pretty big even the min version especially on slow networks.

Re: Ask HN: How should I teach code to kids?

#10
Have a look at CoderDojo [1]. I did an IT project with the first class (patient zero) of kids from this organization. It was a very rewarding experience to see how great their "hands on" pedagogic approach worked out. The project - a website with front end and backend, full stack - was a great success. Amazing bunch of kids.

CoderDojo in an NGO that has spread globally. I wholeheartedly recommend it.Just don't leave your notebook lying around, or some curious kid might take it apart.. (no joke)

[1] https://coderdojo.com/

Post reply on HN