Meaningless Drivel is fun!
The moose likes Ruby and the fly likes Ruby sweet spot? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Ruby sweet spot?" Watch "Ruby sweet spot?" New topic

Ruby sweet spot?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Leaving aside Rails, where do you see Ruby's sweet spot? Does it lend itself particular well to certain types of applications, or to certain development methodologies? Or does it have some innate advantages over other languages, like, e.g., Python or Java?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15082

I've written some small Ruby programs (for myself). One thing was a program to download podcasts. I first wrote it in Ruby, and then I wrote a Java version, just to see how much effort it would be compared to Ruby. The Java version was at least twice as many lines. At the moment, I mainly use Ruby to write small throw-away programs. For example at work, I have to write DAO classes and Java beans, and I write small Ruby programs to generate the Java code for those (so that I don't have to type all that Java code by hand...).

So, in my experience, Ruby is a good tool to write small progams quickly.

In the desktop Linux world (the GNOME desktop), Python is heavily used for desktop applications, both simple and more complex applications. (At least on Ubuntu, Python is the preferred programming language for desktop applications). Ruby is very close to Python - Ruby could have been used for that purpose just as well as Python.

I wouldn't want to give up Java's static typing and runtime performance when I would be programming a larger scale, mission critical business system.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
David Berube

Joined: Jun 18, 2007
Posts: 26
Ulf Dittmer: Ruby is a great way to make programming problems easier by writing code that writes code - metaprogramming. If you'd prefer to work with a unchanging environment, Ruby loses much of it's flair. (Rails gives you some free metaprogramming, of course.)

Lisp does this as well, of course, but Ruby has much better community support, a bigger base of active developers, and more up-to-date libraries.

Jasper Young: Static vs dynamic typing is a hot issue for a lot of people, and the question of which is superior is not going to be answered here and now. For what it's worth, Many people use Ruby for mission critical applications, and many people use Ruby for applications that have to scale. (Twitter, for example, has scaled significantly.)

Take it easy,

David Berube
I agree. Here's the link:
subject: Ruby sweet spot?
It's not a secret anymore!