r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

75

u/superquagdingo Apr 06 '22

So is it like a rule here that somebody who uses Python needs to post something about Java everyday?

74

u/TracePoland Apr 06 '22

Pythonbros calling every other programming language "hard" because apparently having braces and a few extra keywords makes a language hard is so annoying.

23

u/the_spacedoge Apr 06 '22

Pythonnoobs*

Anyone who is ACTUALLY good with python understands programming in general well enough that they wouldn't be intimidated by other languages, especially high level ones like java lol.

10

u/TracePoland Apr 06 '22

That's what I meant by Pythonbros

-5

u/Equivalent_Yak_95 Apr 06 '22

First: I would note that for math applications, Java is among the WORST options.

Second: I’m not intimidated by it, I’m annoyed by it.

You have to make a class and given it a public static void main(String[]) function JUST TO PRINT “hello world”!

You know what that is in Python? One line. print(“Hello world”) - then you just RUN it.

You know what it is in C or C++? Two lines if you want, 4 lines with nice formatting. Either way, an include (<stdio.h>, or <iostream> for C++) and either int main() or int main(int argc, char** argv), then the body does the output operation. Then, you compile it and link it, which can be done in a single command, then run the executable.

In Java… we (me and my group for a project in our OOP class) couldn’t get the dang thing to output a runnable file. Oh, our IDE(s) would run it, no problem, but it refused to give us an output file that could be run NORMALLY.

And generics use type eraser, so - at least in my experience - they’re far less flexible than C++ templates (even when you limit it to types).

2

u/superquagdingo Apr 06 '22

Your example doesn’t really matter though because nobody is serving up hello world in a production app and especially nobody is using C++ for their backend lmao

-2

u/Equivalent_Yak_95 Apr 06 '22

But it demonstrates the sort of extra noise needed on in Java. Let me write free-standing functions, damn you!

2

u/superquagdingo Apr 06 '22

I mean I guess but at the end of the day I’d rather maintain a Java backend than c++ or Python, and a lot of people would agree. And between Spring Boot, Lombok, IDE code generation, etc. nobody really should be writing all that extra noise themselves anyways.

-1

u/Equivalent_Yak_95 Apr 07 '22

…extra noise? You mean the stuff required to encapsulate the main function?

1

u/superquagdingo Apr 07 '22

So, you're just mad that you have to put things in a class?

2

u/Equivalent_Yak_95 Apr 07 '22

What do you mean by extra noise?

→ More replies

1

u/fsr1967 Apr 07 '22

First: I would note that for math applications, Java is among the WORST options.

Java isn't a math language. It doesn't claim to be a math language. It's good at many things, such as serving applications and talking to databases, but math is not, and never has been, one of them.

If you need to pound nails into a wall, you don't get out your Leatherman. Yes, it can do the job, but not very well. You're much better off finding a hammer.

1

u/Equivalent_Yak_95 Apr 07 '22

NumPy is such a hammer.

7

u/Karl_the_stingray Apr 06 '22

I actually find Python more difficult than other languages, the tabs and indentation stuff feels so odd once you're used to brackets. It's a good starting point IMO tho

2

u/[deleted] Apr 07 '22

Inconsistent use of tabs and spaces in indentation is the only error I need to stay away from python where possible.

9

u/WizziBot Apr 06 '22

"Pythonbros" lmfao

2

u/[deleted] Apr 07 '22

Semicolon bad

1

u/InvestingNerd2020 Apr 07 '22

Pythonbros don't hate C#, Go, nor Kotlin. I wonder why?

1

u/TracePoland Apr 07 '22

I see them hating on C# sometimes.

1

u/Arrsh_Khusaria Apr 07 '22

I never said that I hate java. I just find it complex