I want to teach my son how to program and I’ve been wondering what language to start with. I work with Ruby day-to-day but if I teach him that first I feel like it’ll sully him for other languages and “taint” him.
I was thinking of going with Go since it’s very basic, clean and explicit. It’s a C-style language so he will be able to branch out to other languages years down the line if he wants to.
On the other hand, distributed systems are on the rise and probably the future of computing. Something like Elixir will go a really long way in teaching how how to think in a functional, distributed manner.
What do you guys think? Fathers, what languages have you taught your son first?
I started with shell scripting at age 2/3, assembly at age 4-6, Pascal/Forth/Etc… at 7, C later at 7, C++ at 9yrs, etc… etc…
I’d personally probably start with either scratch, lua (like with love2d, let them make a game), lua (with factorio to mod the game and make their own stuff in it), or if I wanted them to learn good programming first, then probably OCaml or so, later Rust.
I’d 2nd scratch and lua. Keep in mind dude is 8 years from learning pre-calc in school… let him get bit by the bug.
That said I also wouldn’t shy away from teaching him an functional language just because it’s functional. We have no idea what the programming landscape is going to look like 12-15 years from now… any enjoyable interaction with a machine is gonna do some good toward whatever that is.
I started at 8 with BASIC - using the examples in the manual with the CPC464 - which got me hooked.
My 10 year old is not really interested in computers (other than playing minecraft) but when we have done stuff on them, he much prefers to play around with the Arduino - its more fun because he can see ‘real’ things happening in front of him. So we mess around with the example stuff, then come up with an idea of what he wants to make and we work through the IDE with me explaining why things do what they do. He was most happy with making a set of traffic lights with crossing, tweaking it to get the timings just right (Yea we had to go and actually time them lol)
I definitely concur and would encourage you to let him pursue his own dreams as well - people excel at what they enjoy most. Who knows, he might be a world renowned geneticist in the making
Having said that, if he’s up for it, why not let him decide? Show him some Ruby and Elixir code and let him choose based on which he likes. Throw in other languages too, though I suspect he might favour Ruby or Elixir because of the more human-friendly/intuitive syntax.
I would suspect a language like C might put him off for life - but I’m only talking from personal experience with my intense dislike of endless brackets and semi-colons
that said a book like ‘Hello Ruby’ helloruby.com might be good.
and then it goes towards his interests… eg If he is into robots, a scratch programmable robot gets you very far, you can get some raspberry powered ones for reasonable money, there is also lego mindstorms, but that is more of an investment.
I started my daughter out with the book “Learn to Program” (https://pragprog.com/book/ltp2/learn-to-program) which @pragdave actually offered to a “Girls Engineering Club” my wife was running when several girls from my daughter’s elementary school did well during STEM testing.
The book teaches programming in Ruby, but the language is almost incidental. What it actually does is covers things like “What is a variable?” what is a loop etc.
Completely anecdotal evidence, but my daughter’s First Robotics FTC team (for which she is the principal programmer) has participated in the last two world competitions and she has been accepted as an entering freshman in EECS at MIT this fall. YMMV.
If you want to go deeper : i advise a functional language because it tend to be simpler to learn. The problem is the time to feedback. Elixir, Go and company have really limited feedback.
Why not Elm? I know there have been some use, may be worth asking to some of the elm community. Nice compiler, not too complex, flashy feedback with UI etc
I’d say OCaml for the functional deeper part, it is near instant to compile so turn-around time is pretty quick and it often tells you what you did wrong and even often how to fix it.
Agree but i am more talking of visual feedback. Feeling that you are accomplishing something. Having something you can play with, with your mouse, with a UI, etc
C-like languages are awful for children. Perhaps Scratch is good, but I think the very starting point in all this is to find a purpose to his learning. Computer memory and stuff like that aren’t interesting for kids nowadays.
Also, Roald Dahl books.
If you want your son to be good at something, let him decide what that is. Find out what (((he))) is interested in, find out what will make (((him))) happy. It is his life. I’m sure you’re just looking out for his future, but let him just be a kid. There will be plenty of time for him to zone out, or rack his brain, in front of a computer. You will do much more for his future by letting him play outside with other kids.
First off, I’m just going to assume your son has an interest in programming and that this would be his first language. Given that, I would probably start off learning Python (or Ruby). I suggest Python especially for a couple of reasons.
The syntax is cleaner than most languages and espouses the importance of white space.
The community is massive and learning resources can be found easily, for all levels, ages, etc.
You can easily branch off into different fields and be exposed to more possibilities and you can certainly find plenty of resources for those fields. He can try working with PyGame, then take a crack at Django for some basic web development, maybe work on a cool project utilizing the Raspberry Pi, etc.
Learn the basics of OOP.
There are more reasons, but you probably get the idea.
I know it’s ironic suggesting this on the Elixir forum, but my appreciation and desire to learn Elixir (Erlang, Phoenix) happened because of my past exposure to OOP in languages like PHP and Ruby. Moreover, I feel like what kept me so active in learning something like Rails at the beginning was having that sense of instant gratification; writing a few lines of code, refreshing the page, and seeing the changes and my idea come to life was really rewarding.
For my kid, my concern would be more in retaining his/her interest in computer science by letting them build things easily and exploring all the possibilities. Once they grasp the fundamentals, you can certainly expose them to more complex or specific languages, like Elixir, Go, etc. If they really have a solid understanding, they will appreciate the nuances/purpose/power of these languages more.