Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 252
Icode4food Avatar asked Aug 04 '10 13:08

Icode4food


People also ask

How do experienced programmers learn a new language?

Expert programmers know programming well, and syntax is not really difficult to learn. They know how to do it in the language(s) they know and just look up syntax to do something in the language they are trying to learn, that's how expert programmers learn new programming language.


2 Answers

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.

like image 98
John D. Cook Avatar answered Nov 15 '22 09:11

John D. Cook


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.

like image 20
Mark Byers Avatar answered Nov 15 '22 08:11

Mark Byers