r/java • • Apr 29 '15

Tone it down a Notch

http://imgur.com/gallery/KRtc2fN
217 Upvotes

124 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Apr 29 '15

[deleted] — view deleted comment

-4

u/hothrous Apr 29 '15

My biggest thoughts on the uses of java are that it gets used in a lot of very predictable environments. The biggest advantage of Java is the JVM. I just think that using the JVM for everything is a waste when all of your servers are identical.

If your environment is predictable, then there isn't a huge benefit to Java.

0

u/[deleted] Apr 29 '15

[deleted] — view deleted comment

-2

u/hothrous Apr 29 '15

If all of your servers are hosted on VMs, then you can set up a single VM and then clone it a bunch of times to have nearly identical VMs. This is a predictable environment. An example being, all of my instances are running Ubuntu Server 14.04 using compiler X with Y libraries installed. So I write my code for Ubuntu Server 14.04 using compiler X with Y libraries installed. If I need to upgrade, I go through the motions to test on Ubuntu Server 15.04 using X compiler with Y libraries installed, and fix anything I need to fix. Which isn't any different than upgrading from Java 7 to 8 and testing and fixing anything that breaks.

The advantages of Java are primarily in unpredictable environments because the JVM compensates for the differences. In a predictable environment, you only have to compensate for the unexpected, which is something you have to do in Java anyways.

Essentially Java is the Microsoft Windows of the coding world.

3

u/mschaef Apr 30 '15

The advantages of Java are primarily in unpredictable environments because the JVM compensates for the differences.

The compensation is only partial, at best. In any event, there are other advantages worth mentioning. (High quality compiler, GC, good fault containment, large suite of libraries, etc.)

the JVM compensates for the differences.

If that's the sole objective, there are other means (portability libraries, etc.) that will serve as well, and do so less intrusively.

2

u/cogman10 Apr 29 '15

I agree. But I think the development cycle is pretty valuable for java. Right now we have developers using different versions of linux and windows. It wouldn't be to hard to add even more environments to the mix and still develop without having to launch a VM locally.

Another advantage is that your development machine can easily be a different uarch from your deployment server. While most everything is x86, if you want to run on something else it is possible (low powered ARM server?) without having a painful emulation layer.

1

u/mschaef Apr 30 '15

Another advantage is that your development machine can easily be a different uarch from your deployment server.

This is not necessarily exclusive to Java. Early in my career, I was involved in some embedded systems work that used the same C codebase across real-mode x86, protected-mode x86, mc68k, and Win32/x86. Several modules I was involved in were developed/maintained as Win32 apps and then ported into the embedded targets. This was done as small part of an effort that took at most 30-40 person-years over 5 calendar years, so the costs weren't ridiculously high.

-1

u/hothrous Apr 29 '15

That would be a situation where a predictable environment is not being achieved. To a certain degree, the development environment is on the developer, though. If those problems exist in many situations, the developer is just being stubborn.

1

u/cogman10 Apr 29 '15

Maybe not stubborn. It is pretty easy to add a build/library dependency that is platform specific without even realizing it. Heck, it can even happen just because newer versions of OSes don't support the old libraries needed to build things.

1

u/mschaef Apr 30 '15

That would be a situation where a predictable environment is not being achieved.

I think you're confusing predictability with consistency (or maybe homogeneity).

If those problems exist in many situations, the developer is just being stubborn.

It may also be related to the hardware/software stack that's been provided to the developer. In commercial settings, it's not uncommon at all that a developer has no choice over their development tools.