News for hackers. Stuff that matters.

Ask HN: Is it worth to learn Java?

I'm currently a CS student in Italy. Is it worth to learn Java nowadays? We have two courses about Java programming languages and servlet jsp, then everything is on C++.

My question is based on the growing ascend of programming languages such as Python, Ruby or Javascript. I would like to have knowledge about all of them, but I know that this is like impossible to achieve. C++ is a good programming language, as a compiled one, is very fast and realiable, but I cannot find libraries or frameworks for C++, like Java or Python ones.

What do you think?

( 10 comments | 5 points | on HN )
Re:Ask HN: Is it worth to learn Java? by argonaut on Wednesday February 27, 2013 @03:33AM (#5291313)
I completely disagree with lutusp. It depends. I cannot give you an unequivocal yes-no answer.

You don't learn a language for the sake of learning a language. You learn a language in order to accomplish something. So what is that "something" that you want to accomplish?

If you want to build a web app, you don't learn Java, you learn Python or Ruby (and use one of the web frameworks). If you want to build the front-end of a website, learn Javascript, HTML, and CSS. If you want to build an iPhone/Mac app, you learn Objective-C. If you want to build an Android app, learn Java. If you want to work with machine learning, consider learning Java or Python or C++, depending on what libraries you use. If you want to build Windows apps, learn C# or Python or Java. Etc. Etc.

EDIT (reply to below):

I learned Java in school (the language and most of the essentials of the standard library). I have never touched it again. If you ask me to build a real-world product (i.e not just implement an algorithm or something) in Java today, I would not be able to do anything until I teach myself the necessary libraries. Not to mention that precisely because I never built any large projects in Java, my understanding of Java is very weak. If you're going to learn a language, you might as well learn the language that lies on the path to building something useful.

Most employers are going to hire you based on what you're capable of building, not what languages you know. (I think the exception would be "big" companies who are not technically focused).

Re:Ask HN: Is it worth to learn Java? by logn on Wednesday February 27, 2013 @04:54AM (#5291530)
I disagree. Your advice holds for someone already in a career. For a student they definitely should learn a language based on external factors (marketability of the skill, ubiquity, applicability to other languages, etc).

To the OP, Java is a great language for students to learn. It's OOP through and through (with the exception of primitive types). It's probably a prerequisite on more job ads than any other language (at least outside the HN microcosm). It allows you to discover a whole world of Java tools and libraries. Any language you transition to will have a whole audience of people moving to it from Java/C and language designers take this into consideration for their syntax. You could spend the rest of your career writing Java, but there are certainly much better ways to write webapps now--but those ways only came about after every fortune 500 company built up a huge Java stock.

Re:Ask HN: Is it worth to learn Java? by lutusp on Wednesday February 27, 2013 @03:51AM (#5291362)
> You don't learn a language for the sake of learning a language. You learn a language in order to accomplish something.

Yes, and if what you want to accomplish is to be well-versed in modern technologies including the common variety, you will be familiar with Windows, OSX, Java and a few other things. Not because these represent the pinnacle of technical sophistication, but because clients and/or employers will expect you to be familiar with them.

> So what is that "something" that you want to accomplish?

The OP is a student, asking what technologies he needs to be familiar with in order to be functional in modern computer technology. That's what he wants to accomplish.

Re:Ask HN: Is it worth to learn Java? by duiker101 on Wednesday February 27, 2013 @04:18AM (#5291437)
I feel I have to agree with argonaut.

Even if OP is a student there must a be a project he wants to work on. Whatever it is, it can probably be done in java, and it's worth doing it to learn.

Trying to learn a language without actively using it to build something on which you can experiment more than just the examples of some book is really really important and you will learn way faster.

Re:Ask HN: Is it worth to learn Java? by knkella on Wednesday February 27, 2013 @04:16AM (#5291432)
I think having strong programming foundations is very important. And learning any one language C++ or JAVA is enough to do it. Once you have strong foundations, then you should learn languages that you want to use to develop something. Otherwise I think learning for the sake of learning is useless.
Re:Ask HN: Is it worth to learn Java? by lutusp on Wednesday February 27, 2013 @03:23AM (#5291284)
> Is it worth to learn Java nowadays?

Yes. Not because it's the pinnacle of computer languages (hardly!), but just because it's ubiquitous. You would have a hard time functioning as a modern CS professional and never encounter Java.

Asking about Java is like asking, "Should I be familiar with the Windows OS?" The argument isn't that Windows is the pinnacle of sophistication, the argument is that it's everywhere.

Re:Ask HN: Is it worth to learn Java? by Proleps on Wednesday February 27, 2013 @05:49AM (#5291685)
Java is still used in a lot of companies. I'm from the Netherlands and a lot of the jobs here are Java or C# jobs(I think this is probably the same in Italy). I think this is a good enough reason to learn the language.

It may be slower than C++ , but it is a lot faster than python, ruby or Javascript. Another reason to learn Java is that it is used for Android development.

The current JEE(Servlets and jsp) version is a lot better than the old one(J2EE). You no longer have to configure lots of very big XML files.

As a dynamic language you should probably learn Javascript first because it is used on the client side of web applications and some mobile platforms are moving to Javascript.

Re:Ask HN: Is it worth to learn Java? by cafard on Wednesday February 27, 2013 @08:40AM (#5292260)
I noticed long ago that it is a very rare musician who knows only one instrument. A musician will almost always have one instrument at which he/she is much more proficient, but your violinist probably plays the piano, and your flutist might be passable at the violin. Much the same seems to be true of persons who are good at a foreign language (immigrants up against necessity perhaps excepted).

Learning Python, Ruby, or Javascript in a certain timeframe may be impossible to achieve. But quite likely you will find yourself at 30 knowing two of them reasonably well, and several other languages also. I don't think that Java is going away soon.

Re:Ask HN: Is it worth to learn Java? by sampsonjs on Wednesday February 27, 2013 @07:06PM (#5295996)
Nowadays, there's two different things: the core language, then the numerous frameworks. The core language is the first thing you need to know and a lot easier to learn than any of the frameworks. So just study the core language in case it comes up on a job interview, you can study the frameworks(a lot of which suck) later if you have to(like it's part of your job or you really need it to pass an interview). Study some C# too, it's cleaner, and besides static typing is awesome.
Re:Ask HN: Is it worth to learn Java? by X4 on Wednesday February 27, 2013 @08:07AM (#5292114)
An Android Developer earns more than a Software-Developer (both writing Java).

And it's always worth learning.