I’m a computer programmer who started at age 12. At that time, by far the coolest thing about programming for me was being able to write my own game. I was also motivated by math and algorithms, but more weakly, at least initially.
I would recommend balancing two things. First, settle on a simple framework that lets you do simple graphics in a simple language with minimum boilerplate. Maybe pygame (never tried it), or processing.js (good because it works right there in your browser), or some learning-oriented language (when I was a kid, Logo was popular, though I quickly moved on to BASIC; is there an analog of Logo for the 2010s?). Show him how he can draw something with three lines of code, get him fascinated, move the goalposts, iterate.
Second, more math but I would especially advise math puzzles of all kinds. Tricks with numbers, geometric constructions, logical puzzles. It’s great if you can find material of this kind for your son that he’ll want to consume on his own and not just because of the time-sharing scheme. Martin Gardner’s books may be useful, though probably a bit later on; and other material of such kind.
Note that I haven’t answered your last question because while the things I listed were helpful to me, I did them, and I don’t know what other, different things would’ve caused me to be a better programmer. I don’t even know if starting at age 7 would’ve caused that; I suspect it’s true, but don’t have a solid argument.
I’m a computer programmer who started at age 12. At that time, by far the coolest thing about programming for me was being able to write my own game. I was also motivated by math and algorithms, but more weakly, at least initially.
I would recommend balancing two things. First, settle on a simple framework that lets you do simple graphics in a simple language with minimum boilerplate. Maybe pygame (never tried it), or processing.js (good because it works right there in your browser), or some learning-oriented language (when I was a kid, Logo was popular, though I quickly moved on to BASIC; is there an analog of Logo for the 2010s?). Show him how he can draw something with three lines of code, get him fascinated, move the goalposts, iterate.
Second, more math but I would especially advise math puzzles of all kinds. Tricks with numbers, geometric constructions, logical puzzles. It’s great if you can find material of this kind for your son that he’ll want to consume on his own and not just because of the time-sharing scheme. Martin Gardner’s books may be useful, though probably a bit later on; and other material of such kind.
Note that I haven’t answered your last question because while the things I listed were helpful to me, I did them, and I don’t know what other, different things would’ve caused me to be a better programmer. I don’t even know if starting at age 7 would’ve caused that; I suspect it’s true, but don’t have a solid argument.