Is Java a Worthless, Piece-of-Shit Language?

Two recent articles got me thinking about this subject. I don't mean any disrespect to Java when I, too, wonder aloud: is Java a completely worthless piece of shit language that should never have seen the light of day?

How to begin this exploration of Java's weaknesses? Certainly there is no lack of options! Perhaps we can work backward from overwhelming evidence of Java's immenint self-destruction: the complete inability to compose libraries into useful applications; Java's inability to express even the simplest of programs without jumping through arbitrary hoops; EJB 2; or most damningly (in this author's opinion) Java's complete and utter lack of iPhone support.

For the sake of argument, let's begin with shockingly poor support Java has for the iPhone. It's so bad, in fact, that even the simplest Java programs will not run on the iPhone. Even as an applet Java won't work in the iPhone's browser. How could Sun be so obtuse as to not just make Java work? Did it not occur to them to make Java work on the iPhone? What sort of talentless monkeys does Sun have working for them anyway?

...

(If you couldn't tell, this post is a parody of the kind of rhetorical nonsense that seems to be making the rounds about Java these days. If you want to dis Java, that's cool: do so. Don't be a wussy and couch your attacks as inflammatory questions. Bruce Eckel doing it is bad enough, but then you have that Shawshank Redemption guy trying to ride on Bruce's dishonest coat-tails. Shame on you, Shawshank!)

23 comments:

Christopher Smith said...

I think you are ragging on Java a bit much. When Java arrived on the scene, many of its strengths relative were exactly the things you are criticizing it for.

Java is just a victim of its own success. Much like C in days of yore, its popularity has wiped out languages that didn't have measurable advantages over it So all that's left are languages that can point at *something* they can do better than Java. Much like C, I expect Java to acquire some of those advantages over time, while others will remain the domain of "the next thing".

As for the iPhone thing.... Sun has deployed Java rather successfully to tons of different cell phone platforms. Do you really think *they* are the relevant factor inhibiting Java on the iPhone, or perhaps just *maybe* Apple has a role in it all.....

James Iry said...

Funny stuff. But maybe the wrong target?

Eckel's point about Java wasn't that the language was dying in the sense of losing users. It or might not be, but if it is it's a mere trickle compared to the ocean that is the Java user community. I'm sure Eckel is smart enough to realize that.

Eckel's point was that Java is a rich, complicated language and that adding substantial features to a mature language can create complicated corner cases, inconsistencies, etc. So if the community doesn't want to substantially break compatibility, then it might make sense to only make minor changes at most. He was saying let Java continue being a useful language more or less as it is. Hence the phrase "evolutionary dead end" instead of "Java is doomed."

josh said...

I agree with both of your very well thought-out comments. In fact, it makes me feel good to know that such rational people out there, and not a little impressed that you would react so calmly to something I meant as been rather obnoxious.

On the OCJUG mailing list I had this to say about Eckel's post. I think it's still valid (and certainly consistent with what you're saying):

The title is quite misleading; I'm surprised (and not impressed) that
Bruce Eckel, the author of "Thinking In Java", would rely on such a
tactic.

Basically he's cautioning against adding new features to the Java
language that preserve backward compatability but yield decreased
readability. He wants to see Java stabilize, stop adding new language
features (especially ugly closures), and be a "reliable workhorse"
like C. Or, take steps like Ruby and Python have done and actually
break backward compatibility to maintain the readability of the
language.

And then, almost as an aside, he pitches Scala, a kinda-new
Java-bytecode-compatible language that I'm hearing a lot of buzz
about, too.

Frankly, I think Bruce has a point. The lasting legacy of Sun's Java
will be the class file format and the JVM, not the language. Java
doesn't need to compete with every hot language that comes along. I
think its great you can write java bytecode in so many different
languages.

...

josh said...

I think it's time for me to rant a little again, this time about the fact that in 2008 so many systems, like blogger's comment system for example, don't know how to handle flowed text that might have an extraneous CR or two. Is it really that hard of a problem??

Anonymous said...

Java is indeed an atrocious piece of shit. It's success has absolutely nothing to do with it's quality, and everything to do with it's LCD design. I yearn for the days when I'll be able to write code in a dynamic language again, and all the two-bit programmers (pun intended) who can't tell a continuation from a closure have left the field and joined McDonalds.

Trying to express oneself in Java is like having to write with a restricted vocabulary. Any deep notion takes lines and lines of code, most of which would be completely replaced by a single line a real language. Describing any sort of complex live type system is a horrible horrible experience of repetition.

Hell, I'd even take C++ any day over Java. And that's saying a lot.

Anonymous said...

This is not funny neither smart. Java is sucessfully used in millions of projects, big and small. You either need to study Java or you need to refine you sense of humour. On the other hand... if you are 13 years old... your post is... probably acceptable.

josh said...

Well, you're right, it's not *that* funny. It is, however, slightly funny, IMHO. Perhaps that means I am slightly 13 years old? There are worse things... Anyway, this post is so old I'm kinda surprised anyone is even reading it anymore! It was written in a time when there were a rash of inflammatory blog titles about Java, and rather than call them out, I satirized. If it worked for Voltaire, it can work for me I reasoned.

webmasterpdx said...

Steve Jobs didn't want to pay the license for either Sun's java, or a cleanroom java, or buy his own. i.e. He was a cheapskate. This is why java doesn't run on the Iphone. He did the same thing with Flash and even told the Iphone developer community that they are not allowed to use flash. Macromedia decided, as a result, to no longer support the Iphone (with flash), so they are now squarely focused on Android. So long IPhone. I can't wait for IPhone to fade away into ablivion due to androing passing it out in features and user interface.

webmasterpdx said...

I saw one person say they hate java almost as much as C++. I'm wondering whats left outside of C or assembler. Pascal? I don't think so.
Any language you use has it's place and was designed for a purpose.
java was designed as a write once run anyplace (within it's type of java...though I've easily converted code from PCs to run on javaTV, OCAP enabled set top boxes). I wouldn't use java in a PIC based embedded design, but if it's a big PIC I'd use C, and if a small PIC I'd use assembler with macros to save space. It all depends on what you want to do.
I hate all the zillions of scripting languages for the web. I'm hoping HTML5 will eliminate the need for many of them. I also am not a friend of .NET as it's not very portable, though C# is actually a well designed language....if it could be run unmanaged.

josh said...

Webmaster, consider functional programming. I think that functional programming has been too long under the purview of computer scientists interested primarily in "making your hat pop off" rather than solving real problems. The power of dynamic functional language is pretty amazing.

I'm just going to come out and say it: functional programming rocks for solving real problems.

webmasterpdx said...

Actually, I started programming in 1979, and I actually have worked with functional languages. I know APL isn't a real functional language, but its close, and I used that in University as I could whip out really complex code in a single line of symbols like writing a math equation. 1000 lines of Fortran or C could be replaced by 30 characters of APL. It was a great language but died because at the time, most programmers used COBOL or FORTRAN, and couldn't handle the change to a mathematical symbol based language. Later on when I worked for an array processor company, we came out with a functional machine, that ran a functional language on a hardware accellerated box (non Von-Newman architecture). Later when I worked at Cray, others at the company did some work there, but it just never caught on.
I loved APL and when you are good at it, it's an amazing language. However, it's an application language, like MATLAB. It would not be feasable to use it in something like a $1 PIC circuit to sound a buzzer when your laundry sink overflows. Assembler or C would be more appropriate in that case. Again, it depends on what you want to do. Remember that Java translates nicely to bytecodes and is very efficient across the web in that case. Functional languages tend to work best when dealing with a specific data type, so if a certain data type becomes very common, like maybe voice packets, then maybe a functional language to deal with voice packets might be the way to go, but someone might make the same case for an OO language like C++. It's almost like functional languages go best with data oriented apps, while OO languages go best with data AND behavior oriented apps.

I will check out what's been done lately in functional languages....you have me intrigued....I haven't done anything there for years....
Thanks...

Anonymous said...

I reached here because I searched "Java is a piece of shit" in google. I did that because I am currently required to write a program for android. I am a C++ developer with about 12years of experience and I just could not believe the handicaps that I have to live with, using this PIECE OF SHIT language. I totally totally agree with one of the comments above about writing code in Java being like expressing in a language with limited vocabulary...

webmasterpdx said...

The limited Vocabulary is not a fair way to say it. It's better to say it's protecting the OS from your mistakes. Java doesn't allow pointers as that doesn't make sense on the web and it's safer (can't kill a phone with an app that way). Multiple inheritance isn't allowed (most C++ developers don't like that except for interfaces or static const data ...which Java does support...so there is no loss there).
Java plays a big role in the security of phones. Phones cannot be insecure....they become almost worthless otherwise. The iphone doesn't use java and is not allowed in many businesses and in the government as a result. It uses a much more convoluted collection of languages to implement security and is a pain to develop for as a result. Android and Blackberry use J2ME which is a much nicer development environment as a result.

leo said...

everytime i install java, i get this messagr hs_err_pid5. this has been going on for a month, i need java for pogo games, otherwise i think it is a piece of shit.

Anonymous said...

Since Windows 95 it was easy to handle Mouse Events in VB and GetAsyncKeyStatus() always could tell me during dragdrop events wheather Shift or Control NumLock Key is currently pressed or toggled on or released or toggled off.
In Java one cannot reliably determine
what keys is pressed or released by now. Event-Listeners are awful and massive overhead and even useless - they connot reliably detect the right answer in case the user switches between Windows.
JAVA IS CRAP

Anonymous said...

Djikstra on Java:
"It's embarrassing. Because it is so bad. The only reason Java has been accepted is because it is a product of a company, Sun, that has made enormous advertisement for it. Beautiful programming languages exist, and a good language, like a tool, is just a joy. But industry doesn't want that. Probably because decisions are made by technically incompetent people."

Anonymous said...

I got here because I BINGed JavaScript is a piece of shit. Having nearly 30 years of IT experience ranging from PL/I to Java, I do see cool stuff in JavaScript but IMO, it's difficult to respect a language that requires one to stare at a piece of code for a few minutes to count the number of braces/brackets to figure out why there's a syntax error. Sure, closures are powerful but the syntax is shit. Sure, a mess can be made with Java too but JavaScript seems to have a built in propensity for creating a mess. I don't think it has to be that way but it often seems that way.

Regarding folks complaining about Java, I suppose they are just like me complaining about JavaScript. The more you get used to something, the more it seems like the sane alternative.

As far as Java not working on the iPhone, it doesn't have a damn thing to do with Steve Jobs not wanting to license Java. Steve is a smart guy. A very smart guy. The last thing he wants is applications being easy to port FROM his platform to another. If OSX was a dominant platform and closed in the sense that only approved applications could be installed, I guarantee Java wouldn't work there either. This has nothing to do with Java and everything to do with Apple wanting to create a kingdom. There's nothing wrong with that until folks blame Sun/Oracle as to why Java doesn't work on the iPhone. The blame is misplaced.

Anonymous said...

Umm.. okay Apple Fanboy, the reason Java is not supported on the iPhone is because of APPLE, not Oracle.

And Java is a very nice OOP language. I don't know what you guys are saying..

Anonymous said...

Yes. Java is shit. Java tools are shit. The Java Culture is shit. The Java Virtual Machine is shit.

Having tried many of the tools, all of the IDEs, and a significant number of frameworks, I have yet to find anything about Java that permits transparent, effective, and efficient development. All of the programs I've been associated where Java was mandated by managers who only know that Java is loved by other managers have all failed to deliver and/or perform.

Java should have been left to programming toasters and never should have been allowed out of firmware.

Anonymous said...

Java is CRAP in deed, Applications working under Java are quite often buggy, user non friendly, not worth of waiting to app load! Especially i hate E-banking crap which uses Java to operate, not working at all! My life is too short to wait Java applet to load! Java on Phones? Same crap! I hate Java!

Anonymous said...

I honestly agree with this statement. Fucking java won't let me play on a minecraft server! That's not just bullshit. That's FUCKING BULLSHIT!!!

Anonymous said...

I'm sorry but you Java fans obviously don't know any real programming languages because frankly, java is a complete fucking piece of shit. No operator overloading? What the fuck is that? No unsigned data types? What kind of a joke, piece of shit babys first toy scripting language is this?

Java makes sense for Android because everything you need is ALREADY WRITTEN FOR YOU IN C++, and you just use the Java interface to make function calls to get your data in and out of the VM. Ya know, since defining and calling functions is about all that Java can do.

No default parameter assignments? Are you shitting me? So what, I have to write 5 overloads of every function and modify the javadoc comment for each one to hint to the user what the default argument is depending on which overload they use? Give me a break. This is pathetic. Honestly, ACTIONSCRIPT is a better, more mature language than Java. THAT my friends, is how pathetic Java is.

I'm writing the Flash platform in Java and C++ and honestly, if I had of started with the C++ version, I'd be done by now. Frankly, I think it might just be time to ditch the java version and go C++ only using NDK for android. Instead of actually focusing on my framework, I'm sitting here fumbling with this piece of shit language trying to find HACKS to do the most basic things.

Anonymous said...

Un, no. He is right 100% After 20 years working with it I will say that the title here is spot on.

Nothing is like it. Name one. Other than flash.

But really flash is Java anyway in terms of its a POS