News for hackers. Stuff that matters.
Re:Hate Java? You’re fighting the wrong battle. by rb2k_ on Saturday June 04, 2011 @12:46PM (#2619796)
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)

Re:Hate Java? You’re fighting the wrong battle. by spullara on Saturday June 04, 2011 @01:45PM (#2619966)
Java is so popular, easy to learn and use that there are tons of terrible frameworks and bad programmers in the community. Rebel against it all you want but in the hands of great developer you can get pretty amazing software written in Java like Hadoop, HBase, Lucene, Cassandra, etc. Java is the assembly language of the JVM and since most of the cooler new languages are on the JVM (and written in Java often) it will likely remain as the way to eek the best performance out of your applications and likely has the library you need to get your job done.

As for your points in here. Most of them I can respond with "don't do that".

Re:Hate Java? You’re fighting the wrong battle. by jshen on Saturday June 04, 2011 @02:38PM (#2620127)
I don't think those are examples of great software. They are very useful, and many fill a niche that needed filled, but they aren't great software IMO. Hadoop is a very leaky abstraction to give one example. I've seen it crash frequently because people used wild cards for their input and the job tracker would run out of heap and crash.
Re:Hate Java? You’re fighting the wrong battle. by currywurst on Saturday June 04, 2011 @06:19PM (#2620613)
Hadoop is a leaky abstraction because it crashes ? Does not compute!

I'm not very familiar with the others, but Lucene is really an example of great software. In a few lines, it makes you feel as if you can build a Google by yourself !

Re:Hate Java? You’re fighting the wrong battle. by jshen on Saturday June 04, 2011 @09:41PM (#2621024)
"Hadoop is a leaky abstraction because it crashes ? Does not compute!"

Hadoop is an abstraction over a distributed file system, that allows programmers to crunch large amounts of data using map reduce.

It leaks in the sense that you have to think about implementation details of the job tracker or you will crash it. That's a leak, right?

Re:Hate Java? You’re fighting the wrong battle. by MrMan on Saturday June 04, 2011 @02:51PM (#2620162)
Bytecode is the assembly language of the JVM. Java is the Java of the JVM.
Re:Hate Java? You’re fighting the wrong battle. by spullara on Saturday June 04, 2011 @11:15PM (#2621181)
The differences between Java and its bytecode are pretty small. There are only a couple things that you can do in bytecode that you can't do in Java source and they are mostly irrelevant.
Re:Hate Java? You’re fighting the wrong battle. by jimbokun on Saturday June 04, 2011 @04:53PM (#2620437)
"As for your points in here. Most of them I can respond with "don't do that"."

The problem is if you are writing Java, you are probably working with people who do do that.

Re:Hate Java? You’re fighting the wrong battle. by spullara on Saturday June 04, 2011 @11:17PM (#2621186)
Since we were talking about Java and not bad engineering management and poor design choices, I thought I would point out that programming in Java doesn't have to be like that. Perhaps I should call it Java!EE.
Re:Hate Java? You’re fighting the wrong battle. by regularfry on Saturday June 04, 2011 @02:19PM (#2620074)
"Don't do that" is useless advice when whatever "that" is is being inflicted by a third party.
Re:Hate Java? You’re fighting the wrong battle. by seanp2k on Saturday June 04, 2011 @03:04PM (#2620200)
Mostly, this. I've seen Java go fast and work well and scale and do other "enterprise-y" things, but there is tons and tons of awful software out there.

I just feel like there are better choices for most projects.

Re:Hate Java? You’re fighting the wrong battle. by thecabinet on Saturday June 04, 2011 @05:29PM (#2620517)
Some of your complaints are definitely right. A lot of factory-mill certified Java programmers go crazy with XML, factory-pattern, and other enterprisey stuff.

But there are two things I can't let slide:

1) Maven fixes a lot of the project-setup, build configuration, and package management issues. It's not perfect, but it makes a lot of things much, much easier.

2) "That most Java libraries don't seem to be able to provide a simple example." Oh, please. Sinatra and some of the other gems do have amazing examples. But half of Ruby's stdlib has no documentation at all. Hell, things like rss use so much fanciness that there aren't even methods!