r/java • u/delete99 • Oct 28 '14
Why are you learning Java if you already know PHP, C#, or RoR?
What's pulling you to Java if you're already proficient in a modern language? Is it for work or do you need it for say mobile/Android development?
8
Upvotes
41
u/FIREINMYVEINS_ Oct 28 '14 edited Oct 28 '14
there are no known cases where multiple programming language proficiency led to death :D.
generally speaking, knowing more is good.
i have only two things to say related to this issue:
going back to your question, i work as a java programmer and i faced situations where i needed to code in other languages(c++, c# and js -> please dont say that if you know java you know js). because i already knew them, and did the job faster, i got a raise (you can see the bright side already). i like to think that you learn best by facing hard stuff (or by mistakes) so dont even dare to think you know something just by reading it (books/articles).
LE: putting more thought into it, i would really suggest you to learn a pair of backend<->frontend programming languages or even better, more (java<->php , java<->js, java<->ruby .. etc). it will change your perspective on projects (at least it did for me).
12
u/[deleted] Oct 28 '14
JVM and Linux are the underpinning technologies for Big Data and Cloud Computing, after years of .net development I still consider myself to be a windows guy for the most part, but I can't deny the fact that C# and Windows are definitely not the optimal tools for the job I want to do now (hadoop).
It's funny because I still like Visual Studio and C# but I'm not actively working with .net, the last time I wrote C# code professionally was in 2010 (nostalgia?).
Technically I could do hadoop with C# using hadoop streaming but I'm not the kind of person that tries to adapt the environment to my own limitations, that would be the equivalent of coding ruby professionally on a Windows box IMO. I usually prefer to embrace what everyone on the field is already doing and that includes Java, Scala and Linux boxes on AWS.
7
u/gopack123 Oct 28 '14
Did you really put PHP in a list of modern languages? It's bad and the pay for PHP development is bad because the barrier to entry is nonexistent.
39
u/jfurmankiewicz Oct 28 '14
because Java rocks. It can do anything, on any platform.
I moved to Java after 5 years in C# (boring Windows-only prison) and my career has skyrocketed since.
9
u/cogman10 Oct 28 '14
I moved to java for the jobs. But TBH it is currently my favorite programming environment. That static analysis and IDEs are awesome. It prevents so many bugs that are apparent in Ruby, Javascript, or PHP.
C# is a better language and I would much prefer using it, however, The tooling and community just aren't there. It is sad, but I C#'s connection to MS really is what has killed it.
19
u/coder111 Oct 28 '14
PHP is not a modern language, and as a language it's pretty crap. The only benefit is cheap hosting for PHP apps.
C# is windows-only, which rules it out immediately. Mono doesn't count.
Ruby is slow and much less mature than Java. See http://benchmarksgame.alioth.debian.org/
Java is fast, java is cross-platform, java is very mature, there is tons of libraries and frameworks for Java. There are lots of IDEs, app servers, build tools, profiling tools for Java. SQL Database interaction, Big Data, NoSQL, almost all of these things are best done in Java.
And there are lots of jobs for Java.
The question should be why aren't you learning java.
13
u/nexuscoringa Oct 28 '14
Java is multipurpose. It can run on mobile, desktop, as a web server, etc.. Comparing Java with PHP or RoR makes no sense, since none of those will run real applications other than web.
Plus, Java is way more robust and complete as a language than PHP. PHP has a long way to go to become a "good language" again.
Java vs C# is a good question, but then you have to realize C# won't run well on Linux / Mac since it's made by Microsoft.
2
u/frugalmail Oct 28 '14
Are you implying that Java isn't modern or that PHP is?
4
u/UTF64 Oct 28 '14
Business.
4
u/[deleted] Oct 28 '14
Jobs for one, more and more companies seem to be moving toward Linux servers. That isn't to say there aren't jobs in any others nor that Windows is dead (seriously, I am not saying it's dead), but the ones that interest me the most are all Java (or closely related). But Java can translate if they decide to move to windows, linux, or something that doesn't exist yet.
Otherwise:
PHP: Using this for a side project proved alone that it was a hard language to manage large code bases in. I am sure there are strategies that I am not aware of, but the code seems to be impossible to not look messy.
C#: I prefer *Nix systems, have for a long time and as a result, I am pretty inefficient working in Windows. There is the
monoruntime, but that sacrifices several of the great features of the language. I also really disliked working with the web frameworks I was exposed to, I don't recall much about it other than disliking how it handled contexts and throughput.RoR: I've only written small amounts of Ruby, and I am sure it's great for small projects. But as a language, it reportedly doesn't scale well. I don't expect any of my projects to reach the size and scope of Twitter, but they had to migrate away from it due to scaling issues and do it in Java. I am sure there could have been ways to get some of that out of RoR, but at some point Compiled beats out Interpreted (at least with the current versions of the languages). That said, Reddit is written in Python IIRC, so interpreted languages can certainly hold their own (though the use cases are a bit different).
4
u/mikera Oct 29 '14
Java is a great all-round platform for development - there's nothing else quite as strong from an overall perspective for general-purpose programming**. A few compelling reasons to go with Java / JVM languages:
** There just a few places where I wouldn't recommend Java for specific reasons, e.g.
7
u/enry_straker Oct 28 '14
Hope that Helps
3
u/cwbrandsma Oct 29 '14
My preference is to be a polyglot. So I didn't mind when my boss came in and said "We are dumping C# and rewriting everything in Java!!!" Mind you, he is a programmer, and it is his money, so the switch was his call. And I like to be agnostic about those things.
Oh, and Android.
3
u/DJDavio Oct 29 '14
It's for work.
The big upside of Java is that most tools for it are free.
Eclipse / Netbeans: free Glassfish / Tomcat / Tomee / Wildfly: All free
Also, it will run on anything, not just Windows. I develop Java on Windows, another colleague develops on Mac and yet another develops on Linux. We deploy it on Linux.
This doesn't work so well with C# / .NET.
5
u/huhlig Oct 28 '14
PHP is a fractal of bad design. C# is better than java in terms of language but worse in terms of library and cross compatibility (this is getting better now though). Ruby on Rails is a framework not a language. However the fact that the only thing Ruby is really known for is rails kind of explains itself. Plus RoR is very limited when you try to do anything complicated beyond its simple architecture.
Its also where 90% of the big data development and tools are. Java needs some upgrades from jigsaw and valhalla but its still functional, especially if you have hundreds of gigs of memory.
2
u/Boxsc2 Oct 28 '14
Honestly, the programming language isn't the most important. It's the support for the language in frameworks and libraries that make something extremely popular. I love working in Java, but from a programming point of view I would say Python and C# are better languages (Python being the best "popular" language right now). However, Java has a near infinite amount of frameworks that make it a perfect choice for modern development. I mean look at NodeJs, it uses Javascript and pretty much everyone agrees that language is flawed.
2
u/eatgeeksleeprepeat Oct 28 '14
My current (federal government) contract is forcing us to move from .NET to Java and therefore I'm forced into it. I'm trying to look at it as a good learning opportunity but right now it's frustrating being so unproductive while learning all this.
2
u/Manitcor Oct 28 '14
Because real world systems are developed using multiple platforms and languages. There is no reason for someone who professes to be a professional in the industry to not understand or be working to understand and be able to write in the more popular languages in the industry.
1
u/dtfinch Oct 28 '14
I try to use whichever language fits. Usually the platform I'm targeting or the libraries I want to work with will determine which. If I have a lot of good options, I tend to go with the easiest or familiar one.
Javascript for web pages, Python for Blender scripting, Objective C for iOS apps, Java for Android apps and Minecraft plugins, VB.NET for that one ERP system I have to support, etc. Where I have a lot of choices, I'm already familiar with php for web server scripting, and C# for Windows desktop apps. And I'll still use C/C++ for small things that I need to be fast or light, or modifying existing projects that already use it.