22

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?

2
  • are you asking because hiring processes look for keywords on resumes? Oct 28, 2010 at 18:15
  • @0A0D no actually, it was for personal interest. Im a programmer also :) Nov 11, 2010 at 9:00

16 Answers 16

43

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
12
  • 17
    What language rules them all?
    – Tester101
    Oct 28, 2010 at 16:25
  • 4
    Assembly rules them all. Which its why it's listed last. Saved the best for last.
    – WernerCD
    Oct 28, 2010 at 17:31
  • 9
    Tester101: English? ;o) Oct 28, 2010 at 18:02
  • 6
    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, 2010 at 6:25
  • 4
    ... and in the darkness, bind them!
    – tchrist
    Nov 20, 2010 at 0:48
53

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.

11
  • 23
    +1 "A language that doesn't affect the way you think about programming, is not worth knowing" -Alan Perlis
    – Inaimathi
    Oct 28, 2010 at 12:52
  • 20
    @Inaimathi: Unless knowing it helps pay the bills.
    – Kramii
    Oct 28, 2010 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"! Oct 28, 2010 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. Oct 28, 2010 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, 2010 at 19:08
22

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).

5
  • 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 :) Oct 28, 2010 at 9:29
  • 2
    karma for ability to learn fast Oct 28, 2010 at 10:24
  • Besides a scripting language, sometimes knowing a shell scripting language can be a big help also. Certain common chores on the system are easier to solve in a shell language than even in a scripting language like Python. Oct 28, 2010 at 14:29
  • knowing C# is different than being an expert in that language Oct 28, 2010 at 18:25
  • 1
    Pascal is hardly an obsolete language; there's a ton of stuff being developed in Delphi these days. Oct 28, 2010 at 22:55
8

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.

2
  • Thanks! I know a bit of here and there but I realised I can't really master one language completely. There is always new things going on.. :/ Oct 28, 2010 at 9:21
  • 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, 2010 at 13:58
8

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.

7

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

2
  • yea, I recently pick up C# essential which is a very good book to read and found out a lot of things that I have never really know how to make full use of it. The other book C# in depth I heard is recommended too. There is so many to learn... that is why I started this post about having to concentrate some languages. Oct 28, 2010 at 9:49
  • prioritize according to your purpose. want to maker you job easier? you are happy with where you are and what you do ? go for clean code. if you want to work in another company that uses another technology, learn that. in you want to change technology just for diversity, go for that. chose your goal and act accordingly
    – Belun
    Oct 28, 2010 at 9:57
6

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

6

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.

3
  • 1
    or !Xóõ: en.wikipedia.org/wiki/Taa_language (the African "click" language). Oct 28, 2010 at 20:28
  • hehe, after you mention about Finnish or Navajo. I think I will go for Japanese language for my fourth instead... enough of programming... Oct 29, 2010 at 0:53
  • 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, 2010 at 1:35
5

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.

1
  • After a point, you can also spend some time using concepts learned in one language in another. For instance, after learning functional programming by using Haskell, you might try seeing what functional programming concepts you could use in C#. You wouldn't want to write an entire function program in C#, but sections of it might make more sense that way.
    – KeithB
    Oct 28, 2010 at 14:02
3

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.

2

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.

1

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.

1

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.

0
0

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.

0

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.

0

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.

4
  • I would appreciate a comment on why you, anonymous critic, voted this answer down.
    – philosodad
    Feb 27, 2011 at 17:58
  • english language don't teach you idea, it's only a way to express idea.
    – sagarmatha
    Apr 7, 2011 at 15:47
  • @sagarmatha: Even if this were true, which it isn't, there's nothing 'only' about being able to express yourself in the default communication language of the field. If you improved your English, you would be able to express yourself clearly to English speakers and, more importantly, read and comprehend English much faster. As Matias points out, programming books and technical articles tend to come out in English first, and sometimes in English only.
    – philosodad
    Apr 7, 2011 at 17:07
  • I don't get why you were downvoted, but I would agree with you that knowing English is as important as knowing a main programming language. @sagarmatha: You just contradicted yourself. If ideas are expressed in English, then surely knowing the English language will enable you to learn these new ideas. How well you learn and apply it will depend on your ability to understand English plus programming skills.
    – chiurox
    Apr 8, 2011 at 1:52

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