3 ms·
TL;DR: Java as a language is not bad. The problem with Java is its bloatware ecosystem. Endemic to the Java world are uninstallability, Rube Goldberg machine co
by api 12y ago
TL;DR: Java as a language is not bad. The problem with Java is its bloatware ecosystem. Endemic to the Java world are uninstallability, Rube Goldberg machine code, and such heights of over-engineering that they're easily parodied:
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
I think the over-engineering is an unintended side effect of Java's most attractive features: incredibly stable standard ABIs, portable byte code, fantastic tooling, and a language that makes byzantine abstractions relatively easy to implement without the instability you get in C++ or the unmaintainability you get in dynamic languages. Sometimes you actually do need very high level complex abstractions, so this makes Java a fantastic language for those cases. But those cases are rare. Java makes it easy to build towers of babel that stand up, so they happen.
Java can be fine if you exercise discipline around complexity. Java coders need YAGNI and KISS tattooed on their inner eyelids more than coders in other languages.
- justinsb 12y agoI think that is both fair and unfair. Fair because what you say is absolutely true. But unfair because if you stick to the non-bloatware libraries, Java is very good, very fast and surprisingly productive. For me, that stack is Guava, Jetty, Jersey, Gson, Guice. I believe though that you can make poor library choices in any language & framework. With languages that have been around for a while, there are a lot of bad libraries...
- nogridbag 12y agoThe last time I tried using a similar stack, I found out the latest Jersey doesn't play nicely with Guice, since jersey uses its own DI library (HK2). Only one user was actively trying to solve the problem and eventually I gave up and looked at alternatives like Ninja framework (which uses Guice, but not jersey).
- justinsb 12y agoAh, true. I still use Jersey 1. Jersey 2 has gone bloatware, sadly. We need a cleaner implementation of JAX-RS (which is really what we want, not Jersey per-se); I've worked on Apache Wink a little bit, but really Jersey 1 is good enough & good. I don't know what happened with JAX-RS 2. It feels like the J2EE team got hold of it... (PS Thanks for the Ninja suggestion; I will check it out)
- bkurtz13 12y agoHave you looked at Dropwizard? It uses Jersey under the hood I believe but it streamlines using all of its libraries together.
- dragonwriter 12y ago> TL;DR: Java as a language is not bad. The problem with Java is its bloatware ecosystem. That's clearly a DR: one of the major headings is "The Java Language Kinda Sucks". More accurate summary: Java as a platform is not bad, the problem is that the platform is popular enough that lots of less-than-skilled people are using it, and making lots of less-than-ideal choices about how to use it -- including failing to use the tools available in the ecosystem to streamline the experience (and including, as a subset of that, choosing the wrong one of the languages available on the platform, including choosing the Java language itself when its not the best choice.)
- Iftheshoefits 12y agoAnything can be parodied by exaggeration. One could provide a github parodying any language: C: pointers-to-pointers-to-functions, type puns, and quasi-opaque "types" with really_long_identifiers_t everywhere (among many other possibilities, and bonus points for numerous reimplementations of basic data structures tailored specifically for different types without significant performance gains) C++: see Java, but in C++ form; or alternatively larded with metatemplate programming perl: write any valid perl, because it parodies itself python: mishmash classes, functions-as-stateful-objects, and n-levels of decorators everywhere, and toss in some metaclass programming for giggles And so on. (Note: my favorite language to program in is currently C++, and I'm well aware of the less desirable traits of the language and codebases that exist.)
- userbinator 12y agoThe difference is that with Java, the tools available allow creating immense complexity very easily - and due to how that complexity manifests itself as the complexity of the entire application, each individual piece still looks simple. A parody Java application resembles a real one more than the others you mention, which are more in the "clearly obfuscated" category.
- CountHackulus 12y agoSo what you're saying is that the tooling for Java is more advanced than the tooling for other languages. I'm not sure I see this as a negative. I did node dev for a while, it was horrible, no tools that were any good, got a memory leak? Have fun! Had a memory leak happen in Java once, had the proper tools already, didn't have to interrupt a live server or anything, plus the tools were easy to use and well documented. Really the problem is that when you program in Java, you need to restrain yourself. You could create another level of abstraction, or you could just solve the problem at hand and abstract it later when you find a concrete case for it. And guess what, when you get there, you've got excellent tools for it.
- Iftheshoefits 12y agoI don't know. I've seen some....interesting....C and C++ software that resembles what I wrote above more than anyone might care to contemplate.
- kyllo 12y agoJava as a language not bad, but it's not good either. It's solidly mediocre. IMO the best thing about Java is the interfaces and libraries. When you want to reuse some else's code, just looking at the public methods and their type signatures makes it basically self-explanatory. This is what I miss most when I'm working with dynamic languages like JS, Ruby and Python.