Note: I'm only 20, so hopefully I can give you the perspective you're after.
I learned C first, then C++, both in High School. It wasn't all that easy for me, but I got the hang of it, and I would recommend C as a first language. C allows you to understand what's going on in the computer, and doesn't do too much handwaving. There also isn't the cognitive overhead of "public static void main(String[] args". Try explaining all of that without losing someone. Now try java.util.Scanner s=new java.util.Scanner(System.in); IMO, Java is a terrible language for beginners. It's overly verbose and the implementation just spews out of every API call at you. I'm a Lab instructor at my college, and I've seen people get very frustrated with Java's little quirks. Confusing a beginner is a great way to get them to quit.
C, on the other hand, is much simpler. You can explain that "printf" needs to have a bunch of special code to work that's already been written for you, and you're just "including" it. Then you explain that main is a function (just ignore arguments at first) and the int it returns is whether it had an error or not.
I don't understand why C gets such a bad rap as an introductory language. Hello world is a lot shorter in C, and there's less to learn than Java. Sure, some things are hard, like pointers and memory management, but the K&R book is only a couple hundred pages. Java barely fits in a thousand. Which would you rather crack open if you were just starting out?
Another benefit of C is that it ties in with Unix and is fairly portable, while not disguising what the machine is doing. For me, learning C first has given me a great advantage. I'm working in industry right now as part of my undergraduate requirements, and it was easy getting the job because I knew C well. Plenty of people went to the interviews knowing Java, but what help is that? I also think knowing C and getting pretty good at it made picking up new languages really easy.
When I had to learn Java, I already understood what must be going on behind the scenes for me when I called new(), and found memory management to be unnecessary as I'd been managing my own for years.
In any event, I think you're doing a great job already with teaching your son the shell and basic Unix stuff (trust me, it will put him miles ahead if he chooses a career in computer science). Keep up the good work and don't get discouraged. Just tackle one concept at a time, and make sure to give him something to apply it with, like a toy problem. He'll probably be tickled to have something useful that does the Binomial theorem and factorials for him. I know I was.
Note: I'm only 20, so hopefully I can give you the perspective you're after.
I learned C first, then C++, both in High School. It wasn't all that easy for me, but I got the hang of it, and I would recommend C as a first language. C allows you to understand what's going on in the computer, and doesn't do too much handwaving. There also isn't the cognitive overhead of "public static void main(String[] args". Try explaining all of that without losing someone. Now try java.util.Scanner s=new java.util.Scanner(System.in); IMO, Java is a terrible language for beginners. It's overly verbose and the implementation just spews out of every API call at you. I'm a Lab instructor at my college, and I've seen people get very frustrated with Java's little quirks. Confusing a beginner is a great way to get them to quit. C, on the other hand, is much simpler. You can explain that "printf" needs to have a bunch of special code to work that's already been written for you, and you're just "including" it. Then you explain that main is a function (just ignore arguments at first) and the int it returns is whether it had an error or not. I don't understand why C gets such a bad rap as an introductory language. Hello world is a lot shorter in C, and there's less to learn than Java. Sure, some things are hard, like pointers and memory management, but the K&R book is only a couple hundred pages. Java barely fits in a thousand. Which would you rather crack open if you were just starting out? Another benefit of C is that it ties in with Unix and is fairly portable, while not disguising what the machine is doing. For me, learning C first has given me a great advantage. I'm working in industry right now as part of my undergraduate requirements, and it was easy getting the job because I knew C well. Plenty of people went to the interviews knowing Java, but what help is that? I also think knowing C and getting pretty good at it made picking up new languages really easy. When I had to learn Java, I already understood what must be going on behind the scenes for me when I called new(), and found memory management to be unnecessary as I'd been managing my own for years. In any event, I think you're doing a great job already with teaching your son the shell and basic Unix stuff (trust me, it will put him miles ahead if he chooses a career in computer science). Keep up the good work and don't get discouraged. Just tackle one concept at a time, and make sure to give him something to apply it with, like a toy problem. He'll probably be tickled to have something useful that does the Binomial theorem and factorials for him. I know I was.