Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

For me I am C# and Java person. I find these 2 languages are quite similar so its easier for me to crossover each other. I'm not sure if its good idea to pick up other different languages. Any thoughts?

share|improve this question

closed as not constructive by Aaronaught, Walter, Mark Trapp Jul 6 '11 at 1:04

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

16 Answers 16

up vote 38 down vote accepted

I can think of at least five reasons to learn a language, and it seems like you should eventually learn one for each of these.

  1. One language to get your first job - likely Java/C#/C++
  2. One language to get things done - likely Bash/Perl/Python/Ruby
  3. One language to bend your mind - likely Haskell/Clojure/Scala/F#
  4. One language for domain specific reasons - likely JavaScript/Objective C
  5. One language to get your hands dirty - likely C/Assembly
share|improve this answer
14  
What language rules them all? –  Tester101 Oct 28 '10 at 16:25
4  
Assembly rules them all. Which its why it's listed last. Saved the best for last. –  WernerCD Oct 28 '10 at 17:31
9  
Tester101: English? ;o) –  John Fisher Oct 28 '10 at 18:02
5  
Of course, it should be no surprise that the language to get your first job is not the language you use to get things done. –  Roger Pate Oct 29 '10 at 6:25
4  
... and in the darkness, bind them! –  tchrist Nov 20 '10 at 0:48

A programmer needs to know three languages: C, English, and Something Else.

C is very much a core language, it's close to the machine and has syntax rules that are common to several high level languages. C forces you to think about things like data structures in a very different way than Java. Also, the Python and Ruby vms are both built in C, and you can inline C into both languages when you want to boost your speed.

English is the common language of programming. Most books, technical reports, technical websites, and journal papers come out in English first, and sometimes English exclusively. Furthermore, if English isn't your first language, learning English will expand your toolkit for manipulating concepts (this goes for English speakers learning some other language as well, of course).

The Something Else should be a language that isn't procedural, or isn't statically typed, or is strongly object oriented, or in some way is just fundamentally different from C. Haskell, Scala, Python, Ruby, some Lisp dialect, whatever.

After that, you can learn whatever your specific situation calls for, likely C# or Java.

share|improve this answer

This could become another specialist vs generalist debate in a sense. Some people may spend a long time knowing one language to great depths which works fine for them. Other people may like to know a little about a bunch of different languages which works fine for them. Most people are between these two extremes.

If you want suggestions of languages to explore here are a few ideas:

  1. Functional programming - Haskell or Lisp would be examples here and the paradigm shift can be a bit of a head turner to some extent.

  2. Database specific - PL/SQL or T-SQL come to mind as something that may be useful if you want to do more back-end work with systems that require a database for some of its functionality.

  3. UI web languages - ActionScript or Javascript would be examples here of languages used in Rich Internet Applications, though AIR can make some desktop applications use web calls in some cases like Twhirl using the Twitter API.

These are just ideas and depending on where you want to be these may be useful or useless to you. Good luck with whatever choices you make.

share|improve this answer

well first of all there are a number of languages that are very hard to avoid for most programmers: javascript, sql, c, etc. so you might as well get acquianted with them, they aren't going away.

it is also a good idea to know a duck-typed scripting language...e.g. one of perl, python, ruby, lua etc. these are incredibly useful for a huge array of problems including automating much of your own daily drudgery

for better or for worse you will also likely run into c# and/or java at some point too, they're quite pervasive.

in any case, don't limit yourself artificially. those coders i know who explicitly avoid picking up interesting tools seem to have cloistered worldviews and limited impact.

share|improve this answer

Popular programming languages like C# and Java will keep you gainfully employed most places, but neither are different enough from each other to learn new ways of solving problems. I think there are some languages that you eat with (the ones you use to do your job), and others that you play with. Both have their purposes.

I've found that by learning new programming languages, I've also learned new and more elegant ways to solve problems. It's not about the number of languages, or how often you pick them up. Each programming language worth learning has a unique point of view, which forces you to approach your problems with a new mindset. Many times the value comes from learning that mindset.

I've played with Smalltalk, and I loved it. The language was just a pleasure to develop with. Once you got used to the idioms, they helped you be more expressive with your code. I didn't miss the static typing you have in Java/C++/C# at all. The generics we live with in our statically typed languages are really constructs to work around the limitations static typing imposes.

I use Ruby and Ruby on Rails regularly, although not for paying jobs right now. Ruby's designing principle was "increasing programmer happiness". You gotta love that sentiment, and for the most part I think it delivers.

Eventually Java will go the way of lisp and Smalltalk, and C# will follow suit. What will be there to take their place remains to be seen. At the end of the day, if you know how to solve problems, and you have a number of ways to slice and dice the problem, you will be able to find a job and pick up whatever language you need for it.

share|improve this answer

Languages are tools to get work done. Some languages are good for some types of problems, others are generally good at all sorts of problem solving. I recommend learning new languages as they come out. Don't get obsessed with what is fashionable this month, but learn what they can do, what they are good at. My advice is 1 new language per year. They come out faster than that, but you are looking to put new tools in your toolbox, not be the fashionable new kid on the block.

One essay that talks about the differences in languages is Paul Graham's "Beating the Averages." I recommend reading it, but one important part is here (he uses "Blub" as a hypothetical language so that you don't go arguing about what your favorite langage can do):

Or how about Perl 4? Between Perl 4 and Perl 5, lexical closures got added to the language. Most Perl hackers would agree that Perl 5 is more powerful than Perl 4. But once you've admitted that, you've admitted that one high level language can be more powerful than another. And it follows inexorably that, except in special cases, you ought to use the most powerful you can get.

This idea is rarely followed to its conclusion, though. After a certain age, programmers rarely switch languages voluntarily. Whatever language people happen to be used to, they tend to consider just good enough.

{snip}

As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.

When we switch to the point of view of a programmer using any of the languages higher up the power continuum, however, we find that he in turn looks down upon Blub. How can you get anything done in Blub? It doesn't even have y.

By induction, the only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one. (This is probably what Eric Raymond meant about Lisp making you a better programmer.) You can't trust the opinions of the others, because of the Blub paradox: they're satisfied with whatever language they happen to use, because it dictates the way they think about programs.

http://www.paulgraham.com/avg.html

Most of the applications we ship are written in C# or VB. When we needed to add scripting to an application, we chose Python (Lua was the runner-up choice). We're learning F# because that can do some hairy new things that are hard to explain and understand if all one knows is C#/Java/VB.

share|improve this answer

When it comes to keeping skills up to date, and flexible, I think you should try to learn at least one completely new programming language every 6 months or so. And I mean a language that is very, very different.

So while learning more of the .net framework while using C# or the Java frameworks helps in keeping limber, learning Haskell, Smalltalk, Scala, Clojure or Ruby will expand your technique and help you think in different ways, some of which you may take usefully back to your main language, and some of which may help you move on if Java ceases to be king of the hill.

If you've never learned C, then although it's syntax has been brought to Java, the mindset can be quite different. It is worth knowing it, in depth, and even better, understanding how OO code can be written in this language which seems only procedural.

I recommend reading Bruce Tate's book "Beyond Java", which highlights only too well the dangers of being only on one language, noting the rise and fall of C++. Although C++ is far from dead yet and has decades left, it is becoming restricted more and more to use only in situations that cannot benefit from productivity gains in other languages. To contrast, Sinatra, a ruby framework, allows you to build a simple web service in about 6/7 lines of code, the C++ equivalent may be an order of magnitude larger than this.

share|improve this answer

As many as is needed to do your job.

But C# and Java are as close as UK English and US English. You might learn something new by going for Finnish or Navajo.

share|improve this answer
1  
or !Xóõ: en.wikipedia.org/wiki/Taa_language (the African "click" language). –  Jared Updike Oct 28 '10 at 20:28
1  
@Jared, I think that a language REQUIRING cut-and-paste just to say its name, may encourage undesirable habits from the start... –  user1249 Oct 29 '10 at 1:35

A programmer need to concantrate on programming not on a spesific language/s.

share|improve this answer

When you're not a native English speaker, at least you must concentrate in improving your English. I'm saying that based on my experience. Understanding that language helped me a lot.

All good materials(books, articles, code, etc.) for learning programming languages, technologies and new concepts are written in English.

share|improve this answer

You should concentrate on the languages you need and use for what you're doing. Really learning a language comes from practice, so you get the benefit of that language when you're practicing it. If you are going to learn a new language in your spare time, then do it by implementing it in tasks of increasing complexity, so that you really get a handle on it.

share|improve this answer

I'd say the most important thing is the ability to learn fast. That said it's important to know different languages that are used for different purposes. For example I know:

1) Python and Perl for the scripting languages category

2) C++ as "framework" language

3) Java for mobile application

4) C for the huge amount of legacy code

5) Some obsolete languages I used to know when I was young (Basic, Pascal, Clipper etc)

I'd say that you need at least a main language and a scripting one. Knowing C# I'd say you need to learn Python or Perl or Ruby next. (I'd go with Python but that's just a matter of preference).

share|improve this answer
1  
i also agree with you one that. A programmer who know a language must at least need to learn one of the scripting language to work with it. I feel that is very important + useful when you want to do some testings. especially games development..etc. i guess i will pick up python as my additional language :) –  Digital Dude Oct 28 '10 at 9:29
2  
karma for ability to learn fast –  Ayush Goyal Oct 28 '10 at 10:24
1  
Pascal is hardly an obsolete language; there's a ton of stuff being developed in Delphi these days. –  Mason Wheeler Oct 28 '10 at 22:55

I don't think you can necessarily master a language without having enough understanding of other languages to see that language "from the outside" as it were. Each different language brings something else to the table and the concepts they bring are things you can take back to the main languages you work with.

So time spent learning to use other languages is never wasted even if you are not planning to use them commercially.

The old adage is to learn a language every year and I'd certainly say for the first ten years or so you need to do that. Maybe beyond that you could choose between exploring some of the ones you already know in more depth ( perhaps updating your knowledge of ones you learned a few years back ) or working with particular libraries rather than just accumulating new languages endlessly, but keeping an eye on exploring the practice of programming through working with different languages is certainly an aid to your development as a programmer.

share|improve this answer

concentrate on none. focus on learning and writing clean code; clear, expressive, simple and, most important, not duplicated.

go for the principles of that type of programming, the basics (for example, encapsulation for OOP; what is means and what it implies) and learn some principles

this stuff will make your job easier. this will even make it easier for the people that work with your or after you.

ya, you have to know the syntax pretty well, too. but that not something what takes your focus a long time

and ya, you must understand pretty well the technologies you use, too. but those can be prioritized according to the level of complexity your business requires.

the last two are not of a main focus, but of some focus

share|improve this answer

It's not about how many languages you learn. It's about learning new concepts. Some languages might be able to teach you many concepts, while others might be able to teach only one.

If you know C#, you probably wouldn't learn anything terribly new by learning Java. But you would if you learned Haskell.

So when you pick a new language to learn, pick something that will teach you concepts you don't already know.

share|improve this answer
21  
+1 "A language that doesn't affect the way you think about programming, is not worth knowing" -Alan Perlis –  Inaimathi Oct 28 '10 at 12:52
16  
@Inaimathi: Unless knowing it helps pay the bills. –  Kramii Oct 28 '10 at 14:18
5  
Just a note: I suggested Haskell for no reason other than it's radically different to C#. The asbestos-wearing trickster in me wanted to say "learn Smalltalk so you can learn OO"! –  Frank Shearar Oct 28 '10 at 14:33
10  
@Digital Dude: the fact that it's hard is kind of the point. That pain behind your forehead is NOT a bad thing - it's a sign that your brain is growing. If you just want to keep learning the Same Thing over and over, learn Java, then C#, then Ruby, then C++ (woooh, no garbage collector - scary!), then C (no classes - scary-scary!), then maybe get really crazy and try Objective-C! (Ooooh - two days ago I couldn't spell Mac and now I can program one!) My point - if you want to learn something NEW you have to do something DIFFERENT. Following the same road just gets you to the same place. –  Bob Jarvis Oct 28 '10 at 16:40
4  
@Kramii @Inaimathi Aha, but a language that helps you pay the bills affects the way you think about programming –  slf Oct 28 '10 at 19:08

It is good to learn one new programming language each year. But rather than learning something similar to what you already know, I will advise you to learn something radically different like Scala or F#. It will show you new ways to do things and eventually enrich your programming skills.

share|improve this answer
2  
@Digital You don't need to master every language. You should be familiar with the concepts, so that if an problem comes along that would be best served by a language, you can make that decision. It may also expose you to concepts that you can use in your main languages. –  KeithB Oct 28 '10 at 13:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.