Live data from Hacker News

Ask HN: How would you teach teens to code in 2019?

news.ycombinator.com

11–20 of 88 posts

Re: Ask HN: How would you teach teens to code in 2019?

#11
post #8

Like the rest, if they are interested. I think, again like others, that something with better fundamentals than JS would be good as then JS won't be hard to take up. I learnt coding in the early 80s by programming games. But when it came to making money I used those skills to build business applications. And I liked that as well (I like the feeling of creating something that works 'out of nothing').

Something fun to start in might be GreasyMonkey kind of stuff were they can manipulate existing sites. That could introduce them into a lot of programming areas while still allowing small changes to have big results.

Re: Ask HN: How would you teach teens to code in 2019?

#12
post #6

Agreed that they should show an interest before you embark on this. Finding joy in general education is more important than job skills for that age. That said, Ruby and JS are not great languages for teaching fundamentals. They (especially JS) have a lot of weird design decisions that don't translate to other languages and don't map neatly onto problem spaces. If you insist on JS, start with TypeScript at least. But…

When first learning it's more enjoyable to see an idea translate quickly to reality. JS is great for that purpose. It's very easy to make animations and other fun effects in the DOM or build an extension on top of their favorite site. Once invested they might start research and discover CS fundamentals. Immediately throwing them at typescript without understanding JS could lead to frustration/confusion. They also mig…

I finally learned Javascript after hating two compsci classes that used Java. I really like Javascript or Python for beginners, I think other languages are too strict and are not "fun" to learn for beginners

Re: Ask HN: How would you teach teens to code in 2019?

#14
You should differentiate between the different aspects programming involves. I sure do see logical thinking as the most important aspect of development. Also Algebra is important, but well above the understanding of a younger child. If you look for example into Game Design you get a lot bigger area of interest that is combinable with programming, such as UI, Art, 3d, Sound, Story, Mechanics and Level-Design, etc.

Getting them directly into programming directly will likely be the wrong attempt, because (in my opinion) programming requires a lot of frustration tolerance and if done the wrong way will spoil it for them. Also combining an existing interest with development, such as using their painted characters in a game might create interest in content creation.

In our Game Design BA, we also give a summer school course for kids (12-18 years), that teaches them to develop a game in GameMaker during 2 weeks. Other visual development systems such as GameMaker might be good as well. Afaik lego also has a visual programming system for it's mindstorms system.

If you you insist on classical programming languages i'd suggest python with some ui based libraries (for example pygame, not because of gaming, but because of graphics, sound and interaction aspects) or processing.

I also consider gaming as an important aspect of learning. But the game has to change often, othervise it's just enjoyment to get perfect in a system that you already mostly understand. I usually reach this point after 2 to 8h in a game, because i want to understand the logic of the game. If you enjoy the story, you have to go trough the whole game usually. To reflect on the things you played and experienced is good to learn as well, but usually spoils the fun. There are a lot of games that teach logic thinking and often contain logical structures systems or train logic thinking. (minesweeper, sudoku, kerbal space programm, bridge builder games, lots of construction games (minecraft)...)

Re: Ask HN: How would you teach teens to code in 2019?

#15
If I had to teach a class right now, I'd teach them on Raspberry Pi's and with some command line / terminal capability that includes SSH. I would probably bring in mathematics, taking care to separate the two pedagogically. I think the rest of the details would depend on the age of the kids in the class.

Re: Ask HN: How would you teach teens to code in 2019?

#17
post #11
post #8

Like the rest, if they are interested. I think, again like others, that something with better fundamentals than JS would be good as then JS won't be hard to take up. I learnt coding in the early 80s by programming games. But when it came to making money I used those skills to build business applications. And I liked that as well (I like the feeling of creating something that works 'out of nothing').

Something fun to start in might be GreasyMonkey kind of stuff were they can manipulate existing sites. That could introduce them into a lot of programming areas while still allowing small changes to have big results.

This. My 12 year old son was never very interested in school coding (Scratch mainly), but when shown how to manipulate existing web pages using Inspect in Chrome that really caught is imagination.

Re: Ask HN: How would you teach teens to code in 2019?

#18
I learned to code on GW Basic in the 1990s. My first programs were simple games like: try to guess which random number the computer picked, you'd input a guess, and the computer would respond with higher, lower, or correct (IF-THEN-ELSE). You'd get to keep guessing until you win (LOOP).

Those might be mundane coding examples for teenagers, but it taught me the basics of logic.

Functions is one thing I wish I had learned about a lot earlier than I did. Also how to commenting out lines of code, rather than deleting them. And how to use the debugger. These are no-brainier concepts now, but I was 10-years-old and self learning from books with some guidance from my dad and brother.

Re: Ask HN: How would you teach teens to code in 2019?

#20
When I was quite young, I started 'programming' by copying code out of magazines. I would run home from school, open up a magazine, write code until dinner, run downstairs after and write code until I had to go to bed. If I repeated that often enough, I would eventually (if I was lucky) be able to compile my code, fix the 14,000 missing pieces of punctuation and then have a (very primitive) game to play and share with my friends.

I don't recall learning much, but I was at an age where I was more concerned with getting Nario to jump over a bucket than with actually learning. I likely did learn something, maybe even just a passion for sitting in front of a computer and making it do cool things. I'm sure I also learned that if you really want something, just put in the hours and jfgid. For me though, the operative part was games. I wanted to play games and at some level, I wanted to learn how other people built amazing games for my Tandy.

The point of all that (other than 7:30am nostalgia) is that, for me at least, I had to be motivated. I had to want the end result enough to push through the grueling bullshit of it all. To this day, I believe that the only way to learn to code is to fall in love with a project to such an extent that you can't stop yourself. Whether that's a good lesson for teenagers will have to wait...my kid is only three, so I have a decade of self doubt to interfere. :)

Post reply on HN