Eating at the Perl Cafe and Javahut

I received the following from a co-worker about Java, written by a Java developer, James Turner. Read Why Do Java Developers Like to Make Things So Hard? for the full article.

Java is a great language. But for some reason, the Java community has decided to take it and make all the ancillary packages as complex and difficult to use as possible. It’s like a racehorse that’s had a wet bar and a hot tub mounted on it. The Perl folks have the right idea. Make supporting technologies that are simple to use, rather than so elegant that they become incomprehensible.

Imagine if the Perl cafe and Javahut were across the street from each other. You walk into Javahut, and ask to sit down. “I’m sorry,” says the person at the door. I’m not actually the hostess, I’m a Factory class that can give you a hostess if you tell me what type of seat you want.” You say you want a non-smoking seat, and the person calls over a NonSmokingSeatHostess. The hostess takes you to your seat, and asks if you’ll want breakfast, lunch, or dinner. You say lunch, and she beckons a LunchWaitress. The LunchWaitress takes your order, brings over your food, but there’s no plates to put it on because you forgot to get a CutleryFactory and invoke getPlates, so the Waitress throws a null pointer exception and you get thrown out of the place.

Dusting yourself off, you walk across the street to the Perl cafe. The person at the door asks what kind of seat you want, what you want to eat, and how you want to pay. They sit you at your seat, bring over your food, collect the money, and leave you to eat in peace. Sure, it’s not the most elegant dining experience you ever had, but you got your food with a minimum of pain.

The long and the short of it is that, in my opinion, Java is a great language being destroyed by Rampaging Computer Science. There’s a time for elegance, and a time for usability. If developers want to make the internals of packages flexible and extensible, that’s all well and good. But the external interfaces should be clean, simple to use, and have wrappers for the most commonly accessed functionality. For example, in a PGP package, I should be able to encrypt or decrypt a file in 5 lines of code or less. After all, I can do it in Perl in 3.

As both a Java and Perl developer, I can attest to the frustration felt by Mr. Turner. Perl was written for purpose (Practical Extraction and Reporting Language). It may not be elegant, but it gets the job done. Java seems to be written for the purpose of religion.

This entry was posted in Web/Tech. Bookmark the permalink.

Comments are closed.