1. Mar 11th, 2006

    James Gosling explains what’s wrong with Java

    James Gosling summarizes everything that’s wrong with Java and Sun:

    “PHP and Ruby are perfectly fine systems, but they are scripting languages and get their power through specialization: they just generate web pages. But none of them attempt any serious breadth in the application domain and they both have really serious scaling and performance problems.”

    PHP and Ruby are generic purpose languages. I’ve written a lot of PHP and Ruby code that never generate Web pages, they don’t even run in a Web server. In my case, most of that code does consume Web pages, but that’s a different story.

    When I started developing for Java 1.0, Java had two serious problems. It was a specialized language, it lacked all the things you could do with C/C++, like telephony applications, low-level networking, 3D graphics, speech-to-text. It was only good for serving Web pages and a few other processing tasks.

    Ten years later Java has APIs for just about everything, but still mostly used for serving Web pages.

    The other serious problem with Java: it had scaling and performance problems. It was painfully slow. But that wasn’t a deterrant. Java was so productive, it would cut down the development cost by a factor of 10. The difference was enough to pay for more hardware, faster bandwidth, and still have a lot of spare change. Quicker time to market, on a lower budget.

    Now Java is the incumbent, taking the place that was C/C++ ten years ago. It can do so much more, but only for the handful of companies that actually care about esoteric applications. It’s better than fast enough, but the development cost doesn’t justify it. Java is the language you choose if you want to be late to deliver and over budget.

    Here’s a good measure of performance. A certain sorting algorithm that determines the most active conversations. 100ms in Java, but a painfully slow 500ms in Ruby (5x). Once you add database query and networking, the difference between the languages is about 10%. 10% is not a big difference.

    Developing the best algorithm is a matter of trial and error. You make a few changes, you test them, repeat until you get it working. With Java it takes about 3 minutes to compile and deploy the code, multiple by number of changes made to get it working correctly. In Ruby is takes about 2 seconds to save the file and have Webrick reload it. Multiple by number of changes made to get it working correctly.

    What’s your cost per month to develop anything? Would you rather spend money on recruiting, training, salaries and overhead? Or have Dell ship you a new server to make up for CPU utilization?

    Ten years ago Sun was the company that disrupted when it brought Java to the market and sold high performance machines. Today Sun is the company that is being disrupted by focusing solely on Java and selling over priced machines. There’s a slippery slope, and it starts with Not Invented Here.

    For the record, I’m not too concerned with doing “interplanetary navigation” in Ruby. It’s not on my todo list for the next ten years. And thanks to 37Signals for the link.

    1. Mar 12th, 2006

      Gosling Didn’t Get The Memo [@lesscode.org]

      [...] Assaf: James Gosling Explains what’s wrong with Java [...]

    2. Mar 13th, 2006

      Yip

      James Gosling was a emacs guy. That he have been spending his time on Netbean lately might be seen as going back to his old hobby.

      With that in mind, he probably so faimilar with tool that he won’t think it takes 3 minutes to compile and try. I am not faimilar with NetBean enough, so I am using Eclipse as an example. Eclipse JDT compiler is smart enough to only insert the methods you make changes to. In case a compile error in code, you might still fly up the debugger and its automatically break at the compile error and let you do on-the-fly change to fix it.

      In case you don’t like the change you made, you can “drop the frame” and go back to the begining of the method and try a new change. It actually cut the iterative trial and error to 20 sec instead of 2 mins.

    3. Mar 13th, 2006

      Assaf

      More wise words:

      Gosling Didn’t Get The Memo

      Versatility is Overrated

      The Static Empire gets Nervous

    4. Mar 13th, 2006

      Thought Leadership

      Why Ruby Doesn’t Matter……

      You may have noticed that pretty much everyone in the Ruby camp are insultants with many of them being book authors attempting to capitalize on hype. I of course, will remain open minded that Ruby may be better than say Java at some tasks but for the…..

    5. Mar 13th, 2006

      Isaac Gouy

      “Java has APIs for just about everything, but still mostly used for serving Web pages”
      Do you have any evidence for what Java is mostly used for?
      Do you have any evidence for what Ruby is mostly used for?

      “I’ve written a lot of PHP and Ruby code that never generate Web pages… 2 seconds to save the file and have Webrick reload it”
      A productivity example that didn’t generate Web pages would support your argument better.

    6. Mar 13th, 2006

      Assaf

      @Issac

      Here’s some of the code I’ve been working on, which doesn’t generate Web pages:
      http://trac.labnotes.org/

      The reliable messaging library (Ruby) is used for asynchronous processing, and does not generate Web pages. Neither do the microformat parsers (PHP and Ruby).

      co.mments contains a lot of code that does generate Web pages, and an equal amount of code that doesn’t generate Web pages.

      It has background processing, load balancing, queuing, data processing, calculations, all the fun stuff, all in Ruby.

    7. Mar 14th, 2006

      Ahsan

      http://www.iunknown.com/articles/2005/10/31/do-databases-rot-the-mind

    8. Mar 14th, 2006

      Spike

      Quote: “Ten years later Java has APIs for just about everything, but still mostly used for serving Web pages.”

      Please get your facts straight; when you say mostly you should have some
      reliable stats that back you. i.e. post a link to a page that indicates
      that 90% of Java Applications are web-based…

      Better yet learn how to use Google.

      Here is some assistance: Google the words Java POS, J2ME, and Swing
      Sightings. Actually on Hans Muller’s blog he points you to a link
      that indicatest that most Rich Client Apps. today are developed in
      Swing.

      Its easy to just utter unsubstantiated facts.

    9. Mar 14th, 2006

      Isaac Gouy

      Assaf, afaict your comment didn’t provide evidence for what these languages are mostly used for, or provide an alternative productivity example.

    10. Mar 14th, 2006

      Assaf

      @Spike:

      Check out the Wikipedia entry:
      http://en.wikipedia.org/wiki/Java_programming_language

      Check out Monster or any other job board that lists jobs for Java. Do a blog search to see what most developers are doing in their day to day job. Mostly it’s Web apps.

      I don’t see a problem with that. I think Web apps are super useful. They’re always on, they’re easy to upgrade, they’re accessible remotely and on small devices.

      Outside of software development and listening to music, most of what I use are Web apps. Even in development I use bug tracking, Wikis, blogs, search, all of which are Web apps.

      I’m not slamming Java for being a general purpose language. I run operating system developed on a general purpose language (C++), I use an IDE developed on a general purpose language (Eclipse).

      But I’m also not ignoring the power of PHP, Ruby and Python.

    11. Mar 14th, 2006

      Assaf

      @Isaac:

      PHP is mostly used for serving Web pages. As is Ruby, especially with the advent of Rails. I think Python is the one that has the larger share of non-Web apps.

      I’m just not sure what’s wrong with that.

      Web apps are not the be all do all. There are a lot of things that can’t be done as a Web app. But if you’re developing a Web app, why not pick the better language?

      In co.mments, about half Ruby code serves Web page, half the code does background processing tasks, and the rest is used for builds and other management tasks (think Ant and CruiseControl).

      As for productivity, my personal experience is about 5x to 10x the productivity. When I moved from C++ CGI to Java Servlets it was nothing against C++. It was fast, powerful, when Java was still in its infancy. But server-side Java was just too damn productive.

      I wouldn’t go back. I’m just going forward.

    12. Mar 14th, 2006

      Isaac Gouy

      “PHP is mostly used for…”
      Assaf, you’re just repeating your original claims - how do you know?

      “my personal experience is about 5x to 10x the productivity”
      How do you know?
      Have you been keeping project metrics?

    13. Mar 14th, 2006

      Assaf

      So PHP is mostly not used for anything specific. It’s a generic prgramming language, that’s also damn good for serving Web pages. Wouldn’t that make it even more of a threat to Java?

      As for project metrics — you bet! I measure that stuff.

      I measure the development cycle, the tests, the maintenance. I measure maintenance after I release, and two years later when I have to go back to code I hardly remember.

      I measure throughput, scalability, loads, data sizes. I measure how long it takes me to put a new feature from scratch, and how long it takes me to iterate to a new feature.

      I know how long it takes me to do a Maven build, or run a unit test, or just push a new release out of SVN.

      What’s software engineering if you’re operating in the dark on blank faith?

    14. Mar 14th, 2006

      Labnotes » Blog Archive » I don’t subscribe to “One Language To Rule Them All”

      [...] I don’t subscribe to “One Language To Rule Them All” My post on Gosling’s presentation received a lot of attention, and some great comments. But it wasn’t the sum of everything I wanted to say. [...]

    15. Mar 14th, 2006

      Isaac Gouy

      Assaf “So PHP is mostly not used for anything specific…”
      I think we can agree that neither you nor I have evidence to support our guesses about what X is mostly used for ;-)

      Assaf “As for project metrics — you bet! I measure that stuff.”
      Which should make it easy to provide a productivity example that didn’t generate Web pages. I don’t need to see it :-)

    16. Mar 14th, 2006

      Spike

      You say:
      ” I run operating system developed on a general purpose language (C++),”
      Then say:

      “I use an IDE developed on a general purpose language (Eclipse).”
      Eclipse is not a language actually, Eclipse was developed in Java,
      as was JBuilder, Net Beans, Oh and btw. do you use Open Office,
      if I’m not mistaken, that is written in Java.

      So much for the bulk of Java being used for Web applications.

    17. Mar 14th, 2006

      Assaf

      Eclipse is one of the best applications written in Java. It always impresses me. I haven’t used NetBeans or JBuilder.

      OpenOffice is written in C++. It uses Java for plugins and the import/export convertors are Java, but the bulk of the application is C++.

      OpenOffice also ships with … Python.

    18. Jun 17th, 2006

      Keith

      I wrote a simple, going on complex, simulator of a piece of telecoms equipment in a dynamic language. It took 2 weeks to produce a working demonstration and 2 months to deliver a product useful to the software team (waiting for hardware). We got a month head start, thanks to the simulator. The boss comes in and says, you can simulate 1, can you do 1000? Scalable… no problem. A year later, we have 2 new varients, can you simulate them simutaneously. No problem. 6 years later, having left the team, the simulator is still being maintained and developed, and used by a team of 10. It is extensively tested being shrouded in several thousand test cases.

      The java equivalent project in another team, took a 3 groups of programmers 4 attempts, 1 perl, 2 java, 3 java 4, c++, the 3rd iteration ran on a swarm of machines, and cost lots of money in bought in libraries. As far as I know this project never delivered.

      In my working environment I was able to code in C, on a method by method basis, dynamically linking in corrected compiled code, while the simulator was running. The tool I chose was ST/X - Smalltalk/X.

      To say that a dynamic language is not fast is simply ignorant - ST/X you can write your methods in C if you wish/have to.

      To say that a dynamic language is not scaleable is also ignorant - I scaled the simulator to 3000x its original design capability. In fact is was Solaris that was not scaleable due to limits in the number of ports it would allow a single process to open, and the limits of stdio.h Yes we had one process handling 254 OSI connections easily.

      To say that a dynamic language is not robust is really ignorant, because the vm just keeps going and exceptions can generally be handled gracefully. Every static language I have ever used tends to crash and burn hard.

      And if you must ST/X can run scripts from your shell.

      I didnt mean to make this an advert, but really and truly the tools discussed here are ALL a pretty poor choice for doing a big project. Why, because we know they have limits that we are likely to hit. Find the tool without limits, with the simlicity and the power, — why would you look back?

    19. Oct 16th, 2006

      George

      I agree. but with suns new x86 stradigy it now makes good hardware at good prices.

    Your comment, here ⇓

    Or using OpenID