Ask HN: It's 2022. Where should I direct the youths to learn about programming?

203 points by slyrus ↗ HN
So... Child #2 (18 yo) is interested in learning programming. Good "with computers" and proficient in level-appropriate math but didn't grow up as a hacker like his old man (I'll refrain from making him learn turtle graphics and BASIC). Where should I point the kid to learn the basics?

I'm afraid that if I show him how to download (or, better yet, build) emacs, how to build SBCL, install SLIME, etc... and hand the kid copies of SICL and PCL someone will call child protective services on me. I imagine there was a time when the answer would have been java/awt, but those days seem long gone. Maybe there was a let's do it all in javascript phase, but that doesn't seem to be the answer today.

So... modern starter pack? VS Code and Python? Tell him to learn Pandas/SciPy/NumPy?

Are there any highly recommended online courses for learning this stuff?

191 comments

[ 4.5 ms ] story [ 271 ms ] thread
Personally I would start with one of these:

https://bubble.io/how-to-build

or scratch

then build some things. then search on the internet and see if there's any tutorials on how to do it with code.

I think the first step is to think about what he would like to build.

Interesting. I'm scarred from spending years learning how to sharpen axes and shave yaks. Maybe the kids today don't need to do nearly as much of that anymore.
I like Scratch. I'm not sure about Bubble's idea of teaching code "without a single line of code."

Eventually you need to write code. Spreadsheets are code, and functional to boot. Everyone can do something in them, and fewer are proficient. It's not that hard to get started coding anything, however it may be hard if you don't know where to start, which is where Scratch comes in handy.

Perhaps looking into some game engine might be a fun thing for a young person? Phaser.io or Love2d or something along those lines.
Yeah, that's a good idea. He's pretty handy with blender and those skills might come in handy here.
I think CS50 (edx) and Nand2Tetris (coursera) would be great courses to start with. Also, freeCodeCamp has some great introductory courses to Python (computing, data, ML etc) as well as web dev (js, react, html/css and even a bit of node).
I'd definitely recommend freecodecamp for learning whatever language you'd like to get him started with. After watching one of their tutorial videos, your son could have a look at other videos for the particular language if there's something in particular he'd like to do.

Python is great for beginners, it's usually the first language taught in schools.

Web development is also really easy and rewarding, which makes it a particularly good route to get someone started in programming. Just remember to guide him through JavaScript libraries after learning html, CSS and JavaScript. When I first started learning web dev, I didn't know about frameworks like react and angular which caused me to waste a lot of time rewriting things which could have been made as react components. It was a lot more difficult to maintain the website I already made at that point.

Like you said replying to someone else's comment, game development is good for getting into programming. Although, make sure he is aware of the other routes, as game development isn't always the best career path even though it might sound fun at first.

Finally, let him make choices. You shouldn't have to decide everything for him, it's a good skill as a programmer to be able to look things up yourself. Maybe ask your son to find out what he would prefer to do, although if you already have some experience, of course let him know if there's anything that could help him get started in programming quicker.

Enjoy the rest of your day!

why learn programming? also, an 18yo is an adult
To build a solution to a problem you have
probably not the motivation here
An 18yo might be a legal adult in the US but I certainly was no adult at 18. I strongly suspect I'm not alone in that.
Because it's fun. For some, at least. One of several valid answers.
Perhaps approaching from the point of view of programming as a means to end might be helpful? If they have any hobbies or academic projects that could benefit from automation or using computers, that might be a good starting point?

For example, when I started studying engineering, it was great to see solutions of differential equations and ways to solve them on computers. Others have suggested games which could be great if they enjoy gaming and want to know more behind the scenes. Basically my approach would be to find a problem or two and use programming to show that computers can do wonderful things once we learn how to interact with them in various ways.

Yes, I completely agree. One thing I'll add as an example; I used programming as a way to learn about mathematical concepts too. I made a program to render an image of the Mandelbrot set, which helped me learn both some new things in JavaScript (what I was using) and mathematics (complex numbers and limits). You'll probably be able to find a similar sort of project for your son.
Do you know what he wants to build?

Probably has lots of different things that he wants to learn so help him explore each.

Python for command line stuff and backend stuff, vanilla JS, html, css for blogs or web pages.

There's also either online classes like Udemy or in person camps or summer programs that would be great, he can meet ppl his own age trying to code too.

I know a few years back iOS coding classes were the rage, now it'll probably be something with blockchain...

In terms of code editor maybe just sublime or atom, no need to go super complicated, he'll figure out what he needs as he builds expertise.

I agree with the parent that the focus should probably be on something he wants to build or a problem he wants to solve. It's easier to stay motivated that way.
Haha not a parent but thank you
Oh I didn't mean it like that! Your comment is the parent of this comment and my previous comment is the grandparent of this comment.
I'd throw everything at them and see what sticks. Try web, gaming, hardware, ML, puzzles... find a place of passion and grow out from there.

Try to give them a tour of what can be done in each domain, and see what they'd like to try.

I'd do the opposite. I'd find out which of those things interests them, and then guide them strongly towards a popular solution for it. If they change their mind, that's fine. But too much choice can make it really hard to approach.
Have you not heard of the idiom "see what sticks."? What you described is not the opposite - its actually the same :) See what stays with them naturally and them go with that.
Local community college. Hands on help and smaller class sizes. VS code and code runner plugin will run just about everything. Maybe also a subscription to pluralsight or oreilly's online catalog safari.
Rather than making him learn a language to build a simple, possibly tedious tool, let him figure out how the "social" side of the tech sector works by allowing to tool makers to explain the tools. There are lists like this on github. He doesn't have to be a computer hacker to get in to the industry.

https://github.com/bayandin/awesome-awesomeness

https://github.com/sindresorhus/awesome

Also, there is always nocode/lowcode solutions he can put together.

https://github.com/kairichard/awesome-nocode-lowcode

Xojo is a nice modern IDE that is very close to Visual Basic 6. It runs on Win/Mac/Linux. Something about being able to place buttons, canvas, etc and write code directly into them and hitting play, makes it more engaging.
> Maybe there was a let's do it all in javascript phase, but that doesn't seem to be the answer today.

Whats the child's actual goal though? Is it to be able to gain a useful workplace skill that will actually provide financial support for their lives (something that their peers who don't end up in tech will struggle with heavily)? If so web dev is honestly a really good path, and quite useful, and will touch on things they already know.

If they're a gamer see if they can make some mods - minecraft is good for it, but the best one is something they're already into.

If they care deeply about some world issue like say climate change, try to have him make some visualizations and do some data science on climate data to understand whats going on.

What you do with coding is imo a bit more important than how you code. Does the kid want to take apart toasters and put them back together again? What actually motivates them?

Google

Starting from there you can learn almost anything for free.

I highly recommend Processing and The Coding Train [0]. The visual feedback is both engaging and illuminating to folks who have no prior experience with procedures or spreadsheets.

[0] https://youtube.com/c/TheCodingTrain

Just to add to this great recommendation, https://p5js.org/ (JS port of Processing) is really great as they can get started right away and the docs are super simple. Dan uses it in most of his videos and really starts at a basic level, but works up to really complex concepts as well. My kids are younger, but they like the graphical part of it way more than me showing them the terminal and Ruby.
I've been working on https:/boot.dev in my spare time, trying to go full-time on it soon.

Wont't say it's the best but I've been trying to fix a lot of things I don't like about existing content/platforms.

so you should go te read about anything in programming also you should ask any question in your mind
If he was younger, I would have recommended scratch. I recommended that to my then 11-year old cousin and he is now an engineering undergrad student.

At your son's age, there are plenty of how to program python courses using udemy and the like that show to build progressively harder apps for a complete beginner. From there, he could probably try to do one of those google certificate courses on android development or the like.

I remember having to check out BASIC programming books from the library as a kid to learn. These days, people have made fortunes on creating videos on how to program.

> These days, people have made fortunes on creating videos on how to program.

Correct, and it's great! Unfortunately most of them are in English (and probably mandarin?) and not every 11-year old knows it at that age.

I remember the 12-year old me studying English on XDA forums talking about custom ROMs for the good old HTCs. That's what got me into programming and computer science, so many good memories.

I usually recommend everyone who wants to learn programming:

- to write some games,

- or alternative to write some tools to be used for themselves to automate or simplify some of their tasks.

Writing games can be so much fun, and is incredibly deep such that you can pretty much touch upon all topics of programming, networking, computer science, algorithms and data structures, artificial intelligence, 3D graphics, GPU programming, low level programming, multi threading, etc. But also, you can start very shallowly and simply.

Writing tools gives you the feeling how useful and productive this can be.

What languages to use depends a bit on taste, background knowledge, and how steep the learning curve can be. I think Python is a good general purpose starting language.

Also, in any case, you should start actively coding right away. I know people who wanted to learn programming but just kept reading books and watching tutorial videos all the time while not really trying it out, and in the end they obviously did never really learn it. You need to have projects, or just random playgrounds. Also, don't start with a big project right away. Do many small projects. Play around.

Tic80.com - might overgrow it quickly, but excellent for start. Has Lua, Fennel.
I’ll second the recommendation for PICO-8 to get started with making games. The built-in game browser, combined with being able to easily see the source for those games is fantastic.

https://gist.github.com/cellularmitosis/6e191bf6b6f062e5f558...

> The built-in game browser, combined with being able to easily see the source for those games is fantastic.

TIC-80 gives you those + all four essential freedoms (seeing, sharing, modifying and using) with the source of the fantasy console itself.

There are some good examples prepackaged with it (from drawing a single sprite to a little ~½ dozen screen top-down action adventure).

I wish they didn’t try to look like a console.
Yes, agree about the last paragraph 100%. I'm only 19 and got into programming maybe 7 years ago. At the time I was gifted a Raspbery Pi. Next to the infamous Scratch, there were about 10 pygame examples. I got the itch to modify them. Trough trial and error I somehow found the source files and I just started removing code and changing numbers. At some point I started copying lines I've seen and recomposing them.

As I wasn't allowed to just go on the internet (yet), some time later I also got a CS book. By studying that, I finally was able to "program" what you would call it.

I agree all the way: Don't read about programming. IMHO, taking a (veeery easy, in my case it was Super Simon in ~200L Python) program, game if you wish, and starting to just change stuff around. This gets you comfortable with the concept of coding. "Formal" education (ie. books etc.) are only required once you already are fascinated.

This is the advantage of the young: They are not afraid to try out and break things. I'd suggest using this phase of life as it is intended.

Can you say more about not being allowed on the internet? Why and how you think it affected you?

It’s hard for me to fathom someone at age 12 in 2015 with a somewhat cosmopolitan background (playing games, using an RPi), not being allowed on the internet, period.

Not the parent but, as the parent of a 16 year old, I can imagine that some kids at age 12 simply aren't mature enough to be let loose on the internet.
Yes, this is pretty common.

For the most part my friends and work pals who are all software engineers or work closely with tech (DBAs, SREs, Sec). Their children aren’t allowed to use the internet unsupervised or in some cases not at all. Pretty much all of us don’t let our kids use social media.

For my friends who don’t work in tech, their kids all have social media and use the internet unsupervised.

Why not?
Internet services are designed to be addictive for kids (and adults). Usually, this addiction is not good for the kids. That’s why my kids are not on the Internet unsupervised.
But what do they do when they are at friends homes, or at school all crowded around a iphone in the bathroom.

I don't have kids, but there's a part of me that would want them to see the bowels of the internet, and hopefully Never want to see that crap again. I know there are pictures I wish I never saw. I'm so glad I didn't see the toddler whom was raped by a Russian soldier. Putin arrested that soldier I head.

If I had children, I don't think I would let them use the internet either.

I wonder if their are any good studies on letting children have free access to restricted. Maybe the study couldn't even be legally carried out?

What is a four letter word that starts with “P”? That’s a big reason I’d guess.
Tell her don't send pictures, don't give name/address, and don't meet people, and she's safe? (She already should have applied these rules IRL from a much younger age anyway.)
It’s a neurological issue stemming from the protective instinct of parents.

Kinda sad actually, when you consider that Aaron Swartz was a member of the RSS working group at 14, after already winning a prize for an online encyclopedia at 12.

I wish my single mom had had the technical savvy to keep me from becoming a porn addict at 12. I had erectile dysfunction when I finally had my first real sexual encounter and it took years to learn how to be with a real woman versus looking at a screen. It also spread into worse more risky behaviors in my adulthood, and I think exacerbated my social shyness and kept me years back in learning how to socialize.

I’m definitely severely restricting the internet for my two daughters, out of a sense of realism and not due to some “neurological issue”.

Thank you for proving my point.

I also discovered (far more) disturbing porn at 12, but it actually doesn’t preclude you from treating your sexual partners with respect.

(And yes, I had several dysfunctional sexual encounters before I actually grew up)

Inevitably your daughters will discover the unavoidable loopholes.

(Edit: the anger you’re feeling right now is exactly the neurological issue I’m talking about)

Why don't we let kids drive cars?

Some tools are dangerous if you don't have a certain level of maturity and experience.

I think it's a good idea, but I wonder if this would work if you didn't have a circle of like-minded friends for the kid. For most kids nowadays (and adults, increasingly), there wouldn't be much social interaction outside the family if they were prohibited from social media.
> to write some games,

> or alternative to write some tools to be used for themselves to automate or simplify some of their tasks.

This is exactly how I learned programming as a kid.

The one difference I would recommend is to not focus on 3D, low-level programming, AI, data structures, etc. at least for younger children. When I was a kid these things confused me (I specifically remember getting random memory management issues and confusing EXC_BAD_ACCESS, and generally resorted to just liberally retaining everything). I just wanted to make things and got bored easily, so I accomplished most making simple projects on Scratch (very basic game-engine) and high-level IDEs.

Of course ultimately it's up to the kid what they want though. If they're more interested in the low-level mechanics and how things actually work than just getting them to work, good for them.

turtleSpaces is a 3D Logo environment that allows fit pretty straightforward creation of simple 2D and 3D games in the browser using turtles and can provide a bridge between Scratch and Python https://turtleSpaces.org
Loose connection, but made me remember https://code.world/ uses a Haskell-like functional language to define still pictures, animations, or even games.
What about playing a game about learning to code instead of writing a game? I spent a few days on codecombat.com as a beginner and thought it was both a great learning experience and an entertaining game.
One of my programming starts was Delphi. Pascal is an easy language, but has some fundamental features: pointers, classes, procedures, custom types, manual memory management on heap and so on (it was devised as a teaching language IIRC). Delphi provided a GUI builder and a rich library which made it all fun and visual; you could whip out a first “program” or “game” in no time.

Delphi is no more but there is some successor, seems to be well received on HN.

Swift Playgrounds is pretty cool.
I will tag along here - with some details on my experience as well as looking for better answers.

Things like Scratch, Python+Pygames etc make the initial hello-world style apps too easy and then there is a gigantic learning curve for anything better. It is very hard to keep the motivation going.

We tried codehs.com . Kids spend an excruciating amount of time trying to make the print statement's literal output match with whatever the code-checker is expecting. It is frustrating even for me to try to debug their code. I feel any kid who is learning coding without an IDE such as VsCode will get discouraged from this field.

I am just about to start a session for 8th grade graduates to introduce them to 'advent of code'. At least here, the right answer is just a number. No more worrying about the quote character being in unicode or text.

The one that got real interest from my students was a world-puzzle solver - to cheat the phone game "LetterPress" (free on iPhone and Android). They finally understood how a bot (official bot that you play against) could be so smart.

I am still on the lookout for such good examples that they can actually use in real life.

The thing about BASIC was that you could just do something. You could try things easily and quickly. You could fiddle with things.

Of current environments, Python may come the closest. (Other environments have a REPL, which is a great environment, but "REPL + harsher learning curve" is not what you're looking for.)

As many others have pointed out, something relevant like games is a good starting point.

On your main question about how to make the (now painful) dev environment setup easier I have some suggestions:

1. Just use javascript

2. Just use python/pygames (yes it has to be installed)

3. Just use a hosted environment (like replit.com)

4. Just use swift if you are a mac user

I'm not a programmer. I tried Python many times, but honestly the best time I had was in an algorithms class that used C.
How you start almost doesn’t matter, it’s the stuff that happens after, such as actually take the time to answer questions and do stuff together.

After some initial experiments it should be more clear where the journey goes. Some learn better bottom up, meaning few abstractions are suitable. Some like bells and whistles, UI or games. Some like domain specific stuff like math or robotics.

There’s plenty to explore. The big realization has to be „I can do pretty much anything!“ and off they go. Just be there when needed and it’s going to be fine.

Make him install an easy Linux distro (I recommend LMDE). Give him an IDE (start with VScode, if he enjoys Linux he'll switch to vim/emacs soon enough), some Leetcode problems, a browser, and have him figure it out. Advise him on compiling if his language of choice* requires it, as it's a pain to figure out when you don't know anything about programming. Should probably also find a basic syntax guide on the language.

*This really depends on his goals. AI/general scripting -> python. Sysadmin -> C/Perl. Games -> C#/Java if Minecraft. Etc.