Best way to learn a Programming Language

(Update, added Casting SPELs)

For better or worse, it’s accepted in our industry to be fluent in only a single programming language or technology. It’s lame, but there are plenty of excuses for this. “Turing equivalence” right? Finding quality tools is hard. And worse yet, to learn a new language you have to spend days and weeks reading some lame introductory text, right? Wrong!

There are tons of good intro guides out there that can get you up and running quickly, if only you know where to look. I’ve accumulated a bunch of these, and would like to spread the good wealth:

Learn You a Haskell, example image

Learn You a Haskell for Great Good — Terribly fun illustrations, and fast moving. See the little chick to the right for example. Sticks mostly to the REPL and teaches by example. Best of all, elides all those lectures on “how Monads changed my life” stuff. Just the facts.

Teach Yourself Scheme, example image

Teach Yourself Scheme in Fixnum Days — A little more down to earth, faster paced. Again, REPL focused; every section includes short illustrative snippets, although many of them refering to fictitious functions.

There’s also a Scheme for C programmers that runs even quicker. It includes special considerations for C programmers, but knowledge of C is not a prerequisite.

Oh, and lastly, the makers of Chez Scheme also offer the full text of The Scheme Programming Language (vendor neutral) on their site.

Why's (poignant) Guide to Ruby

Why’s (Poignant) Guide to Ruby — This one is just… unique. Why’s guide is a bit rich on illustrative dialog for my tastes, but I can say I’ve never seen anything else like it. If you just want to learn the language, skip ahead to chapter 3, but come back to chapter 1&2 later when you have time for a unique experience.

Practical Common Lisp, book

Practical Common Lisp — Full text online. Excellent format, interspersing chapters on the language with case study chapters that examine working programs, giving context for the reader. If this is your 3rd or 4th language, you may find the pace a little slow (a common challenge in programming language instruction). However, this is not to a fault, and 2nd language readers will definitely appreciate the effort made to elaborate the potentially confusing corners of the language.

Casting SPELs Example

Casting SPELs in LISP — Like Why’s (poignant) guide, this one is also out there. Learns you Lisp through programming a simple text adventure game.

Finally, you’ll want a reference manual for Common Lisp. This isn’t just any reference manual though, this one is unique. The Common Lisp Hyperspec is just about the most gosh-darned-hyperlinked manual I’ve ever seen. Particularly helpful is the permuted symbol index. An excerpt:

                   values-list
                          list*
                          list-all-packages
           pprint-exit-if-list-exhausted

Yeah, that’s cool.

So there are some resources to get you started. But what, you say, you don’t still don’t have time to install anything? Then don’t – there are a bunch of REPLs you can play with before committing any time to setting up tools:

  • SISC Scheme — requires Java. A very complete r5rs Scheme implementation.
  • WeScheme — JavaScript. Scheme ide, with repl.
  • Try Ruby — JavaScript + server-side execution.
  • Try Python — Silverlight. Supports all the core python 2.x language constructs.
  • You can’t swing a cat without hitting a JavaScript repl or two, or an interactive lesson.
  • Try Haskell — (upd, 07/18) Looks like it’s going through updates. Since I first saw this a few months ago, it looks like they’ve added lessons and tweaked it to run smoother. It seems every (worthwhile) language is gonna have one of these sooner or later.

These are my favorite fun and easy starting points, but there’s more out there. Try a couple out, find one that seems interesting to you. When you’ve found a new language that looks promising, stick with it for a while. It will give you more perspective, and additional tool to use in your programming arsenal.

Update (7/18/2010):

First, Mozilla has a re-introduction to JavaScript, especially for its opening sentences:

Why a re-introduction? Because JavaScript has a reasonable claim to being the world’s most misunderstood programming language. While often derided as a toy, beneath its deceptive simplicity lie some powerful language features.

Also, added Haskell to the list of online REPLs available.

Join the Conversation

2 Comments

Leave a comment

Your email address will not be published. Required fields are marked *