Friday, May 20, 2011

Re: Seven Advantages Of Java

My usual routine is to checkout after coming back from lunch and today the Seven Advantages of Java blog post caught my attention. It's a quick and easy read but I will play the devil's advocate and lets put a spot light on the 7 "advantages" of Java.

1. Java is easy to learn
Java was designed to be easy to use and is therefore much more easy to write, compile, debug, run and learn than other programming languages.

Well not really. This is pretty subjective -- Java is easy to learn compared to what? C or C++? Ruby is easy. Groovy is easier if you already have Java background. Python is the easiest as most claimed.

2. Java is object-oriented
This allows you to create modular maintainable applications and reusable code.

Just because it's OO does not mean that it will create modular and maintainable program. OO languages are dime a dozen and that doesn't necessary make it an advantage for Java. (Psst, It's how you write the code).

3. Java is platform-independent
One of the most significant advantages of Java is its ability to move easily from one system to another. The ability to run the same code on many different systems is crucial to www, and Java succeeds at this by being platform-independent at the source and almost binary levels.

This platform-independent thing is overrated but I bought it -- hook and sinker -- when I was in college. This is a marketing-speak advantage but not so much of a practical thing in real world. It helps to know how to program in Java but you still have to learn the platform idioms and usage patterns. For example, you can't and don't run servlet as desktop app and vice versa. Btw, wassup with the "almost binary levels" -- it will always compile down to JVM bytecode.

4. Java is distributed
Java is designed to make distributed computing easy with the networking capability that is inherently integrated into it. Writing network programs in Java is like sending and receiving data to and from a file.

This true and may be cool many years back but almost every language framework comes with some kind of distributed capability that you can use right away. So, meh, overrated.

5. Java is secure
Java considers security as part of its design. The Java language, compiler, interpreter, and runtime environment were each developed with security in mind. 

This is true to certain extend but when we talk about security we have to understand that security covers a huge body of concern -- authentication, authorization, integrity etc. So Java VM is secure against attacks like buffer overflow, but the security of the software is not guaranteed by Java alone. It's how you program it. The author should back it up with more specifics.

6. Java is robust
Robust means reliability. Java puts a lot of emphasis on early checking for possible errors, as Java compilers are able to detect many problems that would first show up during execution time in other languages.

By robust you mean the damn thing doesn't crash mysteriously then ya Java is robust. But so is every languages worth their beans. Weak argument really. Reminds me of an advert I came across many years ago -- one of the publicize "Feature" of the program is, Bug Free. :-O

Oh, I don't think you will think about this advantage point when you are getting OutOfMemoryException.

Java is multithreaded
Multithreaded is the capability for a program to perform several tasks simultaneously within a program. In Java, multithreaded programming has been smoothly integrated into it, while in other languages, operating system-specific procedures have to be called in order to enable multithreading.

I think we get it, multithreaded is important and Java is multithreaded language. Ok. So what are the "other languages"?

The author sounds like he is new to Java world. I hope he won't bail once he learned about Ruby. Hmm, maybe he will write "100 Reasons Ruby Kicks Java-ass" then.

No comments: