From the Canyon Edge -- :-Dustin

Wednesday, September 15, 2010

Java isn't Evil, but it's not for Me

First off, I apologize. In my last post, I called Java "evil". That's not fair, and several people called me out in the comments. The post has been updated to drop the "evils of Java" verbiage.

My statement was a reference to the humorous-though-irreverent Call of Codethulhu.

It's a personal taste issue. I dislike writing Java, packaging Java programs, chasing down Java dependencies, and even reading Java code. There's nothing necessarily "evil" about it. I have declined job offers that require work to be exclusively performed in Java. I just don't like being around Java and really dislike some of the habits it encourages.

Before I started my University work, I had extensive programming experience in Basic, Pascal, C, and C++ as an ambitious (dorky?) high school kid. The "Intro to Computer Programming" class most Computer Science freshman at my University took was based in Java. And at that time, they were being taught on Windows computers.

I found it very disappointing that a more UNIX/C approach was not used to introduce most of my college freshmen computer science classmates to programming. The approach nursed bad habits, and many programming fundamentals were missed, in my opinion.

A few years later, while working at IBM, I again landed on a series of projects where Java was king. And once again, I found some of these Java programmers lazy in their approach, and bloat-ware abounded. 2GB of memory were required to run simple services that should run in a few MB. Do-one-thing-and-do-it-well was no where to be found And finally, write-once-run-anywhere couldn't have been further from the truth.

I exited myself from the Java world, once again, choosing C, Python, Perl, PHP, and Shell for the projects I initiated and maintain. I'm able to use sound object oriented practices (in Python, Perl, and PHP), and able to honor to the principles of UNIX (with C and Shell).

Occasionally, I'm required to deal with Java when maintaining or packaging something for Ubuntu. I generally start from scratch, trying to have an open mind, but within minutes or hours, my skin starts to boil and steam flows out of my ears. I find over-engineered code in the source, binary JARs lumped within other projects out of laziness, and memory requirements that are simply staggering for the goal of the program.

Sorry, that's not for me.

Still, thanks for keeping me honest, making me explain myself, and pruning the potentially offensive language out of the other post.

Cheers!
:-Dustin

7 comments:

  1. Thanks Dustin. This is *exactly* my experience. And I've plenty of anecdotes that are just unbelievebale…

    ReplyDelete
  2. Is packaging java dependency really so hard when most of the projects use maven / ivy?

    Memory? Well, once you run a non-trivial server application you don't think in mega-bytes these days. On the other hand apps like terminator, gnome-do, docky, nautilus, empathy, compiz, X and browser of course are all eating more memory than some of the simpler services in java. All those "icons" in upper right corner - i.e. indication applet, network manager, print indicator and others? They do eat really a lot of memory for what they do! Everybody runs them, they are extremely simple and each one eats about 15MB (64bit). I'm missing that memory especially when I need it to run 5-20 java processes which do real work ;-)

    BTW: real java apps consuming 15MB or less are no dream - just use different vm or wait for oracle to complete "jigsaw" project :-)

    ReplyDelete
  3. Thanks for clearing up your view points on Java Dustin. I do want to say I agree with Jan's points as well though in regards to Maven in particular, it almost completely solves the decency problems with Java.

    ReplyDelete
  4. If you want to kill yourself, start working on the eclipse package.

    ReplyDelete
  5. My java experience wasn't as good, either. I just don't like the readability of Java... I still prefer python or something else. Thanks.

    ReplyDelete
  6. There are two aspects to the problem here: lazy programming and Java specific problems. Lazy programmers can produce bloated code with any language, whether it'd be Java, C, C++ or Python.

    Now. for the Java specific issues. Having worked with Java for 12 years, I generally see two problems. The first one is that because Java abstracts memory handling (which is a good thing), a lot of Java programmers don't understand how Java memory management works and instantiate objects like there is no tomorrow without understanding the consequence of what their code does (which is a bad thing). Any time spent with a profiler is generally a great way to open their eyes. Unfortunately very few of them ever do that. The second problem is a side effect of Java's success in the enterprise. Because of that success, a number of dodgy courses that teach Java in a month have sprouted up and you end up with programmers on the market who know Java to the extent that they can write "hello world" but have no idea how a computer works underneath. I've interviewed and worked with a lot of supposedly qualified Java developers over the years and I am regularly horrified by some of the code I see.

    Apart from that, I would say that the syntax, API and packaging formats are a question of taste. I'm fine with them but I can understand why other people wouldn't be.

    ReplyDelete

Please do not use blog comments for support requests! Blog comments do not scale well to this effect.

Instead, please use Launchpad for Bugs and StackExchange for Questions.
* bugs.launchpad.net
* stackexchange.com

Thanks,
:-Dustin

Printfriendly