tags:

views:

910

answers:

12

I was just reading this thread and wondered if it's easier to become a Java expert than a C++ one? Is it because it's very easy to write wrong code in C++ while in Java you have less flexibility (memory management for example) which prevents you from writing code horrors? Or is it because C++ is just inherently harder to learn and master? Have you came across a study that distinguishes and characterizes C++ vs Java vs C# etc coders?

+15  A: 

With few exceptions, anytime I hear someone say they are an "expert" at a language I generally take them with a grain of salt. No matter what language, the best programmers know that they always have something to learn - whether from a seasoned veteran or from a kid right out of college.

Gandalf
Agreed. But how do you answer the nitwit recruiters and HR people who insist you answer their rate yourself 1-10 on skill X questions?
Newton Falls
No mention in my dictionary that "expert" means nothing more to learn. Also, you take exception to use of what you claim is a fictitious term yet your user name here is "Gandalf." That's kind of ironic, don't you think?
Glenn
Ahh, the recruiters. Tell them what they want to hear, so you can get to the real interview. I had many months of self-doubt when (after a year-long hiatus) I started my job search some years back. And this was mostly because of the recruiters and interviewers. You'd think people would consider years of experience and problem solving ability yet you run into horrible interviews and people who expect pre-packaged certification knowledge to the tee.
hythlodayr
++ I remember a friend introducing me as an "Expert Programmer" some years ago. It was funny because I described him as the same thing. Many years later, I realize how wrong we both were at the time :)
Jonathan Sampson
@Glenn - lol, guess I never looked at it that way, this has been my handle since the old BBS days.
Gandalf
+5  A: 

What does it take? Like anything, years of practice and countless mistakes.

And even then, your expertise will be in a handful of areas where you solved particular problem domains again and again; i.e., islands of expertise. Middleware and/or frameworks? Threading & concurrency? Maybe Swing/GUI Java applications? Or web applications...

Java has grown to such an extent that nobody can be an expert in ALL that is Java--look at how many packages have been added between 1.4 to 1.6 and this should be obvious. Though you have guys that come awfully close (Johsua Bloch comes to mind...).

Edit: If this is in regards to recruiters and HR...shrug off all of the buzzwords, minimum years, and "expert in" and just get a phone interview with the team looking to hire. You need to find out from the technical guy what exactly he's looking for because nearly all recruiters and recruitment agencies are COMPLETELY CLUELESS.

hythlodayr
often it's helpful to just go to any company/web2.0 site out there, go to their jobs page and if they have an opening for senior/assistant java programmer, read it and wiki/google any technologies or "buzzwords" they mention and see if it's something you should learn.
Victor
I was under the impression the Josh Bloch was very much a core Java guy, and probably doesn't use the vast bulk of the libraries.
Tom Hawtin - tackline
True. But I bet he's at least aware of them, along with many of the IVC frameworks and other nice things that have evolved out of standard Java.
hythlodayr
even if you are an expert on the language and JDK itself, you really need expertise in one of the many frameworks and several third-party libraries (e.g. Spring, log4j, JBoss) to be productive in a real-world environment.
Ken Liu
+1  A: 

One thing to consider is the amount of open source code there is available to study and learn from.

There is also quite a bit of open source C++ code, but usually Java is more succinct and focused, not having to deal with platform differences and various different libraries.

I feel Java is much easier to learn because that is how I recommend improving and learning. Read code. Read the JDK, read the source of well known and respected libraries and frameworks. Dig in and see how it functions.

Mark Renouf
+2  A: 

The best way is to program a lot in Java. If it's not the language you use the most at work, then it should be the language you use the most on your personal projects if you want to become an expert at it (this applies to any language).

Some reading materials that will help you:

As for ease of learning, I personally had a much easier time learning Java than C++. Java definitely benefited from the hindsight of its developers. They were able to mostly keep the things that were good about C++ and get rid of some of the things that made C++ more difficult to learn. They managed to make it harder, but by no means impossible, to shoot yourself in the foot in Java than in C++, and the potential damage is also often less when you do.

Have you came across a study that distinguish and characterize C++ vs Java vs C# etc coders?

I don't know of any such study, and I will not even begin to speculate. :)

Bill the Lizard
A: 

Consider what you want to do.

If you want to work with programs for Macs learn Objective-C. if you want to work with programs for Windows learn C# or C++. If you want to work with web server backends learn Java.

If you want to become an expert, you need to practice a lot and learn even more stuff. I can recommend reading "How to become a hacker" http://catb.org/esr/faqs/hacker-howto.html#why_this (the whole document) as it will give you a lot of ideas and hints to what ELSE you should do.

Learning only one language is like painting only with acryllic paint.

Thorbjørn Ravn Andersen
+2  A: 

Have you came across a study that distinguish and characterize C++ vs Java vs C# etc coders?

only this one. sorry.

Pete Kirkham
+1 - Wow. I had no idea I was so low in the hierarchy. 8)
duffymo
Pete Kirkham
It reminds me of a joke: Why do most Java programmers wear eyeglasses? Because they don't C#!
kd304
A: 

Or is it because C++ is just inherently harder to learn and master?

I'd say this is the main reason. C++ is a much more complex language with lots of features that can be hard to understand, especially in how they interact.

Of course, the language itself is not everything - Java has a much larger standard API and de facto standard frameworks, which an "expert" would be expected to know.

Michael Borgwardt
A: 

being an "expert" in a language doesn't mean that much, for instance say you are an expert in C++ but have programmed all your career in Linux, would you hire such a guy to do a Win32 program or would you take somebody who is not necessarily an expert but has experience with Win32 and its quirks?

Anders K.
+1  A: 

I think in the industry there are slightly different meanings for Java and C++ experts. Usually, Java expertise implies expertise with some set of APIs(such as J2EE), or a set of frameworks, or with a specific application server. It seems a smaller set of companies that use it are only using core Java, so often they measure expertise based on how many APIs you can claim to know. Often companies using C++ are using it for speed reasons and are writing much more of their code from scratch so they may be more interested in core language expertise.

That being said, I think Java as a language is much more straightforward, but its huge set of libraries and frameworks is very complex. C++ is difficult because you are basically learning three languages: procedural, object-oriented, and template meta-programming.

mattwright
+1  A: 

In my opinion, the problem with C and C++ that they were invented in the 60's1. Java came later and learned a lot from the mistakes, bad practices and questionable solutions often seen in C/C++. After 2001 when C# came along, I would say we observed a kind of co-evolution of these two languages. They learned from each other as well as they learned from C/C++ and for the first time in history, from the users themselves!2

In my case, to answer your question, I had to decide to either learn C++ or Delphi 12 years ago. I found it complicated and tedious to use C++ at that time. Since then, I moved to Java couple of years ago while tracking the greatnesses of C#. So general, it takes only time to become expert on one or another language. I would evaluate myself as an experienced programmer, as for the meaning of word 'expert' is very well defined on tdwtf, which I hope will never be applicable to me. IMHO.

I think the best way to compare coders of various languages is to do it yourself, as I think every argument about the subject is subjective.

1 correct me if I'm wrong about the dates.
2 maybe not the first time, but reading articles of emerged and emerging features of these languages makes me feel so.

For the comparison I found these references a while ago:

Comparación de características de loslenguajes de programación Java y C#, Mayo, 2003

although it is in spanish and I just looked at the code samples.

Comparing Object-Oriented Features of Delphi, C++, C# and Java

for a yet another, more diverse comparison on the subject.

And there is also an 'advertisement' from MS trying to convince you to switch to C# (or to C++ as it is available in VS along):

C# for Java Developers (Allen Jones & Adam Freeman, Microsoft Press, 2002)

Or if you want an 'independent' study:

From Java to C#: A Developer's Guide (Heng Ngee Mok, Addison Wesley, 2003)

kd304
Forgot to mention, that on http://channel9.msdn.com there are hundreds of great videos about the programming subject, and very often they make comparisons to other languages in the talks.
kd304
per footnote #1: C - 1972; C++ - development started in 1979 as "C with Classes", became C++ in 1983.
Dan
@Dan: Thanks. Should have checked the Wikipedia myself before posting.
kd304
A: 

One could say it takes 10 years to be an expert in language. As such I say it is just as easy to be an expert in Java or C++.

Being an expert requires different skills. Java has available to it a confusing array of hundreds of commonly used open source projects. Being an expert in Java means having a good understanding of many of these extras. e.g. Java EE, Spring, Hibernate and many more.

Peter Lawrey
A: 

Most of this applies to many other languages:

As always you need much experience to be an java-expert. And if you think you gained enough experience, learn more.

Java has a rich and powerful API, it makes sense to have knowledge of it, if you want to become an expert.

You should learn to code clean and maintainable, to be a good programmer.

Learn also concepts in different languages, that java don't have (for example closures). You can learn much about a technology/programming-language if you know about things it doesn't can.

Learn about the concepts of the VM, the hotspot-compiler and the generational garbage collector java uses.

And if you reached a level of knowledge, that you think you cannot learn more - you're no expert. There is always more to know, and real experts know about that.

Mnementh