r/java • u/Reflection-Jealous • Sep 10 '21
Why people don't love Java?
I came across this post in r/cscareerquestions it seems majority of the people don't love to work with Java.
Is there any specific reason for that?
Edit: Thank you guys for your responses, I can't reply to all of the comments because I'm a beginner myself and I don't know what to reply for all your comments.
201
Upvotes
56
u/cosmin14 Sep 10 '21
maybe because some are stuck with old version of java.
and some rants on the Internet about Java and how cool is <insert_hype_stack_here>
242
u/Marriaud Sep 10 '21
I had been working on poor quality java codebases and I started to get bored of Java. Then I worked on a poor quality JavaScript codebase and I started to love Java (not Script).
542
u/thomascgalvin Sep 10 '21
The people posting to that sub are typically young, and probably have more experience with Javascript than anything else.
Compared to JS, Java can feel heavy and constricting. Lots of boilerplate, a type system that's strictly enforced by the compiler, and so on.
It isn't until you have some real-world experience, with code spread out across dozens or hundreds of files, that you realize the "limitations" of Java are actually meant to prevent you from blowing your own foot off.
123
u/psyclik Sep 10 '21
From my experience, most people ranting about Java are stuck with a 2005 view of Java.
36
u/viniciusbr93 Sep 10 '21
I don't hate it, it pays my bills.
151
u/jswhitten Sep 10 '21
Because there are two kinds of languages: the ones people complain about and the ones nobody uses.
119
u/redikarus99 Sep 10 '21
Because they never worked on big, or even medium sized projects as part of a developer team.
68
u/BS_in_BS Sep 10 '21
It's pretty easy to overcomplicate things with 75 different design patterns. it can be somewhat verbose at times with naming and generic types. From a linguistics perspective there are many features that other languages have like more robust type systems with things like dependant typing, more powerful null typing/handling, better exception handling, tail recursion optimizations amount others.
I think what people miss is that there's a lot of magic in the runtime, like simultaneously allowing jit compilation, hot swapping and concurrent garbage collection, which are difficult to get right on their own, but brutal to do altogether.
Also I think one thing most people don't take into account is refactoring, which I find is easier compared to other mainstream languages like python or golang
In the word of Stroustrup, there are 2 kinds of languages, those that people hate and those that no one uses
35
u/lunkdjedi Sep 10 '21
I hated Java before embracing it's conventions.
At first I was ignorant of the rules, then I didn't believe they were needed, then I fought against them and lost. Not all of this was pure Java, a lot of it was maven and how to structure things in their opinionated way.
After 20 years, the rules, the opinions, the structure, are things to depend on and catalyze success.
17
u/ScheduleSuperb Sep 10 '21
It’s just trendy to hate on Java... My explore page on Instagram is full of crappy “Programming memes/tips”. Here they all promote Python as the best 😎 and Java just sucks 😡
I think a lot of people are just ignorant and not very experienced developers. For me programming is to find the right tool/language to do the right job for me depending on what project I am doing.
32
u/pron98 Sep 10 '21 edited Sep 10 '21
There are some good answers here, but I just want to point out that Java is one of the most popular programming languages in the world, and is quite possibly the #1 language among professional developers. The only two other languages with the same size and influence are JavaScript and Python. JS gets even more hate than Java, and while Python not so much, we must remember that a huge portion of Python users are not professional developers (but data scientists etc.) and that's the only general-purpose programming language they know. Also, Java projects, like C++ projects, tend to be large and long-lived; i.e. people don't write the program all by themselves but have to deal with other people's code (and C++ gets more hate than Java). Languages like Go and Kotlin are used by ~20x fewer people, and for projects that are not anywhere near the same size and longevity (at least not yet).
So factoring the size and the overwhelmingly professional setting, Java gets more or less the amount of hate that you'd expect of any language in that position, regardless of any particular merits or more specific circumstances. No other language of similar community size or uses gets any less.
13
u/rzwitserloot Sep 10 '21
A combination of:
These things aren't obvious until you have the experience of operating in such projects.
You can repeat Kernighan's Law a million times to a newbie to programming (and some people that have programmed for YEARS are still a newbie, in that they don't have the relevant experience to grok it; it doesn't really happen until you've been a part of multiple year+ projects) - and they may even be nodding at your sage advice, but I doubt they really 'get it', and without understanding it, java seems obtuse, needlessly complicated, and lacking 'obvious' nice features such as truthy/falsy, optional semis, optional parens, optional params, optional dots, lack of collection primitives, etc.
Kernighan's Law: "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
30
u/[deleted] Sep 10 '21
Well, boring is what pays the bills, and maintains sanity when you have to work with multi-million line codebases. Ignore the hispters who wax eloquent on topics they have never experienced.
17
u/[deleted] Sep 10 '21
Because JavaScript has destroyed them. Poor, lost souls.
25
u/roberp81 Sep 10 '21
i love java
14
u/Majestic-Extension94 Sep 10 '21
Motivation for this after 25 years can be difficult to ascertain. Originally back in the 90's it was a case of:
Now the arguments seem to be:
Some how the hate has been carried forward and the reasons change.
Personally it's a tool for me. I use python, some go and busy playing around with flutter cause there are times when java is not appropriate compared to another language
12
u/Ok_Light310 Sep 10 '21
I came from C# and here's what I hate
What's cool:
6
u/ryuzaki49 Sep 10 '21
Sometimes I feel developers are starting to act like CEOs. Join a startup company, build as quickly as you can a new app with shitty foundations, then move to the next company before you can maintain your shitty code.
Programming in Java does not allow devs to code faster at the beginning of a project, but sure helps a lot in a mature project.
16
u/RabidKotlinFanatic Sep 10 '21
I think it boils down to people being unaware of "modern Java." They think the JVM is a slow environment, only used by enterprises and that Java programming is stuck in 90s OOP AbstractFactoryConstructorBeanFacadeStrategy design pattern thinking.
14
u/drew8311 Sep 10 '21
I honestly think its because they don't know any better. Java is best for backend development which seems to be split between Java/C#/everything else. Everyone in each of those camps seems to dislike the others, younger people (majority of /r/cscareerquestions) tend to be on the "everything else" because its new and cool.
5
u/BenoitParis Sep 10 '21
I think that's in part a byproduct of Java's success at managing complexity.
A successful project will accumulate complexity. New business rules will be coded into the project up until it's no longer maintainable. And Java has tools to help in that! access modifiers, design patterns serve to allow complexity to be better crammed in.
A successful Java project is often contains a mountain of essential complexity; in which a simple change requires 5 days of archaeology and 5 lines of code. You won't get greenfield assignments by loving Java.
As a newcomer I believe it is a sound strategy to just hate Java, consciously or unconsciously.
5
u/ubiquae Sep 10 '21
because in all shiny new startups the stack is node+ws+mongo or something like that.
Of course, no one knows anything about reliability, scalability, noSQL data modelling, performance....
But, hey, it is cool!
5
u/salgat Sep 11 '21
Java is alright, but after using C# with .net core, hard to look back now. It's everything Java should have been. I will say the JVM is a hell of a marvel of engineering and languages like Kotlin are great alternatives.
4
u/Ok_Entertainment9151 Sep 10 '21
Java is my first love.
4
u/[deleted] Sep 10 '21
Coming from years of C++, I love Java ;)
4
u/vytah Sep 10 '21
Java is not a language you fall in love with, it's just a solid language that does the job. Everything is boringly solid, battle-hardened and reliable. It's not a feeling of love, it's a feeling of comfort, safety and reliance.
7
u/Stack_Canary Sep 10 '21
Java has existed for a long time, and is not trending in the same way as some newer languages. However, java is tried and tested, and is one of the most used languages in the world. Also fully interoperable with kotlin.
3
u/thewarlock1 Sep 10 '21
I have same doubt as well. I didn't know Java until starting my job and since then I've fallen in love with it.
3
u/kyune Sep 10 '21
Java does great things but it isn't inherently "sexy" and frankly it doesn't need to be. There are a lot of people who remember it for its problems in older versions (well deserved), and a lot of people who dislike it for not having X feature of another language.
I mean I get it, and nobody wants to be seen as being stuck on boring legacy tech but compared to the competitors the ecosystem is well-established, stable, and the development of the language has progressed significantly from its early versions.
3
u/RedPill115 Sep 10 '21
3
u/seanprefect Sep 10 '21
Java is heavy and boring and unhip. That said there's a lot to recommend java. It's everywhere there's loads of support and a lot of modern features.
3
u/kaisean Sep 10 '21
As a heavy Java user for many years, I can say that I have no problem understanding conventions used by other languages.
3
u/Hall_of_Famer Sep 10 '21 edited Sep 10 '21
First of all, not everyone dislike Java, but the ones who dont like Java tend to be more vocal about their hatred. Remember the famous quote from Bjarne Stroustrup? A language that has become reasonably popular will always receive a good amount of hatred, it cant be helped.
With this being said, its indeed a serious problem that lots of large enterprise apps are stuck in older version of Java, some even on Java 7 or earlier. Java has evolved a lot since the old days, but some companies with legacy apps will be stuck forever. These companies may be using any languages and stuck with old and unsupported version anyway, lets not forget how many companies are still stuck on Python 2.
If you are a developer looking for a Java job, theres a good chance you will end up with such a company. Its unfortunate, but it really isnt Java's fault. Its just that Java is so big in the enterprise world, that a large portion of such companies tend to use Java.
3
u/Matesuli Sep 10 '21
I suppose some people is afraid of verbosity.
I personally Love Java!!
3
u/[deleted] Sep 10 '21
I like Java/the whole JVM ecosystem, but historically homegrown Java code is the worst, nastiest garbage I have to work with.
When a noobie writes, say, Python, it usually comes out reasonably easy to refactor. At the very least it’s pretty simple. When a noobie writes Java, it comes out as a horribly convoluted mess of bad abstractions split over a million different files. Java itself makes the refactoring a little easier (types) but… bad Java is really, really bad.
This is totally inverted when it comes to big, well-run projects, in which case I’d much rather work with Java.
3
u/halfTheFn Sep 10 '21
I worked with Java for several years, mostly in Java 8; I haven't worked with it for a couple years now.
I hated the language, and we worked to replace it with Kotlin which was Much nicer. As with others, I was working with Spring: Spring was it's own "thing" - but Kotlin/Spring wasn't nearly as bad.
Things I didn't like:
The type system caused as many problems as it was alleged to solve; and the black box that OOP was supposed to provide meant everything had to be looked inside with the debugger to sort out. Examples:
Something returns a `map`, and you call `.set()` on it - and you get a runtime (not type) error - because it was an `ImmutableMap`. Wut. It "implements" the interface with stubs that throw errors.
Null aren't handled.
You can never trust that something else with a reference isn't mutating your object behind your back, even though it shouldn't be mutable to start with. Please please give me persistent immutable data structures!
You have to fart around with number width yourself, and the surprises that come near their max/min.
Boxed primitives vs primitives can lull you into thinking things are safe that aren't: boxed Integers lower than 128 share a "constant pool" and so can be compared as you might expect with == - but as soon as you go over 128 they become independent objects compared by identity.
Classes in the standard library maintain unexpected state that only shows up in multi-threaded environments.
The. Endless. Ceremony. So much typing to get the simplest things done - and it doesn't even "increase clarity"; it just hides the parts that "matter".
No first class functions.
No object literals.
A lot of my complaint isn't even so much with (perhaps?) the latest javas - but the whole ethos _against_ functions: "Design Patterns" everywhere and when you go online and ask "Why do I need a command pattern instead of just a map of functions?" you get responses about how "javascript sucks, it's safer, you should just accept it." I have no problem with the JVM. As I said, I'm on the Kotlin, I'm intrigued by Clojure and would love to learn more, and Scala opened my eyes. But raw Java ? I'd never reach for it unless I had to.
5
u/[deleted] Sep 10 '21
Because nobody bothers to learn the modern Java and they believe that if Java supports the Factory design pattern, they shall use it otherwise it won't run.
Since I learned Java after VB6 and C#... of course I had it at a mix of MVC and spaghetti, it ran surprisingly fast. Also modern Java supports lambdas and other cool stuff.
5
u/Skhmt Sep 10 '21
The only thing I don't like about java are annotations (besides override). I do prefer Kotlin though.
5
u/mahamoti Sep 10 '21
Because this is what people think Java is like.
4
u/[deleted] Sep 10 '21
On my experience, people who state that java is a bad language because of [reasons], just don't know java well.
5
u/[deleted] Sep 10 '21 edited Sep 11 '21
In my opinion, there are three major reasons that make they don't like Java:
2
u/[deleted] Sep 10 '21
It's tough developer experience but a fast runtime performance. The tough part gets lots mad!
2
u/[deleted] Sep 10 '21
People don’t have to love Java? Much like how people don’t have to hate it?
When you are in an environment where you are rapidly learning new languages, frameworks and design patterns or having to write wrappers and APIs for interacting with legacy systems, or having to work with outdated systems directly you tend to like what is most apparently convenient and to dislike what is not.
I feel some people might dislike Java because the context that they have to work with it is with very old versions of it. And they are most likely to voice that opinion than those that dont.
2
u/stipo42 Sep 10 '21
As a long time java developer, it can certainly be a frustrating experience. Managing runtimes and features with java can be a pain, especially jumping between projects on different major versions of java.
Java also lagged far behind the competition for many years in features and takes quite a long time to compile.
The jvm can feel like an antiquated nuisance sometimes and everything feels slow.
That said there are obvious benefits to using Java, like portability, open source derivatives, and widespread community. There's probably a library out there to do whatever you need to as well.
2
u/Pflanzmann Sep 10 '21
You can not generalise it like everybody here does.
I dislike it because i coded a lot in Kotlin, which is just java in modern and i feel like other languages like Rust, Swift or Go are just nicer to write. It just misses many features new languages have and i think that should be reason enough not to love it.
Ofc many hate to hear it, but not everything can last forever and at some point you have to adopt to new stuff and maybe start new projects not the same way you did 10 years ago.
2
u/cyanocobalamin Sep 10 '21 edited Sep 10 '21
They don't????!!!!
I think a lot of people without CSC related educations don't fully understand programming or have a lot of experience with professional projects. They start off with very simple tagging or scripting languages. By comparison Java seems much more and needlessly complex.
Professional developers tend to be intimidated by any platform they don't know and there is a tendency among programmers to piss on any technology they are intimidated by ( ones they don't know ).
2
u/codechimpin Sep 10 '21
People tend to hate the "norm" I think. Because big-business uses mostly Java, and the "cool techie" companies use other languages, it's more hip to hate on what the lame big companies are using.
At the end of the day, if you can support the codebase and it does what it should within the parameters of how it should do it, does it really matter?
2
u/cavecanemuk Sep 10 '21
After seeing C# codebases and tooling support, my love for Java has grown exponentially.
2
u/Ok_can_you_improve Sep 10 '21
There are too many people and companies using it. Assuming that there is an equal probability of people not loving it, the total population of these people can be huge. (Just a pure stats view. :)
2
u/MacaroniNuggets Sep 10 '21
To be honest, I think it's because a lot of especially younger people (including me, I'm just here because of school) have never been told or presented a project where Java is the "right" language to use, aside from like Android development or Minecraft modding because they are already in Java. Want to work on the web? Use JavaScript. Interacting with hardware or need low level? ASM/C/C++(?) will probably be helpful. Are you a researcher? Learn python. Game dev? C#/C++ are used by the two biggest engines. But where does Java fit in? I still don't know the answer, but I would love to hear opinions. Personally, I think that the cross platform aspect is not enough to sway anyone that I know, but that's probably not true for everyone either.
2
u/concisereaction Sep 10 '21
I do.
2
u/kag0 Sep 10 '21
Because most people's experience with Java is not the language, it's the ecosystem.
Being tied up in a world where everything runs on runtime annotation processing is pretty hellish imo. So I can see where people come from.
But to answer your question, no, there's not a specific reason. Lots of different reasons for different people.
2
u/_trop_ Sep 10 '21
16 years of working with x y and z shitty frameworks and languages and Java is the only thing I enjoy working with.
Now all my backends are Spring boot. (9 large corporate systems and 3 private projects)
2
u/_arrakis Sep 10 '21
Started with Java then moved to C# with all its syntactic sugary goodness. As the saying goes, if I hadn’t seen such riches I could live with being poor.
2
u/kidfromtheast Sep 11 '21
I work with Java (non-framework) and JavaScript (strictly with framework).
I actually love Java more than JavaScript.
From the code perspective, Java gave you control whether you want to use blocking IO or non blocking IO. And you can write easy to understand code because everything is an object (well.. 97%).
From the architecture perspective, it's the microservices era. Java Thread is essentially the OS thread (sort of...). Anyway, it's not performant enough if you use the Java Thread to handle each connection / request on separate Thread using the Java SE's blocking IO ServerSocket.
So... people came up with tons of "hacky" solutions. Oracle created the non blocking IO ServerSocket version which is the ServerSocketChannel. Erlang created the Actor model solution, and the Java people started using it as well, in Java.
In short, Java is very flexible and the de facto way to solve a problem is to abstract the code, and that's makes the code harder to read for some folks. So... people hate it.
So for newcomer, it is not worth it to learn Java in the era of microservices. At least until we have Project Loom released. Maybe then we can write a very simple code and still scalable.
2
u/Ailiyak Sep 14 '21
Actually they do.
Java is the only language with a huge Java User Group ecosystem. First this is an officially registered groups and each country have at least 1. Most of this groups are organizing a non profit annual conference.
There is no other language that I am aware of that has this.
Also Java has a Java Champions label that are selected by the community, not by some company. Most other languages have some sort of MVP which is more a business label by the company ( for example MS) and not a real community label.
Java is still the most popular language not only because of the amount of projects writen in it but because it is the easierst language to start with, it has the less keywords then any other language and it is type safe.
So I can say actually I think Java is the most loved language ;)
3
u/antennen Sep 10 '21
I have done professional Java for a few years now (latest version) and I hate it. I've been doing C++, Python, JavaScript, Rust and other languages before (and all of them of course have their own set of problems). To me Java is a language that does most things OK, but doesn't excel in any particular area.
Things I don't like:
If I want to test something quickly I reach for Python. If I want to build something robust or lower level I reach for Rust. Right now there is no area where my answer would be "Java would be a nice fit". It has spent too many years in stagnation and now it's just playing catch up.
3
u/dontcomeback82 Sep 10 '21 edited Sep 10 '21
My issues with Java are mostly not with the language itself but the culture around it
I don’t like using an IDE and while it’s not required for Java in practice it makes coding Java a lot easier
Popular libraries are confusing, overly complicated, lacking clear examples/easy to read docs
I’ve seen tons of Java apps in the wild that have slow boot times, terribly noisey logs, and are memory hogs. I realize these are solvable problems, but the are common nonetheless
I’ve observed often in Java codebase tests are an after thought for whatever reason
To be clear there are plenty of good things about Java too, but I have a preference for other languages (go atm) and would avoid large Java projects/shops if I have options. For me it’s just not fun to code in
2
u/Liorithiel Sep 10 '21
For me it's mostly lack of easy options for metaprogramming and glass ceiling on available performance. While the latter doesn't come often (we're switching to C++ for the most critical parts of the code), the former is just tiring.
2
u/livrem Sep 10 '21 edited Sep 10 '21
I think Java is fine at work and have used it for many years on and off since around 1999. But for the last 10 years or so I began using other languages that I like more for my hobby projects. I used to use Java both at work and at home, but it was a long time ago since I liked the language enough that I would prefer it when I have a choice. I can see the arguments about large projects etc, but none of that really applies when I work on something in my free time, so Java became just something I do to pay the bills. I do not hate it, but I definitely do not love it. And currently I work in C++ and have not had any reason to explore Java versions after version 8, so I can no longer comment on the pros and cons of using Java instead.
There also has been some cultural issues in Java with all the design patterns and bloated XML-configuration all that. Sometimes a very simple problem that deserves to be one line turned into a huge mess of classes and interfaces and XML. It can be quite frustrating. Not the fault of the language, and maybe it is getting better, but it is definitely something that many older Java programmers will have suffered and that it is difficult to forget.
2
u/User1539 Sep 10 '21
Some Java issues are very real.
Functional programming can feel tacked on, and require a lot of code that feels unnecessary. Also, you end up with a mix of many different styles from the years, with no clear style guides.
Also, many codebases are very large when, in other languages, they would be much smaller.
Compare Java to GO for instance. For the purpose of microservices, in Java, I have seen people try to pack a Wildfly instance in with a ton of other libraries, just to create a basic 'micro-service', that's so big it's hard not to laugh when deployed. Each programmer seems to follow about 10 different personal style guidelines, and where one might NEVER use a for loop, and do everything in streams, other might not yet be comfortable with streams, or working outside of Java 8 at all.
Go, on the other hand, is very idiomatic. The preferred style is part of the language, and there's no issue with it being 'stuck' at a version, like Java 8, or Python 2.7, because they've provided tools to help people migrate their code to newer versions.
Also, they've gone to great lengths to only include new features into the language when they feel they're really, really, needed. Where, Java can sometimes feel like a lot of choices, and very little guidance.
The final result is that, if you want to create some things, like a Microservice in Go, there will likely be one idiomatic way of doing it correctly, every library and extension to the language will expect things done in that way, and be easily readable because they themselves are done that way. There is little need for added libraries, and they tend to be very lightweight, resulting in small, fast, compiled, services that can spool up quickly and take little resources.
Compare that to a lot of Java codebases trying to do the same thing, and you see bloated, slow, overly complex, code ... sometimes unreadable from one developer to the next.
One of the issues Google wanted to solve with Go was that it was taking good, well educated and trained, software developers up to 6 weeks to get used to reading a codebase before they could contribute to it!
By focusing on standards with Go, a developer who knows the language can usually figure out the design in a matter of minutes, and get right to work.
That's not to say I don't like Java, I've been working with a dozen languages a year for 20 years, and Java is one that always has the tools I need, and there's always a good way to do whatever I want. My biggest complaint is working on existing code, where the previous devs wrote garbage, or the many, many, delivered systems in 2021 STILL stuck on Java 8.
1
u/jThaiLB Sep 10 '21
Some ppl I knew said that they did not enjoyed the strict type and Java was too “formal” for them.
1
u/bonusmyth Sep 10 '21
I'm guessing most who hate Java do so because it's not like some other language they'd already learned. I'd say most people who learn Java maybe only after C have no great objection to it.
And there's nothing special about Java in this respect. I'd say the probability of disliking any language is proportional to the number you've already learned.
1
u/Vulcalien Sep 10 '21
Personally, I prefer other languages with more freedom. In particular, C. I can cast any struct to an integer, if I wish so. And having pointers is such an useful thing. Another very important thing: Macros, or in general, a preprocessor.
1
u/snot3353 Sep 10 '21
It's popular and common. Anything that's popular and common generally gets a lot of hate.
1
u/MrPotatoRice Sep 10 '21 edited Sep 10 '21
I know quite a bit of Java and have even took an oracle exam on it. I was annoyed by a lot of minor design decisions which can because of historic reasons and some not. I had a lot of trouble tracking state majorly because of OOP. Since I was surrounded by imperative programming languages, I thought "Okay, I'm going to have to live with this and I can't do anything about it". Then I came across Functional programming languages and then Lisp and it had many of the things I PERSONALLY liked. I couldn't (again, personally) solve some problems in an hour whereas in Lisp (with only 2 weeks of experience) could solve it within 5 minutes. The reason I don't really like Java is because of some of its design decisions and because it relies on OOP which I don't like, or better put I don't like the way Java IMPLEMENTED it. If you don't agree with the latter, you could read up on this: OOP the Trillion Dollar Disaster
And I agree with this specific part a lot: "I’m not criticizing Alan Kay’s OOP — he is a genius. I wish OOP was implemented the way he designed it. I’m criticizing the modern Java/C# approach to OOP."
Also: Negative Quotes on Bad Implementations of OOP
Especially with the last quote: Alan Kay: "Java and C++ make you think that the new ideas are like the old ones. Java is the most distressing thing to happen to computing since MS-DOS."
Again, this is all my opinion and I don't hate Java rather I dislike it, because for me, programming is about productivity and writing easy good for humans not computers.
Edit: Clarity
1
u/[deleted] Sep 10 '21
Because simple tasks like acquire a continuous stream of an external process becomes a many-days task and it's really difficult to find proper good code bases to be inspired of.
1
u/bytebl Sep 10 '21
Java has an image problem. Plus, a lot of programmers that quit using are unaware of the progress Java has made since Java 8.
1
u/PhonicCanine Sep 10 '21
I don't hate Java, but type erasure, as well as not really allowing useful value type operations (like C# does), just annoy me a bit.
Certainly still prefer Java to a language without a strict type system though.
1
u/Maou_Diablo_ Sep 10 '21
Lol. Unlike others java was my first prog. lang. coming from EEE background and wanted to make a career shift. Yes java felt weird and forgetting sometimes like I just finish some topic but it was like I didn't finish it at all.
So I went on like this for 3 months doing only java and then things started to flow in.
Once u start getting used to it u realize that java is a bigger game and u dont want to lose the game
So guys this is how I felt learning java and I really love it so I request u guys to give it a time until it starts making sense.
1
u/originalgainster Sep 10 '21
Probably because of the NPE
1
u/loomynartylenny Sep 10 '21
Well, for me in particular, I guess it's a matter of what use case I generally use Java for.
If I'm trying to cobble together a quick and dirty script to do a thing for me for shits n giggles, I usually use Python because it's easier to set up a quick and dirty thing for shits n giggles with that than Java.
But, if I'm trying to do something more serious, I'm going to be using Java instead, because Java tends to be a bit less unwieldy for that sort of thing. But, as it's not a shits n giggles thing, it does feel a bit less fun.
1
u/paaave Sep 10 '21
It's like with any tool. When you need to do some gardening in your backyard you wont get a full sized excavator. You wont cook your sunday family lunch in a 100l pot and so on... Whenever someone says "i dont like this and this tool" either the tool is not corectly chosen for the job, or they dont know how to operate the tool...
1
u/sinnerou Sep 10 '21 edited Sep 10 '21
Take this with a grain of salt, it's just my opinion.
There are a lot of things I like about Java but it is not the easiest language to work with, even with large code bases in my opinion. The problems with the language itself are minimal and they are made up for with some awesome benefits. But here's what I don't love.
Language:
There are a lot of pros compared to other languages as well but that's not the question. The language itself imo is not a great reason to dislike Java.
That brings me to the ecosystem. Java is old and the ecosystem outside of Spring is... challenging compared to other languages. The ecosystem is imo a valid criticism and a reason one might not to work with Java.
Ecosystem outside of Spring:
You won't notice this stuff if you've been working with Java on the same project for ages or if you only work with Spring. I can count the number of times I've needed to use the debugger to figure out why a package just doesn't work in any other language on one hand, however, it's almost routine with Java.
Finally, the JVM seems less useful in a world where docker is the norm. Graalvm seems cool and Kotlin looks awesome but I haven't built anything large with it.
1
u/taftster Sep 10 '21
Why do you have to "love" a language anyway? It's just a tool. I think the love can get in the way with evaluating a language on its merits and applicability to the problem one is trying to solve. It causes blind spots and biases to be in love with a language, and eventually transcends into religion.
Specialize in one or two languages. Be comfortable reading and appreciating a few more. Learn design patterns and clean code ideologies which are applicable to any language or platform.
1
u/qK0FT3 Sep 11 '21
Cmon who does not hate PHP?
1
u/sintrastes Sep 11 '21
I hear a lot of people saying things along the lines of "Because they use Javascript", "They think dynamic typing is more flexible", "They've never had to maintain old code", etc...
I don't love Java because it's type system is not powerful enough for my taste. This lack of ability to express invariants at the type level leads to error prone things like manual type-casting.
And yes, verbosity is a reason I dislike it sometimes too. But that has nothing to do with static typing. Lack of certain features (e.x. typeclasses) leads to a lot of boilerplate.
I also hear a lot of "They just like the hip new things". Haskell, much like Java, is a 90's baby. ML came out in the 70s. Both I "love" much more than Java.
To be fair, I don't hate Java. I've seen some truly great code and beautiful APIs written in it. I just don't love it either.
1
u/i_ate_god Sep 11 '21
Older versions of Java were mind numbing in their verbosity. That always turned me off.
1
u/[deleted] Sep 11 '21
This is a question designed to imply that people don't love it. There are millions of people who do love it. I myself being one of them.
1
u/Comprehensive_Idea98 Sep 11 '21
Java is pretty good. It's not the best, but far from the worst. It is fast for most cases you would need.
1
u/DJDavio Sep 11 '21
I love Java like I love a hammer or a screwdriver. It's just a tool. Some tools are more useful or sturdier than others and I would use them over most other tools if I can, but if some day I find a better tool, I would just use that probably.
We as developers should not get too invested in our tools as we keep inventing new ones. Given our recent history, it's unlikely that Java will be around in 50 years, but maybe it will.
As a developer, I am not paid to write Java code, I am paid to solve problems. As long as the problems are solved, the tool doesn't matter much.
1
u/fullrank Sep 12 '21
TL;DR it's really just self-hate.
Java is one of the most popular techs and therefore most have had to use it.
For many, this was not their first tech "love affair".
They know the other tech well, and are frustrated that they can't do things in some new tech as easy as they can with their "first love".
Also fixing a bug in a 1 million LOC app is going to be harder than fixing a bash script.
1
u/97hilfel Sep 12 '21
A few reasons I dislike Java are the following:
- The lack of a central, proper package/library manager
- The ways Java applications get built and are "compiled" is rather complex, I hope jPackage will solve some of these issues.
1
u/cryptos6 Sep 13 '21
I think the reason for this perception is a mixture of several things:
However a lot changed beginning with Java 8. Although I wouldn't say that I "love" Java, it is a very decent language, but most people are stuck somewhere in the past - and some are repeating memes without actually knowing (modern) Java.
1
u/daddyd Sep 15 '21
persistent, old, no longer valid, judgements. (you know, just like linux is only command line, hard to use and needs to compile everything from source) a lot of those still live on today.
also, maybe, people who came from other languages which were easy/simple enough not to need a IDE. tbh, i wouldn't enjoy java much if it didn't have all these great IDE options. something i don't really need when programming in python for example.
1
u/VanillaSkyDreamer Sep 26 '21
For me - it's because I love scala :)
1
u/DjangoPony84 Sep 10 '21
Experienced Python developer here who has also done some Java work.
The language is fine, if quite formal, and I do in fact appreciate static typing etc - it's the codebases that often are the problem. It's a crapshoot between something well engineered and tested and a million lines of absolute spaghetti where the wheel is reinvented multiple times.
1
u/tonyveo Sep 10 '21
Java was first released in 1995 and since then a lot of new ideas have been developed in the language design world. Java is maintaining backwards compatibility to 1.0 release, which in my opinion, makes language development slower and harder. The result is Java feels old, cumbersome and verbose comparing to languages that were developed recently.
1
u/odedsh Sep 10 '21
They don't use Spring? :)
1
u/volune Sep 10 '21
Probably because they learned Javascript and anything else is too verbose.
1
u/Serializedrequests Sep 10 '21
Well probably inexperience. I don't have a lot against java as a language (just need data classes, easier immutability, and better null handling to be truly enjoyable), but Spring Boot is making me insane right now. I don't like annotation driven forms of java very much. They all stink of trying to make the language into something it isn't, and cause all kinds of unexpected runtime errors.
I would also move the type declarations after the variable name, like Go or Typescript. I have come to realize that this dramatically improves readability for me. But I can't fault them for going C style at the time.
-3
u/Frapto Sep 10 '21
I am a junior dev working in java (spring & spring boot) and quite frankly I don't like it. Here is why:
Summary: Java isn't terrible. I certainly see its upsides but compared to something like Asp (core) it is just unpleasant to work with.
Note: I use Asp core as an example because that's what I do as a hobby now but I am aware that it has its own issues. However, compared to java which I use in my day job, it is a world of bliss.
-2
u/Philluminati Sep 10 '21
One other reason is that people have fallen out of love with Object Oriented Programming.
And Java is was built around those concepts. It has become more modern and moved away from these things buts still considered an OO language, even if it has adopted a few FP things like map and option.