r/learnjava • • Nov 25 '20

why do people hate java so much?

why do people hate java? I personally really love java because of the OOP paradigm and it makes my codes cleaner. not to mention the portability. but i swear I see more than one tweet hating on java everyday, or saying java is dying. is java really dying?

I guess I have two questions; why do people hate on java and is there still a future for java?

120 Upvotes

88 comments sorted by

View all comments

27

u/Koyomii-Onii-chan Nov 25 '20 edited Nov 25 '20

There are arguments for the "hate" Java gets but it's not a generalization, people hate C/C++/Python/.Net/JS for reasons as well because people are by nature haters

  1. There are Linux devs that only like stuff in C, there are windows devs that only like stuff in .net etc. Refusal to accept that a language can do different things is one point

  2. Java can be confusing, for example: what is the difference between JSP, JSF, JavaEE, JPA, Spring, SpringBoot etc. These frameworks / libraries / technologies can be confusing as hell for a beginner

  3. Legacy code and xml hell. Before we had Annotations that simplify the work of configuring beans we had something like

<bean id="country" class="org.arpit.java2blog.model.Country">
		<constructor-arg index="0" value="India"></constructor-arg>
		<constructor-arg index="1" value="20000"></constructor-arg>
	</bean>

All cool and simple if you read a little about spring. Until you apps becomes 200 classes and your xml configuration is a sea of hopeless text

4) Too verbose

Python:

print "Hello"

Java:

 public static void main(String[] args){ 
      System.out.println("Already bored!"); 
 } 

is there still a future for java?

Java won't go anywhere anytime soon so if you are asking if it's ok to learn Java the answer is yes. In 2020 we have better IDE (and I refer to Intellij, God help the ones with eclipse or netbeans) better frameworks and a lot of learning materials

13

u/aleesssa Nov 25 '20

(and I refer to Intellij, God help the ones with eclipse or netbeans)

haha, totally agree with you! i tried eclipse once, and god i hate it.

thanks for the answer, those make sense

7

u/thechexmo Nov 25 '20

Eclipse is powerful, but it'd take you a life to learn how to use all its powerfulness. I tried to, and I got some fun... But in production it makes you waste time IMHO. I know some mates that "understands" the environment and they get good juice of it, tho.

NetBeans is friendly, specially for newbies. A lot of people starts with it and then you may get stuck to it for a long time. I don't personally use NetBeans so much, but i like it.

IntelliJ is smart. Literally some features are designed as intuitive as like someone is reading your developer's head. In contrast to NetBeans, I wouldn't say IntelliJ is friendly to newcomers because I feel it's counterintuitive for them. And i don't like the freemium philosophy that resides underneath the surface of the environment.

I believe each one has its own scope, so there is no thing such "this one is better for everything"

4

u/Hioneqpls Nov 25 '20

I'm biased since I've only used IntelliJ, but god damn what a fanstastic IDE. I see no reason not to use it. If I were ever to teach someone Java from scratch I'd have them use it 100% of the time. Even if they don't learn how imports work. Show em how to code instead.

1

u/thechexmo Nov 25 '20

As like a survey:

Would you pay Jetbrains for features that are free in other software?

There is no right answer, i'd like to know.

2

u/Hioneqpls Nov 25 '20

Yeah, software engineering pays handsomely and I would do it to support further development. Also their support is open to everyone without user registration and at least when I tried it I got a reply within 4 hours.

1

u/HecknChonker Nov 25 '20

The community edition is free and has most of the features you need. And if your are working in a professional environment then you don't have to pay for it because your employer will.

0

u/thechexmo Nov 25 '20

Maybe in your locale, but thinking worldwide this isn't as straightforward as you say

3

u/Alwayswatchout Nov 25 '20

Ngl im using eclipse as a learner to java because IntelliJ is soo complicated. There's waaay too many functions lol

→ More replies (1)

1

u/moe87b Nov 25 '20

I love eclipse tho

3

u/[deleted] Nov 25 '20

I came into java as a beginner, and got the grasp of programming through the java basics. But man Spring was too much of a challenge to get into as a fresh programmer. I'm sure now I could work with it but even still it's not the easiest thing out there.

And your 4th point is exactly what I was going to write. It's just long. Isnt a flaw, but still. Thank god for the 'sout' shortcut in IntelliJ

Good luck OP! Every language has its haters, but if you're enjoying it, that's all that matters

1

u/aleesssa Nov 25 '20

thank you! I bought a course on java because I fell in love with it (java) and wanted to properly get to know it, but some people are really making me question my decision lol. but yeah, you're right, if I enjoy it and it fits my needs, there's no problem

1

u/Koyomii-Onii-chan Nov 25 '20

I recommend the udemy course: spring and hibernate for beginners by Chad Darby. It get you through all Spring from the very basics and multiple Spring projects( MVC, Security, AOP) and later a little spring boot. It's not advanced but perfect to get you started

2

u/jabbalaci Nov 25 '20

In your Java code, you forgot the surrounding class. It's more verbose than your simplified code.

0

u/Vandenite Nov 25 '20

System.out.println("Already bored!");

TBF, you completely exaggerated your comparison here. You don't need to create a class or method in order to output something.

3

u/Koyomii-Onii-chan Nov 25 '20

I have no idea what you are talking about. That is the main method, you can't have a program without it in Java, The main method has to be in a main class

If you are talking about the printing using static blocks

static{

System.out.print("Hello World");

}};

then you need to tell the JVM to not check for a main method. If you are talking about applets that is a different thing but still requires a class

→ More replies (1)

1

u/popey123 Nov 25 '20

Hi, i m using netbean and i would like to know about i ntelliji

3

u/desrtfx Nov 25 '20

Just try it. The Community Edition is free: https://www.jetbrains.com/idea/download/#section=windows

1

u/Hioneqpls Nov 25 '20

But c'mon man every chad Java dev just slaps on an @Slf4j and uses console.log("😎");

1

u/listendudeheylisten Nov 25 '20

Serious question. Why does nobody mention vsc as the ide of choice when it comes to java?

1

u/Koyomii-Onii-chan Nov 25 '20

At my company we have projects that use vsc when developing single page apps with angular / react in a combination with other ide for java. I am not an expert in vsc and I don't know what facilities it has but I doubt it stands near intellij when it comes to it

1

u/nekokattt Nov 25 '20

Honestly from experience, compared to Eclipse and IntelliJ, VSC's Java extension seems to choke on projects that have a large number of dependencies. Working with Spring Boot/Java EE projects becomes unbearably slow very quickly, at least for maven projects.

Might be a different case now, but when I tried it this time last year... I just had to uninstall that set of extensions in the end, unfortunately.

→ More replies (1)

1

u/nekokattt Nov 25 '20

you forgot the frameworks like apache camel that allow you to basically write 90% of your application business logic in pure XML.

Lovely stuff to try and debug if it doesn't work. Strangely no one ever bothered making an XML debugger lol

(Big /s in that second paragraph)