My question is: If I do, what language should I teach my son at first? Currently I'm mostly familiar with Rust, and a little Python. I used to write C for 10 years and Java for 3 years. I also use Objective-C. I think, as common sense, I should use the language I am mostly familiar with (Rust), but I doubt that's a good idea for 9-year old.
Do the simplest possible thing to get your son interested in anything remotely like programming. The other comments have some good suggestions. With some success at simple things like animated robots and Minecraft and Mindstorms your son may decide to keep digging into programming.
My idea is to keep children off screen addiction for as long as possible, whilst still teaching them the relevant mindset, patterns of reasoning, and the way computers actually work.
On another angle, my son did start throwing together maps and sprites in no time with the (Lua-based) TIC-80 and Pico-8 when I showed these to him. Load81 by antirez is a similar Lua environment without the constraints: https://github.com/antirez/load81
Or, why not put together a low-cost computer/Z80-like terminal with your son, like the RC2014 that runs BASIC: https://rc2014.co.uk/
Good luck!
On the other hand, reverse engineering is the "fast path" to grasp most any technical study in depth, programming included. Reversing only hits its limits when new fundamental concepts need to be introduced.
It doesn't have to be reversing from final results; studying and modifying pedagogical source code is fine and often better than "real-world" in the early going(since the real stuff is always cluttered with concepts). What you should teach in this regard is the technique you would use to study the code in depth: for example, how to "run a CPU" in your head, which can be demonstrated by stepping through with a debugger. Or using the printf statement to create a basic logging system. And the kinds of common data structures. If you give a kid an understanding of structs, arrays, strings, and event callbacks, and some rudimentary debugging knowledge, then point them at code to study, maybe with some guidance the first few times, they can self-learn a lot of things from there.
Get the physical book - “25 Scratch 3 Games for Kids: A Playful Guide to Coding”. Graphical way to program. My eight year old was making games in minutes. And was ‘getting’ it.
Then, when a little older. Get a typing tutor app. Start them on python.
It doesn't have very much syntax but you can still do stuff with it. A good place to start might be to find a library for something he likes. Maybe a game or some other topic he is into.
I've been using this video to teach someone. We watch for a while and then pause and code on my PC. I honestly don't know if it's a very good method or even a very good video. Results have been good so far though.
He should be interested in something, and then should face some problem in it, and then be able to solve it with programming. Or use programming to make things better.
I don't think that you can make a 9 yo interested in outputting a bunch of text into console.
You can get started with Scratch, and see how things go.
Or you can introduce him to Minecraft where he can get started with Java to do stuff in the game.
You can also buy Osmo and check how that goes. Someone I know teaches her 3 yo using Osmo.
My personal choice would be to buy a Raspberry Pi kit with some sensors or an Arduino kit, and download and use Open Source prewritten code with those. Then tweak the code to do things. Then eventually write his own code to do stuff.
Another way would be to introduce him to text-based games like the ones in early-years of computing. There's a book around called- Land of Lisp, where Lisp is taught with Text-Based Games.
I would ask you to remember three things-
1. There would be a trial and error component to it. You will have to be willing to try different things to see what sticks.
2. Code with your son. I mean, give him a place, a desk, maybe, to sit beside you and code together.
3. A boring thing becomes interesting when there is chance to outsmart one's peers. An interesting thing will become more interesting this way. So, after initiation, try and enroll your son in a group activity involving programming.
I hope this helps.
There was a Google doodle some years back where "programming" was introduced. You should check this out and give your son this [0].
You could start with circuitpython since you know python. https://www.adafruit.com/product/4333
Adafruit has got good tutorials as well https://learn.adafruit.com/welcome-to-circuitpython
Here are few other suggestions https://news.ycombinator.com/item?id=29438050#29438836
If you run into any issues or like to bounce project ideas, feel free to contact me, my email is in my profile
The programming language doesn't matter, but lua for roblox or java for minecraft would be a good fit.
Background concepts like how does the CPU work, what's an OS, what's an architecture aren't important for a kid. If he wants to continue programming as a career, he can learn them, but they are not important to get started and will probably lose the motivation.
ASAP!