views:

1121

answers:

12

Java and .NET seem to have a great number of parallels especially in the web application area. Both languages have many of the same technologies especially in terms of open source libraries (JUnit and NUnit, Hibernate and NHibernate) but there are also plenty of differences and different approaches to solving certain software development problems.

As a Java developer I get the feeling I'm missing out on learning about web application development from the .NET point of view and I could learn a lot about the general principles by learning two languages rather than getting stuck in the details of Java and not seeing the bigger picture.

So the first question is, do you agree? Does learning two separate but similar languages such as Java and .NET make you a better programmer?

Secondly, I'm worried that if I choose to take, for example, a MCPD ASP.NET 3.5 certification it won't actually help me get work doing .NET development because it goes against all my existing experience. Is trying to broaden your skills a good career choice or is it a better decision to choose one technology and stick with that?

+6  A: 

Learning any new language (or anything new) makes you a better programmer. It might not be the best use of your time, but if you enjoy it, why not go ahead.

Sticking with learning one technology is almost always the wrong decision - by the very nature of our business there is always new technology. The day you stop learning is the day you stop being a good programmer.

Nick Fortescue
A: 

In my experience the number of projects which are using both Java and .net, where you actively need to code both yourself, is tiny.

So depending on your role it might be better to focus on one, (probably Java), and become an expert in it.
This would apply if you are a developer.

If you are moving towards architecture and designing systems it's probably worthwhile being an expert in one, and familiar with the other.

from what you've said you're more a developer, so I'd get certified in Java. (or related languages/products).

Bravax
+1  A: 

I work in both Java and .NET and have found that learning one helps with the other. Not least because there is a lot of cross-pollination (polite term), so what's new and interesting on one platform inevitably makes its way to the other. This gives you a competitive advantage over single-platform developers.

So learning Struts meant ASP .NET MVC wasnt a big shock. Whilst knowing ASP .NET web controls helped me make sense of Java ServerFaces.

IMHO the high level libraries in .NET (ASP,ADO, Web Services ...) are much better than in Java. But the Java low level libraries (I/O, Networking, Cryptography ...) are much better and pattern rich.

Garth Gilmour
+12  A: 

Because .Net and Java are so similar I think it would be more useful to learn Python or Ruby than to learn .Net

I'm a .Net developer, I've tried out Java and Python (and Haskel recently) and I learned more from trying out Python than Java.

Mendelt
I can't weigh in on this, but I'm a Java programmer who knows some .NET. I think one should only pick up the opposite if one needs to use it at work. Personally, I'm about to learn Python.
R. Bemrose
A: 

This has been discussed many many times already here.

The usual answer is the more skills under your belt, the better developer you are going to be, the better developer you are, the better jobs you'll get.

There may be places where a having too broad a skill set be a liability, but:

  1. Knowing two platforms isn't too broad a skillset
  2. I wouldn't want to work in those places, don't know about you :)
Vinko Vrsalovic
+1  A: 

Actually speaking don't do that!! Instead spend your efforts learning a new programing paradigm, like declarative languages or functional languages, try to understand how languages work, developing a new template using ANTLR is not bad at all. If you already know american english why bother about British english? Spanish or Japanese would be more amusing. I hope I sounded sane.

questzen
+3  A: 

Java and .Net are not Similar... Java and C# Are Similar...

to say Java and .net are similar is like saying that Pascal and C are similar in that they both get compiled down to assembly code.

I learned C# from Java for work, it's fun, in some ways it's better than Java and in some ways it's not as good. If you want something that will be relatively easy to pick up after Java then C# is for you. similar syntax and a lot less verbose. I think that C# is one of the best things microsoft have come up with in the past 10 years.

Some jobs will actually require you use both (Mine does) the context switch can be a bit disconcerting as some features are missing from both (My gripe with C#/.Net is there is no native Set collection).

If you want to and there is a good business case for it go for it. But as you already know Java you might want to try something that's a little different, unless the java Job market is drying up You'll still be able to get Java jobs and knowing something like python might be better for your career.

Omar Kooheji
+2  A: 

Well because of the similarities between .NET and Java you could probably teach yourself .NET at home with a few tutorials off the web and a cheap book in about a fortnight.

It's a tiny investment that can double the number of job offers that land in your inbox instantly so I say do it.

As someone who did Java at Uni then took a .NET straight after I literally picked it up on the job and got running fairly quickly.

When it comes to learning more "general principles" of software however, the more varied the languages are - the more you pick up. I advise having .NET or Java, C and eventually LISP or Scheme. Those 3 languages are near the edges of the spectrum without being too obscure or difficult to pick up and roll with.

Philluminati
A: 

Is trying to broaden your skills a good career choice or is it a better decision to choose one technology and stick with that?

I think everyone will agree that broadening your skills is a great career choice.

What I've chosen to do, and urge my coworkers to do, is to pick up skills and techniques that will help you be more effective regardless of the specific technology or language you're using.

What I'm talking about are things like test driven development, refactoring and recognizing code smells, architecture and design patterns, source code and release management, SOA (including things like REST vs. RPC style interfaces), iterative development, regular expressions.

All of these things will make you a better programmer no matter which "technology stack" you develop in.

Vinnie
A: 

learn what you need to grow you career - or whatever interests you; you never know what might come in handy down the road

if you're having trouble finding java work, or think you'd make more money with C# and .NET, then go for it

otherwise, maybe turn off the computer and go outside for a while ;-)

[just kidding, it's big and scary outside!]

Steven A. Lowe
+2  A: 

Learning two separate but similar languages such as Java and .Net can make you a better programmer in giving you a more generic handle on problems so that your pseudo code doesn't necessarily mirror the language you've used for the last few years. Additionally, exposure to other tools that fit into the other side can be valuable as well, e.g. learning about IIS and using it instead of Apache or Sourcesafe instead SVN.

As for certification, it would probably help ease any company that would fear you wouldn't be able to contribute for a few weeks as you got used to the .Net world. I would think most good places would recognize the value of having someone that knows both of the main 3-tier web application code if that is another way to look at your work.

Your last question has an interesting answer that one has to find where in the spectrum of generalist to specialist does one want to be. Each has advantages over the other, depending on your view:

Generalist - Knowledge of different areas can be used so that this one person handles the roles of possibly a handful at other places. The developer can be the Network engineer, Systems Engineer, Application Engineer, Technical Support, Security Analyst, Business Analyst and Systems Analyst all rolled into one.

Specialist - By knowing one thing to its very core, you can optimize various code chunks or explain why something is starting to break down or get slow now. This may require focusing on one little thing but that little thing could be rather vast depending on your view, e.g. how big could NHibernate or AJAX be? :)

Both have their merits and I think most developers fall somewhere between the two extremes but may lean on one side more than the other. I think I prefer the generalist where I can roll up my sleeves and get into databases, middleware or UI and this is expected in a sense, rather than be somewhere where I do only the front-end or only the object model development. It is a personal preference of my choosing along with looking at my personality and what gets me going or gives me a drive to do well rather than just acceptable.

Some consultants make big $$$ knowing one technology well like Peoplesoft or part of Oracle or part of SAP. Others make big $$$ by their versatility and being able to juggle many duties in one body. IOW, either way can lead to wealth if you want it. Course some places pay big $$$ to placate the fact that they use old stuff and are slow moving in some cases. Or at least that is what some of current and former co-workers have shared with me.

JB King
A: 

Yes. It is always good to learn new programming language as it always adds new perspective.

Rachel