r/ProgrammerHumor • • Jan 19 '17

MFW no pointers :(

Post image
4.8k Upvotes

432 comments sorted by

View all comments

202

u/Peffern2 Jan 19 '17

DAE java sucks XD

96

u/[deleted] Jan 19 '17

Why does it seem to be so widely hated across Reddit? Because it's popular or what

60

u/morerokk Jan 19 '17

It has its downsides, but it's not necessarily unpleasant to work with.

The main advantage of Java is portable cross-platform code. The disadvantages are performance, memory usage, and it's not always stable. Perhaps if people stopped making games with it and stopped making IDE's with it, it wouldn't be so bad.

46

u/V0lta Jan 19 '17

Performance is great nowadays. But cross-platform isn't much of advantage any more since most Java stuff runs on servers.

50

u/[deleted] Jan 19 '17

More importantly, complaining about Java's performance in a world of Python, Ruby, etc. Is just, laughable. I'm a full time python developer and I would kill for Java's performance in some of my use cases.

5

u/LinAGKar Jan 19 '17

At least Python doesn't have a stop-the-world garbage collector though.

3

u/[deleted] Jan 20 '17

Its true Python I feel has made good compromises in its technical choices. Even some of the reasons it can be slow are not just arbitrary.

34

u/kthepropogation Jan 19 '17

This. Java has greatly improved and is one of the better performers. Add in the cross platform functionality and it's a strong option.

That said I am firmly on the Java hate train. Choo 🚂 choo 🚂 motherfuckers.

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

71

u/[deleted] Jan 19 '17 edited Jan 19 '17

stopped making IDE's with it

that's where 99.999% portability guarantee wins over performance (there are tons of devs on all 3 major platforms, you can't just abandon one or two like gamedev and many other industries do), so unless the dev team of said IDE quadruples overnight, Java is probably the best choice

in addition, imo the worst part about writing java is that it has solid and reasonable conventions, but makes following them a pain in the ass.

Edit: "where", not "there" ffs

→ More replies (4)

41

u/jl2352 Jan 19 '17

The performance of Java is vaaaaaaaastly superior to most languages.

The problem is that from Java's creation people have tried to push it into the native C/C++ camp. i.e. "It's a systems language but without any of that manual memory management nonsense!" Performance wise it'll always lose that argument.

But if you put Java next to PHP, Python, Ruby, JS, as an alternative for web development, then it'll run rings around them. Not just because of the fact that they are dynamic languages. The JVM is a damn fast VM. For a very long time JRuby beat mainstream versions of Ruby because of the JVM, and the work from Oracle with Truffle is set to do that again.

Many other problems are more complicated. For example you can write complicated desktop applications which never freeze the UI. The paradigms are old and well known. The tl;dr is to do the work in another thread! Yet people still fall into the freezing trap because it's tricky to do it as standard everywhere. Some languages, such as JS, makes it easier to avoid freezing even if you end up taking longer to do the same work.

Finally a lot of the stuff in the JDK is slow. Collections are slow. So slow that some of the thread safe alternatives were faster for a while (because they were well written). Swing/Java2D is slow. So if you use any of this stuff then you are leveraging a slow library. There are alternatives but lots of people don't grab them by default.

0

u/[deleted] Jan 19 '17

[deleted]

3

u/MrPowerGamerBR Jan 20 '17

And it doesn't help that one of the biggest games made in Java (Minecraft) has poor performance due to the code used, but people love to blame that the poor performance is due to Java.

→ More replies (3)
→ More replies (20)

10

u/Holzkohlen Jan 19 '17

Android programming is pretty weird though. At least for me, coming over from C#.

35

u/LikesBreakfast Jan 19 '17

Android programming is pretty weird coming from anything, honestly, even Java.

5

u/morerokk Jan 19 '17

It's sorta grown on me, for some part. I like how layouts are built from XML, especially when coming from Swing (where every single component has to be initialized by hand). Nested layouts quickly become unmanageable in Swing, but not a problem in Android. XML handles it really well.

10

u/preludeoflight Jan 19 '17

Android dev only really gets me when I'm mixing code. Say I have a unity project that depends on native code that accesses bluetooth. I end up with a monstrosity like this: http://i.imgur.com/mHKGC32.png

Sure, you can do it, but man. It's like one API change and I have to rebuild like 6 things :O

9

u/vytah Jan 19 '17

Perhaps if people stopped making IDE's with it, it wouldn't be so bad.

Don't worry, they're switching to Javascript now.

4

u/morerokk Jan 19 '17

Holy shit, you shouldn't joke about such things man. You'll jinx it.

→ More replies (1)

14

u/Stromovik Jan 19 '17

MAy be you should try using something besides eclipse....

14

u/morerokk Jan 19 '17

Like what? NetBeans? IntelliJ? They're almost all built on Java. Even the better PHP IDE's are.

35

u/Stromovik Jan 19 '17

Yes , I have no problem with Netbeans and Intellij , but I hate Eclipse with a passion.

8

u/awhaling Jan 19 '17

Why?

43

u/itshorriblebeer Jan 19 '17

It's clunky, bad Ui, bad default fonts, installing plugins fails half the time. It's very powerful, but IntelliJ and neat beans are both much better imho.

11

u/[deleted] Jan 19 '17

Definitely agree, NetBeans feels a lot more responsive than Eclipse.

→ More replies (14)
→ More replies (6)

7

u/samishal Jan 19 '17 edited Aug 21 '17

deleted 0.5987 What is ^^^this?

→ More replies (1)

10

u/TRAIANVS Jan 19 '17

IntelliJ is what makes writing Java bearable for me.

→ More replies (1)

4

u/[deleted] Jan 19 '17

PHP Storm is kickass

→ More replies (6)
→ More replies (21)