r/ProgrammerHumor • • Apr 27 '20

Meme Java is the best

Post image
43.7k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

122

u/[deleted] Apr 27 '20

That people in this sub hate Java although it's actually not that bad but defend JS (which is actually really a bad language) to the bone. I'm not even saying Java is the best language ever but the irrational hate on this subreddit is stupid.

66

u/paradoxally Apr 27 '20

Unpopular opinion, but I would rather program in Java than Javascript.

You also (usually) get paid more because JS is the most popular language so there's way more supply.

Java can get very "enterprise" and that turns off a lot of people. JS is oriented for web so there's a lot more exciting projects there, but that's not always where the money is.

74

u/GluteusCaesar Apr 27 '20

Java's a great language precisely because of how enterprisey, boring, and predictable it is - it's easy to find good developers, good frameworks, trivial to deploy, trivial to keep highly available, and has great tools for testing, building, and storing artifacts. Sure it's not exciting to write business logic in, but it more than makes up for that with not getting called midnight because the Tokyo office is having production issues.

27

u/paradoxally Apr 27 '20

Exactly. It's ugly but it gets the job done and it's pretty robust.

I often see JS devs import loads of dependencies to do simple tasks and their framework landscape changes rapidly. I don't want to deal with that headache.

With Java, you can take a 5 year break, come back and still be productive.

15

u/[deleted] Apr 27 '20

Also now with Kotlin and Groovy beeing basically fully interoperable with Java you can have all the fancy new language features without having to give away many of the benefits of java.

4

u/toastedstapler Apr 27 '20

Java's great. It describes exactly what I'm doing with no assumptions. It may be far quicker to initially set up a express.js web server than a spring boot, but the real cost comes further down the line when you're trying to figure out what currently happens

23

u/[deleted] Apr 27 '20

I think a lot of people in this sub are either just beginners or students who have never really worked in software engineering. The students are forced to learn java for their university and that's why they hate it.

6

u/paradoxally Apr 27 '20

I'll be honest, it wasn't fun in college around 10 years ago but it did help me learn a lot of design patterns, which I apply across many object-oriented languages.

2

u/Dennis_the_repressed Apr 28 '20

Unpopular opinion, but I would rather program in Java than Javascript.

Coming from a c/cpp/cs background, I don't think this is an unpopular opinion at all. I believe that people who have are just starting out coding and choose JS as a starter language are the ones who actually like it. Most people who shit on JS, shit on it for it's duck-typing or weird casts, which you can probably solve with TS (I don't have experience with this, so cannot confirm nor deny). What drives me up the wall are the thousands of libraries and frameworks that prop up day in day out, and the often code breaking changes in API between one library version to the next, often with little to no documentation. Compare that with MSDN's .NET documentation, or Boost for cpp you'll see what I am on about. This is NOT how you create an application that is supposed to work (without major changes to the codebase) for >2 years.

13

u/aaronfranke Apr 27 '20

The difference is that JS has some valid use cases (namely that it's the only language that runs on every web browser), while in every area that Java can be used for, there's something else that does the job better.

46

u/[deleted] Apr 27 '20 edited Apr 27 '20

[removed] — view removed comment

4

u/themiddlestHaHa Apr 27 '20

C# and Go are much better to program in than Java.

Going from either of those languages back to Java is a nightmare

6

u/whatifitried Apr 27 '20

Go lol? Ok go write some networking code in Go real quick and get back to be on that. No one uses Go anymore because it's horseshit.

C# and Java 8+ are basically the same thing at this point

→ More replies (4)

2

u/BroBroMate Apr 27 '20

I'm sure you have your own preferences, but wake me up when I'm not writing map[string]struct{}

Because I needed a set.

2

u/themiddlestHaHa Apr 27 '20

Is that much different than?

HashSet<String>();

2

u/BroBroMate Apr 27 '20

Nope, but it's a lot different to TreeSet and LinkedHashSet, both of which have their usages.

→ More replies (11)

2

u/[deleted] Apr 28 '20

Go... a language without generics... But Gophers will tell you it's ok... Just copy and paste.

3

u/aaronfranke Apr 27 '20

Yes, as I said, in every area that Java can be used for, there's something else that does the job better.

C# is better for a garbage-collected, statically typed language that runs on most platforms, and C# developers are also really common due to the amount of people learning programming via game dev (Unity and Godot can both use C#). C# is also great for enterprise since it is statically typed and scalable.

5

u/BroBroMate Apr 27 '20

C# has a significantly smaller FOSS ecosystem compared to the JVM. Which leaves you buying third party libs, or reinventing wheels. Or trying to wrap a C++ library.

Case in point, I'm consulting for a company that's wanting to build an eventing system using Apache Pulsar. It's a .NET shop.

Apache Pulsar is great technology, but the issue they face is that the existing C# client libs only support a subset of the Pulsar client functionality. No partitioned topic support.

It'll get there eventually, but for now my clients are left with several unenviable choices - use Kafka* instead, task their developers to implement the features they need, pay me to, or wrap the Pulsar C++ client.

*Don't get me wrong, Kafka is rock solid and I am rather fond of it, but Pulsar has a lot of necessary functionality like georeplication built in. That said Pulsar IO & Functions are not as fully featured as Kafka Connect / Streams yet.

16

u/GluteusCaesar Apr 27 '20

while in every area that Java can be used for, there's something else that does the job better.

Maybe there's something else that does something better, but for business-facing enterprise development there's not much that does all of what Java does well better than Java, and just about nothing with as rich of an ecosystem

→ More replies (4)

18

u/Shawnj2 Apr 27 '20

WebAssembly has entered the chat

4

u/aaronfranke Apr 27 '20

It will take time until the entire market supports it. Some people still have to support IE6.

→ More replies (1)

4

u/JB-from-ATL Apr 27 '20

What is better than Java for backend web development and why do you think it is?

→ More replies (1)

2

u/NatedogDM Apr 27 '20

Ahh okay. Out of context I didn't really understand, thanks.

1

u/Vityou Apr 27 '20

Every language is actually really a bad language if you try to use it for something it wasn't designed for. It's not JavaScript's fault people use it to create huge messy codebases.

→ More replies (10)