views:

214

answers:

5

Possible Duplicates:
Fast technology to learn
How to learn programming related topics faster?

What is the fastest way to learn a new programming Language? I've heard of a few programmers that know 5-6 programming languages fluently, how do they do that? Just looking for tips and tricks really? Any advice?

Thanks in advance;-)

+4  A: 

Hmm programming. Set yourself a personal project and get into it, there's no better way. You won't learn how to ride a bike just by reading a book.

Also, you have the biggest compendium of information of them all, the Internet.

Ben
Especially not one of those "Learn how to ride a bike in 10 days" books.
Earlz
Sheldon Cooper has learnt swimming with practice on the floor only ;-)
zerkms
+4  A: 

For me, the fastest way is to, first, skim the reference manual cover to cover, then dive into actual programming problems (getting experts of the language to critique my performance in the latter part is a precious boost in learning speed and efficiency, if I can get that;-). I often find tutorials and books of tips and tricks too slow-going, though there are exceptions.

On the other hand, I did get my early experience in an environment where reference manuals were basically all you had to go on, so I guess I'm used to "skipping the legalese" (though excessive legalese can still swamp me -- e.g., official standards tend to have much more than reference manuals, to the point that learning from them is like wading in molasses;-).

Also possibly a generational thing, I've found that having the manual on paper and in a situation where I can use highlighters and take notes on the margin is a serious productivity enhancer for this task (again: I grew up in an environment where books were on paper, though that may matter... though if you had the book checked out from a library of course you wouldn't be allowed to highlight and write notes on it;-).

Some people love getting lectures and labs to support learning; me, I find they're more often than not incredibly slow and boring (again, with some exceptions for really gifted teachers).

But I know that's just me -- I've been on the teaching side of things often enough to know that a vast majority of people prefers other approaches (slow friendly tutorials, lectures with a lot of repetition, and the like).

One more bit: "fake" problems -- ones where I don't have to worry about analysis or discovering novel algorithms -- work better for me than "real" problems since they allow me to focus all my energy into "how do I apply this languages' specific strengths and quirks to implementing this well-known or obvious algorithm". But I've seen people's mileage vary on that, too: some just can't get motivated to do their best unless the problem itself is interesting and challenging, not just the part about making the solution work in language X.

So teaching in a way that's optimal for all your students, even in a small-ish class, is nearly impossible -- inevitably you'll bore to death some of the top ones and yet be going far too fast for some of the slowest... best you can do is try to meet the needs of the vast majority in the middle, I think.

Alex Martelli
+1  A: 

Fastest way:

  • Read other peoples code
  • Write your own code
  • Analyze lots of code
  • Change lots of code
  • Ask questions on www.stackoverflow.com

Bonus:

  • Talk in code
  • Sing in code
  • Grow a beard
Secko
Growing a beard only gives you a Charisma boost against C, Unix, and Perl monsters.
Earlz
ROFL, +1 for the beard :D
mingos
@Earlz It also saves you a lot of time, by giving you more time to code. :)
Secko
A: 

I think that obviously practicing is the best way, I also think that a good book can be vital in learning a new language/idiom.

I already knew c# but reading MVC pro was great in learning that specific technology which I didnt now about (didn't now any asp before).

I think books are specially important when changing paradigms, like knowing an imperative language such as c# and trying to learn F#, Prolog, or Lua: you'd be there with a WTF face without a book or something [stackoverflow] explaining that snippet of code you found.

So I would say get a GOOD (no learn in 10 days) book, one that also has tutorials, and follow them. Once you start to feel comfortable, then try to do a little project of your own.

Francisco Noriega
A: 

Knowing a language "fluently" is overrated, IMO. You need to know how to think like a programmer and writing code in any language becomes as easy as checking the correct syntax and finding the function names:

printf("Hello world!\n"); /* C */
cout<<"Hello world!"<<endl; // C++
Console.WriteLine("Hello world!"); // C#
Console.WriteLine("Hello world!") ' Visual Basic [shudders]
System.out.println("Hello world!\n"); // Java
print "Hello World\n"; // PHP, also Perl
document.write('<p>Hello world!</p>'); // JavaScript outputting HTML
echo Hello world! # bash script

These all do the same thing, only the syntax and/or function names change.

mingos
I agree with you till a certain point, I think that yeah, you get fluent once you start practicing since you know its the same thing... but I think that the important part ("thinking like a programmer") is actually about thinking in the paradigm of the language. As I said in my answer, its really, really hard to start programming in a language such as prolog where there are no IF/WHILE/FOR, when you come from a structured/traditional language (c/java family). Once you get the different paradigms in your mind, then knowing all languages of that family is just checking the reference/syntax :P
Francisco Noriega
Your example is flawed. You are missing declarative and functional paradigms.
Earlz
@bangoker: sure, when you know C, that doesn't mean that you'll learn the assembly language easily, but let's face it: most (higher) languages DO have conditional statements, loops and such :D. Although I was surprised to learn there's no switch-case in Python :). But hey, I know only a few languages, not ALL of them :D @Earlz: you can expand the example, that was just a quickie of what I'd write in the languages I had or still have contact with. These all send text to stdout and regardless of what language you use, there's always a way of doing that, you just have to check it.
mingos
@mingos, yeah, i know not many are like prolog with no conditional statements, but still, there a few that are really really weird, IF you are used to imperative C style languages, like LUA which besides being dynamic considers everything a table, or LISP which is just...weird :P
Francisco Noriega
@bangoker, I wrote a field of view algorithm once. I did it in C. Then I made a C++ version (these are the two languages I'm somewhat versed in), and recently, just for fun, I translated it to C#, PHP (object-oriented) and Java. I don't even know these three languages! I translated the code, along with a working demo, with a beginner's manual in hand, looking up function names and things like "how to initialise an array of custom objects in Java". So, the principle (often) applies. But OK, I'm willing to accept the fact that there are exceptions to it :).
mingos