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').
Ask HN: How would you teach teens to code in 2019?
11–20 of 88 posts
Re: Ask HN: How would you teach teens to code in 2019?
#12Agreed 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…
Re: Ask HN: How would you teach teens to code in 2019?
#13so start by finding a project. even better if they find the project on their own...
Re: Ask HN: How would you teach teens to code in 2019?
#14Getting 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?
#15Re: Ask HN: How would you teach teens to code in 2019?
#16Teaching programming fundamentals via game projects. Things mostly from scratch, no engines.
Re: Ask HN: How would you teach teens to code in 2019?
#17Like 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?
#18Those 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?
#19Re: Ask HN: How would you teach teens to code in 2019?
#20I 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. :)