Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How should I teach code to kids?
236 points by holaboyperu on Feb 18, 2017 | hide | past | favorite | 133 comments
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.




I've never been a parent or teacher, and have not been responsible for raising children in any formal capacity. So, my question is...

Are the kids remotely interested in programming, and does it make sense to try teaching them if they show no interest? As a child, I remember pushed towards taking piano lessons and hating every second of it.


I'm a parent who never got to take piano lessons. And I didn't particularly enjoy things that I was made to do when young.

And now as a parent with kids, I wish I got a chance to take piano lesson (or any musical instrument) when young. I make kids do things that I know I didn't enjoy when young, like studying, being responsible, facing consequences. And just like me, it's a decade(s) long process.

Obviously there should be reasonable limit on how much you will push your kids to do things they don't want to do. But I believe it's every parent's responsibility to help/push kids experience/learn new things when young. Even if they don't enjoy it (if so, it should not be pushed too hard or for long), it's a success because everyone involved gets to know what the kids enjoy or hate.

I'm not suggesting scheduling every waking hour of a child for an organized activity/study. But more/various activities for young kids are generally a good thing imho.


That's a good question because nowadays everybody is teaching their own gospel about programming. First, we don't know yet if it is convenient to launch these massive programming campaigns.

But, I think programming is a creativity tool, and as such kids can use it for creation. Sadly our tools adds a lot of complexity and doesn't help to make this creativity flow easily. Many kids will be frustrated by the number of details they should learn to move a simple object on the screen. This is why I recommended Scratch Jr. and Alice 3D, while not perfect you can do some advanced stuff with simple programming. If kids are not frustrated or annoyed by the tools they will engage in creative projects in art and/or science because this tool enables incredible new ways of expression.


I've been teaching the curriculum of @codeclub for 4 years now (see elsewhere in this thread) as an optional after school club in the U.K. It's massively over subscribed every term, this past term I've had 50% coverage of the total number of students offered in that year group. So, no one is forced and it appears popular, but I guess your point is still valid that parents could be pushing the children. Subjectively, it feels like they want to do it though.....


I like the idea of @codeclub.

"Would you like to go to @codeclub"

"Yes!"

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

Getting kids an opportunity to become interested in @codeclub is a related, but separate question.


> Are the kids remotely interested in programming, and does it make sense to try teaching them if they show no interest? As a child, I remember pushed towards taking piano lessons and hating every second of it.

No one knows the details of your experiences and psyche, I'm not saying that you should continue your piano lessons.

However, parents are primarily responsible from guarding children from their own poor choices among other things. I wish I didn't stop the guitar lessons when I was a child although my mind was primarily on girls, consoles and basketball.


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".


Games are a great way to get kids into computers and code.

Many of us who grew up around MS-DOS had to figure out ways to get around the 640kb base memory limitation and deal with conflicting IRQ ports. Did we want to do that? No, we just wanted to play Dune II. But through that, it got us tinkering with installing new programs, tinkering with configuration files, and eventually learning BASIC, putting together your own computer, etc.

Unless the kids are extremely mature and patient, the best way is to focus on an appealing end product. Don't present it as "oh, let's learn about boolean operators" today, as much as "hey, want to build a [something cool] together?"

And you know what? It may not stick; maybe they'd rather be outside, bake some cookies, or beat on some drums, and that's fine, too.


Doom modding was a challenge too, though more because the tools were immature. Now Duke3D changed that when it shipped with Build. Now I know teens who still use Build to experiment despite it being nearly as old as them.


Codakid (based in Scottsdale, Arizona) teaches kids how to code with Minecraft mods amongst other things.


Wasn't aware of them, signing up my daughter now. Thanks!


Also game hacking. I remember teaching myself VB to make flash game trainers. Would be interesting to find maybe some open-source HTML5/JS games and teach the kids to hack the JS to do what they want. With kids, it tends to help if you give them an existing foundation to build on or work around.


Can relate. Although I enjoyed doing things with websites my programming took on a noticeable uptick after I managed to find a way to automate (fancy for bot >_>) my crafting in FFXIV so I could game and go to the gym at the same time...


I first learned programming from game modding as well. I loved it.


My father bought me a russian clone of ZX Spectrum 48k in 1994 (in post soviet states, ZX Spectrum was hugely popular during 90s just like in UK during 80s):

https://en.wikipedia.org/wiki/ZX_Spectrum

My father was not an engineer and had no idea what to do with it. I also was completely uneducated (I was 10 years old boy in 1994) and basically ignored school classes (or prefered to sleep there). So I also had no idea what it is.

He bought me games and bunch of books about programming on ZX Spectrum.

I just started writing code from these books and see the result on the screen. Then I started slightly modify code. Then I started writing my own little programs.

After 6 years, I managed to learn assembly language and even write my own version of Snake game:

https://en.wikipedia.org/wiki/Snake_(video_game)

I had no help whatsoever from my father, from school teachers or anyone else.

Then my father bought me Pentium I 166 Mhz with installed Windows 98. Unlike ZX Spectrum I couldn't see what's going on under the hood at all. I tried some available programming languages. Their IDEs were huge, bloated, complicated and confusing. I was so frustrated that I couldn't understand what's going on under the hood so I dropped programming for next 7 years. I returned to programming when I switched to Linux and started writing programs in C using Vim as editor (and I'm still stick to Vim!).

So here are my advices based on my story:

Buy them something similar to ZX Spectrum, a small, simple, programming friendly micro-computer where kids can start programming straight away. Give them some simple programming books. Kids will learn themselves!

I personally can't imagine how I would start programming on modern computer. Especially under Windows OS (such a messy unfriendly OS for beginning developers!).

I would definitely not teach kids web-development! It will create a mess in their heads!


You were frustrated by Windows 98 because you could not reason about it on the level you were used to. But think back on the earlier electronic enthusiasts who were used to thinking about resistors and voltages – they would have been just as frustrated by your ZX Spectrum because they would not have been able to reason about machine code by thinking about what voltages they mean. The level to reason about Windows 98 would instead be by thinking about installed programs, registry settings, DLLs, etc. If someone came to computers fresh and started with Windows 98, this level is what they would know.


I can relate. I feel very, very lucky that my early programming experience was on a Commodore 128. Instant-on, straight to the REPL. And being able to switch between C=64 mode & C=128 mode made me aware of how differences in hardware and language changed how you approached a problem, and how CP/M was something else entirely.

It really was the perfect intersection of complicated enough to be a fun system to explore, and you could do Real Projects with it, and simple enough that you could 'hold the whole machine in your head'. I still remember how proud I was when I figured out how to write a TSR driver for a mouse cursor using the tape buffer for storage so that I could move a sprite around with a joystick at the same time as being able to use the shell. At the time, it felt like magic.


Wow, my story is near-identical to yours! Just shifted back in time by six years.

ZX Spectrum+ from my father in 1988, self-learnt after that.

Made a few games like you, but had no hard drive or disks. Storage mechanism for my programs were pen and paper.

Learnt machine code programming in tenth grade.

Later got a PC with Windows in 1997 and learnt C.


> It will create a mess in their heads!

Worse, teaching under-12 year olds to think "logically" like computers (of any kind) may mess them up for life.

We'll probably hear about it in a few years, given the current fashion. After the consequences become apparent and the victims complain, if they can.

(Fortunately, humans in general are quite resistant to instruction.)


I would agree --- actually buy your kids a ZX or C64, and also show them all the cool demos others have made.


I know of a game that incorporates programming lessons in a really cute way. I discovered it when I was around 15 and loved it so much, I wished I ran into it at an earlier age.

It's a 3rd person view where you control an astronaut on different missions. It has some RTS elements as there are various robots to control.

However, in addition to being able to directly control the robots (which is fun and accessible), you can write code that it'll execute and automate some simple tasks, like fetching resources, defending a base, etc. It's very high quality and well made, and incorporates step by step lessons, starting with basics of programming. Your creativity is the limit.

What I've found out recently is the game was eventually released as open source (it was originally commercial) and picked up by a community of people working on making it better, and it's suppported on modern systems.

It's called Colobot [0] and I highly suggest you try it out, see if you think the kids would find it interesting.

[0] https://colobot.info/


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!


>I'd recommend a scripting language to get started, as it removes the need to compile code //

Or use a REPL (eg repl.it)?


Yes good idea!


There's already a lot of good advice here, but I really wanted to emphasize Scratch (https://scratch.mit.edu/) as a first step. A 7 year old (2nd grader) and 9 year old (4th grader) should be able to navigate their way through Scratch.

Start off by following the tutorial on the right panel when you create a new project.

Once you're done with that, your cousins will probably be exploring on their own. Help their exploration by printing out some Scratch Cards (https://scratch.mit.edu/info/cards/).

After they go through those, check out the Harvard Scratch curriculum (http://scratched.gse.harvard.edu/guide/). There's full of exercises and activities in it.

By now you can tell if your cousins actually wants to learn to code. If they do, they'll be building things in Scratch on their own and remixing other people's examples.

I can go further as to next steps, but this should be plenty of material to get started :)


Similar but better than scratch: https://en.m.wikipedia.org/wiki/Snap!_(programming_language

Better because portable, works offline, and the language itself is more sane (although I haven't checked recent versions of scratch)


I had positive experience teaching kids scratch in an afterschool club environment. The Turtle library in Python is a good transition to show them things that Scratch cannot (its limited in terms of what you can do with variables , lists, etc)


For a Python version of Scratch you can actually try out https://www.codesters.com. It's python with drag and drop blocks similar to Scratch, but you actually write real python code. It's a great transition.

Thanks for the reminder! I forgot that another neat thing about Scratch is that it connects with different modules such as littlebits, arduino, etc. This allows them to integrate hardware with the games they build and paves the way to circuits, etc.

Edit. Adding info about Scratch extensions.


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...


My son is 8 and started using Scratch at school. He had me install it on my macbook and he created a simple side-scroll game and a program to play the Jingle Bells chorus.

I was impressed with how quickly he went from "just tried this at school" to "leave me alone, Dad, I know what I'm doing here".

Seems like a good intro for kids.


You don't have to install Scratch! The old version required you to install it, but these days you just need to use the browser version. https://scratch.mit.edu/


Hywel, I notice the blurb says "in line with the new National Curriculum" is that a USA-wide curriculum or is it in another country. I've got kids in that age range in the UK and they don't do any such computing/coding [at school!].


Yeah, the UK National Curriculum says children need to learn a visual language (like Scratch) and then a text based one (like Python). Your kids should be doing visual coding in school from Key Stage 2.


In case anyone else was wondering, "Key Stage 2 is the legal term for the four years of schooling in maintained schools in England and Wales normally known as Year 3, Year 4, Year 5 and Year 6, when the pupils are aged between 7 and 11."


I'm a teacher - scratch and python


I learned the basics of programming with Processing[0] and it was great! Seriously. It's basically procedural (but not turtle) graphics with a very simple IDE. You can also do animations and interactive stuff (mouse/keyboard), that's fun too. The official one is in Java, but it's just procedural, little to no OO required. there's also Python/JavaScript versions, haven't tried them. Another bonus is, it's easily embedabble online. There's a built-in Java -> JavaScript converter, which lets you automagically run a Java sketch in a browser.

the rest of this is just me criticizing things I used and didn't like, so feel free to ignore

I tried reaching a friends' kid programming with Scratch and making any kind of more complex stuff was actually too hard because of the "simplifications" built into the language. Can't remember the details, but you had to use globals instead of passing parameters for something basic, like constructing objects.

[0] processing.org


But first, you must answer the question of why you want to teach coding to kids. If it is because they have asked you about coding, or are curious enough that they will be intrigued or interested in coding, or perhaps you are convinced it is a life skill they should learn, then proceed.

But if you want to teach coding to increase your own esteem in their eyes, or to validate your own life choices by making them follow yours, then step back a bit before proceeding. Get to know them - and yourself - well before embarking on this quest.


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.


Why specifically do you want them to design and build for the web? Seems like a tall order for 7 to 9 year olds.

A lot depends on how much time and interest they have. With some kids, you show them a few things and act as a resource to them and they are hooked and off to the races. With limited time (many kids are overscheduled), you need to adjust your approach accordingly.

I am a big advocate of Scratch as a first language. The payoff is very quick, "syntax errors" and fussiness over indents, capitalization, and punctuation are pretty much nonexistent, and there is a vibrant community with millions of examples to inspire and "remix".

There are a surprising number of online edutainment/learn to code services that flat out don't work for 7 - 9 year olds because the software developer threw up their hands at the prospect of complying with COPPA and just set their terms to be "must be 13 years or older". I think it is a bad start to setting a child's moral compass to tell them "just lie about your age to access this service".


Carlos Bueno, an early engineer at Facebook, wrote this book "Lauren Ipsum" which talks about classic computer science problems (ie traveling salesman or halting problem) in a children's story format:

https://www.amazon.com/Lauren-Ipsum-Computer-Science-Improba...


I found Scratch Jr. [1] and Alice 3D [2] great tools for teaching programming. I found Alice 3D more appealing for kids that the full Scratch online. Scratch Jr. for a 7 year old kid is a good way to start. A typical 9 year old is more capable of general programming (thinking in a straigthforward syntax like in Python).

For younger kids I only recommend Scratch Jr. since it is natural, has less friction, and doesn't require reading.

[1] https://www.scratchjr.org/

[2] https://www.alice.org/


+1 for Scratch Jr.

I am also a fan of hour of code ( https://code.org/learn), it uses popular games and Disney characters and typically no project takes more than an hour.


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/


I like Pico 8, which is a fantasy game console that use Lua, and has an integrated editor, player, sprite editor, and music tracker.

Working with games and graphics is a good way to give a goal to the learning.

It comes with PocketCHIP, which is a cool cheap way to get handheld computers in kids hands, or you can get it standalone and run it on a PC/Mac/Linux.

http://www.lexaloffle.com/pico-8.php

https://getchip.com/pages/pocketchip


How about teaching them about health?

We've recently started to teach kids with the use of Aidlab (https://www.aidlab.com/developer) to show them some basics about heart, lungs or motion data. They are able to measure themselves, develop simple apps thanks to Unity engine, and make use of those data (ex. building games that use respiration level to control game character).


For more in depth JavaScript exercises, I built this for some hour of code sessions at some pretty big high schools.

It's basically a UI for writing/sharing/leading code exercises.

It should obviously be using a database and have better security, but that wasn't a major priority for my original purpose.

https://github.com/katzgrau/hour-of-code-developer


There was a similar thread on HN a few days ago and to get started and get them interested, someone suggested to open devtools and let the kids "hack" Google, like change colors etc. It's very simple but apparently makes kids excited and lets them have fun. Starting totally from scratch might be too intimidating.


A good friend of mine has started working on the exact same problem. He comes with a background in Games/Graphics (Pixar, EA Sports etc.) and in Education, and his take is that teaching programming/math using concepts from animation/games development might be a much better approach compared to the traditional way of teaching programming and computer science. Interestingly, that's how a lot of folks got into programming in the 80s and 90s.

Creative Technology Club: http://www.ctc.ooo

He is starting this in small in-person batches for kids and adults (Ahmedabad, India), with plans to take it online in the future. Would love to hear thoughts on how to best scale this model.


Video games are a great entry into the space!

My 6 year old daughter loves video games and constantly wants me to help her make her own. We're currently working out how she wants it to work. I'm going to help her with the art (she'll show me what she wants) and then I'm going to code with her.

I'm not forcing her but she loves the idea so far. I plan on writing up each step on my blog so people can see our progress and, if it's success, maybe it'll help others repeat it.

If she ultimately hates it that's fine. It's mostly me coding and explaining stuff to her because she's so young. I think it's good for kids to have an idea how it works but if they don't want to be a developer like me then that's fine.


I've co-taught classes on Scratch and Python (seperate classes) to kids from 8 to 13.

One recommendation is https://www.nostarch.com/ - No Starch Press. There are a number of good titles in the kids section. They were also very decent in giving us a classroom discount for materials.

We used ChromeBooks as that is what the school had for kids. It is OK for Scratch but less than desirable for Python. We used repl.io for an IDE and it wasn't bad. It is better to use IDLE if possible...

I've had an idea of teaching a class where the beginning part is to get a Rasp Pi up and running - 1 per kid or 1 per pair. After that use the Raspberry Pi to learn Python / Scratch.


A friend's kid loves Minecraft. He specifically asked me to teach him how to code so that he could eventually host his own Minecraft server. I started with a couple different approaches including Kahn Academy kid-coding videos, basics and WYSIWYG HTML examples. The kid didn't really want to "code" as much as he wanted to see concrete outcomes. One of the outcomes was a blog or forum to interact with his Minecraft friends.

The moral of this story is that it helps to focus on the interest of the children you are teaching, identify desired outcomes that will excite them and deliver the outcomes while secretly teaching them coding and computer science basics. It's like hiding the dog's pill.


I think this topic should have a permanent link at the top of HN; it seriously comes up so often we need to setup a sort of wiki page about this.


I live in mexico city, and I teach python to a group of kids at burger king 2 times a week.. I didnt come up with a lesson plan so I use "Automate the Boring Stuff with Python" as a really loose guide on how to begin programming..


No Starch is awesome for kids - the "Doing math with Python" is a good title too


First and foremost, teach them using something that creates something tangible quickly, this'll keep them interested.

Second, depending on their personality, it may give them more motivation to use a language actual software developers use.

So all in all, good ideas are:

* Python because of the load of libraries

* Haskell because it's very human and has a great REPL

* C because it's pretty easy, and gives them the feeling of something "serious"

* Scratch because it's playish

(This is from a perspective of an 18 year old who started at 11 with C and went through a lot of languages and various programming categories. I think those are things that would've motivated me even more if I had them.)


I get that kids' brains are malleable at that age, but they still have a tendency of thinking in a certain way. Programming requires quite a sequential and linear way of thinking that some kids just don't show a preference to it.

I've got two nieces, one is 4 and the other 2. For the four year old I tried using different games that are similar to ScratchJr. She's a lot more arty/dancey so even though she likes playing games on the tablet, these sequential typed games really didn't do it for her. She would just get a bit bored. The other kid, never plays with toys(ever!) she only draws and plays dress-up, but regardless, I bought her a code-a-pillar (https://www.amazon.co.uk/Fisher-Price-DKT39-Code-a-pillarTM-...) which is for ages 3-6. So even at the age of two she started playing with the code-a-pillar (obviously with the help of her mum), and managed to make it snake around all of her other (unplayed with) toys. So she clearly showed an interest an inclenation to sequential thinking. (Next I'm gonna try get her using ScratchJr, then getting her a Kano or moving to Scratch.)

Personally I would have loved getting them both involved, but ultimately I think only the two year old show's a preference to that "type of thinking".


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.


"turtle" is the what I use to teach kids programming, this is one in JS: http://berniepope.id.au/html/js-turtle/turtle.html

As they get more interested I switch to https://tryruby.org then scraping with nokogiri then asking them about the problems they want to solve.


I'm a volunteer CS teacher with the TEALS program in Seattle. We taught Snap (based on Scratch) for Intro to CS in our high school class, mostly teenagers 14-16. I like that it gives kids a quick and fun way to see immediate results without being annoyed by syntax errors. I also feel like we should have moved on to Python or JavaScript about halfway through the semester. The kids who are most excited about programming eventually want to learn a "real" programming language that is used in industry. So I think teaching a combination of Scratch and Python (or perhaps JavaScript) makes for a good Intro to CS class.

For the second year, we are teaching AP Computer Science, so we are using Java. I think the students had more fun with animation, simple games, and web development than they have with AP exercises. I find that there are too many concepts involved in teaching Java to make it a good first language, which can be demotivating. Tons of time spent debugging syntax errors as well. While these things are important eventually, some kids get frustrated and give up too early without ever seeing interesting results.


Adobe has partner with Goldman Sachs, Vschool, DevMountain, and The Department of Workforce Services (and originally Cotopaxi, but they ducked out) over the last year to teach refugee youth how to code using code.org (the accelerated course) interlaced with robotics using the mBot. It uses the same scratch interface, so their code.org knowledge easily transfers to seeing some real-life application of something that they can touch/hear/see move around. They seem to like it. They definitely hate lectures, though. Clearly one needs to give them instruction, but excessive instruction definitely works counter to one's purpose. These are youth aged 13-18.

The mbot lessons slowly work them up towards a "sumo wrestling competition" where they have to push one other opponent's mbot out of a ring.

If anyone is interested, we made a little repo to hold our code. It's a little outdated, but we'll get it updated soon.

https://github.com/STEAMGEN/mbot-curriculum


I saw a book that focuses on teaching Python through Minecraft for kids that looks promising. It may be a bit advanced for a 7 year old however.


Don't.

Teach them to experiment, problem solve, to be creative, and that failing is okay.

Coding is useful today.. none of us know what will be 10 or 20 years from now.


+1. I think the high level concepts are far more valuable. If they decide to write code in the future then great, they've got a leg up. If they don't then they still walk away with more capacity for problem solving and logical decomposition.


Coding in its most general form (controlling an apparatus through high level deterministic rules) will probably remain useful. Any particular coding language and computer architecture might become obsolete though.


I have 3 kids, eldest is interested in web pages so I showed them html on a neocities site (thanks HN). They now have a photoblog based on w3schools css gallery. They didn't much care for Python.

The middle kid learnt some scratch at school and loves it, and has taught themselves loads about it on the web (youtube is by far their favourite way of learning). They have done a fair bit of Python with me too. However they are interested in 3d games so are teaching themselves Blender and Unity (and therefore some C#) aged 11! Now it seems they enjoy 3d modeling as much as coding. Interestingly they are also fascinated by working with the command line for anything, so they are learning some basic bash too.

The youngest is an avid Minecrafter, but at age 8 they have had a go at Scratch junior. However, they have decided they are too grown up for it and are dabbling in 'proper Scratch' now.

I don't push them, but try and create opportunities for them to see new things


I teach coding to managers with LOGO (Scratch). This works wonderful and people learn to really code (break down a problem into smaller ones etc.) not just copy&paste code or do some cargo cult programming. I still believe turtle graphics are the best to learn what coding is.

I imagine as LOGO was developed for kids, it should work :-)



This is more a recommendation for kids slightly younger (4yo) - http://thefoos.com/

The game is pretty amazing in that it teaches pre-reading kids how to "code" by presenting it as a puzzle that you add pieces to. Really well done.


I teach code to kids. From age 9 to age 16. What I've found that really works is accomplishments.

I'm a huge fan of exercises instead of frontal introduction. I've had success with the Khan Academy program ("introduction to programming") and then giving them simple web exercises.


I'm interested. How do you use accomplishments specifically to teach how to code? Do you create exercised or projects that can be completed, do students build their own projects with certain accomplishments in them, or?


When I was 12, there's no Facebook, no Bootstrap-like CSS framework, no drag-n-drop build tools. I want to build a forum for own interests and for my class.

I just following the steps one-by-one without asking WHY. Getting the PHP forum source, upload it, change few lines. Then, started to try to change color, adding plugins. (Thanks God! In the old days, there's no good MVC separate framework, I must dig into source to change things to add plugins or change styles. When I did more and more, I started to understand the pattern. And then I tried by testing the code.)

So I believed, maybe started with making a WordPress site rather than just HTML & CSS. Child got an end product to show their friends and able to drop comments in the blog.

Get thing done first -> Then, to understand the basic.


Have you seen the exact instruction challenge on youtube? I thought it was a great segue into technical thinking for young kids. https://www.youtube.com/watch?v=cDA3_5982h8


I taught my 8 years old girl using JavaScript and we made a simple game (numbers falling from the top of the screen and you have to click them to make a number: e.g. "3" and "4" because the number to make was "7").

It eventually became PopMath (which I reimplemented in ObjectiveC for the iPhone) but she understood the concept of loops, random number generation, collision with sides (so x coordinate had to be reversed) and event handling (function to get the user clicks).

I also did the same with my son when he was 9, with another game where the player would need to use arrow keys to navigate a maze.

Also in JavaScript because they can see the results right in the browser, can easily add graphics, and even sound effects.

I think simple games are a great teaching tool.


Teach them how to access a simple programming environment like codepen and then load up examples for them to modify that might be motivational. Sit in a room where they can see you doing programming yourself. Teach them how to google. Be available for questions or debugging help. Teach them to debug.

They must be motivated to explore and teach themselves. If you try to dictate their interests or lessons then it will just be a chore and they won't learn how to teach themselves.

They will naturally emulate you if they see you programming. They will also naturally lose interest in programming if there is no quiet time set aside where neighborhood stick-ball or whatever cannot interfere and they are distracted by their friends.


Teach them how to cook a recipe and then ... both how to delegate the cooking of a recipe, and to be an executant.

Basic skills in computing is understanding how things works in order to delegate your tasks to them.

It will be a skill working with human and computers alike.


Get a couple of BBC micro:bit boards. There's something inherently exciting about using code to do tangible things in the real world. I don't know why, but blinking an LED feels totally different to "hello world".

You can start out with a drag-and-drop programming interface and work up to JavaScript or Python. The BBC and their partners have created a wide range of educational resources based on the micro:bit. The boards are really easy to attach to other things and have bluetooth on-board.

http://microbit.org/


I don't think there is a one size fit all method, so take mine as grain of salt. From my exp of teaching my brother programing, I think something that combine HW with SW is a good way to go, he first got into programing by playing/programing with Lego EV3(age 6~7). I think the EV3 (Labview) programing interface is very easy for kids to understand some basic ideas behind programing. Also, the ability of seeing their programs can run in actual brick also help a lot. Then after that it become more easy to learn some other more advance stuffs(Javascript, python, etc)


Nice video! How did you film the Lego stop-motion stuff? Some advice: make sure your voice is clear next time. The music was too loud in this video.

I agree with the other comments in that they need to be interested first. Well, how do you get them interested? That depends on their interests and hobbies. So what I would do is create a short video that ties one of their hobbies to programming, and try to discuss what they thought of the video. Once you get them hooked, they'll be ready to learn.


Have a look at Kano on the raspberrypi. Build and code your own computer https://liliputing.com/2016/03/first-look-kanos-raspberry-pi... It has lessons for Graphics, Minecraft, Music and the command line. See what interests them and then explore, if they like music then they will have fun with SonicPi etc.


KTurtle (comes with most Linux distros). If your kids are not fluent in English, then KTurtle sports several languages through KDE's language packs. Both the commands, docs and error messages are translated. It is a bit like LOGO, but with different syntax.

If English is no barrier then https://code.world/ is also pretty awesome, and in the browser.

Disclaimer: I'm one of the devs of KTurtle.


Nice game for a kids party (ages 6-10) - https://drtechniko.com/2012/04/09/how-to-train-your-robot/ - write "programs" on paper and have an adult "robot" execute the program, which could include having to do silly stuff. Putting them in pairs helps


I've had a small course on programming for kids in ages 9-12. The biggest challenge by far is the setup part. I asked them to type an URL and they ended up googling it instead.

That's why I decided to do as much unplugged activities as possible. The concepts are so much easier to grasp I think when you're in a familiar environment (the physical world). Of course it's important to mix though.


If your cousins have iOS devices they should check out Hopscotch. (http://gethopscotch.com) It works on iPhone and iPad and you can use it to learn to code and make your own games. Full disclosure: I founded Hopscotch. But it's still awesome if I do say so myself :)


Tie it in with something else they enjoy, perhaps? The Minecraft space has a lot of beginner programming tools for kids.


Best introduction to programming I've seen so far is a game called Human Resource Machine, good for all ages, available on Steam.

https://en.wikipedia.org/wiki/Human_Resource_Machine


I think it would be better to teach kids to code. I would start with a project that makes sense to them, probably a simple game or animation. Learning the code, syntax, etc.. would be boring IMO but getting hands on might make them appreciate it and potentially become hooked.


Bitsbox was on Shark Tank yesterday. It's apparently founded by ex-Googlers.

It looks quite good, but does anyone here have any first hand experience with it? I'd love to hear an honest review.

https://bitsbox.com/


To teach them basic concept of coding you can always let them play Human Resource Machine, Android/iOS/Windows game created by World of Goo studio http://2dboy.com/


I bought my kids (age 4 and 6) an mBot for Christmas. We haven't really started developing for it, but since it is something tangible, I hope to give them some basic ideas what programming is and that they could do it themselves.


With Logo.

It gets the basic mindset right (loops and what not) while making things visual so that the kid's mind can follow what's happening in an intuitive manner.

If you launch them straight into "real" programming they'll get bored imo.


Why would you do that? Have you asked them if they're interested?


Teach them how to think in an object oriented way (then you'll see how to teach them web-dev), but the most important thing, for me, is to teach concepts not tools/languages.



Hour of Code and then Tynker Tynker Tynker Tynker Tynker. Did I say Tynker? I just spent 3 hours today with my 7 and 9 year olds coding up Minecraft mods.


I've done it. The best way I found was to setup a Minecraft Server and let them manage it. Keeping it up and running touches on every skill you need.


I am also planning to do same for my cousin with same age, but I want to teach theme maths first from khanacademy.org ane then will teach scratch...


Shameless plug: http://pythonturtle.org/


Check out Robomind. It is an online environment where you can program an on screen robot. It was designed for kids.


I've been making a simple command line quiz with our 9 year old, using Elixir. It went pretty well so far.


Legos. I think the key concepts are building and creativity. After all they are kids.


Ask them.


If they don't have much context, you could show them software projects tailored to their interests and capabilities/time constraints and ask them if they want to make something like that with you.


By showing them how to do something cool with it.


tynker.com is good.


Teach persistence.


> building and designing for the web

please don't


tl;dr - Skip to the last paragraph for the actual advice.

I'm not a teacher, but I did begin learning to code when I was about 8. Allow me to offer a bit of anecdata.

I first started to learn to code on the Commodore 64. The first thing I remember making all on my own was a text-based lucky number program. I made various other very simple text-based games, but without someone giving a bit of guidance, I didn't build much that was complex.

When I really started to learn to code was when my parents bought me a modem, and I got into some rather nefarious activities on AOL (phishing, cracking passwords, mass mailing warez, etc). I was on a Power Mac 7100 at the time, and I started to write tools to assist with my endeavours. I mostly used a tool called OneClick which allowed for easy text capture from on-screen elements, recording of macros from user input, etc. I remember my motivation at the time was part competitive (I wanted to create better tools than other people in the community), and part driven by acquisition (I wanted the latest games/applications, etc).

Finally, the third stage of my childhood programming activities came when I switched from Mac to PC as a young teenager (13 or 14). I pirated a copy of Visual Basic 3.0, and started learning network programming. I remember building a very simple multi-user chat server and client program, getting into ASP a bit in order to build web pages, etc. Honestly I'm not sure what my motivation was at the time, but I remember distinctly thinking that this was going to somehow make me special. That by learning to code I'd be approaching a status which is something like a mix between James Bond and the hackers you'd see in movies like, well, Hackers.

I can also say that while my parents and teachers didn't push me (quite the opposite, really - they always wanted me to quit 'playing computer' and do whatever it was that I was supposed to be doing), they definitely encouraged that feeling of "this will make me special" in subtle, unintentional ways. Once certain teachers started catching on, they too helped encourage the idea, but in much less subtle, more intentional ways (you're gonna be the next Bill Gates, kid). I think more than anything else, that's what lead to my successful career in software development.

So, if I can offer any advice, it'd be to focus on motivation of learning first, and facilitation of learning as a close second. Keep the goals simple and attainable, make sure the activities are aligned well with the kids' sense of fun, enjoyment, and/or utility, and I think they'll lap it up quicker than you could ever provide it.

Edit:

One last thing - I think your video is great, but it's not substitute for one-on-one time. As a kid (and as an adult, really) I remember learning well by watching others who were patient enough to let me interrupt and ask questions. I think videos will be great for self-lead learning once the appetite is whetted, but early on one-on-one time will give the kids a much better chance to learn at their own pace.


codemonkey.com


try code.org


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.


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?


We used Learn to Mod for a junior hackathon, it is like modding Minecraft but with a scratchlike interface. Super cool


I did the same in New Zealand and it was a massive hit with the kids! Great site with a series of tutorials, in browser barebones Minecraft game to see the results of your code and a great full version Minecraft setup with dedicated worlds where the code is loaded as book objects inside the game. HIGHLY recommend checking them out: https://www.learntomod.com/

They also offer free teacher and student accounts with the ability to limit time. Can't say enough positive things about the service.


In respect to Minecraft, you can use Python to control aspects of the game in the Pi Edition. With Java, the Bukkit/Spigot API isn't too hard to understand, but I'm not too sure about how hard it would be for kids that age. Depends on their skill level and interest.


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.


JS is a pretty bad first language to learn—too many quirks and random syntax in the last few years.

Python is dead simple—I recently had to take on a project written in it having never programmed in Python before and I essentially did not have to learn it to get the feature done.


I had a similar experience with JavaScript, assuming you make _extensive_ use of ES2017 syntax and features. It's actually very nice, provided you have a compatible browser, but there's a long way to go still.


Having used both to teach beginners, I can assure you that your categorical statements are false.

I might give Python an edge for a number of reasons (a shell is a simpler environment than a browser in a number of ways, some of the language features are cleaner), but to say that it's much harder doesn't bear out with my experience. Capable first-timers become productive at about the same rate.

I've found it's mostly experienced developers who trip over JavaScript, because they're carrying a set of expectations and are weirded out when it does something different. Turns out principle of least surprise means different things depending on people's backgrounds.

Feel free to choose to start someone with Python if you prefer it, or if they're likely to want to work in a domain where it makes sense (say, data science), but it's probably not going to change your learn-to-code outcomes much.


That ES6 was created, to substantially redesign the language says otherwise.


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


Compared to other languages and environments, debugging JavaScript can be difficult if you don't have a good idea of what's going on behind the scenes in specific browser versions, the DOM and JavaScript VM. Throw callbacks, Promises, etc into the mix and things get confusing pretty fast.

Comparatively, other languages, like Python, will throw sane exceptions and a meaningful stack trace when something goes wrong.


Maybe brython can help with that!

https://brython.info/


I helped an 8 year old get started in Python. It was an almost effortless process once we started with Python's Turtle Graphics. He started "innovating" himself when he saw what he could do with loops etc and draw with the Turtle. I initially tried Javascript but I couldn't think of an easy way to get him to the level of Python's Turtle animations as quickly. Python seemed more packaged and modular this way.


The syntax of Python is sane, which can't really be said of JavaScript.


Do your cousins want to code? Is it good for them to sit in solitude in front of a terminal instead of playing with other kids? Does it help them thrive to spend even more of their childhood staring at a screen than they already will? Will they be happier writing CSS than climbing a tree, or even reading a book or playing an instrument?

Please do not make your cousins learn to code.


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?


I'm 38, started coding when I was 6. My life has been amazing because of it.


Teach them how to be the VC instead


javascript html5 videogame seems like an obvious choice




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

Search: