Icode4food
Icode4food

Reputation: 8704

What is the best way for a programmer to approach learning a new language?

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?

Upvotes: 6

Views: 370

Answers (6)

Christopher Altman
Christopher Altman

Reputation: 4896

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.

Upvotes: 1

John D. Cook
John D. Cook

Reputation: 30089

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.

Upvotes: 3

codymanix
codymanix

Reputation: 29490

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.

Upvotes: 1

Mark Byers
Mark Byers

Reputation: 838696

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.

Upvotes: 3

Kurt
Kurt

Reputation: 4517

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.

Upvotes: 2

Puppy
Puppy

Reputation: 146968

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.

Upvotes: 0

Related Questions