Live data from Hacker News

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

news.ycombinator.com

31–40 of 88 posts

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

#31
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…

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

As someone who started with JS, I feel like this is a valid point, but also ... not really a big hurdle to overcome later down the line.

It's one of those things that is really apparent when comparing languages, but I'm not sure matters as far as learning goes. No doubt someone has run into someone who can't do anything outside JS, but I'm not sure that is all that common.

I feel like if you're at all capable, it's almost no hurdle, and the benefits of being easy to start, can do some front and back end work, are pretty big.

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

#32
Glitch is amazing. It solves the development environment problem better than anything else I've ever seen - you can spin up a new environment entirely from your web browser without installing anything, and seconds later you have a dynamic website that other people can visit.

It's also a really great learning community, thanks to their "remix" feature (like forking on GitHub).

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

#33
I'm super grateful that my first exposure to programming (high school in Eastern Europe, 10+ years ago) was in C++. I don't think we even did a lot of C++ specific stuff so it was probably closer to C but using cout instead of printf. Covered things from if-statements and loops to sorting and tree-searching algorithms. It doesn't sound flashy and it somehow goes against the trend to try to make learning exciting, but it lays a really nice foundation in your learning.

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

#34
I would not focus just on programming but on projects. I would get a few Raspberry PIs and some electronic components and let them build and program devices. Build a simple weather lab for temp, humidity, etc. Build a silly traffic light that is triggered by a motion sensor. Have a lamp that can be controlled from a web page.

Programming isn't just about web apps and mobile games, so teach them how to build simple projects. Their eyes will open up to all the things computers control all around them. That way they get to decide what they like, hardware, software, both, neither.

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

#35
post #32

Glitch is amazing. It solves the development environment problem better than anything else I've ever seen - you can spin up a new environment entirely from your web browser without installing anything, and seconds later you have a dynamic website that other people can visit. It's also a really great learning community, thanks to their "remix" feature (like forking on GitHub).

I also really appreciate that you can get started playing around without making an account.

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

#36

I'm super grateful that my first exposure to programming (high school in Eastern Europe, 10+ years ago) was in C++. I don't think we even did a lot of C++ specific stuff so it was probably closer to C but using cout instead of printf. Covered things from if-statements and loops to sorting and tree-searching algorithms. It doesn't sound flashy and it somehow goes against the trend to try to make learning exciting, but…

This.

I learned programming from doing C, and man am I glad I did. I thinm if my first language had been something like JS it would have been a major impediment.

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

#37
I started with BASIC programs written on my TI-86 to automate math problems; they may find that a useful way to get started, and learning a little BASIC shouldn't be much more brain-damaging than learning Javascript.

I kind of have a problem with training people to "code" rather than teaching computer science; feels sorta like comparing a "wine and painting night" to a course in oil painting, in that you might shortcut to something acceptable-looking but with little understanding of how or why you did it. But they're kids and will probably quickly tune out during Dad Explains Linked Lists :)

Ideally I'd suggest starting off with some smaller guided exercises to get them familiar with the language, then work with them to spec out and implement a more interesting project. In my CS courses in college we implemented the minimax algorithm for tic-tac-toe and checkers, starting with a tic-tac-toe engine which just printed out its desired move and evolving along until we were displaying a checkerboard as it played along. Could be a good project for you since it's implementing something they're familiar with (board games), doesn't use anything weird like networking, and can introduce concepts such as recursion and complexity ("if we have it calculate the next move, how many possible moves are there? What if we calculate the next two moves? The next three?")

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

#38

I'm super grateful that my first exposure to programming (high school in Eastern Europe, 10+ years ago) was in C++. I don't think we even did a lot of C++ specific stuff so it was probably closer to C but using cout instead of printf. Covered things from if-statements and loops to sorting and tree-searching algorithms. It doesn't sound flashy and it somehow goes against the trend to try to make learning exciting, but…

Yeah, the nice thing about C is that it really doesn't take much to start writing and running C. A text editor and a compiler is all you need, and unlike say Java there's not a ton of boilerplate you need to handwave when writing "hello world".

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

#40
I think it depends on what kinds of problems they're interested in solving.

It's not my favorite either, but you'll probably get better traction in Python. Everything from Arduino to algo trading runs in Python. JS if they really like in-browser, but that's it.

Post reply on HN