views:

92

answers:

6

I know that this is quite subjective, but is it something that I have struggled with quite a bit. I have even been hesitant to try to learn a new language because of the reason I will outline below. If this gets closed I guess I will just grin and bear it but this is something I would like to have addressed.

When I go to learn a new language it seems that most learning resources are directed at the new programmer. I then end up reading the "verbose" tutorial or something and getting bored. I tend to feel like I am wasting a lot of time with how a variable works, how data types work and other basic things. These are all important things but I can handle technical terminology and don't need things broken down for me like a beginner would.

I also feel like if I just dive into a project, I will learn bad habits and not get all of the benefit out of learning a new language. I will still do thing using the paradigms that I already know and hacking them into working on the new language.

So, my question is: What is the strategy that you have found most helpful to get the most out of a new language? What are some tips that you have learned?

A: 

Implement the language's standard libraries. They are almost always written in what's considered to be best practice for that language, and it'll rapidly get you up to speed in what's good and that language's advanced features.

DeadMG
A shipping standard library implementation may have different goals than the beginner's application code -- for example, performance may be valued over readability and understandability. In addition, the language's standard library may easily be too large for one person to implement completely in a reasonable period for learning.
Andy Thomas-Cramer
+2  A: 

For easy languages I go through one general purpose tutorial, then I start writing some app with it. If I feel I need to use a specific library or technique I do a tutorial for that then code. I learn more by practically solving problems. I did this with ruby.

With a harder language, I might buy a book, and spend 6 months going through that, and reading the mailing list etc, and after that probably try and maintain some open source software in that language before starting an app from scratch. This is what I am doing with Haskell.

Kurt
Here is a good example of a tutorial for PHP framework. Although annoying to go through, it helped understand the pieces of the framework. http://www.symfony-project.org/jobeet/1_4/Doctrine/en/ **I know the question is about languages, but learning frameworks is not much different
Christopher Altman
+2  A: 

There is a tutorial for Python called Dive into Python that addresses exactly the issue you describe - explaining Python specific syntax to people that already know the basics of programming and diving straight into the code rather than having long introductions.

You should look for a similar book for the language you are trying to learn.

Mark Byers
I have read and enjoyed that a lot.
Icode4food
+1  A: 

I read the language spec. There is anything I need to know and nothing superflous. After that I take a example program and begin to modify and extend it until I begin to get familar with the new language. Then I start to write my own programs with it.

codymanix
+2  A: 

Write code. You'll get more out of a book if you have even a tiny bit of experience using the language.

You might start by porting code from another language so you're focused on the syntax of the new language rather than on algorithms. Your first port will probably be too direct, but that's OK. Then after you've learned more about your new language, go back and port your code again, this time using the idioms of the new language.

John D. Cook
+1  A: 

Listen to this podcast:
http://www.se-radio.net/2009/11/episode-148-software-archaeology-with-dave-thomas/

Dave Thomas talks about code reading and archaeology. For example, he takes Ruby developers through the Ruby compiler, by reading the source code, they learn a lot of significant details about the language.

This may not be your first step, but it should be apart of your overall approach to learning.

Christopher Altman