7 ms·
Ask HN: Is Java still worth learning?
- venomsnake 13y agoYes - if you like money and job security - there is very strong demand for java developers and a lot of code to be maintained. Java is entrenched in the corporate world. If you want to learn something from learning Java - not so much.
- nhatty 13y agobut most company don't need a java this days
- Ralz 13y agoNot true at all! At least in Toronto most of the companies here are hiring Java programmers like crazy. Depends where you want to work, I assume in the Valley it's all Node, Ruby, iOS. I guess Android is all java as well.
- dlp211 13y agoThis is wrong. Nearly every corporation including the likes of Google and Amazon use java extensively and ongoing. Despite what many articles predict or claim, Java is neither a declining technology nor a dying technology, on the contrary, Java is used more and more every single day. 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.
- profquail 13y agoSome quick stats, according to IT Jobs Watch (a UK jobs website): Python-related jobs make up 3.36% of permanent IT jobs in the UK. (http://www.itjobswatch.co.uk/jobs/uk/python.do 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 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 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 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.
- csmuk 13y agoI wish people would promote this fact more. 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.
- mtdewcmu 13y agoI'm pretty shocked that C# has overtaken Java in number of jobs. I suppose that a lot of that growth came from cannibalizing other MS-centric languages, so it's not really comparable. But still.
- ahassan 13y agoI've seen many companies that still use Java. It's still a pretty popular technology, even though a lot of start ups don't typically use it anymore. However, I have noticed a bunch of start ups using Scala, which runs on the JVM. So learning Java and how the JVM works may be useful in the long run.
- patio11 13y agoSome context would help, since it depends on what you already know, what your longer term goals are, and how you think learning Java will help you achieve that. 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.
- a8da6b0c91d 13y ago> The JVM is a wonderful platform. The Java ecosystem interoperates with everything 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.
- w0utert 13y agoI also don't fully agree with the statement that Java (or other JVM based languages) is the pinnacle of interoperability. Try interfacing between e.g. Python and Java some time and you know what I mean. Besides JNI or some other JVM based language, interfacing between Java and something else basically means doing some form of IPC, which isn't fun.
- huherto 13y ago
- dylam 13y agoUntil I can write Android apps in something else, yes. :)
- Avalaxy 13y agoWell, then you can unlearn Java right now! http://xamarin.com/ http://xamarin.com/ http://phonegap.com/ http://phonegap.com/ http://www.orubase.com/ http://www.orubase.com/ etc. etc. etc.
- dodyg 13y agoThis http://kotlin.jetbrains.org/ http://kotlin.jetbrains.org/ is the best language for Android development.
- danieldk 13y agoI think you should motivate 'best' :). 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).
- dodyg 13y agoJava 8 unfortunately does not have closures http://stackoverflow.com/questions/17204279/does-java-8-support-closures http://stackoverflow.com/questions/17204279/does-java-8-supp...
- danieldk 13y agoBy that standard Haskell doesn't have closures either. A closure is a function that uses free variables in its definition. And Java 8 closures fulfil that definition.
- 13y ago
- umren 13y agoof course not! learn haskell! it will employ you easily.
- csmuk 13y agoI hope that is sarcasm as I haven't ever seen a Haskell job in the EU.
- justincormack 13y agoAccording to this there are around 100 advertised every 3 months in the UK http://www.itjobswatch.co.uk/jobs/uk/haskell.do http://www.itjobswatch.co.uk/jobs/uk/haskell.do which is not a lot but non zero.
- csmuk 13y agoThat means there is Haskell in the keyword search but its not necessarily a Haskell job. A lot of companies, mine included, have problems with agents stuffing all sorts of shit in job ads just to get candidates to sign up.
- justincormack 13y agoHaskell seems an unlikely word to stuff in. I can find a few in a quick search (eg Jane Street who are well known for Haskell).
- dagw 13y agoHave you looked at the large investment banks (Barclays, HSBC, Credit Suisse etc) or any major hedge funds?
- frostmatthew 13y agoDepends on your motivation, if you're looking to learn a language for the sake of employability then yes Java is definitely worth learning. 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.
- nkishore 13y agoAs Dave Thomas in his talk http://www.infoq.com/presentations/metaprogramming-ruby http://www.infoq.com/presentations/metaprogramming-ruby says "Java is for average programmers - a scissors with blunt knifes" If somebody wants to learn now, its good to go after the future market which would be dominated by mobile, apps on cloud. The programming trends is poised to be move towards a mix of Functional + Object Oriented, Procedural. JVM will still be around, as its battle tested but will be programmed by something else (Scala, Clojure seems to be picking up). Golang/Dart will be a deadly combination as well. HTML5 Mob Apps will pick up steam. We choose Scala, Golang, Ruby(scripting), Ruby on Rails for our tech stack at http://www.megam.co http://www.megam.co
- danieldk 13y agoIf somebody wants to learn now, its good to go after the future market which would be dominated by mobile, apps on cloud. 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+clojure#q=java%2C%20scala%2C%20clojure&cmpt=q 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.
- cheery 13y agoNo. Like Paul Graham said.. It's a dead end evolutionary. More advanced languages like python and javascript are going to replace it in few years. Start with web apps. :) That's fun stuff.
- netforay 13y ago'Should I still be using Java?' is the question that almost ask myself once every week. And till now my answer was 'Yes'. I have worked on many languages including dynamic languages and compiled languages. 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.
- solomatov 13y agoJava also has IntelliJ which is also free (community edition).
- Zigurd 13y agoAndroid Studio, based on IntelliJ, is also free. 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).
- sannysanoff 13y agoyes, java strong in tools, because java was designed with tools in mind (although Delphi was very cool). Large number of non-trivial refactorings was first introduced in Java IDE (correct me).
- pjmlp 13y ago> C# is great with Visual Studio, but costly to use. The Windows/.NET SDK is free. Additionally, you can make use of SharpDevelop, Xamarin IDE or Visual Studio Express editions.
- 13y ago
- dcarmo 13y agoThis is a question I keep asking myself, specially within the web development enviroment. The company I'm currently working for wants to use Java for their web service needs (I'm trying to push a RESTful approach, but I'm have 0 knowledge of how they could start that in the Java world). So I ask: is Java worth learning for web development (scalability, lines of code, etc)? If not, why?
- jaxytee 13y agoI recommend checking out Play Framework for a modern Restful Java Web Development framework. I must add that the templating engine and under the hood api are written in Scala. It doesn't take long for an experienced Java dev to become a familiar enough with Scala to work with the templates though.
- danieldk 13y agoThe company I'm currently working for wants to use Java for their web service needs (I'm trying to push a RESTful approach, but I'm have 0 knowledge of how they could start that in the Java world). There is a standard for that (as usual in Java :)) - JAX-RS: http://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services 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.
- arikrak 13y agoJava isn't as flexible (or hip) as Ruby or Python but it's still in huge demand, and there are far more Java jobs than jobs in those languages. Here are some reasons I listed for learning Java in my Java tutorial: - 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) http://www.learneroo.com/courses/11/nodes/78 http://www.learneroo.com/courses/11/nodes/78
- theboss 13y agoThe best part of java is it's a good language where beginning programmers can learn design patterns and program design. I like java for this because it has single inheritance. Android is a good example of strict use of design patterns 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
- asmman1 13y agoCheck out this Dr.Dobb's articles: http://www.drdobbs.com/jvm/if-java-is-dying-it-sure-looks-awfully-h/240162390 http://www.drdobbs.com/jvm/if-java-is-dying-it-sure-looks-aw... and http://www.drdobbs.com/jvm/1000-responses-to-java-is-not-dying/240162680 http://www.drdobbs.com/jvm/1000-responses-to-java-is-not-dyi... it may help you.
- huherto 13y agoAh Dr Dobbs. I miss the days when I waited for the next number to read it back to back including adds. Now we have so much information at our finger tips but it becomes harder to be exited about it.
- mjhea0 13y agoyes, many older shops/businesses still use plenty of java in their stack. and it does not make sense for them to change to a newer technology due to costs. that said, i'd learn scala since it's so similar to java and really hot right now. 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.
- kumarm 13y agoAbsolutely Yes. 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.
- memracom 13y agoAlso, once you have learned Java, you don't have far to go to also learn C#. Most of the differences with C# are solutions to problems that have not yet been fixed in Java, i.e. C# is faster moving from a language design point of view. Yes, the .Net libraries are completely different, but few software developers nowadays bother to learn a set of libraries inside out because reference material and search engines are so much better than they were a few years ago.
- kamaal 13y agoNearly all of the areas you mentioned are massive commodity markets, where individuals get hired on the basis of least pay they are ready to accept. Its not a very comfortable position to be in. You age quickly, fall victim to age related discrimination. While a fresher gets the job because he is ready to work for a little less. >>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.
- wikwocket 13y agoI'm willing to believe that mobile dev is treated as a commodity market, but the other areas mentioned are essentially "desktop apps" and "web apps." I don't think you can paint with so broad a brush that essentially all front-end and back-end Java work is commodity. 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.
- Zigurd 13y agoThe very easy answer is "Yes, if you want to write apps for Android." 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.
- pjmlp 13y agoHaving former Sun Java guys on Android's team counts as well.
- collyw 13y agoDepends what you want to do. 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.
- darkchasma 13y agoAs a base for a well rounded developer, I would say to pick C# or Java and Ruby or Python, and C or Go. Learn javascript. Avoid PHP, even if you're starving.
- techaddict009 13y agoWhy to avoid PHP ? I am earning working on freelance project all due to PHP.
- meowface 13y agoThis lists some of the reasons: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...
- pan69 13y agoPHP has actually matured pretty well. Since the introduction of Composer and frameworks like Symfony 2, Zend Framework 2 and Doctrine 2, you can actually build very sophisticated software in PHP. However, for green field projects I personally wouldn't use it. However, having said that, there are still plenty of guns lingers out there copying and pasting crap from PHPClasses.
- film42 13y agoAbsolutely yes! Nobody here can tell you what is good and what sucks. Your experience must not be based off a few HN comments. You must learn the facts, and then draw conclusions. 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.
- throwaway9848 13y agoLanguages I think you should know: 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.
- meowface 13y agoI like the functional paradigm and enjoy writing functional code, but personally, any time I look at Lisp or Clojure my eyes just completely glaze over. I understand how powerful S-expressions can be (source code can be data and vice versa), but reading them is a massive pain. 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?
- throwaway9848 13y agoNo, I just was suggesting learning about any functional language, those two just came to mind first.
- sicxu 13y agoI have used many languages professionally and in my personal projects. Java is the language that makes me most productive. Why? It has the best tooling support. There are a few things that is extremely important for my productivity: - Precise autocomplete - Jump from a name to its definition - Call hierarchy - Code template - Auto formatting - Great unit test support - Stable and high quality debugger - Hot swap - Drop to frame during debugging - Remote debugging - Profiling and heap analysis 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.
- arcticf0x 13y agoIf we are looking at the future from this point on, then in a nutshell the precise answer to this question would be NO. The only popular Java use I see is on Android by google, that is going to change sooner or later.
- kotakota 13y agoAs many other people have said it depends on what you want to do. You should choose a language for a project based on the project. 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.
- vadivlkumar 13y agoYes it is easy fish to catch if you want to experience VM land, especially on any JVM langs.
- mtdewcmu 13y agoAbsolutely, if you want access to a large number of jobs. You also need it to develop for Android.
- seymores 13y agoYes.
- memracom 13y agoDo you think that Camel and SOLR and Scala are worth learning? If yes, then learn some Java as well, but remember that the world of today is different than the world when most Java books were written and most Java curriculums were designed. In other words Java is NOT going to dominate the world, is NOT even going to dominate the Enterprise, and not everything in the Java ecosystem is going to last. But some parts are damn good, like Oracle's JVM, 3rd party commercial JVMs, Camel, Groovy, Scala, SOLR, Lucene, many of the projects in the Apache foundation, Eclipse, IntelliJ, many or the projects from Spring.IO, and so on. 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.
- wikwocket 13y agoOne other area Java is good to know right now is Big Data. Hadoop is spreading like wildfire (whether due to genuine need or buzzwordism), and knowing Java gives you access to most of the Hadoop stack. Presumably this will only increase as more companies decide they need "Big Data" and as Hadoop becomes more stable, popular, and accessible.
- g42gregory 13y agoAbsolutely, Yes. As somebody mentioned, the more languages you know, the better you understand any of them. More specifically: 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-Interdisciplinary-Approach/dp/0321498054/ 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.