Java is my b!tch

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

IcemanJer

Diamond Member
Mar 9, 2001
4,307
0
0
Originally posted by: silverpig
More and more universities are switching their compsci faculties over to Java. Java is more advanced than C++ I think.
Well, Java is a sh!t lot easier to teach. I TA'd the Intro to CS class my freshmen year and dear god if I had to teach those students pointers and memory management..........
 

manly

Lifer
Jan 25, 2000
13,266
4,043
136
Originally posted by: BingBongWongFooey

BS. I know more than one sysadmin who deals with java garbage at work. Java, to me, is a failure. Java was meant to be portable, yet it doesn't work that well on any platform (except maybe mobile devices? dunno), let alone work well on all of them. Java is an unwieldly, bloated resource hog.

Why DID java get so popular anyways? I know in the late 90's or so, colleges started teaching it alot, why?
Generally I trust your opinion, because you're objective and informed. But really, in this case, it seems like you have an old bias against Java and cling to that without much technical basis.

Call it a failure if you want to. I specifically cited its widespread use in enterprise application development; generally speaking, companies do not adopt IT platforms that are failures or that have horrible runtimes. And yes, the resource issue is important but name any other platform (besides C) that scales from embedded cell phones all the way up to big iron.

As far as it not working well on many platforms, that's again a matter of opinion that's generally refuted by the marketplace. If you're referring to client apps, then the that's a very hard problem to solve. In fact, Java is one of the few true single-source solutions for cross platform GUI apps. I'll concede that it doesn't work as well as native apps, but every time this question is raised in the software forum, even many of the die-hard Windows fans cite Java as being one of the best choices for cross platform GUIs (for example, singh comes to mind). Generally speaking, Java Swing is no longer the problem; it's Swing apps that remain bloated.

Now if you're not talking about GUI apps, then Java portability is very good. Although Sun only supports the JVM on three platforms, there are officially supported ports on dozens of others. Most of the Java application servers will run on any platform with a JVM, hosting your enterprise apps. Java doesn't have the quite platform breadth of C (or GCC) but C doesn't have the seamless binary portability of Java either. Java wins in a landslide with all the standard libraries.

In native code development, you usually have to try (hard) to achieve source portability. In Java, you don't have to try hard, but you do have to occasionally debug some differences in platforms. Your opinion that it doesn't work well on any platform is weak if it's based on your trust in a sysadmin that has bad experiences.

As far as why Java became popular, in a word, simplicity. Learning C++ and developing in C++ is HARD. The funny thing is that for some time, C++ was strongly associated with OOP, and thus was the primary language used to teach OOP. It wasn't until Java came around that not only academia but the industry realized that while C++ has been successful, the level of complexity involved is much higher than most languages out there. By most accounts, Java is not a beatiful programming language, but it's practical and productive. Beyond complexity, C++ had other issues I'll summarize as politics. If not C++, I suppose they could have picked Smalltalk or Objective C but I've never really analyzed that question in detail.

I just feel your argument is not based on technical reasons, which I find surprising having seen your discussion in countless threads to date. I personally think your bias shows through with terms such as "failure" and "garbage". In sum, the fact that you admit you've rejected Java to date and don't have extensive experience with it makes you an unlikely candidate to argue both its true strengths and weaknesses.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: IcemanJer
Originally posted by: silverpig
More and more universities are switching their compsci faculties over to Java. Java is more advanced than C++ I think.
Well, Java is a sh!t lot easier to teach. I TA'd the Intro to CS class my freshmen year and dear god if I had to teach those students pointers and memory management..........

This frightens me. Theres are computer scientists-to-be, and they struggle understanding pointers and memory management? I've never been formally taught either, ever, and I have never coded anything except for hello world, and temperature converter type stuff in C, yet I understand both pretty well, at least the concepts. I even know pointer syntax for the most part. Either there is alot more to it than what there seems to be, or people are just really stupid.
 

IcemanJer

Diamond Member
Mar 9, 2001
4,307
0
0
Originally posted by: BingBongWongFooey
This frightens me. Theres are computer scientists-to-be, and they struggle understanding pointers and memory management? I've never been formally taught either, ever, and I have never coded anything except for hello world, and temperature converter type stuff in C, yet I understand both pretty well, at least the concepts. I even know pointer syntax for the most part. Either there is alot more to it than what there seems to be, or people are just really stupid.
Not so much. My school has a distributive requirement for graduation, and many people choose to take Intro to CS to fulfill their "tech" class requirement.. so there were a good number of traditional science majors and humanities majors (and we're talking about people who need help writing for-loops)... Of course in our major the second programming class we take is entirely in C++
 

manly

Lifer
Jan 25, 2000
13,266
4,043
136
Just to be clear on one point, I don't mean to suggest that it was Java that convinced academia and industry that C++ was too complex. It just happened around the same time, Java started to become available on numerous platforms and "the rest is history".

It remains to be seen whether .NET will quickly replace Java but the early returns are that Java is around to stay, but probably in a somewhat diminished role once MS floods universities with free VStudio media kits and curriculums are retooled.
 

IcemanJer

Diamond Member
Mar 9, 2001
4,307
0
0
Originally posted by: manly
It remains to be seen whether .NET will quickly replace Java but the early returns are that Java is around to stay, but probably in a somewhat diminished role once MS floods universities with free VStudio media kits and curriculums are retooled.
That has already started happening, IIRC.. A friend of mine sent me links to a few schools (Waterloo University, I think, was one of them) about their CS curriculum and the Intro class was taught in C#
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: manly
Originally posted by: BingBongWongFooey

BS. I know more than one sysadmin who deals with java garbage at work. Java, to me, is a failure. Java was meant to be portable, yet it doesn't work that well on any platform (except maybe mobile devices? dunno), let alone work well on all of them. Java is an unwieldly, bloated resource hog.

Why DID java get so popular anyways? I know in the late 90's or so, colleges started teaching it alot, why?
Generally I trust your opinion, because you're objective and informed. But really, in this case, it seems like you have an old bias against Java and cling to that without much technical basis.

Call it a failure if you want to. I specifically cited its widespread use in enterprise application development; generally speaking, companies do not adopt IT platforms that are failures or that have horrible runtimes. And yes, the resource issue is important but name any other platform (besides C) that scales from embedded cell phones all the way up to big iron.

As far as it not working well on many platforms, that's again a matter of opinion that's generally refuted by the marketplace. If you're referring to client apps, then the that's a very hard problem to solve. In fact, Java is one of the few true single-source solutions for cross platform GUI apps. I'll concede that it doesn't work as well as native apps, but every time this question is raised in the software forum, even many of the die-hard Windows fans cite Java as being one of the best choices for cross platform GUIs (for example, singh comes to mind). Generally speaking, Java Swing is no longer the problem; it's Swing apps that remain bloated.

Now if you're not talking about GUI apps, then Java portability is very good. Although Sun only supports the JVM on three platforms, there are officially supported ports on dozens of others. Most of the Java application servers will run on any platform with a JVM, hosting your enterprise apps. Java doesn't have the quite platform breadth of C (or GCC) but C doesn't have the seamless binary portability of Java either. Java wins in a landslide with all the standard libraries.

In native code development, you usually have to try (hard) to achieve source portability. In Java, you don't have to try hard, but you do have to occasionally debug some differences in platforms. Your opinion that it doesn't work well on any platform is weak if it's based on your trust in a sysadmin that has bad experiences.

As far as why Java became popular, in a word, simplicity. Learning C++ and developing in C++ is HARD. The funny thing is that for some time, C++ was strongly associated with OOP, and thus was the primary language used to teach OOP. It wasn't until Java came around that not only academia but the industry realized that while C++ has been successful, the level of complexity involved is much higher than most languages out there. By most accounts, Java is not a beatiful programming language, but it's practical and productive. Beyond complexity, C++ had other issues I'll summarize as politics. If not C++, I suppose they could have picked Smalltalk or Objective C but I've never really analyzed that question in detail.

I just feel your argument is not based on technical reasons, which I find surprising having seen your discussion in countless threads to date. I personally think your bias shows through with terms such as "failure" and "garbage". In sum, the fact that you admit you've rejected Java to date and don't have extensive experience with it makes you an unlikely candidate to argue both its true strengths and weaknesses.

What exactly are the uses you are talking about though? JSP seems to not have all that great of a purpose, with PHP and ASP around. For gui apps, there are many C/C++ apps which compile and run on almost any platform, save for windows (and many compile under cygwin, and run in windows, take gaim for example, the gimp, etc etc). I suppose the ease of development makes the most sense to me, the other stuff just seems like things that can easily be worked around. Python with wxwindows is a hell of a portable combination, why isn't that more popular? I think the ease of use combined with it's *ok* traits are what made java so popular. Remember that "the market" also picks windows as the best workstation os, and redhat as the best linux distro?

As far as the quality/reliability of the runtime, considering I have never coded one character of java, nor had anything to do with any machines running it or anything of the nature, I can't say anything from experience, but I do recall seeing a script someone I knew that he had to run on some redhat machines as a cron job, something like this:

LOAD=`uptime | awk '{ $something $to $get $current $load }'`

if [ "$LOAD" -gt "25" ]; then
killall -9 java
killall -9 java
killall -9 java
killall -9 java
killall -9 java
killall -9 java
killall -9 java
killall -9 java
killall -9 java
/start/java/whatever/blah
fi
 

manly

Lifer
Jan 25, 2000
13,266
4,043
136
Originally posted by: IcemanJer
Originally posted by: manly
It remains to be seen whether .NET will quickly replace Java but the early returns are that Java is around to stay, but probably in a somewhat diminished role once MS floods universities with free VStudio media kits and curriculums are retooled.
That has already started happening, IIRC.. A friend of mine sent me links to a few schools (Waterloo University, I think, was one of them) about their CS curriculum and the Intro class was taught in C#
Well Waterloo, no offense, is in MS' pocket. It's one of their favorite places to recruit (and for good reason). The difference is that in this case, .NET is being chosen for political and monetary reasons rather than when C++ was being phased out because the language itself is very difficult. One important reason colleges chose Java is because the runtime is available on many platforms; that makes it easier to build often heterogeneous labs and also have a compelling option for students to work on their own PCs. If you adopt a single-source solution (MS), you really lock your students in. For example, if you own a Mac, are you forced to go to the lab to do any and all programming assignments on VStudio?

One C++ tidbit many probably wouldn't know; it wasn't until just last year that the first front-end for a C++ compiler was fully ISO standards compliant. I forget the developer, but it may have been Edison, which is an unknown company that sells their front-end to the commercial compiler developers. That should suggest that C++ is one of the most complex languages out there, even if many of the developers using it successfully think it's perfectly usable and powerful.

One of the funny documents I read a few years ago was the Mozilla standards guidelines for C++ code. Basically you had to ignore half the language because of the sorry standards compliance of C++ compilers on the dozens of platforms Mozilla was to target. :p
 

FeathersMcGraw

Diamond Member
Oct 17, 2001
4,041
1
0
Originally posted by: BingBongWongFooey

The language can be as great as it wants, but the implementation is horrid and you don't have to be a java coder to realize that.

Your self-professed ignorance about the language notwithstanding, you speak like you've profiled the performance of a wide series of applications. Of course, there's not a single implementation as there are many different virtual machines to accomodate both different platforms and environment constraints/requirements.