Java Sucks!
(http://langstroth.net/article.php?article=111)

Written by: Will Langstroth (http://langstroth.net)

Most of you know that I’m a total geek.  This article is about a 8 on the geek scale (1 being professional sports and 10 being Richard Stallman) so consider yourself warned. The guy in the picture is James Gosling (see picture here), one of the inventors of Java.  His laptop is mocking you.

Holy Sweet Mother of Jesus, Java sucks.  Since you’ve already been warned, you probably know that Java is a language.  No, wait, it’s a platform.  No, a virtual machine.  Wait, it’s a huge class library.  There’s reason number 1, folks:

 

1. Nobody knows what the hell it is.  That’s dangerous, especially with a very specifics-oriented culture like programming.  Programmers are really specific.  The reason for that is purely training.  If you ask a programmer to do something, and he starts asking you a ton of questions, it’s because you weren’t specific enough to get what you want.  In fact, if you don’t know what you want, you’re screwed.  OR you just got sold Java.  The funny thing about this aspect is that Microsoft imitated it with .NET.  What’s .NET?  Anybody?  No idea - but it’s exactly the same "no idea" that you get from Java.  At least Microsoft’s stuff runs on one platform well.  Java runs on all platforms horribly - enter reason number 2.

 

2. Slow, slow, slow  I used to be sold on Java.  It was easy enough to write in, and I thought the object oriented features would help to model real-world applications easily.  Sounds good.  The only problem is, like communism, it only works on paper.  When you actually write these programs, you can ooh and aah about how nifty the code is, but nobody cares!  They do care if it takes 30 seconds to load a program on a 2 gigahertz pentium 4.  Seriously, that is unacceptable.  jEdit takes about 10 seconds.  You may be thinking, "10 seconds isn’t a lot of time, Will."  Bullshit!  Do you have any idea how fast a 2 gig pentium is?  Not if you’re running Java applications, that’s for sure.  They used WAY less computing power to put guys on the moon.  WAY less.  That pentium is incredibly powerful, but Java slows it to a crawl.  AND the virtual machine uses your hard drive so much that if you were running exclusively Java applications, I’d wager the hard drive would burn out after 3 years.  It could have something to do with the fact that Java applications are unusually complex.  That gives us reason 3:

 

3. about a billion lines of code later, you have your progam.  Originally, I had here a breakdown of lines of code to how much a programmer would make, etc.  It was brought to my attention that the argument wasn’t entirely valid.  I concede that, but counter with this:  what’s easier to debug, a short program or a long one?  We’re not talking scientific stuff here.  I mean your run-of-the-mill boring-ass programming.  You know the shorter program is more obvious.  Looking at more lines of code is taxing, and makes me want to take a break, which is expensive.  It gets even more ridiculous if you go in for any of that "Enterprise" horseshit.  That brings us to number 4:

 

4. It’s a marketing scam  That’s right, you’ve been hosed.  They took a few good ideas, like garbage collection, sandboxing, etc. and pretended like they invented them.  That makes it easier to write, though, doesn’t it?  I don’t know about that.

 

5. It’s not easier to write  I’ve heard people argue, "yeah, but it’s so much easier to write in Java than it is in C!"  Uh, is that because you learned to program in Visual Basic first?  Maybe, because I’d rather write in any other language, object-oriented or not.  C++ is convoluted, and not technically object oriented, I’ll give you that.  But if you’re going to write a 3D graphics library, it’s a really good choice.  Or a processor-intensive Windows app.  When is Java a good choice?  Never!  Reason number 6:

 

6. Java is never the right choice  Let’s think back to when Java became a superstar language.  Do you remember why it was a superstar language?  Do ya?  Because it made little animations on your webpages.  That’s right, it became famous as "Applets" - now you remember.  Has anything really changed about the language?  Uh, the library’s bigger.  Let’s see how a conversation between me and Sun would go:

 

Will: For what, exactly, is Java a good idea?
Sun guy: Our Enterprise Java Beans allow business logic to be separated from implementation logic, giving you automatic transaction and atomization support
W: Speak English or I will cripple you in the most painful way I can think of
S: Oh, uh, you can use it for, uh, desktop applications
W: And wait for how long every time it needs to parse XML or whatever?  I have a life to live.  What else ya got?
S: Well, you could use it for little animations for your webpages
W: Oh yeah!  That’s right!  Or I could use Flash, which is WAY easier and looks WAY better.  Next.
S: Okay ... how about ... you could use it for server-side scripting, like serving webpages.
W: Uh, no, I’d use PHP for that, it’s faster to write, faster to run, easier to read, easier to debug, easier to install and easier to document
S: Yeah, but you don’t get the business tier separated from the implementation layer
W: Okay, let’s assume what you just said means something (which it doesn’t).  What would the benefit to that be?
S: Well ... you can program a bunch of stuff that’s a layer on top of the old stuff that runs on COBOL and ... okay, I don’t know. (starts crying)
W: It’s okay ... the bad men told you a lie. That’s right, let it out.

If all you have is a hammer, every job looks like a nail.  If all you have is Java, it’s difficult to imagine what you want to do with it.  To write vague shitty programs?  On to reason number 7:

 

7. Shitty programming cannot be stopped  If you think for a second that programming in Java makes people adhere to "patterns" or objects, or even writing legible code, you’re not a professional programmer.  Period.  If you were, you would have seen the disasters that are produced by idiots in every language.  Frankly, any programmer worth his/her salt should be able to learn a new language within a couple of weeks, and master it given a few months.  The reason for that is that fundamentally, they are all the same kind of thing.  It’s just a vocabulary entirely in the imperative tense.  You just want the machine to do what you tell it to.  That’s all.  Last but definitely the most expensive point:

 

8. Debugging in Java is hell  Some people don’t like debugging in C because it’s so easy to crash the program or have memory leaks.  This goes back to good programming.  If you cross all of your t’s and dot all of your i’s, you’re fine.  You have to be good to do that.  You also have to be good to figure out what the hell might be wrong in a Java program.  It makes me tired thinking about the errors I’ve received, but it basically requires an encyclopedic knowledge of the library in order to effectively know what went wrong.  Yay!  I have to learn 50 times as much as if I was just screwing up of my own incompetence!

 

So the next time a salesman or a manager says "Java" to you, point them to this page, or paraphrase.  It could save their money and your sanity.