Live data from Hacker News

Ask HN: How to best teach a group of children how to code?

news.ycombinator.com

101–110 of 116 posts

Re: Ask HN: How to best teach a group of children how to code?

#101
post #96

Earlier quoted context omitted.

It probably helps if you're in k-12 school at the time (loads of free time), Netflix hasn't been invented yet, it's still kind of possible to run out of crap to look at on the Web, and even though it's the mid-late nineties the only video game console in your house is an NES. I doubt I'm even close to the only developer who ended up here because it was easy to end up in a computer-related learning loop just trying to…

You missed the point. The question is not "How can I teach ashark to code?", but "How can I teach $average_kid to code?"

I think the broader message of the typical-90s-developer-kid journey is "make sure it's a requirement to do something they think is fun—and ideally not an artificial one". I don't know how you do that in the age of just-works iphones and free or dirt-cheap services to address practically every need—which is also why I don't have side projects.

Point is, don't make the goal (for the kid) "learn to program". Make the goal "do thing that's fun (but you'll have to learn to do computer-stuff/programming to get there)" The ones for whom "learn to program so... you can program" is an effective motivator probably don't need much help other than a finger pointing the right direction.

Re: Ask HN: How to best teach a group of children how to code?

#102
Going by my personal experience with my kid, I think the best tool at the moment is a Raspberry Pi + Minecraft Pi + Python. Python and Minecraft Pi edition are both included by default in Raspbian and there are several free resources, such as https://www.raspberrypi.org/learning/getting-started-with-mi...

It is an extremely rick environment..

Re: Ask HN: How to best teach a group of children how to code?

#104
This thread is amazing. I started a company with the goal of helping kids learn to code, so I peed a little when I saw that the HN crowd was giving me ideas.

Here are the main things I have figured out (3.5 years, ~6,000 kids in 8 states): - It has to be fun. Lots of people have said this already, but I have tried and failed starting with academic rigor. Hello world was a psychological payoff in the past, but for this generation it's more like a multiplayer video game (easy on scratch) or fake hacking a news website (people have said this above) - It has to be social. Anyone can get online and teach themselves, but most people won't. We hold weekly meetings at public libraries where the librarians facilitate (they don't know how to code) and the kids teach themselves. Someone mentioned Sugata Mitra +1. - It has to be inspiring. I try to help the kids feel part of a movement, like for example getting the governor to talk at a hackathon, and hand out expensive prizes. But not all kids care about that stuff, and the goal is to figure out what they care about and show them how coding can help. Art, business, sports, etc.

To the original post - I know a lot of inner city, rural and tribal libraries that would LOVE to have a shot at those donated laptops.

Re: Ask HN: How to best teach a group of children how to code?

#105
Problem is, if we teach kids how to code today, they might end up jobless when they graduate from college.

Machines will code for us. I think we should push the vision further. We always try to apply the present for the future. The real future for these kids is not coding!

Re: Ask HN: How to best teach a group of children how to code?

#106

I've done this for several years. Here's what I've learned. TLDR: Focus on getting them to have fun & enjoy learning about 'code'. Don't care so much on how well they learn it. Every kid is unique & will respond to different things. Social & mentors are awesome. It's usually more fun to build with others if possible. Also they will want to easily share & show off their creations with others. Show them how to "hack" G…

+1 for the DOM Inspector. I have found that kids LOVE pulling back the curtain on a website to see the wizard and play with the code. A fun activity is to have them go to a news site and have them edit the headlines and replace the images to silly things and take screenshots to share with their parents. What really impresses me with this exercise is how quickly some kids will figure out some intermediate hacks when t…

>Instead, when I give kids a great big block of javascript code that does something fun and animated, those kids will go wild with it.

It's too bad elementary and secondary education in general aren't more like this.

Re: Ask HN: How to best teach a group of children how to code?

#107

It depends on the kids' age. Older kids could probably handle Python though setting up + computer availability might an obstacle. If they have access to shared computers maybe javascript could be good since they can test things out in the browser. For younger kids maybe a block-programming interface would be good: https://developers.google.com/blockly/ || https://snap.berkeley.edu/ || https://scratch.mit.edu/ For a l…

+1 for block-programming, even for older kids/teenagers. I taught a high school CS class using Snap.

At first, I thought it was silly to teach "drag & drop" programming and would have preferred a high-level scripting language. But, after teaching 2 semesters of Snap and observing classes in Java, I'm a huge fan.

2 main reasons:

1. Time-to-cool-result is really low. The first project was a Mario-like game. Less than 10 hours from "never programmed" to "built Mario game" is a really powerful first experience. (Demo: http://snap.berkeley.edu/snapsource/snap.html#present:Userna...)

2. Syntax and compiler errors are really confusing. When I walked around the Java class, most kids were asking questions about how to fix their syntax errors. In my class, most of the questions were conceptual.

It's easier to go back and learn a "real" language after you understand the high-level concepts and have seen how cool programming is.

If you want the resources I used, feel free to ping me (adamaflynn@gmail.com).

Re: Ask HN: How to best teach a group of children how to code?

#108

I've done this for several years. Here's what I've learned. TLDR: Focus on getting them to have fun & enjoy learning about 'code'. Don't care so much on how well they learn it. Every kid is unique & will respond to different things. Social & mentors are awesome. It's usually more fun to build with others if possible. Also they will want to easily share & show off their creations with others. Show them how to "hack" G…

> I've had a lot of success with a simple trivia game that lets them start by modifying the questions/answers & the replies it gives.

The beginning of my own path to being a programmer, long ago, was playing with games made in RPG Maker 95. If I didn't understand how to pass an obstacle, I would "cheat" by opening the game's world-database file up in the game editor, finding the "object" with the logic that was inhibiting my progress, and then modifying it to allow me to bypass it.

After that, I progressed to just opening games in the editor to "figure out what the author actually wanted me to do here" so I could go back to the game and do it; and then, finally, just observing how people had constructed their games.

All in all, it felt very natural to transition from there, to making my own games in the editor.

I think it was a (probably unintentional) brilliance on the part of the company who produced the software, that the games produced only by using the "hardcoded" features of the game-editor were so simplistic and limited--while also allowing a complete, Turing-complete scripting capability. It meant that, very quickly after starting down a path saying "I want to make a game", I was forcing myself to learn programming concepts in order to extend the engine with the features I wanted in a game.

After a while of doing that, I had absorbed enough about programming to understand that the game-editor tool itself wasn't "magical", and that the whole of its hardcoded game engine could be represented with a not-overwhelmingly-large piece of the same scripting-language logic I had already been writing.

After that moment, it just felt "natural" to move on to reading some Javascript tutorials online, and to pick up a book on C.

The realization that there was no magic in the software I interacted with, but instead merely sequences of small, logical steps I could identify and replicate myself, using a library of atomic mechanisms (branches, loops, etc.) specified to a computer in a formal language: I think that is the one thing that needs to be captured by anything that claims to "teach programming."

And, personally, if I were going to teach programming, I'd try to do it just as I did above: give them completed game, but an overly-difficult one, one which they aren't just modifying for the sake of modifying, but modifying because that's what will let them win.

And, at first, I don't think "programming" even needs to be introduced. Just introduce the framework, the idea of modifying an existing interactive thing (don't call it a program), even if it's just by opening a visual editor and erasing a rock that's in your way.

Then, in later exercises, you can make the "thing that's in your way" much less simple--a sprite whose state is wrong, an event that won't trigger until a flag is set from somewhere else, a person who expects some variable to hold an impossible value where you have to construct the trigger to set that variable yourself; etc.

Eventually (but probably within one semester of an after-school-club setup!), this "adversarial modification framework" could work up to the point of something like Core Wars, where the student is writing writing complex agentive processes controlling shield drones to protect the player-character from enemy fire as they move toward a goal.

From there, you've got a decent jumping-off-point to the "wanting to mod the engine to get it to do the cool things other people have made it do" phase, and from there to the "why not just write it all myself?" phase.

Re: Ask HN: How to best teach a group of children how to code?

#109
post #46

I've been teaching children to code for 20 years. The book I wrote is designed for self-study and seems to work pretty well for some kids. More details on my blog here: http://grahammitchell.com/writings/how-i-teach-beginners.htm...

I thought zed Shaw did the * the hard way titles?

Re: Ask HN: How to best teach a group of children how to code?

#110

I used to help teach kids (12-16ish) how to code. One thing that we always did towards the beginning of a class was an exercise where we tell them to write down the steps to make a peanut butter and jelly sandwich. Then we'd literally get bread, peanut butter, and jelly, and follow their instructions to the letter. No one ever adequately describes the process: "put peanut butter on bread" - With what? the jar is clos…

There was a video of a teacher doing exactly that, made me rethink some approaches I use when teaching https://www.youtube.com/watch?v=leBEFaVHllE
Post reply on HN