views:

1349

answers:

21

I intend to learn/taste a new language every now and then to be able to swim in all kinds of waters. I have fiddled around with Ruby, Python etc and have made some side projects which I did get paid for. Now the question is that what is a good indicator that I know a particular language that I have just learnt. I intend to learn a new language like Haskell in '09 (new year resolution).

Let me know when you stop and say "I learnt a new language!" . What have been your most successful ways of learning a new language at a good pace?

+4  A: 

When I read Source Code of other people and a) understand what is going on and b) have ideas what I would do differently or how I believe this can be improved.

PS: Should be Community Wiki.

Michael Stum
+2  A: 

I would say I've learned a language after I write something non-trivial and practically useful in it.

recursive
+1  A: 

A good measurement is if you can write an application that the programming language is commonly used to solve.In my experience, I picked up C syntax pretty fast, but struggled a bit with pointers and memory management. Now I have completed a course at university where we wrote an os kernel from scratch, including virtual memory,so I feel confident in my C skills.

Egil
+1  A: 

I believe a good measure is when you can look at any source code in that language and understand what is it doing. Of course, this doesn't mean you have to know about every library available for that language.

Another good measure is having a feeling you can implement a compiler/interpreter for that language.

I found it interesting that you said "be able to swim in all kinds of waters". I don't think knowing many languages will improve your skills significantly; learning new paradigms is much more valuable. For example, you may know java, c++ and c# but in the end of the day they are just OO languages with different syntax. Now, learning prolog, lisp, caml, haskell, assembler (for some machine), or even brainfuck, that will give you new perspectives.

João da Silva
What i was trying to say is exactly what you said. Learn new paradigm and techniques that come with new language. I have had to do lots of porting projects, it helps in that sense too.
Perpetualcoder
+4  A: 

When I can read and write in the core language without referring to a book or online manual. I almost have to be to the point where I can think in a language before I claim I know it.

Bill the Lizard
+1  A: 

I am in the middle of porting some code from C# to Java... I've not done Java before and so am forced to. It's suprising after doing .NET/C#, Various C++ Libraries, Mac OS Cocoa Libs / Objective C.... how easy it is to move to a new one.

Tony

Tony Lambert
+21  A: 

Be cautious about being the guy that knows a little about everything and much about nothing. Every language has it's complexities and idiosyncracies.

I don't consider myself fluent in a language until I can accurately review others' code and make recommendations around its finer points.

Pick a language or 2 and master them. Most languages are similar enough that this lends itself to being useful in other languages.

Brian Rudolph
Thanks for pointing that out. My roots are deep in the C# and C++. I am trying to learn new languages as hobby, awareness and learning new paradigms that come with it.
Perpetualcoder
why are you concerned about when you can say "I learnt this language" then?
Greg Dean
It's cool, I'm not going to tell someone what they should and shouldn't learn. It's better than the opposite person who learns one language and leaves it at that, then wonders why they are unemployed in 10 years.
Brian Rudolph
The guy that only knows COBOL, surely would have to disagree with you.
Greg Dean
His day will come :)
Brian Rudolph
I partially disagrees with Brian. Learning a (completely) different language makes you learn new programming paradigms. But you should apply those on one or two base languages you know deeply.
Dykam
+2  A: 

When you start dreaming in the new language, and the dreams still make sense after you wake up.

erickson
I gnever dream...
Tony Lambert
I had a dream that I down voted this, but then realized it was a community wiki.
Greg Dean
Ya, its called a nightly build. And all the unit tests pass with flying colors
Neil N
+1  A: 

I tend to be pretty strict with saying that I have learned a language. I've see a lot of resumes where people list off every single language they have ever used, even if it was just for a 2 week period in University. I personally, don't think I have learned a language until I've been working with it consistently for at least a couple months. I don't believe anybody else can learn a language in much less time either.

Kibbee
A: 

Knowing or having 'learnt' a large number of languages is not really a good goal IMO. I would learn just enough to understand what the +'s and -'s are and when a language is applicable for a certain problem.

Otherwise you'll end up jack of all trades master of none.

Greg Dean
This is by no means certain.... it is quite possible to have worked for 5++ years in each of 3 or 4 languages in a career lasting 20+ years.
Tony Lambert
3 or 4 over 20 years is not a large number.
Greg Dean
+1  A: 

I guess it depends on how you'll use the new language or what you'll need it for.

I consider I have learned a new language when I know advanced topics. Being a software engineer it should be pretty easy (or relatively easy) to understand the syntax and even be able to write good code in any new modern language, which doesn't necessarily mean you'll be ready to write solid applications (then again, if basic and simple apps is all you need then I guess you can conclude you have learned it!.)

For example, I didn't consider myself knowing C# until I understood how to effectively use interfaces, reflection, threading, factories, etc.

Ricardo Villamil
+2  A: 

I decide I've finally learned a language when I feel I understand most of its nuances well enough to look at typical code examples and know what's going on - I don't necessarily require myself to have the library down (indeed, some languages pretty much have to be programmed with a library reference handy), and I don't necessarily measure my ability to code in the language as knowing it, since I will probably never really code a big application in Java, unless that's my job; but if that is my job, I think I could handle it with far less trouble than someone who's never seen the language.

Maybe it's the wrong metric, but I consider myself to 'know' Java (but not, for instance, Python) relatively well, and I could code it if forced to without a language (but with a library) reference.

coppro
+3  A: 

When you can get as much reputation on a tag as Jon Skeet ;)

CheGueVerra
Just go see his profile, you'll get it....
CheGueVerra
Ok might have been when are you a guru or something, but I'm still sticking with it ...
CheGueVerra
+3  A: 

There seems to be little differentiation here between learning a language and being fluent/good in it. Of course, you've learned a language as soon as you can type competently in it without resorting to reading any documentation, just like you've learned multiplication as soon as you've memorized how to multiply two numbers.

However, just like there is a difference between knowing how to multiply and being able to multiply two three-digit numbers in your head, there's a difference between knowing a programming language and being able to program competently in it.

You can learn any programming language in an afternoon, in that you know how the syntax (operators, keywords, etc) works and how to put them together to form coherent statements. Learning how to USE a new language effectively will take quite some more time.

DannySmurf
+10  A: 

Larry O'Brien's 15 Exercises to Know a Programming Language seem smart:

Corbin March
This is an awesome resource. Thanks !!!
Perpetualcoder
+3  A: 

The hardest part of providing an answer to a questions like this lies in the disparity of standards between individuals.

Quite a few of the posters have commented along the lines of being able to work various code bases - irrespective of whose it is and its complexity. While this approach is useful, I consider it better to combine many objective methods in ascertaining one's level of proficiency in a language.

Thus, another approach would be to read a few blogs on interviewers' expectations when interviewing programmers who claim to be knowledgeable. The following by Steve Yegge and Imran (on Tech) should give some indication on the type of things one would need to know about a few languages (C, Java, Ruby) to a certain extent. These, (especially the posts by Steve Yegge) provide some indication as to when one can consider her/himrself to be knowledgeable in a programming language.

  1. Interviewing Ruby Programmers - by Steve Yegge

  2. The age of the Racecar driver - by Steve Yegge

  3. Tech CVs, the lies, the lies

  4. A Long Road

Dinuk
Thanks for the interesting links!
Perpetualcoder
+5  A: 

I think the measures about knowing what's in the manual apply only if you spend time using the language every day, or if it's the only language you use, or if you've written a lot of code. For me what's important is have you learned how to think in the language? This outcome is hard to measure; read Paul Graham's essay on Beating The Averages. Do you think in Blub? For the old people on the forum, can you write FORTRAN in any language? A good proxy for measing whether you can thinkin the language is do you understand what the best programmers are writing? Does it seem natural?

Ray Bradbury once advised aspiring writers of fiction to write 1000 words a day six days a week, and after they've written a million words they might start to know something about their craft. This is good advice. And operationally, I find something similar works for programming languages. Across a half dozen languages that I currently know well or once knew well, it's been pretty consistent for me that

  • After writing 100 lines I am continually looking things up in the manual and don't really know what I am doing.
  • After writing 1,000 lines I use the manual occasionally and am starting to learn how to think in the language.
  • After writing 10,000 lines I am about as good as I'm going to get without making special efforts.
  • After writing 25,000 lines I probably will not need the manual again.

It's also true that

  • To learn to write 100 lines I had to read 100 to 1,000 lines that someone else wrote.
  • For the first 1,000 lines I write it is good for me to read 2,000 lines someone else wrote. For the next 1,000 lines it is good for me to read 1,000 lines someone else wrote.
  • After I've written 5,000 lines I learn the most by reading code written by world experts or by people who designed the language and understand what is there. I no longer have much to learn by reading just any program.

On the other hand, I have less consistent experience over when I stop needing the manual. It's particularly difficult for me when two languages are very similar; I will never stop needing the ksh manual to tell me what is different from sh or bash, and I will never stop needing the Haskell manual to tell me what is different from Standard ML (though the need grows less with each additional 1,000 lines of Haskell that I write). I also find it interesting that while I have written over 35,000 lines of Lua code, and I will never need the manual again for a language question, I have to look up libraries and API functions almost every time I write something longer than 500 lines. (I've written a lot of short Lua programs and a couple of long ones.)

Norman Ramsey
+1  A: 

When you've written a compiler/interpreter for the language, in that same language.

Apocalisp
A: 

I say it when I'm able to implement a closure in it and an algebraic datatype.

Frank Krueger
A: 

I assume you mean "when I'm good enough at certain language". My criteria are:

  • write a complex application in it (online shop, text-adventure game...)
  • read and write code fluently (without looking into manual every minute)
  • be able to read and modify other people's code
  • be able to implement abstract data structures

Bonus: * get paid for coding in this language

Lukas Stejskal
A: 

A lesson I learned when I was teaching and taking tutorials: stay (at least) one step ahead of your class.

Whether you say something (and how you say it) is determined by your audience. You might be a Perl guru, but if you're chatting to Larry Wall, then you'll react differently to if you're talking to your Dad.

But for new languages there are normally "ah-hah" moments, when you realise why they're different (or how they're similar) and why you might choose them over other options. That's normally my moment.

Unsliced