Wood - do you know what the missing step was? I'm a coder (amongst other things) and may be able to point him in the right direction.
I don't know how coding is taught at school, but I can tell you what I'd see as a natural progression in learning. Hope this might help your DS too, Irvine - I was too slow to comment on the thread when you were talking about his coding!
Language choice:
I'd recommend learning either Java or C#. They are 'proper' fully featured, modern, object oriented (OO) languages.
C/C++ are traditional learning languages, but you have to do some heavy lifting yourself, which may hold you back and isn't particularly useful.
I saw your son chose Python, Irvine. That's a perfectly OK choice too, but I wouldn't necessarily choose it as a first language.
JavaScript has absolutely nothing to do with Java, by the way. (The name was pure marketing, chosen because Java was 'The Coolest Thing Ever' at the time) Javascript is a scripting language, often used to provide dynamic behaviour on websites. It's very useful - increasingly so - but not what I'd call a traditional language, and although you can write OO code in it, it isn't natural (but possibly interesting - see (3) below).
So, steps I'd suggest:
- Understand all the basic constructs in the language of your choice eg variables, if/else and other conditionals (tertiary operators, case statements), different types of loops, classes, methods. (Added extra: Bitwise operators are fun to play with, especially when combined with set based results, like you get from SQL, but I'd see them as fun rather than necessary). Get lots of practice at solving different problems with these so that it becomes a natural way of thinking
- The wider basics:
a)Look at different algorithms for solving classic problems like sorting and string matching. It's a good learning experience to see different ways of doing things.
b) data structures like lists, hashmaps, b-tree. Some of these you get for free in modern languages, but it's still useful to know what you'd use them for.
c) languages/conventions used for passing data around, eg XML, JSON, the concepts behind webservices including REST (probably wouldn't bother with SOAP, apart from knowing what it is)
- Object Orientation. This is both fun (think the equivalent of pure maths for coding) and very relevant commercially.
By the way,
Irvine - since your DS likes JavaScript, learning how to do OO (classes, class methods, inheritance) in JavaScript would be a useful exercise for him - but I'd definitely learn it in a traditional language first.
- Design patterns - these are 'best practice' ways of doing things. They basically boil down to good OO design, but it's subtle and you can learn a lot about both how and why by studying them.
this is a very readable introduction to some important design patterns.
The gang of four book is the seminal text, but rather heavy going for a child! Most of these have been written up in different ways on the web, so I'd probably start there: google for particular pattern names, or else just for 'design patterns' .
- Learn SQL. This is the set-based language used for querying databases. It's a totally different way of thinking (fun for the technical/mathematically minded) and very useful. Almost all commercial systems still use databases.
- Learn how to use an automated testing framework (eg JUnit for java or NUnit for .Net). Learning what you need to do to make your code testable will make you a much better coder, as well as being a genuinely useful skill (both commercially and just for trying things out yourself)
There are plenty of other areas to explore after that, eg Web design (html and css), NoSql databases, functional programming, cloud programming (eg Azure), concurrent programming, operating systems, and a plethora of other languages, tools and techniques.
One of the joys of technology is that you are entering a lifetime of learning.
Caveat:
Now, I haven't made any allowances for this being aimed at kids: this is what I'd recommend to an adult who wanted to go into this field too. It's also probably a good few years of study
But I don't think any of this is intrinsically HARD. And they can always stop and move onto another area if they don't like something - these aren't sequential (apart from the language basics, and OO being needed for design patterns).
The really hard bit is using all these tools to solve problems - which is a wonderful life-long adventure!