Live data from Hacker News

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

news.ycombinator.com

41–50 of 119 posts

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

#41

I would recommend Python or if the Unix/Linux component isn't as important, JavaScript. JavaScript would allow your brother to share his creations with friends and learning the amazing (and at times frustrating world) world of the web.

I would say Python also. But why do you care about the Unix/Linux component? Better to focus on non-OS specific stuff.

After Python, you could also try teaching him Scala.

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

#43
post #27

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…

Second on the idea that it should be quick and easy to make useful stuff, but I have to disagree on PHP. Most of the example code out there is terrible, out of date or both. It's very easy to make a mess in PHP. Python seems to be the teaching language of choice these days, and it lets you do useful stuff without getting in the way. It's certainly not the only language to learn, but I'm inclined to say it should be t…

There's nothing wrong with PHP 5. As long as he's learning about all the latest stuff, it's a perfect language. It features functional aspects to get him started and then he can graduate to OOP concepts. Since he's learning from scratch, stuff like objects and public/protected/private members might be a little farther down the line. PHP lets you get the basics of variables, arrays, functions, etc. out of the way without having to switch languages or set up some construct you have to ignore until later, when you're more adept at the language.

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

#44

I would recommend Python or if the Unix/Linux component isn't as important, JavaScript. JavaScript would allow your brother to share his creations with friends and learning the amazing (and at times frustrating world) world of the web.

Python is a good choice because it is clean, easy to learn, and has a large choice of libraries like pygame. It is important to choose a language that encourages good programming practices. For that reason PHP and Basic are bad choices. Some of the worst code in the world is written in PHP or Basic. I would also stay away from languages like perl.

Avoid languages like C++ or Java because there is so much to learn before you can produce a simple Hello World. There is no reason to learn OOP to do a simple task.

I think JavaScript would be a reasonable second language. He should learn programming firs before having to deal with browsers, the DOM model, and OOP.

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

#46
The most important thing to get a programmer started is to get them a project they want to finish. So, get him on something with good feedback.

Does he play any games that have scripting languages? Lua's pretty popular. Additionally, there's TorqueScript, for the torque engine (garagegames.com).

If he's not a gamer, dump the imperative stuff & have him start on scheme or lisp. If you haven't broken your mind into imperative thought like most of us, it's actually pretty straightforward. And it'll probably fit well with the math classes he's probably taking right now. Teaching him how to solve homework problems in code can really drive usage.

If he's interested on the web side, generating HTML from a functional language is pretty straightforward.

Please, no PHP. Friends don't let friends do PHP.

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

#47
I highly recommend JLogo: http://www.bfoit.org/itp/itp.html

This site and JLogo are geared toward first time learners.

It is very easy to take oneself through the lessons and learn all the basics of programming. After going through these lessons, taking AP computer science (Java) was much easier for me.

(And if you are in the bay area, consider having him apply to the summer program: http://bfoit.org/)

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

#48
post #44

I would recommend Python or if the Unix/Linux component isn't as important, JavaScript. JavaScript would allow your brother to share his creations with friends and learning the amazing (and at times frustrating world) world of the web.

Python is a good choice because it is clean, easy to learn, and has a large choice of libraries like pygame. It is important to choose a language that encourages good programming practices. For that reason PHP and Basic are bad choices. Some of the worst code in the world is written in PHP or Basic. I would also stay away from languages like perl. Avoid languages like C++ or Java because there is so much to learn bef…

I think many of you have completely forgotten what sucked you into hacking.

Here's how to get a kid hooked on programming:

  1. Programming should be fun.
  2. Programming should be fun.
  3. Programming should be fun.
Who really cares if a child isn't using "good programming practices"? When I started writing code, it was downright shameful.

But in time, my internal desire to advance my art led me to nuking my globals and having some kind of naming standard. Eventually I fell in love with elegant languages.

Give the kid a fire. Let him decide if he wants to improve himself over time.

When I started, I just wanted to make games. Not learn Greek. Kids just don't care about Python or Ruby's elegance.

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

#49
post #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.

I'd also recommend Ruby and suggest you take a look at Shoes (http://shoooes.net/) which makes it very easy to code GUI-apps with all sorts of fun-stuff in them like animations, downloading data from the web, videos.

The most important part in teaching a 13 year old programming is to let him have fun and a give him a sense of achievement. The rest will come.

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

#50

I would recommend Python or if the Unix/Linux component isn't as important, JavaScript. JavaScript would allow your brother to share his creations with friends and learning the amazing (and at times frustrating world) world of the web.

Javascript is interesting but it has many quirks and powerful features. I'd say start with Python first, since you can start off with just the language. I actually enjoy writing in Python myself because I feel that it pushes me to stick to coding standards. Also, Python's class-based OOP might make more sense at first to Javascript's prototype system.

Good Javascript programming requires coding differently than you would in Python and C, you have to understand and use strange but cool features like closures and prototypal objects.

Post reply on HN