Advice needed, son wants to learn how to program

foofiepie@lemmy.world to Programming@programming.dev – 179 points –

Hi all,

My 8 year old is asking if he can learn how to program. He has asked specifically if I could set him up with a ‘programming kit with lessons’ for a Christmas present. I’d like to support this, and it seems like it’s not a transient interest as he’s been all over scratch, and using things like minecraft commands for the last year. I have an old (pre 2017) MacBook Air I can set up for this. How do I / what would you advise I set up for him, to a) keep him safe online (he’s 8!) and b) give him the tools he needs in a structured way.

I am not a programmer. I know enough bash/shell and basic unix stuff to be dangerous and I was a front end dev a very long time ago, but I wouldn’t call myself a programmer and don’t know what concepts he needs to learn first.

Hugely appreciate any advice, thanks.

Edit: So I posted this then had a busy family day and came back to so many comments! I will methodically go through these all, thanks so much.

A couple of things on resources: he has expressed interest in 3D worlds and I noticed comments on engines, but wonder if that’s too advanced?

Totally agree with the short feedback loop rather than projects that take days.

He has an iPad 6 and I’m happy to pop a Linux distro on the Air, so certainly open to that.

So many links to research. Hugely grateful.

74

Everyone else's suggestions are great.

Get them a copy of Factorio, it's a game, but it's all about computer science fundamentals, architecture, pipelining, busing, data integrity, etc. It's a visual game, but it'll scratch the itch of programming. It'll get them to think.

Buy the hardware projects, the little ones with either a pic, an Arduino, something that does something physical. A little bit of programming. To make a thing happen. So they can experiment.

Look at the software robot competitions, there's a couple on steam, there's couple elsewhere, you can do it as a family project, whiteboard out the logic of what your robot will do, and you can write it together. And see how it acts.

Just make sure anything you get, has a very small feedback loop, so they can iterate very quickly. That'll keep them engaged and exploring. You don't want to get a daunting project that's going to take weeks to see any output. You want things on the order of minutes, or even seconds to see what happens

Ah, haven't thought about factorio. On that matter 7 Billion Humans is a cool game that can teach the basic logic behind programming.

Seconding all of the above. Also tis 100 and exabots. All games by that developer actually.

I love Zachtronics, but I think their games are very ambitious for 8 years old. Maybe teenager with some discreet logic skills under the belt.

"send me your favorite base" is probably a better programming interview than most

Get a breadboard. Get a bunch of wire for it. And do small projects with the breadboard in a controller. It's fun to move the wires around. You can even build a tiny 8-bit computer with a breadboard. And have a do things like output of display. It's very tactile and hands-on. Excellent visual. There's excellent YouTube tutorials up there for breadboard projects.

https://www.youtube.com/channel/UCS0N5baNlQWJCUrhCEo8WlA

This guy has some excellent breadboard projects. Find an easy one. And do it together with your child

Also, remember Human Resources Machine. Its a puzzle game thats actually a progamming language

If you get them factorio then they'll just play that all day instead of learning programming

1 more...
2 more...

See if you can find a book on python, and work through it a bit. Sit down with him once you know some and try making something basic with turtle or the likes. Your goal is to keep his interest up and not make it a "studying" thing. For a kid the most important part is that he needs to be able to see results of what he's making. Drawing simple shapes, cool patterns, etc. in python is a nice way to start and it can teach all the basic initial things he needs to know.

There's also simple robot kits for kids that could be fun to play with, which he could eventually move on to basic electronics to after from.

W.r.t. safe browsing, I'd try blocking egregiously bad stuff with some DNS blocker that you either buy or host using something like pihole. Use it to block ads and well known "bad" domain names. Also have a conversation about it. (I'm not sure how much this helps here considering he's 8... but better then nothing.)

Well, Scratch is certainly a good starting point so I would assume he wants more if he's been all over it.

There are some toys and kits available but I am not really aware if they are any good.

If my little brother would make such a request I probably would want to go with Python and an Arduino project. Robots are cool so it would pique his curiosity while basics with Arduino should be challenging but manageable. The only drawback is that it probably would require some time investment on your side.

A cheaper alternative would be directing him towards writing some simple programs in Python or Java as the only setup this would require is an IDE and it would also teach him googling for information.

I think the safety online is the biggest problem here and the only thing I can think of is to only allow some domains...

Maybe some of these suggestions sound good to you, if so I'll gladly expand on them.

Also big kudos to your approach on the matter.

I'm going to go a slightly different direction and suggest something that has physical feedback like Adafruit's CircuitPlayground. It can be setup to use MakeCode, CircuitPython, or Arduino and there's a lot of good resources, both for purchase, and free: https://www.adafruit.com/category/965

In terms of keeping him safe online look into some content filtering for the whole home network, either paid or self-hosted.

Projects that act upon physical stuff are the most rewarding. Something simple such as building a simple Python script that interacts with a smart home API and turns switches on/off or changes light colors around the house are relatively simple and require no hardware/mechanics if you're not into robotics, soldering or circuit boards.

You've got a great kid :)

I love this. https://www.youtube.com/c/beneater ben eater does a lot of hardware stuff that may be of interest in this area.

I know that there's some pretty advanced lego stuff which is a great entry point as well.

Writing a program in assembly for 6502 processor might be a little bit too far from scratch for an 8 year old

HAHA yes of course of course. But it's not out of the realm of possibility if they show an interest in it. Ben does some really simple projects that an 8 yr old could tackle to get some real fundamental understanding of what's going on under the hood.

Make Code Arcade is a great next step if your child has completed the Scratch tutorials.

MakeCode allows building with BlockCode, but also supports toggling to Python or JavaScript.

Scratch and Make Code Arcade are both free.

For the Christmas present, get them a [MeowBithttps://www.microcenter.com/product/668481/kittenbot-meowbit-card-sized-retro-game-computer-codable-console) - a $50.00 hand held game system that plays the games they write using MakeCode Arcade.

The full Harvard CS50 course is available on YouTube: https://youtu.be/8mAITcNt710?si=rTa1zOkY2REnlXDe

This is the course all programmers have to take before they get to take the real programming course. The purpose is to introduce programming concepts in a way that essentially anyone who is interested will be able to understand. The instructor is fantastic.

Not exactly geared towards 8yo but if you have the time and inclination, you could go through some of these videos to see how the topics are presented and then try to introduce those topics yourself to your child. Or at least look for resources that introduce them like the comment above talking about scratch.

Or better yet, maybe you both do these lectures together and learn the fundamentals of programming without getting bogged down in a specific language or with specific syntax. I'd bet that will become a core memory for any child.

One suggestion I haven't seen, get him a super-cheap laptop with Linux. The exposure to a new environment beyond his phone (and likely Chromebook) will help him get more comfortable with things outside the norm.

It will help him discover if he likes to "make things" or "figure things out" which are very different activities that both directly corrolate with programming.

+1 for Linux but use your MacBook Air. There are Educational Linux versions that would be a great environment for your kid to learn to code. It can also be set up with kid safeguards.

You can also run Linux from a Usb if you’d rather not install it over MacOS

I recently put Linux (Mint) on my old 2015 MacBook Air and it’s been really great.

@Alxrg @fmstrat oh, I've installed Ubuntu on Macbook but had many troubles with the keyboard.

Probably some of these problems are originated from the StumpWM – a tiling window manager written in #commonlisp

Not all problems are solved yet. For example, a key near the left shift should produce ` and ~, but it outputs < and > instead. I don't know how to remap it.

For OP’s question (just to stay on topic before we veer off), would you still recommend a Linux distribution on their MacBook Air?

Edubuntu seemed like a good choice to reuse their existing hardware and have a safe environment. There’s lots more choices to choose from

I’m only casually using my Linux MacBook but haven’t had any troubles with the keyboard.

Although a nice tiling window manager sounds like fun. I’ll have to look into it.

I learned programming at about 12, by following tutorials for the Pygame python library. It doesn't do anything especially fancy, but it taught me many concepts, while I had a lot of fun. My first project was making the traditional snake game, which I think is a good level of complexity.

I don't want to undermine everyone's suggestions but I think they are failing to understand this is a kid, buying him a laptop and stuff is okay but doesn't motivate him to much.

Check for authors of books for kids. Invent with python is great, that was going to be my suggestion. But same author has plenty, like this one https://turtleappstore.com/book/ ... to echo someone who mentioned Minecraft (indeed, already marked a whole generation into computer science subject!). Good luck! Maybe you can even find something for you, like, how do we teach CS/ programming to kids? How come that moving the Logo turtle was alright for so many years, lol

Do you have a linux machine at home? My 12 year old daughter is also wanting to learn to program and I've been updating the NakedMUD codebase to work with Python 3. It has been working for a while now but I'm still tweaking some stuff within the codebase before turning her loose on it. When it's ready I'll probably throw the modified code up on a server somewhere.

If you're not familiar with MUDs they're online text-based game servers (Everquest was basically a graphical version of one, supposedly even using code stolen from the most popular at the time). NakedMUD has a core written in C but the game engine itself is extensible with Python (and Python changes can be initialized without rebooting the server) and the world/NPC handling code is also extensible with Python. Users can dabble around with making changes to the Python scripts and then see the results real time, and in a gaming environment. To me it seemed like the ideal way for my daughter to learn programming in a way that will likely keep her interest.

MUDding taught me programming and Regex in a very real and useful way.

It also contributed to a gaming addiction that took years to break, so food for thought I guess.

I often suggest MIT App Inventor. Most kids are more comfortable with phone apps.

But this requires an android phone.

keep him safe online

Not sure how well it works but u can try those family safe DNS servers like adguard I used the adblock ones and it's good, but not as good as ublock or pihole.

If he likes working with physical objects as well (robotics) I can't recommend the Lego mindstorms or education series enough. The standard interface is very similar to Scratch so he'd feel right at home, but they can generally also be programmed with more traditional programming languages if using building blocks becomes too restrictive.

I have no advice, but I can say that having a copy of K&R C in the house when I was a boy had a big impact on me. That was the 80’s but the book is just as relevant these days.

I can recommend PICO-8, if you have access to any windows/osx/linux computer.

It's a "fantasy console", a self contained gamedev environment that emulates an 8bit retro console (while using Lua, a popular and modern language), is super user friendly, and allows you to get a satisfying and fast feedback loop when learning to code.

There are many resources to learn it and a lively community

Pico 8 is super frustrating at times. I wish they'd make a program to be a "Pico 8 dev kit" that has a larger resolution so the IDE is more readable. The IDE being so hard to work with makes me want to use a proper text editor but there are downsides with that too. It could keep the game's resolution the same and only have a larger resolution for the IDE so the specs don't change.

I agree with the resolution, and I (almost) never use the built-in code editor.

Most of the time I have a folder per game, with a somegame.p8 whose only code is #include main.p8.lua (+ other includes if needed), and the code itself is inside main.p8.lua. Since the code is cleanly separated from the other assets, I don't risk overwriting one with the other while juggling between my IDE and pico8

This! But I also suggest Tic80 as a really nice free and open source alternative of Pico-8.

https://tic80.com

Actually I prefer to develop in TIC-80, but the community is way smaller, and TIC-80 games can't be played on phones without a keyboard. It's not a 1:1 alternative, tho I'm glad it exists.

When I started out at about 14 I found a few programming books that really helped at my local library. It's really tough to keep motivated as a kid, but if you give him tools and help him find joy in the process he'll push himself to the finish line.

Good on you for supporting your kid, my parents told me to get off the computer and go outside every time they "caught" me programming.

I'm not sure if it's good for your case, but I learned programming in Garry's Mod - specifically the Expression 2 chip from the Wiremod addon. It uses C-like code either running on I/O triggers or in an infinite loop, and can interact with Wiremod's other components or the game world itself.

There's a lot out there for Arduino which is a great platform for learning. Arduino is a microcontroller you can use to read button inputs and control LEDs, all the way up to controlling robots and all sorts of things. It's pretty hands on compared to a lot of pure software stuff and is often sold in starter kits for kids learning. Worth looking into!

Small Basic is about equivalent to Scratch in terms of what you can do, but you have to actually write the code. It reinforces various coding principles in a more explicit way than Scratch.

The website has a printable curriculum that looks reasonable.

I think it's an excellent stepping stone.

http://smallbasic.com/

If he's interested in 3D worlds, you could get him started with Java making Minecraft mods.

I see a lot of good advice, so I'm going to suggest something different. Have your son watch this guy or someone like him do some stuff.

https://youtube.com/@SebastianLague

He just picks something that interests him and builds on top of that interest.

My kids (8 and 11) don't even have any interest in doing programming at the moment, and they like watching him build stuff. We watched the Geographical Adventures playlist twice.

Don't worry about Linux, and don't try to over complicate things. If you are set on going the Linux route, get a Raspberry Pi. It will give him something really flexible and cheap to experiment with later on.

Look into modded Minecraft. There is a mod called Computer Craft where you can write programs in Lua. One of the things that makes scratch so good for kids is that the results are instantly visible. This is important for kids.

https://www.curseforge.com/minecraft/mc-mods/cc-tweaked

There are programs to control your reactor > https://www.youtube.com/watch?v=N9fC3khXuj8

Unmodded Minecraft has Redstone where you can build logic gates.

Outside of what you already have check into a maker space or a computer club at school. Here in Atlanta there is https://www.codeninjas.com. Maybe there is something similar in your area.

Google Scratch! Could be a good way to get started.

If he is interested in game development, I recommend buying a couple Udemy courses on Unreal Engine development.

You will need to make sure your MacBook is powerful enough to run the unreal engine development IDE.

But if it is, he will be able. To quickly put something things together and see the results.

My son(9 years old at the time) put together a small game over a summer via a udemy course and unreal engine.

Or alternatively Godot. IMHO it's a lot simpler to get basic stuff working. The editor can run on a much lower spec machine than unreal and GDscript is good stepping stone between scratch and languages like c#.

wow that's wild. I've never even tried anything in those games engines because it's extremely overwhelming interface.

For general Unix skills, get him a laptop and help him install a Linux distro on it. Show him a few different desktop environments, buy him a Linux magazine with a DVD and articles or projects. Then just let him try whatever he wants and promise to be there to help him fix whatever he breaks (by pointing him to docs, belong him write good forum questions, helping him revise search queries, etc.). These skills are perhaps a bit simpler to pick up but can eventually grow into scripting and programming skills.

For programming, start with simple programming exercises or koans, and maybe give him prizes (like a quarter or a piece of candy or something) when he solves them. Let him solve lots of similar problems/puzzles over and over as he builds his confidence; rather than pushing him to harder material, just offer harder material with higher rewards. You'll probably have to write your own exercises at first, like just translating arithmetic expressions from a notation he's learning in school to one used by whatever programming language you're working in together. Eventually, you can start to do online exercises together.

Once he has been messing with this stuff for a year or two, revisit fundamentals by working through a carefully selected introductory textbook together. You can include shell scripts at this point to tie the Unix stuff and programming stuff together, and maybe use a good Linux magazine or Learn Enough Developer Tools to Be Dangerous as the 'textbook' for that side. Then he'll at least know basic version control and surrounding tools.

After you've gone through a chunk of those basics together— full mastery is not required— sign up for an introductory programming class together at the local community college. Taking it together, you can make sure he's keeping up with the material, encourage him to ask questions, and help him with homework if necessary. If you want, you can also do this with networking or systems administration.

This is based on some things that my dad did with me, including a couple of community college classes we took together. (Idr exactly how old I was during those classes, but I think it was before I started high school.)

I was going to suggest something like Kaboom.js for simple game development, but their site is currently down...

Some high-level ideas here:

There's lots of opportunities in programming to make mistakes, or where they're faced with big open-ended problems that a programmer can build an entire career in dealing with in themselves. Being aware of what resources you need to look for and learn from is one of the first steps to getting what you want out of your interactions with those areas. If he persists in learning programming, he will soon run into these areas, and how well he handles them will play a large role in determining how successful he is as a programmer. A small number of examples of different domains that have unexpected nuances which suddenly become important to a new programmer, and catch them by surprise:

Internationalization Password handling Interacting with the host operating system and filesystem Interacting with programmers from groups with different social norms and standards than they're used to - this is partly solved by READMEs and project documentation, but only partly. Social skills are important. Interacting with end users Programming languages often have weird corners to them which can waste a lot of time, cause a lot of confusion, and cause bugs. Looking at C and C++ especially, but no programming language is blameless. He'll have to test his code. If he needs to do involved tests on his code, which he might eventually, there are a few areas of testing code are virtualization, unit tests, and fuzz testing. These all take significant effort to learn how to do. Ethics, legal issues, and politics. GUI programming

There are plenty more areas, of course. I'm not saying this to discourage you or your son - learning about these sorts of things can help your son grow as a programmer and maybe even as a person if he's fortunate. But my biggest piece of advice is to be very careful where you put your time and attention on, in programming, and probably in life in general. There's no limit to the time you can waste on being foolish, except the limits you have for yourself.

My second biggest piece of advice is that maybe he should switch to using Linux and Free and Open Source Software at some point. It's very convenient from the perspective of a programmer who's very motivated by being engaged with a community or by benefiting others - he can learn about a community he's likely to want to engage with in the future, he'll be more able to change aspects of his computer to suit his needs or desires, and honestly, my experience as a Linux user who's learning programming is that learning how to use Mac and Windows feels more like work than learning Linux does. Learning how to use Linux feels like learning how to program.

Maybe you would want to introduce him to Godot and Blender, since they're FOSS software, and less at risk of weird decisions being made with them like happened with Unity, where companies pulled a very weird and developer- and user-hostile and security-hostile decision out of nowhere.

All the others have great suggestions but I'd just like to add there many open source projects out there and given example code of how something is done and letting him play with it can be tremendously helpful. For example finding some simple 3d programs and lettting him change the source code to do whatever he wants or just giving him a template like https://editor.p5js.org/1alimaze/sketches/IJpxIEME8 which I made when I was first learning and letting him play with the values and add more objects.

There was a software developed in Bratislava called the Comenius Logo. It was specifically developed as a programming environment for kids and we did 2 full years learning it in primary school, I'm still thankful for my teacher for making kids learn this. He shouldn't have to do that it was not part of the program. I'm out of the education scene so I'm not sure if there are modern options to this but you may look it up as well. It uses a C-like code to move a turtle around the screen and draw shapes.

There's Colobot, an old game with a C++ based language where you control bots through scripts.

A couple of things on resources: he has expressed interest in 3D worlds and I noticed comments on engines, but wonder if that’s too advanced?

I most certainly wouldn't start out programming with / in 3d worlds.

Drawing 2D shapes seems like a good way to spark interest though, with immediate visual feedback.

Alice is a pretty good 3D programming environment aimed at kids, with little programming blocks to snap together.

You might want to try going back into the archives and pulling out something like MS-DOS and QBasic, or Logo. You can find a good tutorial in book form, and you can get a system that was designed to be programmed offline, with things like local help in the editor instead of behind a Google search, so it should be 100% safe to leave the kid alone with the machine.

minecraft can work really well for learning how tp program, when I was 9 that is how I started, unfortunately its been a long time since I took that course but if you are willing to do the research there should be a some for server programming and java modding at least that is what I took over 11 years ago at this point, and maybe javascript for gametest framework for bedrock edition. there is also minetest which is a little better for learning but isn't minecraft so is a little bit more annoying but lets you modify basically anything you want which is very fun. also a great way to learn boolean algebra/circuit design in minecraft/minetest, redstone can be used to make micro computers like calculators, fun and can be applicable to making games in minecraft which makes it more engaging as well. also the minecraft commands can be put into a mcfunction file as you can imagine this can be generated by outputting text to the file, this is great because you learn file io and a programming language and mostly he would be using math to generate things so teaches math, its limited but that is something he would find fun that is super easy and can be done in basically any language.

redstone/mcfunctions I personally like this approach on top of the course because it gives him something useful so should hopefully encourage him to play and program after he finishes lessons and etc...

Try a more advanced node based programming language that aligns more with a specific language. Something like NodeRed for Java...

...or maybe he's ready to try game development on something like Godot, which has a language a lot like python.

Python is apparently a good first language to learn.

IMO set him up with some of the modern engines and tutorials... Godot 4, Unreal etc...

actually if you are looking for some stuff to have ready for him.

https://www.humblebundle.com/books/game-programming-with-c-unreal-packt-books?hmb_source=&hmb_medium=product_tile&hmb_campaign=mosaic_section_1_layout_index_2_layout_type_threes_tile_index_1_c_gameprogrammingwithcunrealpackt_bookbundle

If he has access to youtube there's also lots of really good tutorials etc... out there. Heartbeast has some awesome ones for godot etc...

Give him a laptop with Alpine Linux installed on it, and make him setup Root-less Xorg with DWM on it

Ground him into a room until he learns to make a game with only assembly, give him a Tandy to figure it out