Ruby vs Java, which wins?
July 30, 2011 2:22 PM Subscribe
How does Ruby compare to C#/Java in terms of speed of development, quality of code and long-term maintainability? A broad question, I know, but my focus is on enterprise applications that might pull in from several large data sources and might be rather large.
I've played around with Ruby and Ruby on Rails. It seems like my gut is telling me that apples to apples, given the same project in Java or C#, I could get things done Ruby at least 1/3 quicker, and have just as high code quality and maintainability. It seems that the big barrier to doing this is that there's not that many good Ruby developers out there, so adding members to the team is going to be a challenge,
Is this really the only barrier? Has anyone out there done a large project, with multiple team members, in Ruby? I guess in my mind I'm seeing the leap from Java->Ruby the equivalent of C++->Java (I'm assuming that C#/.Net is near equivalent to Java in development time).
Again, I realize there's probably some performance issues, especially as sites get larger, but that's not really a problem I face. I'm more interested in that if you had two teams with the same amount of experience, tasked with building an e-commerce site from scratch, would you see one with a better work product at the end, or would it be about the same?
One of things that's spurred this is that while my gut says Ruby development is quicker, I've seen quite a few Ruby shops fail. Complete confirmation bias on my part, I realize, but it is still something I've seen.
posted by geoff. to computers & internet (15 answers total) 7 users marked this as a favorite
The disadvantage is you have to write unit tests. "That's not a disadvantage!" some people in the audience are reflexively saying, and in some sense they're right: if you do write the unit tests, you get better checking and refactoring support than what you get from static types and compilation. But then you're effectively counting the unit tests as part of your code base, and you lose some of your lines-of-code savings above, since you now have to develop and maintain (and test!) the unit tests. And if you don't write the unit tests, you're much worse off* than the Java situation: it's very easy to break things accidentally and you won't find out until runtime.
*You have to make your own tradeoff between speed of development and safety, of course; but as the number of people on the team scales, you have to put more effort into safety unless you can count on everyone else on the team 100% as much as you can count on yourself.
So the upshot in my experience is Ruby (or Python or Perl) development is quicker than Java (albeit not as quick as it seems at first) but it requires more discipline from the team.
(I actually think that C#, with anonymous methods and LINQ for functional support, is a great compromise, but if you're in an environment where you're picking between Ruby and Java, C# probably isn't an actual option.)
posted by inkyz at 2:53 PM on July 30, 2011