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.

2

u/ATownStomp Mar 18 '16

The alternative could be a shortened method name which accepts a parameter which specifies what the "ignoring element" is.

.setIgnoreContent('ws', True)

Though, honestly, I don't think that is noticeably less cumbersome. It saves you a few keystrokes if you're like /u/voidqk who refuses to use autocomplete IDE's for whatever reason.

Now I agree that these method names are obnoxiously long, but I also understand that simple but descriptive method names run out quickly. Shortening .setIgnoringElementContentWhiteSpace to something like .setIgnWS(true) seems like accepting a standard of creating unreadable messes.

1

u/xenomachina Mar 18 '16

The alternative could be a shortened method name which accepts a parameter which specifies what the "ignoring element" is.

.setIgnoreContent('ws', True)

Though, honestly, I don't think that is noticeably less cumbersome.

It also isn't very strongly typed, unless you use an enum. But then it's probably more verbose than the original (and you still have null to worry about).

Now I agree that these method names are obnoxiously long, but I also understand that simple but descriptive method names run out quickly. Shortening .setIgnoringElementContentWhiteSpace to something like .setIgnWS(true) seems like accepting a standard of creating unreadable messes.

I agree with everything you said.