Live data from Hacker News

How would you teach a middle / high schooler how to code?

news.ycombinator.com

1–10 of 15 posts

How would you teach a middle / high schooler how to code?

#1
Obviously there are many sites out there on "teach yourself how to code" and books on "learn to code in 30 days." I have a little bit of a different take on the subject, and would love to get your opinion.

If you were teaching a 14 year old the most important thing to expose them to the world of programming, what would it be? Let's say you have 1-2 hours a week and a year to do it.

Re: How would you teach a middle / high schooler how to code?

#2
The khan academy has some really really good intro to CS videos for free. It is primarily python and JavaScript along with basics of algorithms and data structures. Show the kids that they get badges for learning and can compete for more points. I couldn't recommend it enough

www.khanacademy.org/cs/tutorials/programming-basics

Re: How would you teach a middle / high schooler how to code?

#3
I would try teaching him/her to make a simple website first. That way they can see that with a little effort, you can make something really neat on the computer.

CoronaSDK is also a good choice. Then there's all those sites like codecademy which would be helpful as well.

Re: How would you teach a middle / high schooler how to code?

#4
I have been teaching my 13-year old sister how to code over Skype, and built this tool to help: http://replpad.com

It's a collaborative code editor that will run the code in-browser, so we can write together and run the code all on the same screen. We've been working through simple problems and I've been teaching her how to solve her math homework programmatically.

Re: How would you teach a middle / high schooler how to code?

#8
I've been teaching my girls how to code for a while now (was even published in Hacker Monthly magazine for it). My experience has taught me that the only reason they will learn to code is:

    If they have something they want to build themselves.
I battled with this idea for a while. Why can't they just build a website and be done with it? Turns out, building websites is boring if you don't want a website.

I tried all sorts of languages and tools. What has worked for me has been using the Arduino platform to build animatronic projects for Halloween (a pumpkin that yelled and flash LEDs), and Minecraft. With Minecraft you can create your own textures and game objects by using Java. Its really fun, and they can see the connection between code and results very quickly. Try it out.

Re: How would you teach a middle / high schooler how to code?

#9
You need something based on intrinsic motivation.

A lot of people saying "start with teaching problem solving and algorithmic thinking" and while I agree that this might be "the best" way to learn how to do programming from some angles it is probably not especially motivating apart from to people who are intrinsically interested in math/logic puzzle type things.

It probably works as an approach in a CS programme where you have the luxury of saying "do this or you don't get a degree" and where you are trying to weed out people who might not hack it in the long run. It may also be more time efficient in developing actual programming skill, but that is not necessarily the point here.

A good example is to look at minecraft modding tutorials on youtube. Based on the commentary it's clear that some of these people don't really understand Java and don't really know what they are doing and are mainly learning by copying others. However they are still getting the results that they want to some degree so they keep going.

At some point these people will inevitably hit against hurdles because of their approach. At this point they may either give up in favour of some other hobby or they will naturally gravitate towards reading the accumulated wisdom about debugging techniques, OO design etc.

I can see why the more formal approach is appealing to people who started as being self taught and are introspecting about their own development as a programmer.

There's certainly plenty of times where I think about older programs I had written and thought "if only I had read textbook X first, that would have been much easier/better".

Re: How would you teach a middle / high schooler how to code?

#10
I'm sorry but there is very little you can teach them about programming that will stick with 1-2 hours a week of effort. Assuming the kids aren't self-selected (unusually bright, inherent interest in programming), you are very limited in what details you can expect them to remember from week to week. You're better off giving them a few hands-on tasks that are graphical and mostly self contained. Building a simple 2D game in stages over the year can work. Building a world with rules like gravity and momentum, and then building a simple collision detector might be the highlight of the course.
Post reply on HN