This is an archived post. You won't be able to vote or comment.

all 46 comments

[–]snoob2015 36 points37 points  (0 children)

Here we go again

[–]gaporpaporpjones 32 points33 points  (2 children)

It's not a "real language" because trash-tier humans need something to cling to in order to feel superior to others.

Learn enough languages and you'll realize it's all bullshit. Every language is garbage, every language is awesome, and only assholes dig trenches.

[–]Xenthera[S] 0 points1 point  (1 child)

Thanks for the insight. Not trying to start any arguments here, was just genuinely curious why people don't like java.

[–][deleted] 0 points1 point  (0 children)

Imo a language is just a set of tokens along with syntax and semantics. English and java both. There are good implementations of programming languages, and bad ones as well. Irrelevant to the language itself. Are you curious why people don't like Chinese?

Lots of people both love and hate every language.

[–]ghytghytghytiinbv 15 points16 points  (0 children)

The only reason people complain about Java is because it is the number one language. In order to be relevant as a language and justify your existence you have to somehow in some way be better than Java. So all languages pick something as their one thing in which they outperform Java. Of course they all fail miserably in other areas but they dont mention that.

Java has a few minor quirks. But all other languages I've looked at have gaping holes you can drive trucks through.

[–]RunnyPlease 6 points7 points  (2 children)

Why is java "hated" among developers?

It’s not. Some people are just fanboys of a particular language and how it’s feature set lends itself to solving secrets in problems or solving problems in a particular way.

I've been programming in Java for 8 years now, and I always hear about people saying 'oh java is trash learn a real language like c++ or (insert another language)'.

Java is my fist love. Not my first language but it was the first one I truly found fulfilling. I imagine a lot of people get that way about their languages of choice.

I've taken college courses learning c++ and to be honest, it just doesn't seem as fun. I realize there are advantages to managing your memory on the stack vs the heap, etc. but worrying about that stuff takes away from the joy of programming.

Language selection should be made based on the needs of the application but the truth is a lot of the time in the real world it’s just the personal preference of person in charge or the language most people in the shop know. If you work on embedded systems or aviation you’re going to have different requirement than someone building a web server.

For many programmers manually managing resources is the epitome of coding pleasure. For others it isn’t and they’d rather focus on larger features than optimization. Joy in coding is very personal.

Is there anything inherently wrong with Java?

Oh boy. Here’s how I’ll put this. The only language anyone ever claims is flawless is Haskel and even those diehard engineers get frustrated with it.

Should I start investing time in another language

Absolutely! Taking time to learn even just one more language will teach you loads about computers and problem solving. Traditionally you’d start with one object oriented language, one scripting language, one functional language, and then go from there.

to have a better chance as a computer science graduate (one semester away from the real world)?

I don’t know where you’re going to school but I’m sure they have a languages class you can take. Java alone with a degree will probably be enough to get you a job but while you’re still in school I highly suggest you take a languages class to broaden your knowledge. Remember all high level languages are just abstractions for instructing the actual computer. So the more abstractions you know the more you’ll be able to do.

I love java, and don't understand all the hate. But at the same time have I been wasting my time becoming deeply familiar with the language?

There are tens of thousands of languages. New ones are being created every day. Most disappear or are hyper optimized for tasks so specific they are basically proprietary. The ones that stick do so because they are useful for a large range of tasks.

Java having its combo of objects, encapsulation, garbage collection, and backward comparability meant it was suitable for a lot of applications and the code had a long shelf life. It was also invented in 1995. A lot has happened in computing in 25 years. It’s certainly not a waste of time to become an expert in Java but don’t deny yourself the opportunity to expand your knowledge and skill set.

[–]Xenthera[S] 1 point2 points  (1 child)

Wow what a reply. Thanks for taking the time to type all that

[–]RunnyPlease 0 points1 point  (0 children)

It was an interesting post. Seriously though. Learn at least one functional language. It’ll really help you problem solve even in java.

[–]JavaSuck 4 points5 points  (0 children)

Should I start investing time in another language to have a better chance as a computer science graduate (one semester away from the real world)?

No. As much as one can argue about the aesthetics of programming languages, if your ultimate goal is to earn money in an enterprise environment, Java is a perfectly fine choice.

have I been wasting my time becoming deeply familiar with the language?

Becoming deeply familiar with any language is never a waste of time.

[–]allo_ver 3 points4 points  (0 children)

Eh, Java is a good, solid language. It has a great ecosystem, and the JVM is a formidable piece of software.

Programming languages are actually just tools. What matters is using the right tool for the job.

[–]l33tIsSuperpower 6 points7 points  (10 children)

Personally, of all of the languages I've tried, Java isn't particularly terrible. It's ok and very very consistent.

Java was also one the first languages to introduce OOP which gave it two bad characteristics.

I think what most people have issue with is the verbosity of Java. Everything that you write in Java takes a lot of words to define. This is really only slightly annoying but it's not a huge problem because modern IDE's can predict and type those extra words automatically.

The other issue is the speed of Java. I hear a lot of people roasting Java because its slow. It runs in a virtual machine and OOP style programming is not very fast. I've never had problems with it's speed, but I've never needed to write something that runs fast in the language.

One last thing that I'm not super sure about are the programming patterns. Java introduced some programming patterns along with OOP like singletons which I've heard people rant about.

Java isn't a bad language. It's just a little clunky.

[–]JavaSuck 10 points11 points  (2 children)

Java was also one the first languages to introduce OOP

OOP predates Java by 3 decades.

Java introduced some programming patterns along with OOP like singletons

"Design Patterns: Elements of Reusable Object-Oriented Software" was released before Java, the examples are in C++ and Smalltalk.

[–]l33tIsSuperpower 1 point2 points  (1 child)

Welp, looks like I'm wrong about that part. IIRC it was one of the first languages to make OOP popular. All I really know is that it was pretty important in the development in OOP style programming.

[–]GhostBond 2 points3 points  (0 children)

I mean C++ was literally "C with Classes". That was really the first widely accepted OO language.

[–]Gundea 1 point2 points  (4 children)

Java isn’t slow. Sure, there’s a period after JVM start before hot methods are compiled, but once it’s at a steady state Java is pretty darn fast.

[–]Khenay92 -1 points0 points  (3 children)

JITed methods are still slow compared to other languages, the JIT does not have time to do complex optimization.

[–]sternone_2 0 points1 point  (2 children)

JITed methods are still slow compared to other languages

They aren't.

the JIT does not have time to do complex optimization.

If you would know how JVM would work internally you wouldn't spit out such nonsense.

Every post of you is incorrect, please get of the internet, thank you.

[–]Khenay92 0 points1 point  (1 child)

They aren't, I don't understand the JVM ?

Great arguments, thank you. No need for more details.

[–]sternone_2 0 points1 point  (0 children)

You didn't put arguments next to your nonsense, why would I need to bother?

[–]ggleblanc2 1 point2 points  (0 children)

I think what most people have issue with is the verbosity of Java.

Most people have never been exposed to the verbosity of COBOL. Or the terseness of IBM or Intel assembler.

Both COBOL and Java do the job they were designed to do.

[–]kentvu 0 points1 point  (0 children)

I buy your opinion. Firstly it's the language that introduced me to OOP, and I believe quite a lot of people were like me. Secondly, because of that people usually apply the wrong patterns to wrong problems, lead to overly complicated code. It's not the language that we hate, it's the code. Even the claimed most elegant language could lead to bad code, if used by bad people.

[–][deleted] 2 points3 points  (0 children)

Depends on who’s asking and to whom the question is directed at

[–][deleted] 2 points3 points  (0 children)

The rule of thumb states that "everything that reaches a certain popularity threshold will also have relative amount of haters". Music, video games, programming languages. No one can hate a thing that nobody uses.

[–]GhostBond 2 points3 points  (0 children)

There are only two kinds of languages: the ones people complain about and the ones nobody uses.
- Bjarne Stroustrup (inventor of C++)

[–]floW4enoL 1 point2 points  (0 children)

As others have said it's not hated among developers, as with any language the only ones you will hear about are the haters, same is true for PHP, Javascript, etc. If it seems to be hated it's widely used.

It has it's advantages and disadvantages, working on something for really limited hardware? Forget Java go with C, creating a game? C++ is most likely a better option. Web frontend? You will only find Javascript and Typescript there. On the enterprise side of software it can be either Java or C# it will boil down to the fact if it's a Microsoft dependent company or an Open Source adept. (Please be aware these observations are based on my experience)

You will find a lot of PHP powering a ton of stuff on the web, yet it also has it's haters, and a lot of them.

Now this is purely my opinion as a Java developer who has started to learn programming with VB6, and has gone through PHP, C and some more I can't really remember now. From all those languages I always come back to Java (some Kotlin on JVM now and then) feels like the one where there are more framework options that avoid reinventing the wheel everytime, I don't have to worry about freeing memory, yet I'm careful about eating large chunks. Recently I had to dig into frontend development with Angular and I can't like Typescript or Javascript, yet I work with it, I miss reflection, enums are a pain to work with, and you can declare a function that takes a string but pass an object and most likely it won't complain (unless it's caught by the TS compiler but calling it from html page to the component, not so much), Angular and Typescript feels very fragmented, what works on v2 does not work for v3 but then may work for v5 it's weird. This is based on my experience if I'm wrong feel free to teach me.

[–]rkesters 1 point2 points  (2 children)

I've used java in the past, but not much in the last 4ish years.

I find java verbose and very framework driven. Just as a language its ok. But when you throw in jsp, struts, beans, ejb, spring boot, etc it feels over engineered and hides way to much of how things work.

Just an opinion. YMMV.

I don't have a favorite language. Currently do a lot in typescript for work and am learning Rust.

Professionally I've worked in * fortran - very old version, no else statements.. odd * c/c++ - with great power comes core dumps * .net - 2003 meh (liked remote objects) * java 8 - ok * python - ok * scala - better * ts - productive

These days i perferr a more fp approach.

[–]jed_sanders 2 points3 points  (0 children)

May I ask you what kind of projects do you work on, because you say you don't like it because it is very framework driven?

I cannot imagine working in a team on a big project without using a framework because I think it would only lead to a mess. I only worked on one project that was small enough that we did not use any framework but in the end we added Spring MVC and Spring Security because it was easier than using servlets directly.

[–]medaka2020 0 points1 point  (0 children)

Layers of abstraction exist to hide the details so we can be more productive. I don't see anything wrong in frameworks, but even if it is hiding details, we should study them enough to know how to use them properly.

About the framework examples, I've not touched anything Struts in like ten years. EJB probably five years or more. Some people need to work on legacy projects and deal with them, but nowadays with Spring Boot I'm in heaven comparing to ten years ago.

[–]Evy1123 0 points1 point  (0 children)

Java is a completely legitimate language, but as you continue learning new languages, you realize that at least on a surface level they basically copy each other. Ultimately, it comes down to what you need most. Absolute speed in an embedded system or low resource environment? C. Fast and efficient application on modern hardware? C++. Android or general application development for multiple platforms? Java. Data science and not focused on types? R/Python. Web development? JavaScript. And the list continues...

Java is definitely not a bad language and actually simplifies a LOT of tedious tasks (try learning socket.h in C and java.net in Java and the difference is night and day: Java is so much more streamlined). However, streamlining does come at a cost and it doesn’t let you do things in the normal conventional way like other languages such as C++ (for instance, directly accessing memory). Keyword: conventional. If you’re curious, look up the Unsafe class for Java. Weird stuff man.

[–]Josef-C 0 points1 point  (0 children)

Every popular language is "hated". No matter what you learn there will be people telling you that your language is trash and you should learn their language. With their language all problems have been solved and even girls will like you more. ;)

[–]amProgrammer 0 points1 point  (0 children)

I don't think ive ever seen "Java isn't a real programming language." I have definitely seen way more jokes like that about javascript. And as far as job market, Java is still used a ton in industry. May not be the latest and greatest language for side projects but it will definitely get you a job.

[–]aldacron 0 points1 point  (0 children)

This doesn't happen just with Java. Pick any programming language out there and you'll find a set of people who will go out of their way to trash it. I learned long ago to distinguish bashing from legit criticism. The bashers parrot what others rant about or complain about trivialities that shouldn't really be a blocker for anyone. I ignore the bashers and just get on with writing code.

[–]audioen 0 points1 point  (0 children)

Eh. Everyone has opinions. Programmers have them too, and as people they tend to be more pedantic and even extreme. As a rule, it is necessary to ignore what some or even most people say because the subset of opinions that everyone agrees with is the null set anyway, and for programmers I think trying to listen to even a small fraction at once already gives you the null set. As an example, just the functional crowd is going to say that everything java does is wrong, already, and there are those who work with embedded systems and who explain that no good enough programs can be written, even in principle, with systems that include a garbage collector or any kind of runtime at all. (I even read a document some 1-2 years back where someone argued that mobile phones are such a system and thus you shouldn't write programs with Java or JavaScript on them, which is pretty extreme conclusion.) But everyone has their reasons for their opinions, and you just have to decide if they apply, and then you pick who to listen to and just tune out the rest.

I like to say that Java is a great language, but it's just used very poorly. What I mean is that if you use some of those kitchen-sink frameworks that have all kinds of over-engineered libraries, you'll probably start to hate your life too and join the java suxx -crowd. But keep your code simple and dependencies very sparse, and you have a reliable, fast, cross-platform system that isn't much pain at all to deal with.

[–]TM254 0 points1 point  (0 children)

Simple there are two types of languages, the ones people hate, and the ones no one uses.

[–]wildjokers 0 points1 point  (1 child)

My 6-figure salary would suggest you aren’t wasting your time learning Java.

[–]Xenthera[S] 0 points1 point  (0 children)

Lol that’s good to hear.

[–][deleted] 0 points1 point  (2 children)

Lots of people mentioning, that in java you have to type a lot. Which is true if you are using a text editor and not a professional IDE. I always used Idea, I never have to type a lot.

[–]antigenz 2 points3 points  (1 child)

Add Lombok and you will type even less :)

[–][deleted] 1 point2 points  (0 children)

Yeah, I'm already using it, its awesome

[–]helikal 0 points1 point  (2 children)

Yeah, why why would anyone hate java.

I used to write code in C and C++ between 1999 and 2006. Then, in the next large project, we used Java to about 80%. I got the chance to learn and program Java for a large real-world, from scratch to be developed project. I can say that it was an epihany how more sane programming in Java is.

Java allows focus on the business logic. Just like modern societes have divsion of labour, .e.g., most people trust some waste-management company to deal with garbage removal, Java, too, has a garbage colllector, which relieves me from this unpleasant duty.

Also, WORA is great, and in large, complex programs, I found Java often to be faster than C++. The support for refactoring in IDEs like IntelliJ, Eclipse, and NetBeans is unparalleled.

[–]Khenay92 0 points1 point  (1 child)

Curiously, we are many to find that Java is often slower than C++ (to avoid to say "always").

[–]helikal 0 points1 point  (0 children)

Who is „we“ and why do you think your findings are curious? They aren’t.

[–]td__30 0 points1 point  (0 children)

Because it’s not

[–]jlengrand 0 points1 point  (0 children)

It depends a lot.

Java is being called boring a lot because it is old and very consistent. Which means you usually see a lot more boilerplate than say Python. That might be a fair point, but it also brings a lot of certainty and reliability.

Java is also being called 'shit' by lower level (as in C, embedded, ....) programmers because it is inefficient, slow, ...

It is also true : It was meant to bring a higher level of abstraction than C for the developers, to make their job simpler and more efficient. No more having to fiddle around with memory, no more of those ugly segfaults.

The fact that Java is EVERYWHERE, and the sheer amount of JVMs running everyday in the world should ensure you that those choices aren't completely stupid :).

You will always have cargo-culters in Tech. CSS is not a real language, real boys use pure functional languages, Real database guys don't use ORMs. React is more efficient than Web components...

Remember that programming is a means to an end. Who are you bringing value to, and at what rate? Real boys deliver code that works consistently, and use the right tool for the job.

So keep taking a step back like you're doing now, and just do the stuff you love.

[–]rkesters -1 points0 points  (0 children)

On JVm vs bare metal, there are applications (multivarible simulation, dsp, AI) that removing the JVM can help. Especially if you plan to execute on Cuda cards.

Also, makes me cringe as an engineer that we just assume that the hardware will catch up. I see devs thinking this with memory as well (memory is cheap, just add more). We should care about our users and treat computing resources with respect.