I had the hardware, the aptitude, the interest, and the free time, but it just didn’t happen until I was in the right environment to give me a bit of initial hand-holding. I guess my point is, don’t just throw your kid in front of a computer and assume they will learn to code. They might end up writing fanfiction, playing an MMO, or trolling on 4chan instead.
But I got so interested in game programming that eventually a project struck with me and I kept with it and wrote code more than ten lines long.
The Ruby programming language and a little book(don't remember at the moment) from the public library was my gateway drug.
As a child, I went to the library, got a book on programming and was dying to learn how to do it but didn't manage to compile a single program for years.
A programming app, or a programming robot, or some other tailor made solution may well be the right solution for some of these kids.