Some reasons in favor of learning Java: it's an incredibly entrenched technology in a wide variety of industries, and it will be running incredibly valuable line of business code for long after both of us are dead. The language itself is competent and C-style, and it handles memory management. The JVM is a wonderful platform. The Java ecosystem interoperates with everything, has copious developers available no matter your region/price point/industry/desired level of experience, and has a vibrant community which has libraries available for whatever you'd want to do.
Reasons against: I'll spare everyone the "Good God man, it's Java." (Though, having cut my teeth on it and used it professionally for most of my career, they're not totally wrong.) Mostly, my concerns would be directed at "Is learning a new programming language really the highest priority for you given your particular goals?" Learning the syntax will only take you a few weeks (assuming you've programmed before), but getting conversant with e.g. the J2EE stack is a multi-year project, and there are many things you could accomplish in the same time which would be more intellectually rewarding/credibly promise more career growth/etc.
I hear this over and over but it never strikes me as true. The best and most widely used libraries and interfaces for a given problem always seem to be C++ or C. There's typically some slower and less comprehensive library for Java or .Net.
Now if you don't want to use Camel and want to build a Big Ball of Mud, that is your choice, but do not pretend that it is a best practice in the 21st century. The standards for software engineering have moved on.
I don't even understand what you are saying here. Are you implying that if I have a Python application and a Java library that solves some very specific part of what the application does (say, applying some very complex algorithm to a few numbers, or decode some arcane undocumented file format), that I should use something that sells itself as:
Apache Camel ™ is a versatile open-source integration framework based on known Enterprise Integration Patterns.
Camel empowers you to define routing and mediation rules in a variety of domain-specific languages, including a Java-based Fluent API, Spring or Blueprint XML Configuration files, and a Scala DSL. This means you get smart completion of routing rules in your IDE, whether in a Java, Scala or XML editor.
Because 'the standards of software engineering have moved on'?
Not everyone is building large-scale enterprise software running on clouds of servers or whatever you have in mind. I can make up a million examples of pieces of software that perform only one single one-shot task (like a command line script) that may want to call out to some external library that implements some part of what the script is supposed to solve, and for those kind of applications, 'the standards of software engineering' should not have to dictate I have to use message queues or a versatile open-source integration framework based on known Enterprise Integration Patterns, amirite? If that library I need to call is written in Java and I need to call it from Python or some other non-JVM language (or even C/C++ because JNI is a pain in the ass as well), I'm SOL :-S
Here's just one counterexample to your claims: http://stackoverflow.com/questions/4257659/c-sharp-versus-c-...
Java libraries tend to mis-handle classloader recycling, but most projects can ignore that.
Why on earth would you want to stick some C code (or God forbid, C++ code) inside the same process as the JVM? If you control the OS, there are better ways to do the same thing with two separate proceses. And even if you don't control the OS, we do have techniques (most of them implemented inside Apache Camel) for hooking up a Java process and some other kind, without sharing bodily fluids.
Apache Camel is safe hex, use it!
Where are the enterprise C and C++ libraries and server stacks?
The enterprise is all about Java and .NET nowadays.
I think it differs hugely per case. E.g. there are not great C++ or C libraries that provide functionality of Akka, Guava, or Java persistence.
On the other hand, nothing in Java-land beats Qt, Cocoa, or Eigen.
But I agree on interoperability. Interoperability within JVM-land is pretty great. But it is far easier to write a good binding for a C library in e.g. Python, Ruby, Go, or Haskell, than it is in JNI.
I always get a kick out of this. If someone says a language's expressiveness is one of her biggest pain points, she probably is not working on anything significant. There is a reason that so much Java is used in Google, Amazon, etc. Performance, maintainability, tooling, and ecosystem are more important than whether or not you have anonymous inner classes vs. true language support for closures.
J2EE, like Applets, gave Java a bad name. And Spring has become more complex and nasty than J2EE ever was. Java sucks when you have to deal with those environments.
But if you use a modern Java stack - Jersey, Jetty, Guice, Guava, etc. - it is a pleasant experience.
There is a reason why some companies are still running COBOL, C++ or even FORTRAN. Replacing them en masse is expensive, and often you can hire cheap labor and throw some bare minimum funding to keep those systems up and running, until there is no business case to keep them running any more.
When these companies started up, Java was the latest tool that gave tremendous productivity benefits over C++. Newer tools have arrived, now and Java is in the same place as C++ was.
And just like how it doesn't make business sense to re write old legacy systems in new languages. It also doesn't make business sense to write new systems in older languages.
Choose where you want to be.
Which languages/tools give tremendous productivity benefits over a modern Java stack? Serious question. I have done a lot of work in a lot of different environments and IMO for the big and maintainable things it's hard to top the Java ecosystem.
(edit: I do agree with you - it is ridiculous to rewrite enormous legacy systems. But I don't think there's a clear-cut order-of-magnitude-better replacement for Java yet)
Good for Java, bad you us as a career option. Unfortunately the more entrenched it is the more legacy projects you get to work on. The new things, the important things, sort of things which people are ready to invest big money on will happen in some other stack.
I know of a few friends of mine who've so far worked mostly on COBOL their whole career so far. Through COBOL is still pretty much in use, they have problems getting into good projects, switching jobs, getting good compensation. People seem to look legacy stacks like a burden they need to carry on unwillingly. So tend to provide the bare minimum funding to keep it up and running. Most of the times they are only running, until something better is found to replace them.
Learn Java if you want. You will still get a job, but you shouldn't be surprised if something like scala has more interesting projects, good money and better opportunities.
This happens with all technology. As with these things, the sooner you adapt to something- the better.
What Language today will open up opportunities to:
1. Being able to program for No1 Mobile OS (Android)
2. Being able to program for Enterprise application (Oracle Apps etc)
3. Being able to develop web application with other server side application with matured specs (JavaEE)
Any other so called "Hip" language at most will let you help find jobs in one of those areas.
Yes Java is not what cool kids advocate but it what makes an good career.
>>Yes Java is not what cool kids advocate but it what makes an good career.
Well Java is what cool kids in the late 90's were advocating. And C++ was where the supposedly 'good career' was.
Surely there are markets and companies where companies hire Java programmers as replaceable cogs, and you shouldn't aim to work there. But there are many many enterprises where quality Java engineers are hired, appreciated, and well-compensated.
If you want to learn something from learning Java - not so much.
Is it a sexy language, no, is it a hip language, no, is it a mature language with some of, if not, the largest support libraries out there, yes, and this is why it is so popular.
Python-related jobs make up 3.36% of permanent IT jobs in the UK. (http://www.itjobswatch.co.uk/jobs/uk/python.do)
Ruby-related jobs make up 3.54% of permanent IT jobs in the UK. (http://www.itjobswatch.co.uk/jobs/uk/ruby.do)
---
Java-related jobs make up 14.38% of permanent IT jobs in the UK. (http://www.itjobswatch.co.uk/jobs/uk/java.do)
C#-related jobs make up 16.97% of permanent IT jobs in the UK. (http://www.itjobswatch.co.uk/jobs/uk/csharp.do)
You can't judge the popularity of a language from the stories you're used to seeing on social news websites -- enterprise software, although it may be mundane, employs a huge portion of the developers out there today, and many of them are C# or Java developers.
Reality is well outside what the marketing would have you believe.
Also the reason people pick c#/java etc is simply due to it being a pretty good stable standard for fungible staff with decent productivity output and the ability to scale up really complex functionality pretty fast.
On the other hand if you're interested in learning something that will make you an overall better programmer it's best to learn something different than what you're familiar with (most likely Java isn't much different than what you've used), e.g. learning C (if you haven't written lower level code) or a functional language (if you've never used one) will grow you much more as a developer than adding yet another generic object-oriented language to your skillset.
The (now) largest mobile platform uses Java as its main language for applications. Lots of cloud services, including much of e.g. Google's, are written in Java.
(Scala, Clojure seems to be picking up)
We live in a bubble:
http://www.google.com/trends/explore?q=java%2C+scala%2C+cloj...
The average programmer will never write Clojure. Maybe Scala, but only as a Java with less boilerplate.
Golang/Dart will be a deadly combination as well
This almost seems an enumeration of today's hypes ;). You know that Go (the language) is practically a Java 1.0? What is so deadly about a Java 1.0-like language with green threads (which have been around a long time) and CSP-like channels (for which Java implementations were available). What's 'deadly' about it?
I like cutting-edge languages such as Haskell. However, historically, it's mostly boring languages with industry support that win. C was boring and it had UNIX, C++ started out as C with objects and had Microsoft and many others, Java was boring (a watered-down C++) and had Sun, IBM, Oracle, etc., and C# was boring (a Java clone) and had Microsoft (arguably, it did adopt more outside influences than Java ever did). Go will probably be popular as well, it's an incredibly boring language (no one could claim it to be revolutionary after Java or Erlang) and it has Google.
Note that I don't find the predicate 'boring' offensive. These languages are well-understood (except maybe C++), are standardized, have large ecosystems, have great tooling. The result is that they allow you to focus more on the actual problem than reimplementing basic libraries or fighting tooling.
We are making heavy investment with our code every day, and I feel no other language is close enough with 'Java' with ease of programming.
Dynamic Languages are great. But without help of IDE and easy way to debug, there is no way we can use any great language. Language on itself is useless. We need tools to be able to use it. If you are the master in programming, then you can do great stuff with dynamic languages. But 99% of programmers out there are not masters of programming.
C# is great with Visual Studio, but costly to use. Java have Eclipse which is free.
We don't need code that is small, we need code that is bug free and easy to understand.
Maybe I've got Stockholm Syndrome but so far I have not found a compelling reason to move from Eclipse. But if you like IntelliJ now there is an official and free toolchain supported by Google (N.B.: in pre-release).
The Windows/.NET SDK is free.
Additionally, you can make use of SharpDevelop, Xamarin IDE or Visual Studio Express editions.
C, Java, Bash, Javascript, one out of {Perl,Python,Ruby}, and perhaps a functional language like Lisp or Clojure. Each one will make your understanding of programming more comprehensive.
What Java offers is that it's actually a pretty idealistic language in its approach to OOP, to the point that it irritates the hell out of most of us with all the necessary boilerplate. Practically speaking, too, there are a lot of Java jobs (and probably will be for a while) and it's not very idiomatic so there's a lot of overlap w/ other languages, vs say, Prolog.
Also, by "know" I mean, have written a non-"hello world" application but not necessarily having expertise in it.
So, I've been learning Haskell and Scala instead. Is learning a Lisp-based language a necessity to be a robust, professional developer, do you think?
It is probably not worth your while to become proficient with J2EE but some bits of it like JDBC are still widely useful. If you do decide to tackly J2EE be aware that you are walking the same path of the COBOL programmers of old, and you will likely spend the rest of your professional life working with Java J2EE enterprise stuff that suffers severely from the Big Ball of Mud and various other antipatterns. I guess that someone has to do it, but I also guess that most people on HN are like me, and are want to always learn new platforms and apply the latest knowledge coming out of the computer science academic world. We want to speed up innovation, and plain Java is not where it is at.
- Are going to a college that teaches Java
- Want to make Android Apps
- Want to program for a large company, like IBM
- Want strict rules to help prevent errors (at the cost of some flexibility)
However, having said that, there are still plenty of guns lingers out there copying and pasting crap from PHPClasses.
There is a standard for that (as usual in Java :)) - JAX-RS:
http://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Servic...
It's actually pretty ok, it requires relatively little ceremony. The most popular implementations (Jersey and RestEasy) work well.
You need to know at least one of the fast, compiled languages. The choices here are C++, Java or C#. Among these three, Java is by far more pleasant to work with (personal opinion). C is not really an option, unless you need to do networking, drivers, and work directly with hardware.
Please do not equate Java with J2EE or Applets! :-) J2EE sucks and Java rocks (again personal opinion). Modern Java programming style is a lot less OOP-rigid. We will have Closures and lambda functions in Java 8 in 2014. Here is a good book with more modern views on Java programming model: http://www.amazon.com/Introduction-Programming-Java-Interdis...
Here is what Java is actually good for:
- Natural Language Processing and Machine Learning. Collections APIs (Thanks to Joshua Block for designing them!) rock there. Yes, you could do the same things in C/C++ but it's a lot more painful. And no, you can not do this in Python, it's too slow.
- Information Retrieval at a large scale.
- Any large systems. Java has debugging capabilities like no other language I know. Please don't use J2EE!
If you want to work for Google, you need to know C++. C++ is 20 - 30% faster then Java and it matters at Google scale. But no one else has the Google scale in the corporate world.
JavaScript is another "must to know" these days, especially Node.js and AngularJS.
Python is the nicest interpreted languages I know. Really good for learning data analysis, machine learning and natural language processing. Tons of good libraries.
Even if you're not into Java programming, a weekend or two with the language will validate a few opinions and reject a few. I promise there's no better way to learn.
Recently, I am working on both a very large C++ code base and similarly large Java code base. In C++, I find myself routinely use logging and printf for debugging, because switching to debug build and use a debugger is such a pain. In Java, debugging is much easier. The feeling is like night and day.
With that being said there are a lot of jobs available for programmers who know java, c++, and .net. If you want to do desktop developement work i would suggest being compitent in those languages but if you want to do web dev work you should probably skip those languages for the time being and focus on languages that are better suited for that domain.
with more and more new developers learning scripting languages, java developers will continue to make more and more money. great language to learn right now. it may not be sexy or hipster, but it pays.
http://xamarin.com/ http://phonegap.com/ http://www.orubase.com/ etc. etc. etc.
In general, Kotlin is a good candidate for the next Java. It removes a lot of boilerplate from Java and makes it more powerful (e.g. through extension methods), without becoming an enormous language such as Scala. It is a predictable language for anyone coming from Java.
Kotlin's largest competitor is Java itself. Java 8 does provide a lot of the advantages that Kotlin had (e.g. closures).
http://stackoverflow.com/questions/17204279/does-java-8-supp...
A closure is a function that uses free variables in its definition. And Java 8 closures fulfil that definition.
But it is certainly a good way to write portable software across all mobile platforms.
Java was my first language I learned in university back in 2000. At the timer I thought it was amazing. Then I learned Perl and realised how boring Java was and how much more expressive a language could be.
Now I use Python mainly, but looking around a jobs, the well paid senior engineers are usually Java based jobs. Python is mainly academic, or web development, and poorly paid as a result.
If you want to be a startup guy then I wouldn't bother with java but if you want to be a good programmer it can't hurt
The more interesting question is "If Java is that much less desirable than other JVM languages, why hasn't Google enabled a complete, well-sorted alternative and started using it in Android system programming?"
Android software development is vibrant and growing. It is shaping how and why people learn Java. It has unique aspects like Android's modularity and IPC systems that are shaping the way people design and code.
So, why are the alternative JVM languages still on the margins when it comes to Android software development? Could it be that modern IDEs and Java work together well enough to overcome Java's flaws as a language in isolation? Are the cases where alternative JVM languages are compelling less relevant to Android apps? Are Android's APIs and modularity enough to modernize Java?
Google is about to ship their second generation (third if you count adding a JIT compiler) VM for Android without having addressed the language issue. Maybe that's just a matter of prioritization and they have something in mind. But, so far, Java has been Good Enough.