Live data from Hacker News

Ask HN: What programming language should I teach my little brother?

news.ycombinator.com

11–20 of 119 posts

Re: Ask HN: What programming language should I teach my little brother?

#11
As a teenager, I tried various "real" coding languages - C++, Java, VB (ugh) - but I was never able to get engaged in them. All I wanted to do was build something cool quickly, and none of these languages allowed that without a significant time investment. Then, I tried out PHP. Within a few days, I was building random tools left and right, and having a great time doing it. So, to get him interested, I recommend you choose a language that lets him get results fast.

Re: Ask HN: What programming language should I teach my little brother?

#12
Since you know OCaml how about teaching him Haskell followed by C? The former should be pretty accessible to a 13 year old and he’ll have a lot of time to wrestle with some of the more difficult concepts like Monads (although I think exposure to them at an early age will make them easier to grok since he doesn’t have to unlearn a bunch of other stuff). I highly recommend Real World Haskell (http://book.realworldhaskell.org/read/) if you do decide to go that route.

Apologies for a (related) tangent but I'm in a very similar situation (except that my little brother is 31). He has more artistic inclinations but in the past he's demonstrated an aptitude for mathematics and is generally good at problem solving. I've been teaching him some basic set theory and number theory in preparation for some actually programming.

My first thought is to teach him one high level language like Lisp followed by a low level language like C. On the other hand, JavaScript (+ HTML) has some of the best of both of those worlds with the added benefit of affording immediate gratification. Any thoughts?

*Admittedly, my bro is a bit more motivated by financial considerations but I do think he will come to appreciate the beauty of programming if it is presented the right way.

Re: Ask HN: What programming language should I teach my little brother?

#14
python or ruby are good choices. They can be used to do UNIX scripting, and each one has some really cool modules to do graphic stuff. I'm learning ruby just now, so that i can do GUI programming with shoes, and im using _why's guide: http://poignantguide.net/ruby/index.html

I don't know which one is better for a 13 year old, just pick the one you know better.

Re: Ask HN: What programming language should I teach my little brother?

#15

As a teenager, I tried various "real" coding languages - C++, Java, VB (ugh) - but I was never able to get engaged in them. All I wanted to do was build something cool quickly, and none of these languages allowed that without a significant time investment. Then, I tried out PHP. Within a few days, I was building random tools left and right, and having a great time doing it. So, to get him interested, I recommend you…

PHP's how I got into programming too. It's a relatively easy language to learn as it doesn't worry too much about typing and it's syntax leaves a nice bridge to C which could be just what you need.

Re: Ask HN: What programming language should I teach my little brother?

#16
Whatever language you choose: write a lot of (small?) shell scripts. This is very unix-y and also easy. The composing of those scripts using unix-pipes also will give him a little bit experience with things like modularity.

Also, I'd choose a language I like and that I'm familiar with. I think OCaml would definitely be a good start. Strongly typed and strict, lots of possibilities for abstraction, it's all pretty cool. Or teach him (and yourself) Haskell using RWH or something.

If you go for an imperative language then Ruby or Python would probably be a good idea. Those languages are really a lot like English and have a lot of momentum. If you go for Ruby, take a look at http://hackety.org/, I think it's awesome for young programmers.

Re: Ask HN: What programming language should I teach my little brother?

#17
I've given this question lots of thought over the years. I really started loving programming when I found Garry Kitchen's GameMaker. It wasn't very elegant, but it was damn fun.

I'd push him toward PHP.

The goal isn't to make him a great programmer with an amazing language. The goal is to get him doing fun stuff fast, so that he sticks around.

When things are fun, kids stick around.

I'm guessing that many readers here got hooked on a language, not because it was a functional language, but because you could accomplish things quickly.

Introduce him to PHP and work with him on coming up with a very specific project he wants to hammer out. Then you can sit down and walk him through the various phases of putting it together.

Re: Ask HN: What programming language should I teach my little brother?

#18
I would suggest a language like newlisp (http://newlisp.org), that has enough libraries to do unix scripting. Also, you should consider teaching him awk because it has simple semantics and it will be simpler for him to switch to C later.

Btw, why do you hate C ?

Re: Ask HN: What programming language should I teach my little brother?

#20

python or ruby are good choices. They can be used to do UNIX scripting, and each one has some really cool modules to do graphic stuff. I'm learning ruby just now, so that i can do GUI programming with shoes, and im using _why's guide: http://poignantguide.net/ruby/index.html I don't know which one is better for a 13 year old, just pick the one you know better.

Seconding Ruby, just for _why's guide. I've never read anything that makes me so immediately enthusiastic about coding, and it still has that effect when I reread it. I wish I'd known about that as a kid.
Post reply on HN