The Artima Developer Community
Sponsored Link

Artima Developer Spotlight Forum
Are Ruby's Open Classes a Poor Fit for Large Projects?

51 replies on 4 pages. Most recent reply: Sep 1, 2006 3:33 PM by Joao Pedrosa

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 51 replies on 4 pages [ « | 1 2 3 4 | » ]
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 27, 2006 5:27 PM
Reply to this message Reply
Advertisement
> I cannot recall a sick project that would have been saved
> by strict typing, objects , polymorphism, pick your
> sacred cow.
>
> Remember we are all doomed to live at different points on
> the technology adoption curve. So whilst we ponder if ruby
> can work for large projects there is also someone arguing
> that Java will never scale for non-trivial apps, an d
> another person who is already using Ruby for a large
> program. I am huge Java fan but I can't get too excited
> about the risks of dynamic types. I could spout the theory
> but in my heart I know that it's crap.
>
> I could equally ask the question "Is Java's verbosity and
> ease of coding a problem for large projects?"
>
I don't think we're discussing whether or not the project will get sick as it gets big, but which tool will make people the most productive as the project scales. If you're the only one left in a city after some kind of cataclysm, all those stop signs and lights slow you down pointlessly. But if the city is full of people, the signs slow you down as much, but help prevent you from having an accident that can slow you down even more. So it isn't so much about whether projects will fail or not, or be "sick" or not, but how smoothly the team will hum along as it grows.

Andrew Norris

Posts: 8
Nickname: wanorris
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 27, 2006 5:49 PM
Reply to this message Reply
> I believe your claim for small projects. I'm not sure for
> large ones, though, because I don't have any experience
> doing that.

And not believing the claims of new technologies without actually seeing it personally is both healthy and smart.

My suspicion is that in a few years the consensus will be that Ruby is a brilliant hacker language, but that its surplus of dense syntax is poorly suited to large-scale enterprise projects. This is pretty much the prevailing consensus that has evolved for Perl as well.

By contrast, my strong suspicion is that sometime in the next 5 years, there will be a flood of Python buzz (similar to the flood of Java buzz in the late 90s) that pushes companies to start moving their development to Python. Python seems well-suited for enterprise applications.

> What I haven't done is a big project in Python or Ruby,
> just little things.

It's too early for anyone with a sizable investment in other tools to just cut everything over and move to a dynamic language. But it's not too early to look for a good pilot project of a decent size and see how things go.

> But that said, it isn't just productivity. The
> productivity increase that I see in small projects I do
> believe has a performance cost. So I use such tools when
> a performance hit doesn't matter. Like the nightly batch
> job. If it takes 10 minutes instead of 5 minutes, it
> doesn't really matter.

Java was slower than most of the C++ code it replaced. If the cost of adding deployment hardware outweigh the savings in development hours, don't use a dynamic language. If your deployment environment is narrowly constrained (e.g. embedded programming, or desktop apps for Win98 boxes), don't use a dynamic language.

But for most enterprise apps, the development cost and the time to delivery are a bigger factor than the hardware differential in deployment.

> There's also the problem of less tool support. Java just
> has much better tool support, and that matters. APIs too.
> Java has amazing APIs. So it isn't a single dimension
> decision based solely on productivity.

The Ruby libraries are fairly extensive, but not immense. The Python libraries are among the largest available. The main difference from Java is that with Python, they're not built into the language and the VM.

As far as IDEs and other tools go, there are good options available for Python. There's not nearly as much development being done in Python as in Java right now, but it's still a popular language with a great deal of active development, and the state of the available tools reflects this.

Joao Pedrosa

Posts: 114
Nickname: dewd
Registered: Dec, 2005

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 27, 2006 6:18 PM
Reply to this message Reply
I'm not sure about the claims that Python is going to rule anything, because it's not of wishes that castles are made of. I do hope Python succeeds, though, because I would hate to keep hearing how great it is and yet it's not so used, like LISP sounds sometimes.

Also, what's Python evolving into? With the needs for more "enterprisey" features for Python, because Google and Microsoft (IronPython) require it, maybe Python might lose momentum as well.

On the other hand, for Java, I see it being fought on the high-end by .NET and its one-platform approach, generally. And being fougt by the low-end by Ruby and Python, to name two, though other languages are welcome to the party. After all, it's the low-end. :-) The low-end tries to appeal to cross-platformness as well.

Now, with Windows Vista leveling the .NET playground on Windows, in 5 years other languages might be able to explore it better than the current ones. Ruby.NET, for instance, has been already started. If it keeps true to its nature, I'm sure it will have a future of its own, as the most dynamic language in the world. While Python might try to appeal to more static typeness for one thing, leaving Ruby alone on the low-end. On the high-end, fierce competition will exist, as C# will be there, powering and being powered by many tools. And on the low-end, JavaScript-like languages might try to take some of the market to themselves. After all, JavaScript is plenty known and has plenty of appeal.

All I know is that a "Winner" that's on paper only is not all that.

Peter Booth

Posts: 62
Nickname: alohashirt
Registered: Aug, 2004

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 27, 2006 8:48 PM
Reply to this message Reply
> > I cannot recall a sick project that would have been
> saved
> > by strict typing, objects , polymorphism, pick your
> > sacred cow.
> >
> > Remember we are all doomed to live at different points
> on
> > the technology adoption curve. So whilst we ponder if
> ruby
> > can work for large projects there is also someone
> arguing
> > that Java will never scale for non-trivial apps, an d
> > another person who is already using Ruby for a large
> > program. I am huge Java fan but I can't get too excited
> > about the risks of dynamic types. I could spout the
> theory
> > but in my heart I know that it's crap.
> >
> > I could equally ask the question "Is Java's verbosity
> and
> > ease of coding a problem for large projects?"
> >
> I don't think we're discussing whether or not the project
> will get sick as it gets big, but which tool will make
> people the most productive as the project scales. If
> you're the only one left in a city after some kind of
> cataclysm, all those stop signs and lights slow you down
> pointlessly. But if the city is full of people, the signs
> slow you down as much, but help prevent you from having an
> accident that can slow you down even more. So it isn't so
> much about whether projects will fail or not, or be "sick"
> or not, but how smoothly the team will hum along as it
> grows.


I appreciate with your analogy about the signs. At the same I don't believe that choice of language has much impact on large project productivity. I believe that the quality of the team, good leadership, healthy shared culture, clarity of purprose, are much more determinative.

Todd Blanchard

Posts: 316
Nickname: tblanchard
Registered: May, 2003

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 1:00 AM
Reply to this message Reply
Your post reminds me of the Turtles - the Slowskys - in the Comcast high speed internet ads. I've done large projects (large, like in telco enterprise) apps in C++ and Smalltalk. We got a lot done a lot faster in Smalltalk.

Stability? Not sure about that - but malleability - adaptability - agility - this is what the dynamic languages give you. Plus, in Smalltalk, the diagnostic tools are unparalleled and allow you to update high availability systems on the run (potentially risky - take appropriate precautions - natch).

> > These are not small systems. This entire thread is fear
> > mongering from the C++/Java bigots.
> >
> I don't think most C++ or Java programmers have much
> vested interest in protecting C++ or Java from Ruby and
> other dynamic languages by fear mongering. I think it is
> not so much fear mongering as just plain old fear. I know
> I have this fear, or at least concern, about the
> scalability of dynamic languages. I don't have any
> experience creating a large system in a dynamic language,
> precisely because I'm too afraid to bet a large project on
> a language I'm not sure scales to the task. It seems
> logical to me that all these things in static languages
> that slow individuals down may help groups work together
> more effectively. But I just don't know because I'm not
> willing to take a chance building a large project on a
> dynamic language unless I'm sure ahead of time.

Duncan Idaho

Posts: 4
Nickname: hilmi
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 1:49 AM
Reply to this message Reply
There's a well known solution for this problem: selector namespaces. This feature will be in Ruby 2.0. It's really interesting nobody mentioned this yet.
By the way, I'm sick of seeing this uninvited python propaganda everywhere. Why don't you create something useful (like Rails) with your language instead of talking about it all the time?

Andrew Norris

Posts: 8
Nickname: wanorris
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 7:29 AM
Reply to this message Reply
> By the way, I'm sick of seeing this uninvited python
> propaganda everywhere. Why don't you create something
> useful (like Rails) with your language instead of talking
> about it all the time?

Personally, I like Ruby better than Python. But a lot of the things I like about Ruby make me question whether it will ever realistically take hold as an enterprise language for large-scale development. Personally, I think Ruby is an ideal choice for small tiger teams of good programmers, which is how I'd rather work anyway.

But Python is a lot more orderly, and it has solutions for some of the specific concerns raised earlier in this thread, like reining in rogue programmers, which is why I suggested it as perhaps a better path for enterprises looking at dynamic languages.

If you think the Ruby is ideal for environments with high turnover and dozens of programmers, some of which may be incompetents or even saboteurs, please elaborate.

Duncan Idaho

Posts: 4
Nickname: hilmi
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 10:19 AM
Reply to this message Reply
I don't want to waste my time discussing with someone who thinks Ruby has "surplus of dense syntax (your words)" "like Perl".
In fact Ruby and Python are very similar languages and they will both win or loose together. Their most important differences are Ruby has the strongest parts of Smalltalk (its language) and Perl (philosophy of parts of its standard library) and Python is obsessed with its understanding of "best syntax" and makes an example of a strong NIH syndrome.
Dynamic languages are not new. Ruby does, can and should learn from the experience of Smalltalk (like using these selector namespaces for localizing and isolating changes to open classes).

nes

Posts: 137
Nickname: nn
Registered: Jul, 2004

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 11:35 AM
Reply to this message Reply
> What's a large project? Seriously. How large does a
> project need to be?
>
Burn large projects, death to large projects!

Regarding open classes: “Doctor it hurts when I do this. Answer: Don’t do this!”

Andrew Norris

Posts: 8
Nickname: wanorris
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 12:18 PM
Reply to this message Reply
So, "Ruby and Python are very similar languages and they will both win or loose together" except that Ruby is a powerful language with a strong heritage and Python is a language for anal obsessives?

The fact that they are similar merely puts emphasis on the fact that organizations that commit to a language are going to have to choose which one they want to put most of their weight behind, because there's no reason to support both, especially on top of all the other legacy languages they have lying around.

> someone who thinks Ruby has "surplus of dense syntax
> (your words)" "like Perl".

Some examples from the web version of Programming Ruby:

file = File.open("ordinal")
while file.gets
print if ($. == 1) || /eig/ .. ($. == 3) || /nin/
end

while gets
next if /^#/ # Skip comments
parseLine unless /^$/ # Don't parse empty lines
end

for i in File.open("ordinal").find_all { |l| l =~ /d$/}
print i.chomp, " "
end


I stand by my claim that Ruby is a less orderly language than Python, and that organizations looking for an orderly language are likely to prefer Python.

The lack of orderliness in Ruby may well be a virtue to others.

Joao Pedrosa

Posts: 114
Nickname: dewd
Registered: Dec, 2005

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 12:41 PM
Reply to this message Reply
What about the organizations that still use Perl? :-) Like some Fortune 500 ones...

If Ruby was 50% like Perl, and I mean syntatically and semantically, I would be the first one to jump ship.

But do we have a gradation here? Like, if Ruby is 10% like Perl to me, and it seems like 90% like Perl to someone who hasn't used both to know the real figures, who are you going to believe in?

For one thing, Ruby was started with OO features, while most other languages bolted OO later on.

Yeah, regular expressions are used most often in Ruby than in other languages, but try to follow the logic of someone doing the parsing of something by hand, instead of using a simple regex, and you will soon feel the pain of the NIH syndrom. It starts with a couple of lines, then grow to a page long method, and god forbid, soon you might have pages of parsing that could have used regex in strategic places and be reduced to 10 lines or something.

You can try to hide the complexity, or you can handle it in a responsible way.

Duncan Idaho

Posts: 4
Nickname: hilmi
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 12:57 PM
Reply to this message Reply
Oh boy, the code examples you've pasted gives warnings like "warning: regex literal in condition"; couldn't you find newer examples?
I can see it's hard to understand languages with horrible things like regex literals for some people. That's why I don't want to discuss with those people who thinks Ruby is like Perl because they can only understand Python and what they can't understand must be like Perl. (Hint: don't base your propaganda on the syntax like you used to do against Perl for ages. Ruby is not Perl. You have to find new weaknesses. Happy propagandazing to you)

Andrew Norris

Posts: 8
Nickname: wanorris
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 2:05 PM
Reply to this message Reply
> What about the organizations that still use Perl? :-) Like some Fortune 500 ones...

Lots of them use it as a glue language, but relatively fewer use it as a language for large-scale development.

I like Perl. But I hope never to have to write an accounting system in it. :-)

> Like, if Ruby is 10% like Perl to me, and it seems like
> 90% like Perl to someone who hasn't used both to know the
> real figures, who are you going to believe in?

10% is probably fair. As mentioned above, Smalltalk is clearly a vital influence, and there are other languages that people will see certain similarities with, like Lisp (though admittedly, most of that is via Smalltalk).

> Yeah, regular expressions are used most often in Ruby than
> in other languages, but try to follow the logic of someone
> doing the parsing of something by hand, instead of using a
> simple regex, and you will soon feel the pain of the NIH
> syndrom.

Regular expressions rock. It's debateable whether they should be a part of the syntax of a language -- I think the answer depends heavily on what you use the language for.

Andrew Norris

Posts: 8
Nickname: wanorris
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 9:07 PM
Reply to this message Reply
> That's why I don't want to discuss with those people who
> thinks Ruby is like Perl because they can only understand
> Python and what they can't understand must be like Perl.

The regex literals didn't get into Ruby by accident. Ruby was markedly influenced by Perl, even though it has been moving in a different direction in recent years.

Both Ocaml and Erlang have to my eyes eccentric syntax, at least to my eyes, and neither one reminds me of Perl in the slightest. Ruby struck me immediately as having been influenced by Perl.

As I said above, this doesn't mean I think it's a bad language. Personally, I like Ruby better than Python. But I don't think Ruby will end up being a particularly good fit for enterprises. Likewise, I think Haskell is an awesome language -- arguably better than either Ruby or Python -- but I don't see it taking over the Fortune 500 in the next 5 years either.

Duncan Idaho

Posts: 4
Nickname: hilmi
Registered: Aug, 2006

Re: Are Ruby's Open Classes a Poor Fit for Large Projects? Posted: Aug 28, 2006 11:42 PM
Reply to this message Reply
Instead of trying to spread your dogma, why don't you look at this side by side comparison of Python and Ruby: http://www.dmh2000.com/cjpr/cmpframe.html

Flat View: This topic has 51 replies on 4 pages [ « | 1  2  3  4 | » ]
Topic: The Death of the General-Purpose IDE and the Last Java Developer Previous Topic   Next Topic Topic: JOTM Transactions in Spring and Hibernate

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use