That Sucking Sound Is Java Killing Your Soul

There is nothing fun about Java. Every possible good facet’s goodness is completely predicated on the requirement that you know how to set up and or get around some soul sucking gotcha. Where it’s been said that even a language such as Perl can make “easy things easy and hard things possible”, Java seems to try to make “easy thing hard and hard things infuriatingly impossible”.

Ok, I know. This will get some people steaming. You may not want to continue reading if that’s you. I’m sure that your assumptions are that I’ve never given Java a chance. I’ve never worked with Java long enough to make any sort of real assessment. I’m not a real programmer… blah blah blah. Ok. Sure yeah. I’m not going to try to convince you of anything. I’m sure you’ve found Java just wonderful for your research paper or whatever pet project you’re working on. That’s great. You know so much. Like I said. You may not want to continue reading.

For those of you who can hear it, here’s the point. Why use a language that tries to be everything to everyone when all it does is suck the joy out of being a software engineer. Remember when programming was fun? If you don’t, then you’ve never used anything but Java.

Why do I need to invoke a Factory every time I want just a simple object? Why are there no good GUI design tools–and please, don’t tell me about your favorite GUI design tool. Frankly, they all suck in comparison to pretty much everything else out there. And that’s another thing, why does a GUI based Java application window, when restored from being minimized for several hours, respond so sluggishly?

Java is not fun. It is not exciting. It is not enjoyable. It just makes you grumpy. If you find it fun, I dare you to to tell me how. Go ahead. Put it in the comments now. Let it be known how Java is so fun. Seriously!

I admit that there is no perfect dev environment. They all have their quirks, even my new favorite–xcode on the Macintosh/iPhone, but I just can’t understand the madness. Why do people insist on defending Java–this lousy programming language that is the basis of more once-hot-now-abandoned frameworks than anyone can keep track of. If you don’t believe me, take a quick survey of the latest posts about Java over at Reddit’s Programming Section. Here’s a smattering:

All of these posts are actually not bashing Java. The writers like the language. What they are doing, however, is defending it. Why? Because it needs defending. It’s horrible.

What’s fun about programming is problem solving. Sure enough, you’ll spend a lot of time solving problems when you use Java, but they are not programming problems–they are environment problems. Sure, you can write that web app once you’ve decided which lame web framework is the least bad of them all. But then you’ll find that setting up the least bad framework will take you a full day or longer and then it might not work properly once you deploy it. Oh yeah, and where are you going to deploy it? Not on a shared hosting web server. You’ll have to go co-lo and administer the box yourself if you want it to run Tomcat or some other web app server.

… and I could go on, but why?

If you want to have fun writing code… If you want to get your soul back, start writing for the Mac or get the new iPhone SDK and start writing code for it. For that matter, start writing for 8-bit embedded systems. That’s more fun than Java and probably easier. And for those of you who just at that moment thought about suggesting embedded Java for 8-bit micro-controller programming, you need to put your laptop down right now and seek help. Seriously. Call somebody. You are not well.

If you are wondering what’s fun that I am doing these days, take a look at my other blog Cocoa Is My Girlfriend. Here are a few of my latest posts:

Satisfaction Guaranteed

So I’ve been using the NetBeans IDE v6 to do some Java development. I’ve been pretty happy with it so far. It has a nice set of project templates. It allows you to run and test web apps directly and at $0 dollars you can’t beat the price.

I loaded the application today and here is what I was greeted with:
Bad Netbeans!

Now, I suppose you could make the case that since it’s a free application, I should be obliged to take their survey, but I don’t recall agreeing to that. Just like most people, I didn’t read the license agreement so maybe I did agree to it, but what’s funny is that they want me to express my satisfaction with an application that has, for the first time since I started using it mind you, done that which is one of the most likely ways to cause dissatisfaction. They gave me two options and neither of them are useful to me.

Netbeans is cross-platform which means you’re going to have some hold-over ideas from other platforms, namely Windows. Since I work on a Mac, this also seemed very unfamiliar. Mac apps don’t bother you with stupid dialog boxes (that often) and when they do, they normally give you a way out. This dialog does not.

Call me crazy, but I don’t think a third option that says “No thanks. I don’t ever want to take a survey”, or even simply “Cancel” would suffice for the moment. That’s basically what “Remind Later” does, but when labeled that way, I realize that I should deal with this in a permanent way in order to be left alone, but the only permanent way is to choose the other option, “Go To Survey”. Now, I realize I don’t have to take the survey once I’m at the site, however, I am now less satisfied with the application because it is bugging me to take a survey and tell the company that I’m not satisfied because they bugged me about taking a survey. (I’m dizzy now) So I’m going to clue them in without taking the survey. Hello, Netbeans people. Yes. Here’s one way to guarantee my satisfaction–leave me alone!!

So this is just a rant and me complaining. It’s not that big a deal, but I would take this opportunity to say that if you are a new Mac developer coming from the Windows world where forcing users into choices they don’t want is the order of the day, just get over that notion now. Don’t start building Mac apps that do this. Please. It doesn’t help anyone. I think Mac users are generally happier people. I think it’s because their apps are unobtrusive. Leave your users alone. They’ll let you know if you need to fix or change something.

Update: Just got contacted by Gregg Sporar who works for Sun (see the comments). He says this has been fixed in Netbeans 6.1. Cool!

Nobody Uses JavaServer Faces

So, I’m going to take a quick detour from Cocoa development for a moment as at my day job I am working on a Java project. The application simply displays a list of items on the first page and then provides a link for each item to a details page. It’s pretty simple, however, it’s taken me two weeks to get it to the point where it actually displays the data. Now I’m working on formatting fields so that dates don’t just display as unix time stamps and fields that are labeled “Reachable” display as “Yes” or “No” rather than as “true” or “false”, etc.

I am using JavaServer Faces for the project as the technology to be used was specified in the design. If you’re not familiar with JSF, it’s a bit like Java Struts. It uses tag libraries, but it does a good job of implementing a true MVC (Model View Controller) architecture. My kudos for the technology, however, stop there. I’ve read many articles touting how JSF is going to be the great new web development technology that everyone will be using. It constantly gets compared to ASP .NET and seems to nearly always come out on top in such comparisons. Yet, I have yet to find any redeeming qualities. As much as I despise ASP .NET, it is a dream compared to JSF.

A quick word from our sponsor:
Get 250GB of Web Space and 2TB of traffic for $5/month

I can’t debug anything with break points as everything is compiled into a java class at run time and all I ever see are tags, not Java code. It is so far abstracted that I can’t get to the guts of it if I tried. If you recall, I am not terribly fond of black boxes and this has got to be one of the worst ones I’ve seen yet. I will complete the project using JSF, but I am not impressed in the least. If the design didn’t have mandated that I use JSF, I would have had this project done the same day it was assigned as I would have written it in PHP. It’s the right tool for this job, frankly.

And that brings me to the point. JSF is a technology that looks good on paper, but when it comes to actually using it, it stinks. I have come to the conclusion that nobody uses JSF simply because when I do a web search to find the answer to the simplest of questions, I find nothing useful. Sure, there are tutorials out the wazoo, but not a single one of them is shorter than 15 printed pages and most of them show you how to make some retarded calculator application that is in no way any sort of representation of a “real-world” app. Fifteen printed pages to demonstrate a calculator? Wow! JSF is impressive!! Maybe fifteen pages is an exaggeration, but I’ve seen many tutorials that are very long and by the end of them all you’ve done is taken input from the user in a single text field and responded in a new page with “Hello {name}. It is currently {datestamp}”. Not exactly useful or helpful.

Ok, I’m done ranting. If JSF is your favorite technology (though I doubt there is a single soul that cares in the least–time will tell), I’m sorry if I’ve stepped on your toes. You probably will surmise that I just don’t understand it well enough. That may be true, however, there is overwhelming evidence that the people who use it are few and far between and very few people consider it worthy of writing a proper tutorial with reasonable explanations. The bottom line is I’ve done a lot of web applications in my career, and I would *never in a million years* choose JSF to build a web app. It’s nearly unusable. Don’t get me wrong. I am getting the project done, but that’s a testimony to my own development skills, not how great the technology is. JSF stinks. That’s my story, and I’m sticking to it. Feel free to disagree in the comments.