Live data from Hacker News

Ask HN: How should I teach code to kids?

news.ycombinator.com

21–30 of 138 posts

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

#21
In my (very limited) experience, building text adventures is a great way to teach kids programming:

* You don't need any complicated stuff for it, just printing to stdout and reading from stdin.

* Kids love making up stories and games

* When they understand the basics you can gradually increase the complexity: Add if/then/else conditions (do you wanna go left or right?), functions (e.g. to parse answers to questions), variables and simple arithmetic (treasures found, monsters fought, ...) and libraries (e.g. for adding randomness to the game).

And if they're hungry for even more afterwards, you can add some graphics programming into the mix. By then they should be motivated enough by their story that they actually want to learn something more complex and challenging.

I'd recommend a scripting language to get started, as it removes the need to compile code, which (IMHO) just adds unnecessary complexity.

Not sure if this is the best approach, I tried it once and it worked great though!

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

#22

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 sh…

Interesting. I teach people programming too, both adults and kids - okay not too young kids, say 10th grade or above.

>distributable and saleable software

Do you or they make the Python code into an EXE for sale, using one of the available tools, or sell as source?

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

#23
post #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.

Plus one for this option, I've been teaching the same curriculum for nearly 4 years now, it keeps getting better and better in terms of the resources available as a teacher.

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

#24
post #14
post #12

Don't. Kids that age should be playing outdoors.

So it's either learn how to program or play outside? I do not see why the kids couldn't dedicate some time to each, if they are interested of course.

computers are addictive. Every noticed how top coders look like they've never seen daylight?

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

#25
Depends whether you want to teach code or computer science (and code).

I wrote a book to teach 7-11 year olds to code in Python and Scratch and teach them some computer science along the way - I read a few other books out there first, and there's a lot of "just copy out this code and things will happen", which is exactly what I tried to avoid in this book.

The reviews: http://www.goodreads.com/book/show/28232614-coding-unlocked#...

The book: https://www.amazon.com/gp/product/B013R4OFVA/ref=x_gr_w_bb?i...

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

#26
post #19

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 sh…

Why Python rather than JavaScript?

The real question is "why JavaScript rather than Python?" The only reason JavaScript is so popular is that it runs in the browser. JavaScript is otherwise a pretty poor language, and certainly much harder to learn than Python.

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

#29
post #26
post #19

Earlier quoted context omitted.

Why Python rather than JavaScript?

The real question is "why JavaScript rather than Python?" The only reason JavaScript is so popular is that it runs in the browser. JavaScript is otherwise a pretty poor language, and certainly much harder to learn than Python.

Running in the browser and having pretty good debugging tools seems pretty useful to me.

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

#30
Game modding

The first contact I had to actual programming was messing with Pawno scripts to make gameservers in San Andreas multiplayer when I was 12... Spent hours and hours programming with it. It started simple placing coordinates where the cars should spawn until I started to mess with more 'complicated' stuff like gates that open when player get near.

I would get some game that is popular among kids that age (minecraft?) and teach them to make simple modifications, if they like they will try to push themselfs to make harder and more complex stuff, the reward/work ratio is bigger than make a game from scratch on HTML, where there is a lot that needs to be done before getting to the "fun part".

Post reply on HN