• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

The Most In-Demand Tech Skills of 2013

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

beginner99

Diamond Member
Jun 2, 2009
5,318
1,763
136
For hobbyists, some .Net stuff is free some is not, but that's true of other stacks too.

Not really, in Java most stuff is for free...the only thign you pay for is services but as a hobbyist you don't need that anyway. Java is better for hobby open-source stuff.
 

smackababy

Lifer
Oct 30, 2008
27,024
79
86
That said, this usually isn't a huge issue. We are in the age where 1gb of ram is super inexpensive. Memory consumption generally only matters in memory controller situations.

Are we? Because every company I've worked for refuses to even let me spend the $100 it would cost to get 2 sticks of 8gb RAM to put in our PRODUCTION servers. =(
 

Cogman

Lifer
Sep 19, 2000
10,286
145
106
Are we? Because every company I've worked for refuses to even let me spend the $100 it would cost to get 2 sticks of 8gb RAM to put in our PRODUCTION servers. =(

Sad day. Welp, my company doesn't. My current VMs have 32gb of ram with the physical hardware having somewhere around 256gb of ram. Sucks that yours is stingy.

But even then, you can run a pretty powerful java application with less than 1 gb of ram. It was done in the past, it is more doable today than it has ever been.
 

postmortemIA

Diamond Member
Jul 11, 2006
7,721
40
91
GC still has long ways to go. My fairly simple desktop app has performance problems because GC does not hit until it is too late, and then app crawls. No matter of RAM size and max RAM usage settings, eventually app is stuck in GC. Culprit: number of surviving generations increases over time with app use. It is like GC can't find references to discard.
 
Last edited:

Cogman

Lifer
Sep 19, 2000
10,286
145
106
GC still has long ways to go. My fairly simple desktop app has performance problems because GC does not hot until it is too late, and app crawls. No matter of ram size and max RAM usage settings, eventually app is stuck in GC. Culprit: number of surviving generations increases over time with app use. It is like GC can't find references to discard.

If this is an issue, I would suggest reading through this

http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#generation_sizing.young_gen

When it comes to java GC, there are a boatload of options. If what it is currently doing doesn't work for your type of app, you can tune the hell out of it.

For example, the default java GC happens once of minute. You may be better served by increasing or decreasing that frequency. You also might be better served by using a parallel GC.
 

brianmanahan

Lifer
Sep 2, 2006
24,627
6,011
136
Java is a huge pig, the same thing written in C++ will be 10 times more efficient, and also wont be subjected to locking yourself into a very specific platform (OS/Java version).

try 1.5x-3x more efficient

and FYI, c++ is way more platform specific than java is

and in the enterprise, ease of understanding and maintainability is usually more important than efficiency
 

Cogman

Lifer
Sep 19, 2000
10,286
145
106
try 1.5x-3x more efficient

and FYI, c++ is way more platform specific than java is

and in the enterprise, ease of understanding and maintainability is usually more important than efficiency

Assuming you aren't doing platform specific things (creating windows, interacting with drivers, etc). C++ is actually pretty platform agnostic. Sure, you can't take a C++ binary and run it everywhere. But you really can't take a java Jar and run it everywhere either. You have to have the right JVM version, and all the JVM features you use must be implemented consistently... inconsistencies in JVM implementations happen more frequently than you would imagine.

C++ also has the benefit of being ancient. Most of the stuff that is platform specific has a wrapper library that is prepared for you to resolve most if not all platform incompatibilities.

Of course, C++ is far from perfect. Bad C++ is pretty gnarly to deal with. However, just like java, most of that gnarliness can be mitigated by using sound programming principles and not doing weird stuff (true for most programming language).

What does C++ offer? It is possibly the only language with more libraries than java. It is also one of the most easy-to-integrate languages. Pretty much every language can interact with C++ and vice versa.

C++ also offers a dauntingly large number of language features. Some find this as a con, I find it as a pro (you don't have to use every feature, but it is nice to have the option to use many of them). On top of that, C++11 and beyond look to be very modern languages indeed.

I'm not saying C++ should be used anywhere, just that it shouldn't be thrown away without a second thought (most languages shouldn't). If you are looking for a fast language, low level support, which compiles to every platform, there isn't much better you can do than C++.
 

slugg

Diamond Member
Feb 17, 2002
4,723
80
91
I haven't found anything better than C/C++ (mixed) for digital signal processing.
 

brianmanahan

Lifer
Sep 2, 2006
24,627
6,011
136
But you really can't take a java Jar and run it everywhere either. You have to have the right JVM version, and all the JVM features you use must be implemented consistently... inconsistencies in JVM implementations happen more frequently than you would imagine.

i have used 100's of jars on 4 versions of the sun/oracle jvm, 2 versions of the openjdk jvm, and 3 different server platforms - and never run into a jar/jvm incompatibility issue. sure i have seen dependency issues, but that will happen with any library platform.
 

Cogman

Lifer
Sep 19, 2000
10,286
145
106
i have used 100's of jars on 4 versions of the sun/oracle jvm, 2 versions of the openjdk jvm, and 3 different server platforms - and never run into a jar/jvm incompatibility issue. sure i have seen dependency issues, but that will happen with any library platform.

I've written and worked on a couple of java guis for internal tools. I've seen incompatibilities going from linux to windows (usually in the form of "Hey, these events mean different things on windows and linux").

Also, things like this

https://code.google.com/p/guava-libraries/issues/detail?id=1635

happen. Currently, one of the most popular libraries used in java is broken with the latest release of java... yeah.
 

smackababy

Lifer
Oct 30, 2008
27,024
79
86
Also, things like this

https://code.google.com/p/guava-libraries/issues/detail?id=1635

happen. Currently, one of the most popular libraries used in java is broken with the latest release of java... yeah.

It looks like that problem is from a version of Java released literally the day prior. I would imagine the library will be updated (if it hasn't already).

I won't argue there might be inconsistencies between JVMs, but I would think any are well documented enough, there are ways to mitigate that.
 

Madpacket

Platinum Member
Nov 15, 2005
2,068
326
126
The biggest issue with Java in the enterprise (from an IT perspective) is maintaining the many different versions (1.5, 1.6, 1.7) required to keep the ship sailing. This is a nightmare from an operational and security perspective which I fear will never be resolved.
 

brianmanahan

Lifer
Sep 2, 2006
24,627
6,011
136
The biggest issue with Java in the enterprise (from an IT perspective) is maintaining the many different versions (1.5, 1.6, 1.7) required to keep the ship sailing. This is a nightmare from an operational and security perspective which I fear will never be resolved.

?_?

are you talking end user apps or server apps?

because we use java on app servers, and going from version 1.4 to 1.5 to 1.6 took almost no effort aside from testing (and eventually converting EJB 2 to 3, etc, etc)
 

Red Squirrel

No Lifer
May 24, 2003
70,603
13,810
126
www.anyf.ca
The biggest issue with Java in the enterprise (from an IT perspective) is maintaining the many different versions (1.5, 1.6, 1.7) required to keep the ship sailing. This is a nightmare from an operational and security perspective which I fear will never be resolved.

Yeah exactly, this is a big issue where I work. In some cases multiple versions have to be installed and setup a very special way or all hell breaks loose because 1 app wants one version and another app wants another. It's what happens when you let CGI touch anything, though, so not entirely Java's fault I guess. But if it was standard C++ (not .net) this version stuff would not be an issue, but sadly nobody seems to use standard C++ anymore in the enterprise.
 

nisryus

Senior member
Sep 11, 2007
951
273
136
At my work we have several tools from different major vendors that we use daily. However, each of the tool required and worked only with certain version of Java installed. Two won't work with 1.7, one only works with 1.6. One is a tool we use to access our SAN. Worst is that the vendors have all promised to update their software to their users in early 2013, so far ... nope.
 

purbeast0

No Lifer
Sep 13, 2001
53,643
6,527
126
Assuming you aren't doing platform specific things (creating windows, interacting with drivers, etc). C++ is actually pretty platform agnostic. Sure, you can't take a C++ binary and run it everywhere. But you really can't take a java Jar and run it everywhere either. You have to have the right JVM version, and all the JVM features you use must be implemented consistently... inconsistencies in JVM implementations happen more frequently than you would imagine.

are you seriously trying to argue that c++ is as portable as java is? :confused: