6 ms·
I always had the impression that people that say they 'hate Java', usually don't hate "Java: the language". Most people that dislike programming in Java have a
by rb2k_ 14y ago
I always had the impression that people that say they 'hate Java', usually don't hate "Java: the language". Most people that dislike programming in Java have a negative sentiment because of:
- the usage of XML (or now: annotations) to configure all of the tiny parameters that nobody really cares about
- a class hierarchy in which you have to jump to 20 levels of inheritance to get to where you want to go
- that a lot of Java developers aren't able to compile their application outside of Eclipse
- that people build in "flexibility" in form of factory methods but at the same time only have the factory only build the same thing over and over again
- that setting up java projects is usually an unpleasant experience with way to much work if you only want the basic functionality because there are no sane defaults
- that there is no proper package management for libraries (similar to something like 'gems' in Ruby)
- that all of the concepts that the language is missing was 'patched' in using reflection, injection and annotations
- that the language just seems stuck (for how long did the Java community talk about Lambdas by now?)
- that most Java libraries don't seem to be able to provide a simple example (compare to ruby, examples on the front page: nokogiri.org, sinatrarb.com)
- altcognito 14y agoI agree with all of this -- Maven has fixed the issue with package management to some extent.
- rb2k_ 14y agoUsing maven was a horrible experience for me every single time :( It seemed to download the whole internet and POM files are using everybody's favorite configuration language: XML
- davedx 14y agoSame. Maven drove me pretty crazy, to be honest. Compare it with Ruby gems or Laravel's bundles, Maven felt like using a ten thousand ton tank to round up sheep.
- lmm 14y agoIt is, but it uses XML right: for a declarative document, and one that has tools for editing rather than having to do it by hand. Maven is glorious because it ensures your builds are actually reproducible, something which I've never seen any other language or build tool accomplish.
- rb2k_ 14y agoIn Ruby: To make sure I have the right version of my libraries I use bundler To make sure I have the right version of my code I use git To make sure I have the right version of other applications I use chef. Has worked fine for me so far... I guess it's the usual unix philosophy where each tool does a single job and does it well.
- markokocic 14y agoSo basically one can replace one tool in Java (maven) with four different tools with different conventions and usage scenarios and call the Ruby way simple, and Java way too complicated?
- batto 14y agoIt's better to use different good tools, rather than one bad tool. And by the way, since when is Maven SCM? AFAIK Maven just pollutes SCM with it's dumb release plugin.
- st3fan 14y agoIf you don't want your artifacts uploaded to some place (like your SCM) then don't do it. But let me explain how useful this actually is. When working on a Java project with a team of people, we usually use Maven and some CI tool like Jenkins or Bamboo. People commit code, Jenkins run a Maven build and then either Jenkins or Maven uploads build artifacts to a central repository. Artifacts usually are: the jar/war/ear file, the -src.jar and the -javadoc.jar. If code is finished then it will be a x.y release, otherwise it will be uploaded as something like 1.0-SNAPSHOT. Snapshots are usually timestamped. Now I have a standard place where other projects can find dependencies, where the ops team can grab releases, where developers can find dependencies, code and documentation. Three extra lines in a pom.xml and you get all that. Your IDE now picks it up and keeps it up to date. You can click/hotkey on anything and it will show source or documentation. You call it pollution, I call it a great and pretty much completely automatic infrastructure that makes development so much easier.
- st3fan 14y ago"It seemed to download the whole internet" It just grabs your project's dependencies and probably some extra stuff the first time you use maven. This is not really different from python or ruby build systems.
- cafebabe 14y agoLets face it: There is no system that fits all the needs of everyone and is simpel and easy to use from everyones personal point of view. There is no such thing and each system that does say otherwise, lies. All specializations come with tradeoffs.
- gizzlon 14y agoAbsolutely! I don't particularly like Java the language, but what I hate is the bs-filled "enterprise" ecosystem where code and technology is just an afterthought. Things may have changed though, but 4 years ago I had to look up Java projects on Wikipedia to understand what they where.
- nahname 14y agoXML and the language are my biggest gripes. Checked exceptions are a bad idea. Lack of lambda expression (though they are coming!) is pretty much a deal closer. After many years of working on code, the only real way to clean things up is often a lambda. Turn 120 lines into 30 over 4 files? No chance in hell you were using a Factory Method pattern to do that.
- ralfn 14y agoYou hit most points. Lets add one of my personal biggest gripes: - Java reperesents a way of thinking where all languages issues are fixed in the IDE. A thinking which enables the language itself to grow in all the wrong directions. Its not so much that that is always a bad thing. But if the usability of a language is so dependend upon and designed for an IDE, that IDE really should be part of the language design.
- myspy 14y ago- Programs build in Java are usually pretty ugly. I don't know if this can done any better, but I don't like using Java programs.
- silverlake 14y agoAmong mainstream languages Java is still a good choice. It's easier than C++ and more portable than C#. If you want a dynamic language, you can write chunks of your system in Groovy or Clojure. If you want a strongly typed language with smart features, use Scala. If the build system and frameworks are too big, there's space for someone to design something simpler. There's not much inherent in Java the language that prevents this. The lack of closures is irritating though.