December 18, 2005 - Humane Interface or Minimal Interface ?

Bruce Eckel weaves together the two hot topics in blogland this week. One is the Humane Interface vs Minimal Interface discussion which pits Java's List API against Ruby's. The other is the "Death of Java" topic.

I followed the list api wars and came down very strongly in the humane interfaces camp (ok, ok, I started in that camp).

One of the many blogs that contributed to that discussion held up Elliotte Harold's XOM as an example of why the minimal api is clearly superior. One task that I do over and over when processing XML is read and write attributes - especially attributes that represent integers and booleans. XOM includes no support for those common operations, so a user would have to write their own. That, in my book, is inhumane.

Which leads me to why Ruby has picked up such a following at this time. XP has made it fashionable to use code to express ideas and Ruby allows you to do that. Java requires you to write lots of code in the solution domain which obscures the code that addresses the problem domain. The Java APIs demonstrate the minimal interface philosophy throughout and I find them painful to use. This, IMO, is the main reason for the flight to Ruby.

Java has been my primary language for over 10 years but I have long since ceased to be an enthusiast. I think C# is a slightly better language and the .NET APIs are much more humane than Java's but the tool support for C# still lags Java. Ruby is a much more expressive language but the tool support is nowhere.

I really, really want to like Ruby because it seems superior to Java in almost every way but whenever I have tried to learn it I have felt like I stepped into a time machine that took me back to the days when people wrote code in text editors while they rummaged through the printed documentation by their side. After a few hours of Ruby I start to pine for IntelliJ.

I have started to fantasize about a language with Java's tool support and Ruby's expressiveness but I am not sure if that is even possible with a dynamically typed language (yes, I have tried smalltalk).

Posted by Kevin Lawrence at December 18, 2005 11:21 AM

Trackback Pings

TrackBack URL for this entry:


Yes, you have to like the text editor. I like to use Jedit, a concole, and a web browser. I run frequent unit tests in the console (no green or red bars but they run faster).

Ruby does not have strong typing, so it it a bit more difficult to create the refactoring tools and perfect autocomplete functionality with embedded documentation.

However, duck typing allows you to have a much simpler architecture. I find this to be a preferable tradeoff, especially since there is a limited amount of screen real estate to look at UML diagrams.

Also, unit tests take strong typing unnecessary.

Posted by: Brian Takita on December 19, 2005 11:39 PM

Also, unit tests take strong typing unnecessary.__________ ALERT: Troll detected !

Posted by: Visiteur on December 22, 2005 05:23 AM

I've written tons of code in plain old text editors, and I see nothing wrong with it. IDEs are nice when they work as desired, but I find that you often spend as much time fixing problems in the IDE, or breaking out of its tendency to lock you in, as you do writing code.

I tend to use Vim on *nix and Windows to great success. The main tools that I want are RAD tools for GUI design. I've found Python and wxGlade to be quite nice and portable, without locking me in.

For Java I've used both Eclipse and Netbeans, but honestly, if the API is simple I don't need the IDE to complete method calls for me, and my CPU has better things to do. My IDEs are typically heavier than the code for my project, and that's just wrong.

Posted by: Michael Soulier on December 28, 2005 08:39 AM

Re: Death of Java. As Mark Twain said of Java, the reports of its death have been greatly exaggerated. Every tool has its strengths and, therefore, problems for which it is well suited. Have the Java enthusiasts left the building? Nah. They just understand that Java is a tool like any other tool. It has its strengths, and problems for which it is well suited. When it was new it was exciting because it introduced some useful ideas. The ideas aren't new anymore, but they're still just as useful as they ever were.

Re: C# slightly better than Java - Well, I should hope so. It came along later, and its developers had the opportunity to learn from the collective experience of the industry with tools like Java and C++. (Question: When cross-platform execution is required, is C# better than Java? Three guesses.)

Re: The Ruby time machine. Convenience tools such as smart IDEs will come along as per demand, just as they did for Java. This is not a big deal.

Re: Mike's comment about IDEs - I'm of the same mind. I thought I was the last person on Earth to start using IDEs. I just didn't see the value. But some of the IDEs around these days are pretty solid, and offer sufficient benefit to make them worthwhile. For Java, I like Eclipse and IntelliJ. I've also used JEdit and liked it. For .NET work, Visual Studio has matured nicely. The reason it's not strictly necessary for a tool to auto-complete statements for people like Mike and me is just because we're so old. Most developers are younger, and haven't memorized substantial portions of APIs. That may be evidence that they are naturally smarter than we are. After all, aren't there better things to do with one's brain than to memorize APIs? (Vim? Well, I said I was old, not crazy.)

Posted by: Dave Nicolette on January 3, 2006 10:23 AM

Post a comment

Remember Me?