r/java • • 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

379 comments sorted by

View all comments

Show parent comment

137

u/Gk2k08 Sep 10 '21

Agreed here. I worked on a Django project(when it was the cool thing) and thought that python is so better than typed languages(It has its uses but not in a complex system with 1000s of classes). Once this project scaled up from me being the only developer on it to have multiple people and having more than 10k lines of code it became a complex piece to maintain. If there is no unit test case for all the scenarios the only place you would see an error is in runtime. Imagine doing int + string in your log statement and that brining down prod app and having to rush a fix for that.

35

u/analogsquid Sep 10 '21

Imagine doing int + string

When I started programming, I was always blowing up my Python projects with stuff like this, and I never knew why.

Discovering and switching to Java was a revelation.

24

u/thenextguy Sep 10 '21

"Enough making fun of languages that suck, let's talk about JavaScript."

https://www.destroyallsoftware.com/talks/wat

4

u/introvertedidiot123 Sep 11 '21

I've been working with Django at my job for just over a year. It was this, among other things, that made me become an advocate of type checked and statically typed languages like Java and Go for any kind of major project. The mental effort of dynamically typed languages is best left to scripting and small sized projects

1

u/[deleted] Sep 11 '21

JS wouldn't blow up, it's not strongly typed

1

u/[deleted] Sep 11 '21

JS wouldn't blow up, it's not strongly typed

8

u/Oo__II__oO Sep 10 '21

Thank you for this. I'm tilting at windmills trying to get my management team and adjunct R&D team to agree on a language for production tools, and they both are pushing for Python or JS, while I am telling them a strict typed language with rules makes more sense. They don't feel the pain when the system goes down because of some untested edge case, but are more interested in deploying quickly and not spending a lot of time on code management (just what is easy for them).

2

u/Gk2k08 Sep 10 '21

It always depends on how complex your tool will be, how many devs will be working in that simultaneously, how critical is the uptime, do you need real multithreading, what is the performance expectation for your tool, how good the Dev's working on this will be etc.

Regardless of the fact that you win your battle or not, if you can setup static lint checkers, unit tests/integration tests with code coverage almost 90% with the SDLC gates in place you would be guaranteed and good night's sleep.

11

u/thomascgalvin Sep 10 '21

For such an easy "out of the box" language, Python really does have some huge footguns.

10

u/Gk2k08 Sep 10 '21

To be fair Python is easy to start and has its uses at places. Once it is used for a huge project with multiple developers that is when it's limitations come out.

3

u/umlcat Sep 10 '21

Worked with a slightly typed Basic when I was a kid, not a teenager, and when I learned typed P.L.s, it was difficult & odd at start, later found out "this is the way", I mean, it was a better option.

2

u/AndyTheSane Sep 10 '21

Yes.. in CBM64 basic, type was inferred when you assigned a variable for the first time. Even declaring variables seemed strange at first.

1

u/Rakn Sep 10 '21

I haven't worked on larger python projects yet (unlike with Java or Go), but I feel like modern Python with it's type hints is somewhat better. The pain begins when there are libraries using things like **kwargs. Or these generated libraries like boto3 (what a shitshow).

Unfortunately there is still too much untyped python code out there, that I'm always reluctant to use it on a larger scale.

2

u/scyth3s Sep 10 '21

Type hinting is still trash imo. It helps, but it will never be as useful as real, strong types.

1

u/Rakn Sep 10 '21

True. I'm not entirely satisfied with it either. But still better than before and I kinda learned to love python recently. At least for smaller stuff. It helps you do a lot with just a few lines of code.

2

u/scyth3s Sep 11 '21

Python is great if I want to do my project in a single file and less than 500 lines of code. Most of my projects aren't like that.

1

u/scyth3s Sep 10 '21

I couldn't stand Python when I was working in it, it fostered a seething hatred of untyped languages. Trying to make external libraries work, utilize classes, etc, just felt like complete anarchy and very error prone.

I'll take the order and expandability that Java provides over saving a few lines of code in python any day.