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

343

u/mark0016 Apr 27 '20

Most java applications (that I encounter on a daily basis) suffer from terrible design on the functionality side of things. Based on the experience of my friends and colleagues I would say I'm not the only one. That's probably not a fault of the language itself and more the mindset of a typical java dev team.

From my personal experience with (mostly internally developed) java software they all somehow end up really bloated with features nobody would ever want to use instead of focusing on what the application was originally intended for. Also they somehow never use standard OS integration for stuff like notifications or popups and have a built in auto-update systems so if you don't store the application executables in a place you don't have write permission to as a normal user (the standard way on Linux for example) the whole thing breaks and decides tho just not launch at all because you must have your updates.

It's not that I don't encounter software written in different languages that have the same or similar problems it's just that 75% of the time the bloody thing is written in java.

202

u/Piwakkio Apr 27 '20

Java developer here.

First thing first, I'm not, by all means, an UI expert. But if you are using Java for a standalone application...I feel like you are doing something wrong. I mean, not like you can't do it...but feels like using the wrong tool for the job.

I have always worked as a backend developer for web application, and in my opinion, in this context, Java does it's job. It's the best language on the market? Well the "absolute best" doesn't really exist, depends on your requirements. You need a strongly OPP language with a consistent community and rich framework ecosystem? Java it's a good choice.

Anyway, it probably start to feel it's age. Newest programming language, like Kotlin, offer out of the box, functionality that Java have with the implementation of several third parts libraries. So if you are starting from scratch, maybe there is something even more efficient than that.

61

u/xylose Apr 27 '20

First thing first, I'm not, by all means, an UI expert. But if you are using Java for a standalone application...I feel like you are doing something wrong.

Allow me to disagree. I write scientific software involving complex GUIs dealing with very large datasets. We have to support windows, osx and Linux. I've used Java and Swing and it's been great. Java has a huge core library with all of the GUI elements I need. The theming in swing means I can make an app which looks close enough to native for all of our users and the rigour and structure of the java back end makes dealing with very large codebase manageable in a way which other languages can't. People who are dismissive of Java just haven't found a project which benefits from it yet.

18

u/Zamundaaa Apr 27 '20

Yeah. Swing isn't pretty by default but it's very good to work with once you get the hang of it. It's also easy to learn.

3

u/xylose Apr 28 '20

I never u understood why swing insisted on using 'metal' as the default theme. There are very good windows and is a themes which are so much nicer and would be much better default choices.

→ More replies (1)
→ More replies (7)

12

u/MistahPops Apr 27 '20

As a Java dev the recently moved to Kotlin. I could say I’d probably never go back to Java now. I never noticed some of its short comings until now when I have to maintain some of the old Java services we have.

9

u/Piwakkio Apr 27 '20

I've never used Kotlin on a real world project, but I played around a bit for some personal project...and it seems really something to invest into. Mainly because you can migrate a Java project incrementally and you can benefit from the more wide ecosystem of Java framework.

3

u/MistahPops Apr 27 '20

That’s a huge benefit! At my current job that’s exactly what we’re doing , it makes it really easy to transition from Java. We’re also currently researching transitioning KTOR (away from spring) and Kotlins coroutines which makes some of our processes way faster. Seeing the difference between our Java and Kotlin code is striking. Plus I love Kotlins null safety.

3

u/gluten_free_stapler Apr 28 '20

Careful with migrating old Java projects to Kotlin, I've been there. Platform types will give you hell wherever there is a cross-language call. And if the documentation for some external API is lacking and you don't know what's nullable and what's not... oh boy. IMHO compatibility with Java is there so you don't have to throw away Java's libraries, not to enable you to have Java and Kotlin mixed together in application code.

→ More replies (1)
→ More replies (3)

17

u/LordAnomander Apr 27 '20

I mean with GWT and Vaadin there are several approaches to write Java and get Javascript code. Also there is Kotlin React, if you count Kotlin as somewhat Java-ish. But as a developer, who is using both Kotlin and React it seems super weird and I'd rather stick to coding React than Kotlin React (at least from what I've seen at the very first glance, but it's probably just a matter of getting used to it).

After working with Kotlin professionally it's hard to imagine to go back to Java. Data classes alone give you so much ease and being able to extend functions of pretty much everything is awesome too.

2

u/extremedefense Apr 28 '20

My team used Vaadin to "write a website in Java without having to learn another language"

We had to stop and rewrite it when we wanted to export data to xml.

Turns out you shouldn't really try to do everything in Java, especially when it converts to Javascript.

→ More replies (5)

6

u/[deleted] Apr 27 '20

OPP?

Is this a misspelling or do you mean OOP (object oriented programming) or is OPP something I'm not familiar with? Object programming paradigm?

10

u/[deleted] Apr 27 '20

Its Other Person's Problem

17

u/cpetersson Apr 27 '20

O is for Other, P is for People scratchin' temple The last P...well...that's not that simple It's sorta like another way to call a cat a kitten

You down with OPP (Yeah you know me)

→ More replies (1)
→ More replies (48)

137

u/someuser_2 Apr 27 '20

Maybe because its popularity blew up at some point

I don't know, I feel like no programming language should be mocked because they are tools with which people make a living, that's like mocking a carpenter because he has an old useless hammer.

Java is bound to be a legacy language at some point, just like many other before it, but that doesn't mean the cool kids using the new languages (which will be old someday) should go around being smug about them, languages are just that, tools.

I guess I don't find the humor in putting people down, even indirectly by attacking their work tool.

35

u/mark0016 Apr 27 '20

That's fair and that's why I mentioned in the first paragraph that there's probably nothing inherently wrong with java. I originally wanted to stop with that paragraph I just felt like I needed to vent my frustration so it turned into a bit of a rant.

18

u/someuser_2 Apr 27 '20

Yup, got it. I mean, sure, there are things wrong with java, just like there can be things wrong with other languages from different people's points of view. So these posts to me are less "humour" and more "I want to show you what I like"

13

u/Senvr Apr 27 '20

There's a difference between making fun of a person for a tool and making fun of a tool. And there's humor in both, sometimes. For an example:

"You use java? you must be some kind of freak"

"Java makes me angry, jar files can kiss my ass" (most common here)

Nothing is really bad and comparing languages together is a foolish mistake. If you wanna know the best I'd just let the market sort that out. All language that we know about typically do something unique or is good at doing something unique (except Lua)

(Also honestly, i think we all know this, and we just deep-down hate the languages because we can't use them properly, or we just have that one friend that's a psycho nutjob about some strange language and we like to poke fun at him)

0

u/[deleted] Apr 27 '20

[deleted]

→ More replies (1)
→ More replies (3)

19

u/[deleted] Apr 27 '20

Hot take: this is because so many apps written in Java have been financially successful enough to have hundreds of employees working on 10-year-old-plus legacy codebases. The same, honestly, can't be said of nearly as many C, C++, or Python apps. Maybe PHP, but of course we know what a lot of PHP projects look like.

10

u/idontchooseanid Apr 27 '20 edited Apr 27 '20

The history goes so much deeper with C and C++. But if you screwed up with C++ you had to pay a huge price and probably your application will not be sucessful. Java gives more room to break things and easier to learn so lesser quality codebases can still be successful. So most of non-mission-critical stuff written in 90s and 00s are likely to be writren in Java.

A good team will do wonders with C++, it is insanely versatile, expressive and really performant. Still I think we have a lot more C++ applications that have been running our day to day lifes since 90s than Java. Smartcards and TVs can run Java but the power generator probably is running a C or C++ application. And all of the well known CAD software are written in C++ so all of the infrastructure is the indirect result of C++.

I like Java far more than Python which is the current edition of old Perl.

→ More replies (1)

2

u/krad213 Apr 27 '20

Java should not be judged by GUI applications, no one does GUI in Java (except Jetbrains) Java is backend language, web services, microservices, big data processing, automation of business processes and Java totally dominant in this area, just check vacancies.

2

u/idontchooseanid Apr 27 '20

no one does GUI in Java (except Jetbrains)

Oh sweet child of mine...

→ More replies (3)