Makes me realize I never wanted to learn to code. I never set out for it. I want to learn to code things now, but back then? I wanted to make an executable that did something. Sometimes it was a game. Sometimes it was some weird graphical screen saver like thing. Coding was just to make it happen. That became something interesting too, eventually.
It is something we as programmers forget. Why we did it in the first place. It usually shows up when those analyst show up and want some program. Cant they see how amazing our code is? /s When what they want is a program that does something.
I started coding pretty young (Perl probably ruined me at 12), and what I realized as a teenager was that I didn't really enjoy programming, it was just the means to an end. I wanted to make the computers do something.
I'm a system administrator now. Turns out that most of the problems I wanted to solved had capable people already working on them.
Those years of coding give me such an advantage when things go wrong, though. I've never regretted it for a second.
As I matured, coding eventually became my own thing, and I started to enjoy it as something I could escape to that nobody around me really had to understand. But when I first started dabbling in it, you bet my Dad heard just... hours, and hours, and hours of my rambling. Mad props to him for listening, even if in hindsight I realize he barely had any interest in the subject and found it hard to keep up. You did good, Dad.
I made primitive games. They weren’t much more than shapes and colors and sounds, but I was able to make it do things. And that was before there was an internet where I could find help. I didn’t know anyone who had ever written a line of code.
I think one might be surprised what a 9 yr old boy could do these days programming.
Maybe he does, but he doesn't know it yet. Do not force him, but you can show him. That's actually how I got into coding. Like every kid, I wanted to make a game, but progressively, I found that I had more fun coding than actually making the game. In the end, I went in so many tangents I didn't complete my game, but who cares?
Everyone is different. Maybe he just wants to imagine stuff, maybe he really wants to produce something, or maybe he wants to code, or write, or draw, whatever. Maybe that's an opportunity to see what he is really into. For me, it turned out to be code. People, kids and adults alike don't just want to "learn to code", they have a motivation and code is what gets them there. You need a starting point. For adults, it is often making money, but for kids, making a game is probably the most common.