Jump to content

  • Log In with Google      Sign In   
  • Create Account


Whats wrong with java?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • This topic is locked This topic is locked
48 replies to this topic

#1 Wiitoy200   Members   -  Reputation: 105

Like
0Likes
Like

Posted 13 March 2012 - 10:00 AM

I've been looking around the web and I've seen a deep hatred towards java? I mean to me it seems like a decent language (then again i'm a noob that doesn't know sh*t about programming other then "If then's" statements.) I also have seen that C++ has a very good rep. can someone explain this to me in VERY VERY LAYMEN TERMS? (noticed how i bolded, underlined AND CAPITALIZED, very very laymen.)

Sponsor:

#2 Cornstalks   Crossbones+   -  Reputation: 6974

Like
2Likes
Like

Posted 13 March 2012 - 10:12 AM

I've been looking around the web and I've seen a deep hatred towards java? I mean to me it seems like a decent language (then again i'm a noob that doesn't know sh*t about programming other then "If then's" statements.)

It is a decent language. Personally, the reason I don't like it as much as say, C#, is that there's a lot of legacy stuff in Java (it's older, and things have changed a lot since it was first released; however, it's also had to retain compatibility with itself from its early youth), plus the fact that I fee like I have to be way more verbose in Java than say, C# (that is, if I want to do the same task in Java and C#, I've typically found that Java requires more code (not tons more, but enough for me to feel like C# is a more elegant, simple solution typically)).

I also have seen that C++ has a very good rep.

The reason you see this is that you've been looking at the wrong parts of the Internet. I wouldn't say C++ has a very good rep. It (and C as well) has a reputation for being very easy to introduce a bug in the code base that you'll only ever find years later after tons of debugging. Yes, it's used a lot in the industry, but that doesn't mean it has a very good rep. (common example: Washu's quizzes. I don't know a single person that's been able to correctly answer all the questions on all the quizzes without cheating)
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#3 Telastyn   Crossbones+   -  Reputation: 3726

Like
2Likes
Like

Posted 13 March 2012 - 10:36 AM

Java also has the unfortunate association of accompanying many college's move away from computer science and towards churning out code monkeys. Plus it's heavily associated with Oracle now, and nobody likes Oracle. Plus java has a lot of badly designed bits (datetime, type erasure in generics).

C++ has a very poor reputation. Maybe a better rep for games in certain circles, but in commercial sectors it's relegated to specific environments where nothing else can go or to vital legacy code.

#4 Manabreak   Members   -  Reputation: 141

Like
0Likes
Like

Posted 13 March 2012 - 10:36 AM

Some people think the overhead caused by Java's virtual machine technology is unbearable and that's why they "hate" it so much. I personally don't think it's that big of a deal, and there's even one professor at my university who wrote an Othello game using C++ and then ported it to Java, and it turned out the game ran faster on Java, even though it shared the same basic code. When it comes to making games using Java, it's a bit problematic without DirectX support and the lack of proper development environments. One can still make games with it, Minecraft being a good example. :)

The C++'s "good rep" is a bit of an illusion, just like Cornstalks said, it's PITA to find a bug in some cases. And while C/C++ usually offer unrivalled efficiency, it's often too much of a hassle compared to Java or C#. Also, C++ suffers from the huge need of broilerplate code with all the header stuff and whatnot. Everyone has their opinions about these, and they always reflect to their needs and work. I don't really have my own opinions about languages, I prefer C# because I've used it daily for a year, but I don't mind programming with Java or C++. It's a matter of need more than a matter of opinion. :)

#5 Serapth   Crossbones+   -  Reputation: 5325

Like
4Likes
Like

Posted 13 March 2012 - 10:41 AM

Yeah, outside the game development community, C++ has a pretty horrible rep. Often it's use is attributed to being a necessarily evil, which is becoming increasingly less necessary. That said, newbie developers are probably as much to blame about propagating the C++ is awesome meme. Most experienced developers become much more pragmatic in their approach to languages.


As to Java, its a perfectly serviceable language, but it isnt aging well. Basically C# came to the scene, learned from the best of C++ and Java, and thus has less legacy cruft weighing it down. C# is aging better than Java, adding new features that fit well, as opposed to feeling like kludged hacks.


My biggest beef to Java is the ecosystem. There are too many libraries to do too many things, half of which do them poorly. Where for example C# has two windowing systems, Java has about 20, of which only 1 isn't crap. So, as a new developer, you are going to get overwhelmed with options. Hell, just try to figure out which web framework you should use with Java... as a new developer, that experience will crush your will to live.

My other beef is the ecosystem is just horrifically over-engineered, it reeks of consultants. People try to abstract things to the 29th degree, to the point you are depending on some magic XML file, being called by a 3rd party tool, calling another 3rd party tool, accessing a web repository just to display a unicode string on screen. It's the type of thing people paid by the hour do, and its all wonderful and great, until it breaks. These days, you don't just learn Java, you have to learn Ant, Maven, Git, then whichever frameworks you go with. Plus, Eclipse sucks, for much the same reason, too many options, too many tools trying to be too clever and creating a nightmare when they break.

#6 zoneweb   Members   -  Reputation: 92

Like
-6Likes
Like

Posted 13 March 2012 - 11:58 AM

It's slow and not very good for game development on PCs, but on some smart phones (e.g., Android-based phones) it's the language used for coding games. IMO, neither Java nor C++ is noob-friendly due to their myriad frameworks and libraries, lack of documentation, and intentional obfuscation. Other languages have similiar problems that make it difficult for new programmers. C++ does have its drawbacks, but nobody forcing the programmer to make things more difficult than it needs to be. It's the design and not the language that is the main issue.

If you want to start simple, I recommend Javascript. It's completely self-contained. There's no need install anything and you won't have to worry about compiler settings and options. All you need is a modern browser.

#7 Ravyne   Crossbones+   -  Reputation: 7116

Like
2Likes
Like

Posted 13 March 2012 - 12:10 PM

Legacy (some poor libraries, features that can't be shoehorned in anymore) and verbosity (everything-a-class, no operator overloads) pretty much sum it up.

There's also a lot of hold-over opinions from the early days when JVM performance wasn't that good, and the half-failed promise of "write once, run everywhere".

C# isn't perfect, but its basically Java-done-right (as it was able to learn from Java's mistakes)

#8 mhagain   Crossbones+   -  Reputation: 7821

Like
1Likes
Like

Posted 13 March 2012 - 01:47 PM

There's nothing specifically wrong with Java itself - in the right environment and when used for the things it's good at, it works. That's good by any measure of success. Like any other tool/language/platform/API/framework/widget, if you try to strongarm it into doing things that it's not good at you will probably end up in deep trouble.

As it was really the first of it's kind it got to make all the exciting mistakes, and the hype originally surrounding it did turn out to be a mite off the mark, but a lot of productive work (as opposed to over-engineered consultantware) still gets done in it.

A large part of the hate - as with any hate - is just down to people being tribal and liking to pick sides in a (potential) fight. You'd probably find the very same from the other perspective if you went looking.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#9 Bregma   Crossbones+   -  Reputation: 4985

Like
-3Likes
Like

Posted 13 March 2012 - 01:51 PM

The biggest negative to Java has to do with corporate machinations about a decade ago. The result was that Microsoft made sure that end users would have a hard time installing the Java runtime on their Windows boxes, but the C# runtime (aka .NET, then later the CLR) worked out of the box. So, to distribute your Java application you need to bundle the entire Java runtime, which is not tiny and useless if you do not have big bandwidth. Distributing C# apps means a tiny bytecode file download.

Microsoft also ships the C runtime and some C++ runtimes.

In summary, the disadvantage of Java is that it is a hassle to distribute apps for Microsoft Windows written in Java compared with apps written in C# or C or (in most cases) C++.
Stephen M. Webb
Professional Free Software Developer

#10 swiftcoder   Senior Moderators   -  Reputation: 9856

Like
1Likes
Like

Posted 13 March 2012 - 02:12 PM

In summary, the disadvantage of Java is that it is a hassle to distribute apps for Microsoft Windows written in Java compared with apps written in C# or C or (in most cases) C++.

Worth mentioning that Apple no longer pre-installs the Java runtime (although it will offer to do so when you try and run a java application), and most Linux distros now have multiple available JREs, each with their own caveats and/or bugs.

It's all a bit of a mess.

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#11 Serapth   Crossbones+   -  Reputation: 5325

Like
1Likes
Like

Posted 13 March 2012 - 02:18 PM

The biggest negative to Java has to do with corporate machinations about a decade ago. The result was that Microsoft made sure that end users would have a hard time installing the Java runtime on their Windows boxes, but the C# runtime (aka .NET, then later the CLR) worked out of the box. So, to distribute your Java application you need to bundle the entire Java runtime, which is not tiny and useless if you do not have big bandwidth. Distributing C# apps means a tiny bytecode file download.

Microsoft also ships the C runtime and some C++ runtimes.

In summary, the disadvantage of Java is that it is a hassle to distribute apps for Microsoft Windows written in Java compared with apps written in C# or C or (in most cases) C++.



No offence, but your tinfoil hat is showing. Microsoft tried to kill Java via embrace and extend, somewhat out of necessity due to the piss poor performance at the time. But Microsoft very much did not block the distribution of Java ( they would have been sued *more* into oblivion ), and the only real difference between the the JVM and .NET runtime for distribution is Windows Update, and frankly, blame that on Sun, as after a given date, Microsoft was no longer permitted to distribute Java updates.

#12 Bacterius   Crossbones+   -  Reputation: 8516

Like
0Likes
Like

Posted 13 March 2012 - 02:29 PM

In my humble opinion (and it's just my opinion), Java is too popular for its own good. And as we all know, with the masses comes idiocy. By that I mean that most students fresh out of college, "trained" to use Java, don't actually know how to do anything. Most of them don't even know how to use a pointer and are just taught to use such-and-such library to do such-and-such task. They couldn't work their way out of a paper box. This gives Java a bad reputation and an incredibly low signal to noise ratio.

Of course on the other hand, the fact that Java is so popular means you will find absolutely anything you need in some random library if you look properly, so you don't even have to solve problems yourself, you can just cobble up an application from stuff other people have written and call it a day. Pro or con, depends on your perspective. If you want to learn "real" programming Java may not be the best choice. The reason college and high schools use it for learning is because it's "The" language currently (and that there's a lot of stuff already there to help you achieve some kind of goal for instant gratification). In the minds of most IT teachers, "it would be foolish to teach them anything else than Java, since that's what they'll be using after graduation". Nothing intrinsically wrong with this point of view, but it is however a bit short-sighted, especially considering *how* the language is taught. But I digress.

That said there is nothing wrong with the language itself... it looks a lot like many languages, curly brackets, standard keywords, method calls, etc... nothing really new to get excited about. The real gripe people have is with Java's history and its place in the industry which can seem a bit overwhelming. People do not like being boxed into learning a language, and this is exactly what Java has done - forcing pretty much everyone to pick it up in order to be competitive or even just look credible in the business world. Thus the hate.

But you should also know that the Internet exaggerates everything. All the "hate" you see online is probably the rantings of a dozen or so people which voice their opinion loudly. People tend to complain when they are unhappy but stay silent when satisfied, which will skew any passive survey if not done with care.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#13 Ravyne   Crossbones+   -  Reputation: 7116

Like
3Likes
Like

Posted 13 March 2012 - 02:32 PM

This will be fun!

It's slow and not very good for game development on PCs

Slow compared to what? C++, C, Assembly? The JVM has come an awful long way in its 15+ years. And of course there are multiple vendors of JVMs now, all with different performance properties.

Minecraft is written in Java, and while it might not be that much to look at, a whole mass of computations are going on under the hood.

...but on some smart phones (e.g., Android-based phones) it's the language used for coding games.


Not so much -- There's a native code SDK available too, which I'd make an educated guess is the preferred environment for pro game developers, for portability between PC and iOS if nothing else.


IMO, neither Java nor C++ is noob-friendly due to their myriad frameworks and libraries, lack of documentation, and intentional obfuscation.

all-in-one-ness is hardly the measure of being noob-friendly. A simple, self-contained library that doesn't do what you want isn't very helpful, regardless of how well its documented or clear the code is.

Furthermore, Java and C++ are on complete opposite ends of the spectrum with regard to library support -- The standard library of Java is around 2 orders of magnitude larger than the C++ standard library.

Other languages have similiar problems that make it difficult for new programmers. C++ does have its drawbacks, but nobody forcing the programmer to make things more difficult than it needs to be. It's the design and not the language that is the main issue.

That's only in the smallest of ways any more true of one language vs. another. C++ simply doesn't make any over-reaching attempts to protect you from yourself. Java and many other modern, RAD-oriented languages have extensive guardrails in place, while C++ is happy to let you walk off the end of the pier; however, that does't change the fact that good design is required regardless of language or programming paradigm.

If you want to start simple, I recommend Javascript. It's completely self-contained. There's no need install anything and you won't have to worry about compiler settings and options. All you need is a modern browser.


Again, there's something to be said for simplicity, and I actually have a lot more respect for JavaScript than your average Joe -- but its hardly a panacea of simplicity. Javascript performance varies greatly between browsers, as does the feature-set needed to do anything interesting with games. Performance swings from one extreme to the other between even versions of the same browser. Microsoft claims to have no plans to support WebGL, and there's no standard solution for a proper sound solution (e.g. even a rudimentary stereo mixer) -- though some interesting work on that front was announced this week.

All that said, things are moving in the right direction with JS, presuming MS gets fully on the bandwagon, so its not a bad choice if you can deal with working in a browser.

#14 swiftcoder   Senior Moderators   -  Reputation: 9856

Like
1Likes
Like

Posted 13 March 2012 - 02:42 PM

By that I mean that most students fresh out of college, "trained" to use Java, don't actually know how to do anything. Most of them don't even know how to use a pointer and are just taught to use such-and-such library to do such-and-such task. They couldn't work their way out of a paper box. This gives Java a bad reputation and an incredibly low signal to noise ratio.

That Computer Science programs across the nation are using the move to Java as a cover for the great 'dumbing down' of CS education, is purely incidental to any faults of the language.

That's not to say there aren't any faults with Java (J2ME can die in a fire *shudders*), but in general its a pretty OK, albeit completely uninteresting language. "C++ with the fun bits taken out", as the old-timers say...

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#15 Bacterius   Crossbones+   -  Reputation: 8516

Like
1Likes
Like

Posted 13 March 2012 - 02:51 PM

That Computer Science programs across the nation are using the move to Java as a cover for the great 'dumbing down' of CS education, is purely incidental to any faults of the language.

Of course, that's why I said later on there is nothing wrong with the language itself - Java just happened to be at the right (or wrong, depends on your pov.) place at the right time.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#16 mhagain   Crossbones+   -  Reputation: 7821

Like
1Likes
Like

Posted 13 March 2012 - 02:54 PM

The biggest negative to Java has to do with corporate machinations about a decade ago. The result was that Microsoft made sure that end users would have a hard time installing the Java runtime on their Windows boxes, but the C# runtime (aka .NET, then later the CLR) worked out of the box. So, to distribute your Java application you need to bundle the entire Java runtime, which is not tiny and useless if you do not have big bandwidth. Distributing C# apps means a tiny bytecode file download.

Microsoft also ships the C runtime and some C++ runtimes.

In summary, the disadvantage of Java is that it is a hassle to distribute apps for Microsoft Windows written in Java compared with apps written in C# or C or (in most cases) C++.

Sun and now Oracle have done more to make Java a pain to distribute on Windows machines than Microsoft ever did. I don't know if you've ever been involved in a corporate deployment of a Java app, but let me assure you that up to only a few years ago it was an incredibly unpleasant experience. Proprietary installer - check. No group policy support - check. Having to manually edit configurations on individual machines - check. Config data stored in areas of the file system that non-admins can't write to - check. Random/semi-random crashes and DEP violations meaning you can't patch and/or upgrade browsers until a compatible runtime is released (which Oracle in particular have displayed some reluctance to do) - check. Annoying auto-updater that you've no central control over - check.

I recall dismissing client-side Java as nothing more than a "developer's plaything" for these very reasons back in the day, although I do believe that things have improved a huge deal since then. Thankfully I've since moved on.

None of this is a fault of the language, by the way, but rather of the framework and culture surrounding it (or that did surround it at the time).

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#17 daviangel   Members   -  Reputation: 600

Like
1Likes
Like

Posted 13 March 2012 - 04:35 PM

Java also has the unfortunate association of accompanying many college's move away from computer science and towards churning out code monkeys. Plus it's heavily associated with Oracle now, and nobody likes Oracle. Plus java has a lot of badly designed bits (datetime, type erasure in generics).

C++ has a very poor reputation. Maybe a better rep for games in certain circles, but in commercial sectors it's relegated to specific environments where nothing else can go or to vital legacy code.

Yup, Oracle Posted Image
I've even moved away from programming in Java since Oracle took over Sun. I mean they even ran off the creator of Java so that should tell you something.
Not to mention I primarily program for MacOSX these days and AFAICT JAVA is fubared on that platform. Apple used to ship a Java VM and provide the Java SDK but now they just refer you to OpenJDK.
Anyways, before all this fiasco happened I would've said in layman terms as I've said before that the illogical hatred towards Java, since it's actually pretty similar to C# which everyone seems to love, at least early version of C# I programmed in, was because programmers hate being told what to do.
That's the thing with Java see it's like having someone looking over your shoulder when you are programming telling you don't do that, it's dangerous, do it this way since it's the safe way to do things whereas C/C++ it's like you are expected to know what you are doing so you are allowed to do whatever you want so if you want to overwrite that piece of memory or go overy the end of an array you must know what you are doing just don't come crying to us why your program doesn't work Posted Image

But as I heard Stroustroup once said there are languages one complains about i.e. Java, C++, etc and languages no one uses i.e. Lisp...
okay this is the original quote:
"There are only two kinds of languages: the ones people complain about and the ones nobody uses"-Stroustroup
Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

#18 froop   Members   -  Reputation: 636

Like
0Likes
Like

Posted 13 March 2012 - 04:36 PM

Maybe it is because everytime a program requires me to install Java, I look for another program that doesn't, and usually succeed.

#19 Bregma   Crossbones+   -  Reputation: 4985

Like
0Likes
Like

Posted 13 March 2012 - 06:59 PM


The biggest negative to Java has to do with corporate machinations about a decade ago. The result was that Microsoft made sure that end users would have a hard time installing the Java runtime on their Windows boxes, but the C# runtime (aka .NET, then later the CLR) worked out of the box. So, to distribute your Java application you need to bundle the entire Java runtime, which is not tiny and useless if you do not have big bandwidth. Distributing C# apps means a tiny bytecode file download.

Microsoft also ships the C runtime and some C++ runtimes.

In summary, the disadvantage of Java is that it is a hassle to distribute apps for Microsoft Windows written in Java compared with apps written in C# or C or (in most cases) C++.

No offence, but your tinfoil hat is showing. Microsoft tried to kill Java via embrace and extend, somewhat out of necessity due to the piss poor performance at the time. But Microsoft very much did not block the distribution of Java ( they would have been sued *more* into oblivion ), and the only real difference between the the JVM and .NET runtime for distribution is Windows Update, and frankly, blame that on Sun, as after a given date, Microsoft was no longer permitted to distribute Java updates.


No tinfoil hat. Microsoft wanted Sun to "open" java, Sun wouldn't. Microsoft wanted to ship their own proprietary implementation of Java, Sun blocked it with lawyers. Microsoft took their ball and went home, it just wasn't profitable to continue the fight. Shortly after that, they introduced C# to fill the same niche.

I was working doing Java development on Windows at the time. It was very relevant to what we were doing.

My point is the biggest problem with Java is not any technical problem with the language itself but with the ecosystem associated with distributing apps written in it.
Stephen M. Webb
Professional Free Software Developer

#20 Hodgman   Moderators   -  Reputation: 29447

Like
2Likes
Like

Posted 13 March 2012 - 07:04 PM

Shortly after that, they introduced C# to fill the same niche.

Which started out life as a cheap Java clone (which started out as a cheap C++ clone, written by people who didn't grok C++ or OOP), but has evolved into the language that Java always should have been Posted Image




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS