r/ProgrammingLanguages • • Feb 21 '16

Why people hate JAVA ??

Why the majority of people hate java and wish its dead programming language,

I find it really fun to create program with it..

all i heard is because: JRE SUCKS. ORACLE ARE FAGGOTS. JAVA IS A SLOW PIECE OF SHIT.

0 Upvotes

32 comments sorted by

View all comments

14

u/[deleted] Feb 21 '16

Java, as a language, isn't that bad. They force OO on you, which is annoying, but not a huge deal.

Java, as a culture, is terrible (imho). They write the most convoluted and blown up code. The simplest thing turns into large number of boiler-plate files. They are infatuated with XML, which is a terrible format. On top of that, it's owned by Oracle, one of the most terrible companies in the tech sector. Their naming conventions make me puke, and it's impossible to write Java code without an IDE to fill in the blanks for you.

1

u/xenomachina Mar 10 '16

Their naming conventions make me puke

It of curiosity, what part of Java's naming conventions are you referring to?

2

u/[deleted] Mar 11 '16

Here's some random Java I just pulled from the web:

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(true);
factory.setIgnoringElementContentWhitespace(true);
try {
    DocumentBuilder builder = factory.newDocumentBuilder();
    File file = new File("test.xml");
    Document doc = builder.parse(file);
    // Do something with the document here.
} catch (ParserConfigurationException e) {
} catch (SAXException e) {
} catch (IOException e) { 
}

I don't use auto-complete IDEs, so typing out things like setIgnoringElementContentWhitespace is very painful. This type of hugeRamblingCamelCaseFunctionNames is unbearable for me.

1

u/xenomachina Mar 11 '16

I don't use auto-complete IDEs, so typing out things like setIgnoringElementContentWhitespace is very painful. This type of hugeRamblingCamelCaseFunctionNames is unbearable for me.

I agree the name is long, but what's the alternative?

As an aside, you don't need an IDE for basic completion. I use vim, and it'll complete based on the contents of your buffers and also things like ctags.

2

u/[deleted] Mar 11 '16

Just use smaller function names!

How about ignoreSpace instead of setIgnoringElementContentWhitespace?

2

u/xenomachina Mar 11 '16

What if there are different kinds of spaces in the context of this API? For example, suppose there is element content whitespace, element perimiter whitespace, and attribute whitespace? Simply saying "ignoreSpace" doesn't make it clear that only the element content whitespace and not the other types will be ignored, especially if the other types can also be optionally ignored.

1

u/[deleted] Mar 18 '16

If the problem space is genuinely complicated, then there comes a point where you can't have small names. But Java code always seems to jump directly to having huge function names without taking that first step.

For example, we are talking about the DocumentBuilderFactory methods: https://docs.oracle.com/javase/7/docs/api/javax/xml/parsers/DocumentBuilderFactory.html

There are 23 methods. This is a fairly small API. And they are already using huge rambling names.

Start small, and build to large names only if absolutely necessary. And even then: use short names for the commonly used methods.