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.
Gosling Didn’t Get The Memo [@lesscode.org]
Thought Leadership
Labnotes » Blog Archive » I don’t subscribe to “One Language To Rule Them All”