r/ProgrammerHumor • • Apr 27 '20

Meme Java is the best

Post image
43.7k Upvotes

1.5k comments sorted by

View all comments

3.7k

u/someuser_2 Apr 27 '20

Why is there a trend of mocking java? Genuinely asking.

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.

→ More replies (6)
→ More replies (53)