Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What programming language should I teach my little brother?
41 points by atestu on Jan 10, 2009 | hide | past | favorite | 110 comments
My brother is 13 and asked me to teach him "how to code". I really don't know what programming language would be the best to start at this age.

First I thought of C because it will also teach him how the Linux he runs was made. But… I hate C. I personnally learned programming with OCaml and Pascal. I still love OCaml (pattern matching FTW), but it didn't really teach me anything about Unix…

I'm looking for a language that would be easy to learn, with a beautiful syntax, and that would gently introduce a 13 year old to the amazing world of Unix/Linux.

Any ideas?




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.


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.


Reinforcing good practice shouldn't need to negatively impact having fun; some would argue that Python's strict enforcement of syntax and structure means one less thing for the kid to worry about deciding for himself, thereby reducing the complexity of learning. When you're just starting out, having some (meaningful) rules in place can be a good thing.


I would suspect a good IDE might be better than a headful of little things a kid has to remember. ("Hey buddy, see how you missed the ; here, better add that!")



Go with Python. I taught my 7-year old nephew Python in an hour, but failed to teach him javascript. There's just too much to type and explain.

Also, it's easier to explain to someone if you have an interpreter going and they can see the results.


Yes, I second that the interpreter is easy to show people basic things. The cocos2d stuff with the interpreter are really informative.


Since making stuff should be fun, I'd recommend Python with the Facebook API. It's really easy to learn and allows him to show off to his friends.


I think the ability to "show" something is important for probably 90% of people - that doesn't mean they won't become deeply interested in programming in general, its just that they view it as a means to an end, and I think people underestimate how hard it is for beginners to make something that "works" in a cross platform way, enough to inspire them to keep going anyway.

In some ways I almost think javascript in a browser is enough, you have firebug and its shell, and you can immediately show hacking around etc..

Of course, there are some who the mathematical pleasure is really what they are after, in which case I would think haskell - and it has the bonus of a very simple syntax that really doesn't look like a "programming language" - at least what most people think.


Or go with the PyGame API.


Indeed. Pygame is pretty simple and with only a bit of knowledge one can use it to produce awesome visuals.


And they have good tutorials and documentation.


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.


Closures aren't that weird, and JavaScript makes them a lot more easy to understand than Python...


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.


I also recommend Javascript. Go through a tutorial manual (yes, because that is how he will learn without you) and then learn stuff about canvas or use an api like jquery.

There is a lot of explanation for any language, but with javascript there is a compiler/runtime on every computer.


I'll second python, even though I learned the C route.

I'm a stubborn bastard, only reason I kept going.


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.


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 the first.


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.


Perhaps also you can stress which are languages that need APIs to do GUI and other useful stuff and which have the APIs built in.


Yeah, PHP isn't an excellent language but it does do one thing and do it well. Just 99% of examples or scripts you find are absolutley horrible. Seriously, I've seen blog posts on PHP from IBM which contain bad programming practices.


Let's keep rehashing how a language creates terrible code and how none of it has anything to do with the guy sitting in the chair pushing buttons.

Seriously, can we just nuke this argument?


I'm not sure that this "please think of the children" argument -- the one which asserts that the sight of PHP will forever warp the minds of children and risk turning them into script kiddies, or Blub programmers, or crack addicts -- can be nuked. It's really old. People were apparently using it when I was thirteen -- except that the guilty party back then was not PHP, which was more than a decade in the future, but BASIC. And I obviously didn't know about the controversy at the time, because I was too busy using hunt-and-peck typing to rekey my BASIC apps over and over again. (At the time my school's brand-new Commodore 64s didn't have tape drives, let alone floppies.)

And the kids were alright back then, and they are alright now. Applesoft BASIC makes PHP 5 look like Haskell (we're talking about a language with nothing but global scope, here), but the generation that built the Web grew up using it and it didn't hurt anyone. The smart kids just moved on to better things as they became aware of them.

Teach the kid something fun. For a thirteen year old, that's very likely to be Javascript, Actionscript (i.e. Flash), or PHP, though I certainly might give Shoes or Hackety Hack a try, or maybe this Scratch thing: http://scratch.mit.edu. Try several of these and see if any of them stick. But don't get hung up on the details. The guy is thirteen. There will be plenty of time for him to learn how ugly, fragile, insecure, opaque, and unmaintainable his code is. Try to let him have some fun and get hooked before he's forced to learn the truth. He won't sit still for it, otherwise.


As an occasional reader of The Daily WTF, I don't think it's fair to say that this sort of thing never hurt anyone.

Every language that has been around for a while has its own culture and traditions. The culture of PHP is a better reason to avoid it than the language itself. I spent a lot of time un-learning habits I picked up from languages like PHP and BASIC. I suspect I would know a lot more now if I had started with Smalltalk[0] and not had to waste as much time un-learning bad habits.

[0] Python wasn't around then


It's easier to code and deploy using PHP than Python for web-app.

It's easier to code and deply GUI app in VB (and .NET environment).

For a beginner to start coding web-app in Python would be like a non-geek trying out Linux with just command-line.


Then don't do web-apps. There's nothing wrong with starting doing GUI apps with PyGame or something


It's even easier to get started with JavaScript.


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.


This is good advice.

I personally thought VB6 did a good job of letting you build something quickly in its day, in spite of its other faults.


Same here, I started with QBasic and VB but never really accomplished anything in them. PHP is when I really started to "do stuff."

These days though, I would recommend teaching him Python or Ruby.


Whatever you teach him, teach him something that you love. You will infect him with your enthusiasm and that matters an order of magnitude more than which language.

Heck, there are plenty of situations where exactly this happened, and the programming language was COBOL or Assembly!


Scratch (http://scratch.mit.edu/) is a good way to learn the basics of putting programs together. It's done visually and it may feel like just a toy, but you can do some pretty cool things, it has a very shallow learning curve, and it can intuitively guide you to learning some important concepts which then have applicability to traditional programming.


My 9 year old son is pretty facile with Scratch, and my 7 year old daughter loves playing with it. I second this recommendation for younger kids.


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.


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've always liked Chris Pine's tutorial (http://pine.fm/LearnToProgram/), because you can go through them with someone who's paying attention in about two hours. I do love _why for self-teaching, though.

My biggest recommendation, though, is that once the kid has any sort of "foundational" programming language under his belt, you write a Scheme interpreter together, in that language, and then show him that the interpreter you just wrote can run Scheme files that already exist (possibly ones you pre-prepared.) That's the best way, I've found, to burn into someone's head that there's no one-true-language, and to get their mind started experimenting with "what if the language was different in way X? Could I code that?" trains of thought.


Also consider Hackety Hack from _why. It is very involving, giving step-by-step instructions and crystal-clear explanations (like TryRuby).

http://hacketyhack.net/reality/


Somebody downvoted this entire thread; no clue why. I've never tried Hackety Hack, but it looks like a really interesting tutorial set. Thanks for the tip!


I played with it a while ago. Not too shabby. Seems perfect for a 13 year old. It's fun and it makes it easy to make something happen.


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.


I agree! The poignant guide is perfect for having fun in the reading about it part.

And Ruby has a number of other benefits:

* Easy web frameworks if he wants to get into that (Rails, Merb, Sinatra, Camping, etc)

* Definitely fulfills the "beautiful syntax" part

* shoes for really easy GUI apps (that are portable, so he can show it off to his lame windows-using friends)

* Built-in powerful regexps for that pattern matching you expressed love for

* It's generally something that you'll run from command line, helping with the learning about Linux part

* Lots of cool libraries out there

* Object-Oriented, which at least for me was a very easy thing for me to grasp (especially compared to functional, which I'm currently trying to learn)

* Awesome


Python is easy to learn. Some advice by ESR : http://www.catb.org/~esr/faqs/hacker-howto.html#skills1


and use pygame to teach him how to make games and get him excited about programming


Logo isn't too bad. It's open source, scheme derived, and very easy to make games (beginners like immediate feedback). http://education.mit.edu/starlogo/

At 13, he may be too old for it, but Logo was one of my first languages back in elementary school, and I remember being very excited that I could write my own galaxian clone in just a day or so.

Otherwise, I would stay away from JavaScript and Ruby (I like them, but they are hard for beginners) and stick with Python.


I realize I'm sounding here like I've been seduced, but I truly don't understand why you would want to teach any first language other than Python.


Do you understand that ruby is similar to python, and some people consider the differences to be advantages?

Also, there are arguments that Lisp is better than everything else. Especially when the goal is to learn something (rather than get a product out the door, which makes it more important to have existing libraries, and to be able to hire people who know the language).


Squeak (http://www.squeak.org/) is fun. It's designed for teaching, has lots of high level libraries available and it's simple (everything is in one system).

This isn't going to do much to help with Unix/Linux mind, but as someone else pointed out programming is supposed to be fun.


Ruby.

It's the most human-readable language out there. I personally think that it's a lot easier to get started with the basic concepts of programming like while loops, if statements, etc. It is a lot easier to do those things when you don't have to think about including random libraries and putting everything in specifically named functions (ie. main() or static-something-or-another in JAVA) and what-not.

It's the fastest way to get started.


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.


Haskell as a first language... I've seen it work, but the learner was a physicist working on his PhD. "Finally a language that makes sense", he said.

For a 13-year-old who has probably not been exposed to much mathematical rigor at school, I would not recommend Haskell, though. Haskell makes it hard to write a program that, as ugly and unmaintainable as it may be, somehow mostly works (e.g. you have to plan ahead which parts of the program may perform I/O).

Therefore, I'd go with an imperative language and reserve Haskell for the day when he asks "is that all there is?".


Those are good points. However, I don't think Haskell is that much harder than something like SQL once you really understand what's going on. Although it's not much more than an informed hypothesis, I do think that a precocious 13 year old could do well with it... but I would definitely teach an imperative language too.


For your brother, I would teach him C before Lisp.

C is mandatory, every programmer knows C, it teaches you about memory management, syscalls… it teaches you how you computer works. Once he gets it, he can start having some fun with the sexiness of Lisp, and he will make less mistake because he knows what's happening behind the scenes. Plus… it's really hard to learn C when you already know Lisp exists. I mean… first you ride a bike, and then a motorcycle.

For my brother, I don't think Haskell is such a good idea. Sure, it's a great language, but maybe too mathematical for his age (he just learned the Thales theorem…).


Thanks for the reply. You mentioned that OCaml was one of your first languages and I guess I assumed that you learned it at a similar age which is not necessarily the case... but that's why I suggested Haskell. Also, I can appreciate that teaching Haskell to a 13 year old can seem a daunting task (for the teacher) but I really do think that under the right tutelage I smart kid could get it (you can get a lot of mileage by just treating it as sort of a SQL dialect). It's also pretty well integrated with at least one Linux distro as far as systems programming goes (http://urchin.earth.li/pipermail/debian-haskell/2006-May/000...).

Good luck with whatever you decide though, he's fortunate to have a brother that's taking the job seriously :)


Why are Monads considered difficult?


They are difficult because the concept is very unfamiliar and abstract. It's also not very easy to see the motivation at first.


Perhaps I am too tainted.

Monads can be motivated as a generalization of a lot of stuff that follows similar rules (the Monad laws). E.g. Lists, Haskell's Maybe (representing success/failure), sequential computation.


As a Haskell beginner it's not so easy to see the generalization between State, Maybe, IO, and especially Lists.

This is exactly the problem.


I love Python, use it for all sorts of stuff, but I remember there were some things that went over my head learning it because I didn't understand OOP, and until I saw its beauty and the important aspects of writing clean code I hated the forced indentation. Plus I wasn't using vim then, and my lazy butt still doesn't like having to manually indent two-to-four spaces, depending on the project/language.

So maybe PHP would be better--tied with XHTML, CSS, and little by little some JavaScript. However, he's 13, so I don't think doing things in C or even Perl would be too daunting. (I can't recommend pure shell stuff with no graphics to people younger than 10 (sometimes 12) or so; it's just not that interesting for them.)

So then again Perl might be a better choice if you want to do a bunch of shell stuff. Have fun explaining cat.pl to him: #!/usr/bin/perl while (<>) { print; }


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.


Ruby.

Give the Why's Poignant Guide and you can't go wrong. Plus he'll love the cartoons, even if he doesn't get the strangely subtle adult humor.


Call me old school, but I would start off with Basic. If he was younger I would recommend Logo. Once he's hooked I would get him into C or pascal.

I can't recommend enough getting him a "Basic Stamp" kit. Seeing how software can control hardware is magical. Then work him up into "Arduino" world in C.


BASIC will scar him. You might as well go with ruby or python, you get the same facility and start off with an extensible paradigm.


Why?

I thought BASIC is very good to teach basic programming concept such as Loops, line-by-line execution, etc. Really, for a beginner, one must have that kind of mindset.


1)LET s =10 imparts no further understanding than s=10.

2) Numbering lines for programs is nonsensical.

3) Gotos are bad practice.

4) Most programs consist of more than 1 file.

5) Hello world is just as easy in any other (more useful) language.

Can't think of any more off the head right now, time to eat.


Those are very imperative concepts and while imperative programming is good for some things, a language that teaches and allows for higher-level programming is probably a good idea. Languages like Python and Ruby allow functional and object-oriented programming which are becoming more and more common.


It's tradition.

Didn't we all start with basic, even if just for a little bit?


Yes, and I wish it upon no youth to suffer such a perversion of what programming is again. Better to start them off in m68k assembly, at least they will learn something useful in terms of how a computer works.


Arduino has a nice simplified C language and a friendly and simple IDE. I recommend skipping the Basic Stamp.

Other than that, bare-metal programming on microcontrollers has the advantage that the boy can get a mental picture of the entire machine in his head; not so easy with an SDK of hundreds of megabytes for a modern high-level language.


This is not a bad idea. Interfacing with hardware can be really fun, but basic enough that they can be creative.

"Hey, see if you can make those 8 LEDs do like the KITT car!"


Appjet (http://appjet.com/learn-to-program/lessons/intro) would be really cool. When he wrote a program, he could share it with his friends instantly just by sending them the URL.


The approach I'd use would be to find a problem he wants to solve, and teach him to solve it in a few languages.

One of the big "duh" moments when learning CS is when you realize that all languages consist of similar structures to let you get things done.

Not sure what his interests are, but I'd probably choose from:

Ruby or Python

Haskell or Lisp

Javascript

Maybe c or c++ too to remove the intimidation factor, even if it's just for Hello World.

After he can write simple 50-ish line programs in those three languages and knows a bit about how they work, zoom in on one of them and take things a bit deeper, and then a few weeks later zoom back out and see if he can "self-teach" himself those same concepts in the other languages.

This assumes he doesn't want to just jump in a build something for the web, in which case you have to decide how much HTML/dom/standards stuff to teach him (which is largely boring to newcomers) at the expense of doing some cooler programs.

Alternately, you might just want to use pygame and build a fun, playable game with him and not worry about too much theory until after he's having a lot of fun with it.


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.


ActionScript was the first programming language I learned. I found some tutorials on how to make games and little by little learned by changing the source code. Being able to create graphics was very rewarding and the popularity of flash made it easy to show my friends what I had done. The feedback loop was very important in keeping me interested in programming.

Project sprouts (http://www.projectsprouts.com) makes it easy to get started in ActionScript and is also a good introduction to writing support scripts in Ruby.


When I was at your brother's age (roughly), I started with dBase III+ and QuickBasic because that's what was installed on the discarded IBM PC/XT my father took home from work.

What kept me motivated was that interactive programs were just an INPUT A$ and a LINE(x,y,x1,y1) away. Today, I'd have to write dozens of lines of GUI code just to get a program with input and graphical output.

You may want to check out Processing at http://www.processing.org/ which offers a bit of that good old simplicity.


It might be fun to start with a specialized language like processing, which makes it easy to create interactive animations. Here is what the creators of processing say:

'Processing was never intended as the ultimate language for programming visuals; instead, we set out to make something that was:

    * A sketchbook for our own work, simplifying the majority of tasks that we undertake.
    * A programming environment suitable for teaching programming to a non-traditional audience.
    * A stepping stone from scripting languages to more complicated or difficult languages such as full-blown Java or C++.
At the intersection of these points is a tradeoff between speed and simplicity of use. If we didn't care about speed, it might make sense to use Python, Ruby, or many other scripting languages. This is especially true for the education side. If we didn't care about making a transition to more advanced languages, we'd probably avoid a C++ or Java-style syntax. But Java makes a nice starting point for a sketching language because it's far more forgiving than C/C++ and also allows users to export sketches for distribution via the web.'

(quote taken from http://www.processing.org/learning/gettingstarted/)


Go with C++. I learned C++ at 12 and learning every other language (except those based on the functional paradigm) has been a breeze. Starting with a more "difficult" language will give him a good foundation. And C++ really shouldn't be too difficult anyways if he is really interested in the material (sounds like he would be).


If he's a little on the fence whether he really wants to get into programming, I would start with something where he can do stuff that looks impressive with relatively little effort.

C is a horrible choice by this standard, starting with the modify-compile-crash development cycle and especially once you get into manually managing memory.

It's not really coding per se, but HTML is a good thing to get a feel for whether you get a kick out of bending a computer to your will, and would let him show off his creations to his friends. He can also earn some spending money if he gets proficient.

After that he can get into JavaScript and maybe something like JQuery which makes doing more complex stuff much less tedious.

At that point he can probably decide if he wants to learn "real" programming, and you can introduce him to scripting languages, compiled languages and whatever APIs and frameworks he is interested in.


There's lots of good advice here, and I've upmodded the ones I agree with. But, really, it doesn't matter. Anything that lets him create something is good.

Some people here are concerned about "best programming practices" and learning certain lessons. He's 13. Just let him play, and if he likes programming, he'll continue learning.


I've heard several people say that when people start with PHP (or [insert language here]) they develop poor programming habits. Learning PHP or whatever else first could be the difference between becoming a casual programmer and a serious hacker.


I submit the concept of "poor programming habits" does not exist for a 13-year-old.


Not yet and that is my point. That concept does not exist for anyone who has not programmed. I think we just have a disagreement philosophically in the proper approach. I think that this kid should be carefully molded into a coder who does things the right way because he already seems to have an interest. If he did not have an interest already then I could see why you would want to "ease" him into things.

I think your "let the kid be a kid" argument is valid though. It could be overwhelming and turn him off to the whole thing is coding appears to be too strict.


He's expressed an interest, but he still doesn't know what it is. If you hover over him and continually tell him "you're doing it wrong" he won't have fun.

In order for someone to decide it's worth their time to learn the best practices for anything, they first have to reach the point where they decide "I want to get good at this." The kid may never reach that point, and that's okay, too.

Kids express interest in lots of things. That doesn't mean they'll do any of them for the rest of their life.


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 ?


I really hate the syntax, and I may be lazy but I'm sick of memory leaks and stuff. I don't want to spend my time tweaking my program so that it won't take to much resources, etc…

I prefer languages that offers a certain abstraction, languages that allow me to concentrate on the algorithmic part of the program, the core of the application.


i second the newlisp :D

then js+jquery with firebug console as repl


I recommend NetLogo. It is simple to learn, LISP-inspired, and makes it trivially easy to do all sorts of graphical work. It runs on the JVM.

(I took a class in which we used NetLogo to run agent-based economics simulations. Lots of fun, although the LISPer in you will start to hate it after a while.)


Ahh---sorry for the self-promotion but I really believe what I am saying: I wrote a book called Game Programming for Teens, which teenagers tend to like because it teaches them to make video games off the bat (using a modified version of BASIC), gets them interested in programming, and then helps them move on to learning more difficult languages b/c they already have some programming concepts down. The book is here http://www.amazon.com/Game-Programming-Teens-Maneesh-Sethi/d...


An ideal programming language for absolute beginners is the one that doesn’t force them to worry about underlying computing structure(e.g. memory management). Instead the language should teach the fundamental principles of programming (like control statements and the concept of subroutine) in a simple environment that is free of complexities. I would recommend either Karel (http://en.wikipedia.org/wiki/Karel_(programming_language)) or Alice (http://www.alice.org/).


Javascript. It gives him a chance to create GUIs pretty quickly by saving any page he sees on the internet and tweaking it. And he can create things that are useful to him pretty quickly if you show him Greasemonkey.


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/)


smalltalk, absolutely.


This is how I would go too. And if/when he really likes it and wants to move on, LISP.


Python and teach him early library Pygame. For 13 the motivation is the key and nothing could beat creating own games.


I would recommend Ruby because its loose syntax is more forgiving, good for new programmers. Then on top of that, learn Shoes for a graphical interface for creating games. Ruby+Shoes is the modern Basic.

Then again, just have him learn Basic. :-p That's how I learned.


For an average person I would think JavaScript would be the most useful language, but for a 13 year old? It really depends on what he is interested in. For example maybe he would enjoy programming Lego robots? Or creating his own Flash games?


Why not tell him of several languages and let him ask you questions and decide for himself what to learn? Those who accomplish the most are those who strike their own path.


Python and probably a lot of shell scripting. I like zsh a lot.


AppJet now, C later.


at 13 your brother need not worry about memory leaks :) Just let him start with C.

More importantly you should concentrate on what can be done with code(e.g. create a blog, automatically search from library of congress or wikipedia, create a graph of his favorite football team etc etc).

People get hooked when they accomplish something...bothering about language or the finer nuances like memory leak etc can come later.


Processing.org : easy to get started with graphics. I have been having fun with it recently myself.


Even though you hate C, I recommend C, because you learn intricacies of computer software with C.


JavaScript, Python, Scheme, Ruby.


i started with LOGO


Don't teach him one programming language, because if he wants to be a hacker, he'll need exposure to many.

Ruby or Python is good for a start, because it's easy to debug and you can do simple, cool things with them pretty quickly. Then introduce him to Lisp or Scheme, and finally OCaml or Haskell so he's exposed to good static typing. Save C for later (by the time he's ready for it, he'll be picking languages rather than asking you for advice).


Then you should teach him C or assembly. But you don't want to teach him C. So fuck off.


perl, javascript, haskell.

perl: practicality + fanatically helpful community, and it's in unix's dna javascript: nice skill, something you can make money in if you're good, immediate gratification on web pages haskell (or lisp): get some theory in there. i'd vote haskell because of the community


ruby! he will be a rockstar by 16 and we will all thank you




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: