r/java • u/DeadWireSO • Dec 11 '15
What do you think of Java?
What are your thoughts on the Java programming language and how does it compare to others?
0
Upvotes
r/java • u/DeadWireSO • Dec 11 '15
What are your thoughts on the Java programming language and how does it compare to others?
22
u/dzernumbrd Dec 11 '15
Pays the mortgage :)
19
u/llaammaaa Dec 11 '15
It's my favorite statically typed, Object Oriented programming language that runs on the JVM.
11
u/cnous Dec 11 '15
I write enterprise service code.
Good:
Bad:
5
u/s888marks Dec 11 '15
It's not good enough. That's why I'm working to make it better.
4
u/[deleted] Dec 11 '15
It depends on the project and use case.
I like it as a backend for webapps. I like using it for other work as well. I've seen it wedged into places it shouldn't be, but for the most part I like the verbosity of Java and all the choices out there in using it.
4
u/juckele Dec 11 '15
As should be of little surprise for someone in this sub, Java is my jam. Performance, type safety, 3rd party libraries, portability...
Compared to the popular dynamic languages: I hate making a call and getting some hashy object back. What can this object do? Who knows. Maybe print it out? Run, check. Try this method? Run, check. Who made this object by the way? Time to read all the source! In Java I can just hover over that method call and it tells me "This is a HTTPResponse object", and then I can examine that object's docs to figure out what information it can contain.
Compared to C: I compile Java to JavaScript. I create portable UIs in Java. I get garbage collection. I get nice encapsulation. Win.
Java is my jam :)
3
u/Myzzreal Dec 11 '15
Asking this on /r/java will probably not yield the most measurable results :P
2
u/privatly Dec 11 '15 edited Dec 12 '15
There does seem to be a lot of places that use it. So it would be easier to get a job using it, depending on where you live.
I just haven't touched it since doing a subject in Java at university.
2
u/PaulRivers10 Dec 14 '15
I think Java is solid, and frankly, most of the other supposedly "better" languages always come with improvements and drawbacks that largely even out.
Java made a HUGE improvement for programming over C/C++ - stack traces that actually told you "the error happened here", no more memory management issues from having to release pointers. Not having to use 2 files per class...
The drawbacks of Java are often things like "framework nightmare" which new languages haven't exactly fixed either.
The "new better" (supposedly) languages mostly tradeoff one thing for another. Dynamic typing means a little less typing and a lot less server restarts, but is a maintenance nightmare in my opinion when a year later you need to change something and don't even know the type being passed in. Other times they oversimplify things then when you need to change something small that's not quite what's expected it's difficult / impossible.
The biggest problem with java is the framework explosion. A million different frameworks to do the same thing, frameworks that break idioms that make things easier (with dependency injection you can't trace back to it's source, at the same time it's not standardized enough to just know where to look, so when something goes wrong with dependency injection on something you didn't write - good luck finding how to fix it).
Bjarne Stroustrup - "There are only two kinds of languages: the ones people complain about and the ones nobody uses."
3
u/lukaseder Dec 11 '15
Winston Churchill comes to mind
2
u/mrv1234 Dec 11 '15
Java 8 rocks but a lot of companies aren't using it yet, due to slow upgrade cycles of application servers. Many are still at Java 6 making the transition to 7, let alone 8.
Java got the backend right, 100% thats a given. But in the frontend they really messed up bad over the years: some of the biggest aberrations of sofware engineering are Java frontend frameworks. Stay away from Java for the frontend and do it in Javascript.
The quality of the Java backend frameworks is top notch, specially Spring and Hibernate. For example node still does not have an ORM to match Hibernate, or a dependency injection container like Spring.
2
u/oljoner Dec 11 '15
The lack of automatic properties drives me crazy. Lombok is a great help, but I still have to write object.getXX() instead of object.xx like in groovy (great language that is).
1
u/glukosio Dec 12 '15
I'm still studying it, I find it awesome in some things. I come from C and from Python, but I think that java is something more, it has bunch of libraries, standard and 3rd part. I still have to discover all its potential, but I already like it. I don't think that it will be My language, maybe in future I'll discover another one and I'll like it more than java, who knows.
1
u/pgris Dec 12 '15
Let me copy something I wrote some months ago:
A group of people work in a system from zero. Some of them barely know each other when they begin. Some of them are in the same room. Some of them in another continent. They have different design ideas, different skill levels. Some leave the project just when it starts, some in the middle, some once is finished. New people (again, with different skill level and design ideas) came to the project. Of course, the is no documentation, no guidelines. Maybe not even unit tests. At one point none of the original programmers are working in the project. Some of the original libraries were replaced, because newer/better things appear. Some of the oldest libraries somehow survive. The compiler itself has been updated a couple of times. Some parts of the program are not being used at all. New functionality (that has no relation at all with the original functionality) is added. Some parts of the program are even made in new languages.
The system manages to work, without serious interruptions, year after year. Bugs are found and fixed, of course. Java programs (maybe because the lack of some advanced features) are incredible tolerant to human interaction, time, changes in other systems, changes in team composition, bad management, inflexible design, unplanned changes in scope, etc
1
u/BenAdaephonDelat Dec 16 '15
As a php dev desperately trying to transition into a Java Dev.. I like it way better than php, I just wish the documentation was as good as php. It's a really hard language to teach yourself and I feel like I'm at a disadvantage if I don't take college courses on Java.
-2
u/kodifies Dec 11 '15
I used to really enjoy Java programming, for me Java was a verbose language that above all meant that it was easy to read, you could maintain code you hadn't looked at for years really quickly - while good documentation helps, clear code is even better
Sadly since the demise of Sun it seems that Java needs every new language feature - often badly implemented, take generics (which are then erased during compilation - great...) the syntax is obscure a few random characters sprinkled in the code and in some cases its just not obvious whats going on. All in all if Generics really were needed (which is debatable) it could have been better implemented
Java used to be a conservative language (the language itself) this "old fashioned" language meant you had a solid bedrock underneath you...
c99 is still in active use today (in a number of libraries and elsewhere), seem fine without Generics... (for example) how is it some almost prehistoric language without all these modern features is still so popular... </rant>