tags:

views:

7106

answers:

19

Guys, I'm good with VB.Net, I don't see why I should officially learn C#, instead I want to learn Java so I can develop for different platforms. What is your advice?

+36  A: 

Learning C# will probably be easier to start with, because you are already familiar with the standard libraries. Java has a completely different set of libraries, and these days a significant portion of the work in learning a language is learning the platform and libraries.

As the languages go, C# and Java are very similar, but have many differences in the details (plus big stuff like LINQ). If you learn C# first, then you can carry over your knowledge of the libraries. Then, learning Java will be mostly learning the libraries, since the language is so similar to C#.

Good luck, and enjoy!

Greg Hewgill
I like the fact that Java forces you to catch or re-throw exceptions. Also, Java has such a great standards-based community. C# is yet far from that goal. I think thats because of Microsoft's goal of "get as many people in, asap" vs. Java's goal of "get programmers to do things the right, standard way". Flame on.
Liao
I hate the fact that Java forces you to catch or re-throw exceptions.
roddik
@Liao: exactly what "standards" are you talking about? Also, I've never heard of java (or any other language for that matter) as being something to get programmers to do things the 'right', 'standard' way. 'Right' and 'standard' are excruciatingly subjective.
Chris Lively
I'm a C# developer, and I also like how Java forces catch/re-throw of exceptions, but I would argue against C# not being close to "standards-based". All it takes is installing stylecop (and adjusting some rules if you like) - if the code passes stylecop, it's conforming to at least one, very readily available, standard.
SnOrfus
+6  A: 

The laguages of C# and java aren't really that different. If you know one, then it takes very little time to learn the other. What takes time, is learning the frameworks like ASP.NET, Spring, Hibernate etc. If you learn java, you might find that learning C# is easy as you already know .NET from VB.NET. My question is: Why choose only one? Why not start out with one and make a plan to start learning the other at a later time?

Erlend
Even then there is NHibernate and Spring.net
Dan
+6  A: 

You can use C# on multiple platforms, too. You'll probably need to provide more information about why you're learning another language.

Kent Boogaart
+4  A: 

I think you should decide it your self, but as you mentioned, you already familiar with .NET so C# for you would be easier to learn.

but you can read various articles about this.

C# From a Java Developer's Perspective

Comparison of Java and C Sharp

A Comparison and Contrast of C# and Java

I hope that this will help you decide :)

As for me, at first I was Delphi programmer, latter C++, then java, and now i'm C# programmer.

Lukas Šalkauskas
Delphi sucks. It almost ruined me.
Liao
Yeah, it ruined me as well (in some areas like OOP).
Lukas Šalkauskas
+14  A: 

On a different note, I firmy believe that if you know VB, you should also know C#. In fact, I claim that you don't know VB really well unless you also know C# because you won't know a lot of things about .NET and why it is the way it is.

Additionally, a lot of resources concerning .NET are written for/in C# and in order to harness these resources, you have to know C#.

I say this as a programmer with a VB background, I come from VB6 and have developed in various VB languages for years, and continue to do so. So this is not meant to demote VB. Actually, I believe that the opposite is true as well: Great C# programmers should also know VB.

So my advise is: learn C#.

Konrad Rudolph
+1 any competent .net programmer should know both.
dotjoe
I wouldn't go so far as to say any competent .net programmer should know both. I would however say that moving from one .net language to another is much simpler than moving to an entirely different technology stack.
Chris Lively
@Chris: that depends on what you understand by “Great C# programmers” (my words). Merely “competent” programmers might not need to know both – but the CLR has some surprises ready for C# programmers which are readily explained by a knowledge of VB.
Konrad Rudolph
@Konrad: I was actually replying to dotjoe's statement which changed the meaning of your statement. (should have prefaced the comment correctly).. That said I would agree that Great .Net Programmers should know at least 2 of the .net languages.
Chris Lively
+9  A: 

There are very few jobs that require both Java and .Net, so from a career point of view learning both is a risky strategy. You would be better off becoming truly expert at one or the other.

When hiring I would just about always choose an expert over a jack of all trades. While I'd expect either Java or .Net devs to be generalists (that is able to work on DB calls, UI, services, web or desktop equally) I wouldn't expect a C# expert to work in Java or vice versa.

5 years .Net (2 of VB.Net and 3 of C#) is worth more than 2 of .Net and 3 of Java. With the latter you'll get either junior .Net or junior Java positions. If I'm hiring a Java developer VB.Net is a nice extra, but it is unlikely to make a difference.

Keith
Not that I disagree that most jobs do not require both, ironically my current job does. I work on multiple projects and some are Java and some are .net. SO being familiar with both in my case, was a help.
jschoen
There are definitely some, but the vast majority are not.
Keith
I'd personally pick a good generalist over an expert. I believe it's more important to be able to learn what's required to get a specific job done then to be an expert in one specialty. My job also requires that I work in Java and C# (and VB .NET/VB6, ASP, Powershell, Python, ....
bruceatk
Disagree: don't generalize about generalists. My experience has been there's a huge difference between "dabblers" who hop between languages, and expert coders who take the requisite time to learn the framework. A good coder is a good coder, can become expert in any language within a few months time and apply a huge amount of experience from one language to another. I've found more often that Java or C# 'lifers' have less perspective and tend to be hindbound to that environment. I think it was Dave Thomas who said learn a language a year -- I agree. Cross-language perspective is healthy.
Dave Sims
@Dave Sims: There's a vast amount if intricacies per language/framework/platform that you can't just pickup in a book and hobby programming in a few months. When I see resumes from people who've got n+1 languages listed, I immediately think "they read a book and think they know the language"
SnOrfus
@DaveSims - I'm not, I'm generalising about hiring practices. It's great for your skills as a developer to learn new languages - I'm a hobbyist in several that I don't use for my job. However most jobs (with a few exceptions that will pay well but be very hard to find) are either C# or Java. The extra perspective might help you be a better developer, but it won't show on your CV. As the hiring manager I want to know that a candidate is an expert in the technologies used by us. Perspective on other languages is a nice to have by comparison.
Keith
A: 

If you want to learn Java then learn Java.

The one catch to beware of moving from .NET to Java is that .NET provides everything you need (despite the many frustrations I have with it) - If you're looking to learn J2EE you'll have to spend considerable time to understand and work out how to use the many third-party tools you'll want for enterprise applications.

Chris B-C
:) you can say exactly same thing like this: if you want to learn C# you tie yourself to MS IDE, MS frameworks, MS application server, etc... where with Java you have freedom of choice.
Slartibartfast
In C# you also have freedom of choice, starting with ide,frameworks, application server :), it's just that MS provides a default set, you don't have to use them or you can use them if appropriate.
Pop Catalin
+4  A: 

Isn't this a good example of the type of question that stackoverflow wants to avoid? See "What kind of questions should I not ask here?" in the faq....

Elidon
A: 

Java, don't fall into MS lock-in. I know there's Mono but it's always out of date and unofficial.

You may want to expand on your argument about MS-lock in and some concrete evidence why it can be bad.
Daniel X Moore
+3  A: 

Read your own question:

...instead I want to learn Java...

Learn java then.

If you're good at VB.net you're already familiar with the .NET framework ( which is the harder part of learning something )

If you want to learn java, do it so. When you are familiar with the language, you'll realize that writing C# is like writing VB with java syntax ( kind of ).

I don't see why I should officially learn C#

Then don't do it.

I think you already have the answer.

OscarRyz
A: 

I believe if you learn Java you may find yourself migrating to C# over VB. I find it easier to switch between Java and C#. If your goal is to program for different platforms then Java is your better choice (unless you chose something like REALbasic which targets Windows, MAC, and Linux).

If you chose Java you might want to look at Eclipse's Rich Client Platform. It is a way of taking advantage of the Eclipse UI tools to make a platform independent application. Here are some examples.

bruceatk
A: 

You should learn Java and C#! why not? once you get used to {} and ; it will be fine.

dotjoe
+1  A: 

If you like Linux/Unix then you should learn Java. If you find it morally agreable to stay with Windows then go for C# because it has stuff Java will get only in 10 years like functional programming aspects,LINQ and much more.

Mikhail
The time when C# was Windows specific is well in the past; Mono now works at least as well on Linux as Java does, and arguably better.
rwallace
C# but not all .NET libraries, For example there is currently no plans to port WPF to Mono, although there is Moonlight as equivalent of Silverlight.
Mikhail
A: 

Don't ask, learn both. And for the functional aspects, learn F# and scala.

ChaosSpeeder
+1  A: 

The real question is whether you want to work as a Windows programmer or a *Nix programmer.

.NET programmers thrive Windows development, whereas Java programmers thrive on Linux/Unix server development.

Jin Kim
A: 

I think you are not going to have to go through a steep learning curve if you choose either. I am not a VB.Net developer, but every now and then I come across VB code on the Internet. The syntax of the C# programming language looks very different than that of VB.Net, so in terms of learning the language itself, both Java and C# would be something new to you. The advantage that C# has over Java is that you will use the .NET framework, so you won't have to spend too much time learning the API.

I would say you should learn Java if you want to develop cross-platform applications and basically learn a different API.

A: 

Whether it's right or wrong there is a stigma that VB developers are not as good as C# developers.

It's a completely unjustified assumption, but the assumption remains.

So because of that, C# developers typically make more money than VB devs.

Is it right? Absolutely not, but it is the way it is.

So if you want to be taken more seriously by people that just don't understand, or want to make more money, then learn C#.

Jack Marchetti
A: 

To become really proficient you need to do a lot of actual programming in your chosen platform. The best way to ensure that you get that done, is to have it required in your daily work. In other words, whatever you choose, ask your employer to have it part of your job.

Just dabbling with tiny programs, does not give you the grey hair between your teeth which comes from having to make your software production ready, as well as fix it when it breaks anyway.

Thorbjørn Ravn Andersen
A: 

I would choose Java... Here's why (don't downvote please, I'm not trying to start a holy war, just pointing my observation)

  • corporate .NET harbors many junior developers (including senior dudes who are junior developers) as well as junior managers
  • consequently, the junior .NET crowd seems to favor predictability over innovation and tends to believe in Elixir of Eternal Youth and the Philosopher's Stone (a joke by Dijkstra)
  • JVM ecosystem seems to lead the innovation in the areas of design, architecture and best-practices (IoC, ORM, EIP just to name a few). Open source .NET community is mostly playing catch-up game, with projects like NAnt, NHibernate, etc. Truth be told, there's a radical cutting edge crowd in .NET too (sometimes known as Alt.NET) but its reach is limited and its projects often die in version 0.2
  • JVM innovation is mostly driven by OSS community (and therefore diverse), while .NET innovation is almost all driven by large players like Microsoft (ASP.NET MVC, C# language enhancements) and Novel (Mono).
  • in terms of language innovation, with JVM you're not limited to Java, there are Groovy, Clojure and Scala; finally, you can even coexist with JRuby. there are alternative languages in .NET too: Boo, IronRuby, Delphi Prism but they are either too niche, lacking community support, or belong to corporations that are likely to drop them at any moment.
  • Java gets better exposure to fresh blood of non-Microsoft developers (from *NIX), while .NET is comprised of predominantly Microsoft-centric crowd (we will see how Mono changes that in the future). Fresh blood brings fresh ideas.
  • Also, according to some popularity indexes (e.g. TIOBE), Java is more popular than C# and VB.NET combined, which means more jobs for you to choose from.

Hope this helps.

zvolkov