Help me learn Perl, Python, Lisp, Haskell, Ruby
July 9, 2009 9:39 AM   Subscribe

Help me learn a few new programming languages. Python, Perl, Lisp, Haskell, Ruby.

In college now, been programming for six or seven years already, all self-taught. I started with Java for a couple years, moved on and now consider myself fairly fluent in PHP and its friends (JavaScript, CSS, etc.). I've been having a lot of fun with jQuery lately! And now I'm stuck in a summer internship working on an ASP.NET project written in VB.

I'd love people's recommendations for books/resources to get started in a few high-level languages: Perl, Python, Lisp, and possibly Haskell or Ruby. I went through an O'Reilly book on Perl (I believe it was this one a couple months ago, so I have a handle on the syntax, but am not terribly capable with it.

Opinions/information on which languages people would recommend (or others) and for what purposes would be incredibly helpful. Other language suggestions are welcome, as well. I don't really have reasons to learn these specific languages beyond "well, I probably should know enough Python to know what it's good for, understand what's going on in Python code if I saw it, and hack something together for a basic task." I'm perfectly capable of searching for tutorials/books on my own, but people's personal recommendations have that knack of knowing which ones worked and didn't for them. ;)

Books/Internet resources/etc. that anyone could point me to would be awesome. Bonus points for a good crash course in Linux shell scripting.
posted by jgunsch to Computers & Internet (22 answers total) 23 users marked this as a favorite
 
One language at a time. Program in it until you stop having dreams about it -- after a few months.

If you know PHP, Perl will be no surprise. Skip it for now.

Python is a wonderful language. Go there next. Since you know two languages already, go straight to "Dive Into Python". Give some time to what we lovingly call "thinkCSpy"; google knows.

Next, try Lisp/Scheme. Spend a weekend and watch "SICP" videos from MIT; youtube knows. Play with Clojure on your JVM. These will make you a better programmer than 95% of the schlubs out there.

Come back to Ruby. Try Tcl for a few weeks. Forth is a different kind of programming, too. Try them all.

Finally, you can't get away from C. It's the lingua franca of programming. Get yourself a good reference. Harbison and Steele's _C,_A_Reference_Manual_ is great to keep next to your desk. Man pages are your friend. (You are using a Linux, right?!) It will take several years to be good at programming in C, so don't immerse yourself in it unless you need to.
posted by cmiller at 9:53 AM on July 9, 2009 [3 favorites]


My suggestion is to download some open source projects in the language you are interested in, and try to understand it.

Actual, my real suggestion is to learn languages as you need them. They're all pretty close except Lisp and Haskell, and conveniently no one uses those.
posted by smackfu at 10:05 AM on July 9, 2009 [1 favorite]


Start with Python, hit Dive Into Python.

Skip Perl.
posted by cj_ at 10:22 AM on July 9, 2009


Uh yeah, what cmiller said.. shoulda previewed. But seriously, don't waste your time with Perl. I cringe even seeing it mentioned in the same sentence as Python -- this coming from someone who has made a living off of one or the other for the past decade.
posted by cj_ at 10:24 AM on July 9, 2009


If you want a new language for practical quick projects, learn Python next.

But if you want to have your mind blown, go for Haskell.
posted by qxntpqbbbqxl at 10:34 AM on July 9, 2009


Not a book, but: Learn you a Haskell for great good!
posted by ThatRandomGuy at 10:47 AM on July 9, 2009


Wjat languages to learn? It depends on your goal. If your goal is to learn new paradigms, I'd go for:

C
Scheme
Any of OCAML, Haskell, and Prolog

Learning these languages will teach you a lot about different ways of programming, which will come in useful in the future. Even if you never use any of those languages again, you will be a better programmer than you were before.

If your goal is languages that are useful in industry, I'd go for:

C
C++
Python
Maybe Ruby

Learning Python AND Ruby AND Perl is pretty much a waste of your time. They're all different, sure, and if you wanted to actually use all three, you'd need to learn them, but learning 3 of them won't teach you much more than learning just one. And they're sufficiently easy that you can pick them up as you need.

As for resources:

Haskell: Haskell School of Expression is great, but not free; your school library may have it.

Scheme (dialect of Lisp): Either How To Design Programs, which is fairly basic and hand-holdy, or just go ahead and read SICP, which is a decent summer project all on its own.

The Python online tutorial is pretty decent if you're a mildly experienced programmer (I worked through it sophomore year in college or so).
posted by goingonit at 10:53 AM on July 9, 2009


If you're comfortable in Java, PHP, VB, and Javascript you're now a programmer. (Congratulations!) Now it's all about learning libraries and API and system components. Do you want to learn languages or platforms?

If you want to learn platforms, then you're not learning Visual Basic, you're learning ASP.NET (or DirectX, or ADO, or Linq, or whatever). Similarly you're not learning Ruby, you're learning Rails. And you're not learning Python, you're learning Django or PIL or NumPy or whatever libraries you're using. Learning new platforms is great, both because you have a skill you can apply and because when you learn enough platforms you start to know what works well and what doesn't. In the web-app world I'd definitely recommend Ruby on Rails next. Or else Python + Django + Google AppEngine because that's such an interesting platform.

If you want to learn new languages, for languages themselves, that's a good thing too. It'll make you a better computer scientist but (arguably) not a better software engineer. For new languages you should get outside the procedural/OO stuff you've been doing. A functional language like Haskell is a great idea, be sure to get into the real mind-bendy stuff. Also learn a little assembly language programming, preferably pure x86 or the like. It's good to know what's going on in the metal.
posted by Nelson at 11:15 AM on July 9, 2009 [1 favorite]


Opinions/information on which languages people would recommend (or others) and for what purposes would be incredibly helpful.

I agree with others who have said that Python from your list would be a good starting point, but really you'll learn something new any time you learn a new language. I aslo agree with goingonit above that if you want to learn a very different high-level language you could try Scheme, OCaml, Haskell, or Prolog.

On the purposes side, tutorials and books are great for learning the basics of a language, but you won't really learn it until you use that language on a real project. Other than hobby projects, you can look for open source projects or any clubs at your college that involve writing code. Also, when making choices for your elective courses, be on the lookout for classes that involve coding but leave it up to you to pick the implementation language. For example, I took an AI class in college that gave me a chance to tackle the coding assignments in a few different languages of my own choosing, and that was a better learning experience than the courses that taught a particular language and did more hand-holding in the process of figuring out the language features.
posted by burnmp3s at 11:17 AM on July 9, 2009


I love "Why's (poignant) guide on Ruby", it's informative AND entertaining.

A good programmer's resource to check out is StackOverflow, kinda of a Wiki/AskMeFi/Digg for programming.
posted by sdinan at 11:23 AM on July 9, 2009


I'm not going to go all religious-wars on you and try to convince you that it's the best, but I like Ruby a lot. It's as intuitive as Python and I prefer some of the design decisions.

If you can embrace quirkiness, cartoon foxes, and occasional hilarity, I highly recommend Why's Poignant Guide to Ruby

If you're more of a cut the crud, I just want to hammer out example after example person, stick to the standard Programming Ruby:
The Pragmatic Programmer's Guide

posted by chrisamiller at 11:26 AM on July 9, 2009


Of the languages you list, I think Scheme (a Lisp variant) will probably do the most to make you a better programmer, especially w/r/t JavaScript since, while the syntax of JS is definitely derived from the C style, its semantics are more closely related to the functional paradigm of Scheme.

As others mentioned, you can gain tremendously from reading/watching SICP, but then go read/watch Douglas Crockford to apply your new knowledge to more practical JavaScript. If you want a very gentle, light-hearted intro to Scheme, pick up a copy of The Little Schemer, which you should be able to largely understand without even using a computer.
posted by ijoshua at 11:49 AM on July 9, 2009


I still blame Why's Poignant Guide to Ruby for the headaches I suffer today.

Seriously, given the volume of programming languages, I'd consider a Safari Library subscription. It's kind of pricey, but I've found it invaluable. All the books you can eat for a single monthly cost.
posted by Citrus at 12:31 PM on July 9, 2009


Here's a tutorial which walks you through writing a Scheme interpreter in Haskell, without requiring a background in either language. Seems like a good way to kill two birds with one stone. :-)

Here's another tutorial which teaches you Haskell through writing a fun little picnic seating program.

And this one shows how to write an IRC bot in Haskell, but requires some Haskell knowledge already.

Also, _why's guide, mentioned above, is good for ruby. I worked through it and thought it was fun.

Someday I intend to actually do those Haskell ones, heh, but so far haven't, so I can't vouch for them. They just looked interesting to me, so I had bookmarked them.
posted by losvedir at 12:40 PM on July 9, 2009


Recommending python/ruby, scheme, then Ocaml/haskell/scala. The latter three will expose you to various levels of advanced type systems (functional, class-based, or both).

Make sure you have extra time and room in your head for the last three though. You've been warned. Sometimes alcohol helps comprehension.
posted by mezamashii at 5:01 AM on July 10, 2009


I am overwhelmed with great resources!

Do you want to learn languages or platforms?
I've never heard someone express this concept of "languages" and "platforms" the way you did. If I understand you correctly, you are recommending learning a variety of language types over the specific nuances and intimate details of what each language can do through its libraries. If that's not at all your point, would you care to point me in the right direction?

For those recommending C: I took a required introductory course in C my freshman year, but it really didn't cover anything new--just an overview of basic C syntax, loops, conditionals, etc. The class as a whole kept failing the tests (averages in the 40-50% range) while I simply stopped attending because it was no new material and the homework was a joke. I know the basic syntax of C, but I sure can't do anything useful with it. Does anyone have a recommendation for where to go with C? I seem to remember trying to learn C through online tutorials in high school but only finding introductory sorts of things.

For example, I took an AI class in college that gave me a chance to tackle the coding assignments in a few different languages of my own choosing
This sounds like fun. I certainly hope to run across this sort of class before I finish my Computer Science degree.
posted by jgunsch at 5:38 AM on July 10, 2009


Does anyone have a recommendation for where to go with C? I seem to remember trying to learn C through online tutorials in high school but only finding introductory sorts of things.

The nicest thing about C is that pretty much anything vaguely resembling a computer will have a C compiler that works for it. So you can, for example, buy an arduino starter kit, write some simple C programs to run on it, and then start making some cool stuff with it.
posted by burnmp3s at 6:42 AM on July 10, 2009


If I understand you correctly, you are recommending learning a variety of language types over the specific nuances and intimate details of what each language can do through its libraries.

Not quite. I was describing two different kinds of things to learn. You can study computer languages themselves. Or you can study the libraries used by a language. I'm not particularly advocating for either, both are interesting.

In most cases languages and platforms are convolved. Ie: if you're learning Ruby to do webapps you're also learning Rails. But you can focus one or the other. (The exception to this rule is .NET, where many languages use the same libraries and runtime. And maybe you would enjoy trying out F# in .NET as an introduction to functional programming).

Does anyone have a recommendation for where to go with C?

I like burnmp3's suggestion of doing embedded systems hacking. Honestly there's very little reason to write C code on a PC-class system anymore, it's just too much work for what you get. But it makes sense for smaller devices. BTW, I suggested assembly earlier, and in many practical ways C is more like Assembler than anything else you're going to use. I'd still recommend pure assembler as an exercise.
posted by Nelson at 8:02 AM on July 10, 2009


You should learn C. The best book on the topic is the very terse The C Programming Language by Ritchie and Kernighan. I think you will get a much better understanding of how computers work in general, since the language is fairly low-level. If you were interested in working on operating systems or writing networks programs, it is good to know.
posted by chunking express at 9:14 AM on July 10, 2009


Note to self (recommended in person by coworker): Thinking in C++ by Bruce Eckel
posted by jgunsch at 5:37 PM on July 10, 2009


Nelson has it right. C kind of sucks. It's the lowest common denominator of programming, slightly higher-level than assembly -- thus my "lingua franca" comment. It's terrible unless you absolutely need it. You may need it to write an OS like Unix from scratch, or to make a SQL engine, or to write a device driver, but past that it's probably a bad choice.

It takes a long time to be good at programming in C; ten years at least. (I am in my 20th year of programming, and at least half of that was programming C/C++ professionally.) Use your youth learning to be a better programmer several languages than in becoming expert in something as awkward as C.
posted by cmiller at 8:55 AM on July 12, 2009


OCaml may very well be the language of choice for financial institutions nowadays.

Learning a functional language (I would choose OCaml or SML) is a good way to make your head hurt! Luckily, however, you will not have to write mathematical proofs for your programs. At least figure out what a continuation is. And foldr! You can do it, you will want to hit something!
posted by that girl at 3:14 AM on July 14, 2009 [1 favorite]


« Older I accidentally dipped the end ...   |  I need to write a script of so... Newer »
This thread is closed to new comments.