Live data from Hacker News

Ask HN: How should I teach code to kids?

news.ycombinator.com

101–110 of 138 posts

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

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

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.

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

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

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

#104
post #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 (m…

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.

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

#105
post #45

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.

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.

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

#106
post #26

Earlier quoted context omitted.

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.

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…

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

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

#107

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…

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.

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

#108

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.

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.

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

#109
post #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 (m…

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

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

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

Post reply on HN