Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

This question is geared specifically towards finding out what techniques you employ when faced with learning a new language - feel free to skip to the last paragraph for the straight-forward question.

I'm an inexperienced programmer and would like to learn a multitude of languages (quickly (thirsty for knowledge ;), but thoroughly).

I've dabbled in computer programming since I was 10 years old (VB 6 - 19 years old now). I've played with PHP, C, Ruby and HTML + CSS (though the last two arent technically programming languages, though you obviously know that).

I want to structure my learning for efficiency and productivity as I develop my career and would like to hear how you approach learning a language.

For instance, I read up a little bit about a particular language and if I like the look of it, I usually do a bit of book research and buy a thoroughly (and positively) reviewed one since published content is usually better than a lot of the content you'll find on the web (don't quote me on that). I'll then follow the book and set myself mini-projects to complete, obviously from the first 'hello world' application to a CMS or minigame. I find setting myself projects is a good tactic - it requires research 'off the beaten trail' to find out what features of a language I need to know about to accomplish it in the most efficient way.

What works for you when learning a language? Anything different from reading books and setting small bite-size targets?

share|improve this question

closed as not constructive by Jim G., World Engineer Mar 22 '13 at 2:52

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

This seems like a poll question. Perhaps you could focus it a bit by describing your particular learning situation, and asking for guidance on that situation specifically. – Robert Harvey Sep 19 '11 at 20:28
I personally like using "nutshell" and "cheat sheet" references, and diving into writing code. You learn best by doing. – Robert Harvey Sep 19 '11 at 20:29
Apologies if it came across as a poll-style question - it really isn't, I'm looking for techniques that work for other people aside from what I've mentioned - which you did... so thanks. :) – Anonymous Sep 19 '11 at 20:31
what's wrong about poll-style? – DaveFar Sep 19 '11 at 20:42
As far as I know the FAQ/question guidelines (not well), questions have to be answerable. A poll isn't really something that you can answer, merely vote for the answers given - thus not allowed? – Anonymous Sep 19 '11 at 21:30

10 Answers 10

up vote 11 down vote accepted

I usually go through the following stages when learning a new language:

Read surface level documentation

This means any "hello world" type walk-throughs, or other simple introductions to the language. Generally, I find that when you read the early documentation, you find out a lot about the author (or team) behind the particular language. You may also find out a bit about the community backing it through links and such.

Toy with the language

I might use the language to automate some task for myself, solve a few projecteuler problems to see how it matches up against others I've used. Point being that these projects are fairly well sandboxed and there will be no impact if I end up not liking the language for whatever reason and ditching it.

If I end up liking the language...

Study the spec

There's nothing like a whole whack of dry reading to really understand how a language works. For example, reading ECMA-262 will give you a deeper understanding of Javascript than 99% of the books out there. Note: This isn't intended to give you much insight into the usage, only the details of the language itself.

Scour the interweb for talks by those smarter than me

For instance, Google University's public lectures are pretty awesome (although there aren't a whole bunch there) for language-specific talks.

Take a look through OS projects

Not getting involved with them, but even browsing Github source. This gives you insight into how other people are using the language by checking out how others solve specific use cases.

Implementing a full project

I may have already started on a full blown project before this point using the new language, but chances are that I will end up spending some time refactoring based on new learnings. By this point, I should be fairly familiar with the language and various techniques to solve given problems.

share|improve this answer
I've never been able to read even snippets of official specs. To me they just talk in a way to abstract language – TheLQ Sep 26 '11 at 16:01
If you spend the time to understand them, they're absolutely invaluable. – Demian Brecht Sep 26 '11 at 17:46

My experience has varied wildly depending on the language involved. There are several issues I try to deal with, in the following order:

  • Frame - I spend some time reading about high-level programming concepts and history of the language, to develop a frame to fit it in. It helps to know that the language is a C level language, inspired by Lisp, with a healthy dose of Erlang inspiration too, for example. I can get a rough idea of what to expect, based on what I know about the other languages it is related and/or compared to.

  • Programming concepts - some languages force me to understand programming concepts I many not be familiar with, before I can use them. I try to read up on these and get a good understanding for them before trying anything major in the language.

  • Syntax - the ability to read the code and understand what it does is paramount. I spend significant amounts of time reading example code, preferably as part of a complex project (open source projects are ideal), to get to the point where I am comfortable being able to parse the syntax properly

  • Common patterns and idioms - each language tends to come with preferred environments, and with a surrounding culture, which includes shared patterns between the programmers, and common idiomatic ways to solve problems. For very popular languages, there may be multiple mixes/silos of these, and I'll pick one and stick to it until I fully grok it.

  • Standard libraries and development environments - I spend some ground-work learning the ins and outs of the STL and dev environments the language is typically used with. These may be standard, and comparable to what you might find in any mainstream language, or highly specialized and/or incomplete.

All of this I do in parallel with what you're already doing - carving out bite sized chunks, and trying my hand and programming them.

share|improve this answer

My steps are (in that order):

  1. listen to some podcasts about it. That's how I usually get interested in a language in the first place, and also get a good first overview, especially about pros and cons of the language.
  2. look at some hello world program, e.g. at or
  3. read a small tutorial about the language
  4. get a cheat sheet and start with my own small programs. Those are picked from the domain the language is supposed to be very good for.
  5. if I'm still enthusiastic about the language, I search through amazon-reviews to find the best book there is on the language and read it.
  6. then I either move on or use the language productively. If the latter is the case, I solve problems and questions by searching through blogs and stackexchange sites.
share|improve this answer

You learn a language because you're interested in it?! My method is to be assigned a fix or enhancment to something that was written in that language, and jump in and try to understand what is going on. Ask other co-workers who know the language, query google, and ask questions here when I get stuck. I eventually convince my team lead that some formal training might be useful. Eventually I may be considered one of the experts in our team, even though I know I am not, so I keep trying to learn more, to keep up the facade and to reduce the code that I hate when I have to return to it myself.

share|improve this answer
+1 having a problem to solve in a given language is the best way to learn it. – mouviciel Sep 20 '11 at 8:14

What you really need to know is what the people who are very good at it say they don't like about it. For example, ask Herb Sutter what he hates about C++. That's the most informative.

share|improve this answer
That's not going to teach him the language. It will give him insight once he knows the language. – Oded Sep 19 '11 at 20:33

What I do is, initially I figure out why exactly I want to learn this new language. There has to be something intriguing about it: be it adding to your current development stack, a whole new frontier (i.e. embedded development for a desktop develer), or just something you find interesting.

Then I find a book. A good book that is not your hey-this-is-your-first-time-writing-Hello-World-book. You already know how to program. You will soon numb your mind because that is not very exciting.

Get a good book and read it cover to cover. I know a lot of people will probably downvote that comment, but it works for me. I read a good programming book like any other book. Then I have familiar knowledge of it. The next step for me is a mixture of roughing through the initial implementation of the language and immersing myself in some form of community geared around this language/framework/technology. That'll give you a great idea of what people are doing with it, what the common errors are (let's be honest, there's a book of common errors in each language), so on and so forth.

If you are really enjoying it by this point and stick with it with passion then it'll come easy. Before you know it you'll be proficient in the new language.

Most developers are self-taught. So just think of this as...teaching yourself.

Good luck!

share|improve this answer

I have worked in a couple dozen languages over the years. Here's my approach:

  1. Spend a few hours on the sofa with a good book: one recommended by the experts in that language. I don't try to memorize the small points. I'm trying to understand the key ideas behind the language, the key features of the language, and the standard programming style. I think that to use a new language effectively, it is important to have some understanding of the whole language.

  2. Get to work. Initially I frequently have to go back to the documentation. Then not so much.

  3. Keep reading. This is key to your market value. In interviews I always ask "What have you read recently that changed the way you work?" It's not good when a candidate mentions something he read for a class five years ago.

share|improve this answer

My typical sequence is following:

  1. Take a look at the examples, code snippets, or whatever else I can find written in that language.

  2. Identify its class, find out what other languages influence can be traced in that one.

  3. Write a couple of simple code snippets, see how they work.

  4. Skim through a specification (if one is available). If not - read more code examples.

  5. Implement a compiler or an interpreter for a reasonable subset of a language (of course without doing any boring, mundane stuff like implementing a standard library).

share|improve this answer

When I learn a new language, I try to solve some toy problems as soon as possible (e.g. from ). This helps me to see if I really understood the things I thought I understood.

share|improve this answer

I recently learned both Objective-C and Scala in a span of a few weeks. All I can offer is just do it. Spend a day or so reading through the basic concepts, then get to work on your project (or well, I had the luck that I had to learn it for Real Software), tuning your speed for understanding and learning stuff. The internet is your friend - when you come across something you don't know yet, look it up and read it through.

Works for me, at least.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.