Live data from Hacker News

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

news.ycombinator.com

91–100 of 119 posts

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

#91
post #86

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.realworldhask…

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.

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

#92
post #89
post #88

Earlier quoted context omitted.

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.

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

#93
post #91
post #86

Earlier quoted context omitted.

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.

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

#94
post #81

Earlier quoted context omitted.

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.

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.

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

#95

Earlier quoted context omitted.

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.

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

#96
post #79

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.realworldhask…

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… firs…

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

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

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

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

#98
post #93
post #91

Earlier quoted context omitted.

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.

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

#100
post #27

Earlier quoted context omitted.

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…

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
Post reply on HN