I got a lot of flack for what I wrote in my ONLamp.com article on Rails when I said you could get a 10x productivity increase using Rails vs. a typical Java framework. The funny thing is that I thought I was being conservative!
Anyway, I spent some time talking with Bruce Tate this weekend (author of Better, Faster, Lighter Java; Bitter Java; and Bitter EJBs) and he was able to confirm that my claim is *not* out of line (he likes to say 5x to 10x increase). Obviously your mileage will vary depending on circumstances, but based on the details I got from Bruce, I still think that 10x is a good ballpark number.
Some of these details have been reported before (DHH even commented on some of this in his blog), but if you dig a little below the surface I think it is even more telling, so please forgive me for re-telling the story...
Bruce Tate and his partner Justin Gehtland were engaged by a client to replace an web app that had originally taken the company a year to develop. Justin took 4 months to reimplement this web app using Spring and Hibernate. Bruce characterized Spring/Hibernate as among the most productive frameworks available in the Java space.
Recently, Justin decided to re-implement with Ruby on Rails. Bruce said that this took a total of 5 days (Justin's weblog reported 4 days for 80% completion so, presumably, 5 days is for the whole thing)!
Now this was widely reported, and so far there's nothing new here. But consider this:
- Justin is a recognized *expert* in Spring and Hibernate. - Spring/Hibernate are not your typical Java framework (i.e., not Struts), but are the current best-of-breed. - Justin was a *novice* with Ruby and Rails and knew practically nothing about either one.
Despite being an expert in the best-of-breed Java frameworks and a novice in the Ruby on Rails frameworks, he still managed an 8x improvement in productivity -- this is very compelling! I can easily see how the productivity increase would be even higher if compared with a Struts-based implementation written by a non-expert.
But there is more... the Rails implementation actually ran faster than the Java implementation! Now this, too, was previously reported. This had baffled me somewhat, but Bruce thinks he knows why. He thinks its primarily because Rails has fewer layers to go through than the java stack, and the fact that the ActiveRecord ORM layer is much less generalized than Hibernate and can, therefore, be implemented much more efficiently.
Anyway, it feels good to have my 10x claimed confirmed by an industry expert to stated that he, too, was skeptical... until he had first-hand experience.
Curt
PS Bruce Tate and David Geary (author of Core Java Server Faces, Core JSTL, and more) have signed with O'Reilly to write a "Rails Developer Notebook" (obviously one of O'Reilly's new Developer Notebooks series).
> Justin took 4 months to reimplement this web app using Spring > and Hibernate.
[snip]
> Recently, Justin decided to re-implement with Ruby on Rails. > Bruce said that this took a total of 5 days ...
[snip]
> Despite being an expert in the best-of-breed Java frameworks > and a novice in the Ruby on Rails frameworks, he still managed an 8x > improvement in productivity ...
> Bruce Tate and his partner Justin Gehtland were engaged by a client to > replace an web app that had originally taken the company a year to develop. > Justin took 4 months to reimplement this web app using Spring and Hibernate. > Bruce characterized Spring/Hibernate as among the most productive frameworks > available in the Java space.
> Recently, Justin decided to re-implement with Ruby on Rails. Bruce said that > this took a total of 5 days (Justin's weblog reported 4 days for 80% > completion so, presumably, 5 days is for the whole thing)!
The devil's advocate would ask, how much of that first four months was devoted to Justin developing his expertise in the application itself? Once you've mastered an application's logic, you have a distinct advantage when re-implementing it in another environment.
>> Bruce Tate and his partner Justin Gehtland were engaged by a client to >> replace an web app that had originally taken the company a year to develop. >> Justin took 4 months to reimplement this web app using Spring and Hibernate. >> Bruce characterized Spring/Hibernate as among the most productive frameworks >> available in the Java space.
>> Recently, Justin decided to re-implement with Ruby on Rails. Bruce said that >> this took a total of 5 days (Justin's weblog reported 4 days for 80% >> completion so, presumably, 5 days is for the whole thing)!
GP> The devil's advocate would ask, how much of that first four months was GP> devoted to Justin developing his expertise in the application itself? GP> Once you've mastered an application's logic, you have a distinct GP> advantage when re-implementing it in another environment.
Correct. And you can implement the first 90% of an application in 10% of the time you need for a 100% implementation.
-- Best regards, emailto: scholz at scriptolutions dot com Lothar Scholz http://www.ruby-ide.com CTO Scriptolutions Ruby, PHP, Python IDE 's
> > Justin took 4 months to reimplement this web app using Spring > > and Hibernate.
> [snip]
> > Recently, Justin decided to re-implement with Ruby on Rails. > > Bruce said that this took a total of 5 days ...
> [snip]
> > Despite being an expert in the best-of-breed Java frameworks > > and a novice in the Ruby on Rails frameworks, he still managed an 8x > > improvement in productivity ...
> Is not it more like 24x?
I was assuming a 5 day week and that during those four months he actually had *real* weekends with his friends and family.
> > > Justin took 4 months to reimplement this web app using Spring > > > and Hibernate.
> > [snip]
> > > Recently, Justin decided to re-implement with Ruby on Rails. > > > Bruce said that this took a total of 5 days ...
> > [snip]
> > > Despite being an expert in the best-of-breed Java frameworks > > > and a novice in the Ruby on Rails frameworks, he still managed > > > an 8x improvement in productivity ...
> > Is not it more like 24x?
> I was assuming a 5 day week and that during those four months > he actually had *real* weekends with his friends and family.
OK. 4 month > 17 weeks :)
I also agree with the argument made by others that re-implementation takes less than the first implementation but it may be more true for their first re-implementation in "better" Java.
> Just to be clear, the 10x claim is specifically for web app development > using Ruby on Rails vs web app development using mainstream java frameworks. > I make no such claim for general Ruby vs Java development.
Good point. I was refering to Ruby in general, but really Rails specifically. I have quite a bit of stuff related to rss and web services that could easily exist independently of Rails, but it was all written for the purpose of plugging into it. I still feel more productive whether I'm working on the independent stuff or if I'm working on things that are clearly within the domain of Rails. Again, this is all anecdotal. But I think we'll ultimately find that it's impossible to escape the anecdotal issue. -- Bob Aman
> > The devil's advocate would ask, how much of that first four months was > > devoted to Justin developing his expertise in the application itself? > > Once you've mastered an application's logic, you have a distinct > > advantage when re-implementing it in another environment.
> I agree; I find that Ruby gives me an 11x increase ("Well, it's one > faster, isn't it? It's not ten." ) in productivity over Ruby whenever I > decide to rewrite a Ruby app in Ruby.
> A good deal of development time is figuring out where the specs or goals > are wrong or incomplete, and sorting things out. Once I've written > something, in whatever language, porting it over (or simply rewriting > it) almost always goes faster; there's less thinking involved.
Ok, but what about when you want to add new features to an existing ruby app. What if you're trying to beat your competitors to the punch? If nothing else, I'd pick ruby simply for the ease in hacking something together quickly. I just picked ruby up recently, and thanks to the whole 'least surprise' business, I find that even though I don't really know what I'm doing, I still manage to do things exactly the right way on the first try the overwhelming majority of the time. In Java, and many other systems, it takes at least 2-3 rewrites of a feature before I'm really happy that I got the thing right... and I know I'm not alone in this. Almost no one ever designs something totally new without making any mistakes. Even Apple is working on a 5th generation iPod.
I know people don't really like anecdotes, but Ruby gives me a warm fuzzy feeling and Java simply doesn't. I doubt I'd claim a 10x improvement in productivity, but I can definitely say there's a substantial one, and it's big enough that it's hard to measure.
And actually, so far, I don't think I could claim an '11x improvement writing something in ruby over writing something in ruby'. So far, rewrites take me almost the same amount of time as the original code took to write, because the limiting factor, thus far, seems to be my typing speed. -- Bob Aman
> I got a lot of flack for what I wrote in my ONLamp.com article on > Rails when > I said you could get a 10x productivity increase using Rails vs. a > typical > Java framework. The funny thing is that I thought I was being > conservative!
> Anyway, I spent some time talking with Bruce Tate this weekend (author > of > Better, Faster, Lighter Java; Bitter Java; and Bitter EJBs) and he was > able > to confirm that my claim is *not* out of line (he likes to say 5x to > 10x > increase). Obviously your mileage will vary depending on > circumstances, but > based on the details I got from Bruce, I still think that 10x is a good > ballpark number.
43 Things was implemented and released by 5 people in under 3 months. There was only one Ruby expert (me) and I spend half my time playing sysadmin.
> I know people don't really like anecdotes, but Ruby gives me a warm > fuzzy feeling and Java simply doesn't. I doubt I'd claim a 10x > improvement in productivity, but I can definitely say there's a > substantial one, and it's big enough that it's hard to measure.
Just to be clear, the 10x claim is specifically for web app development using Ruby on Rails vs web app development using mainstream java frameworks. I make no such claim for general Ruby vs Java development.
>> Bruce Tate and his partner Justin Gehtland were engaged by a client to >> replace an web app that had originally taken the company a year to >> develop. >> Justin took 4 months to reimplement this web app using Spring and >> Hibernate. >> Bruce characterized Spring/Hibernate as among the most productive >> frameworks >> available in the Java space.
>> Recently, Justin decided to re-implement with Ruby on Rails. Bruce >> said that >> this took a total of 5 days (Justin's weblog reported 4 days for 80% >> completion so, presumably, 5 days is for the whole thing)!
> The devil's advocate would ask, how much of that first four months was > devoted to Justin developing his expertise in the application itself? > Once you've mastered an application's logic, you have a distinct > advantage when re-implementing it in another environment.
I agree; I find that Ruby gives me an 11x increase ("Well, it's one faster, isn't it? It's not ten." ) in productivity over Ruby whenever I decide to rewrite a Ruby app in Ruby.
A good deal of development time is figuring out where the specs or goals are wrong or incomplete, and sorting things out. Once I've written something, in whatever language, porting it over (or simply rewriting it) almost always goes faster; there's less thinking involved.
I have a problem with assorted claims based on anecdotal testimony, however expert and/or reliable the person making the claim. They almost always come off sounding like biased hype, and the lack of any objective proof allows people to go away believing whatever the want to believe anyway.
Much better, I think, to make demonstrable assertions about the tool or language itself, and let others make their own comparisons based on their own experience.