Why Ruby




Less Verbose and
 
Ruby and Rails make life simpler and more fun.  Ruby feels like an old friend.  It is very similar to Smalltalk which I have programmed in for years.         

I have high regard for the design principles used in Ruby and Rails.  For instance, Convention over Configuration, which is a pervasive philosophy helping to give Ruby its productivity edge.  Another comes from Ruby's late Type Binding.   When developing applications, I don't want to be distracted from domain considerations.  Ruby's Late Binding is a big help here.  Unless of course the objective is to optimize performance.   Another abstraction which helps make life simpler is Rail's seamless integration with Active Record, far more than Java's various bolted on Object Relational persistence frameworks.  It's nice that in Ruby the database seems like nothing more than another hash.  Ruby and Rails allow applications to be created quickly and then be optimized later.   A highly advantageous business practice.  Ruby and Rails further simplifies development by reducing the number of languages a developer must know.  Doing everything in Ruby instead of a medley of languages and using Ruby's simplified configuration help to make programming more fun.  

The scientist in me likes to experiment.   I can learn and do more when work is turned into play.  The 'irb' and 'script/console' provide great areas to play with code.  Additionally these consoles are convenient places for creating snippets which can be used in building unit tests.   Ruby and rails are still changing rapidly.   This means it provides an excellent sandbox where creative people, like myself, want to play.  The "script/generate scaffold" is a very nice part of Rails, though I look forward to the day when there will be a routes based generator.

Developers do the unimaginable with Ruby and Rails.  I was listening to an episode of The Java Posse Podcast.  All the evangelists agreed  that there will not be an effective online Java IDE for at least 10 years.  Yet Heroku already provides an extremely effective Ruby on Rails online IDE.   I was stunned to find how fast an application with complex logic can be created and deployed with Ruby on Rails and Heroku.   I have 10 years of Java experience and several months of Ruby, not counting my Smalltalk experience.  I wrote two applications, both requiring the use of a scheduling package.   I used Quartz for the Java servlet and Rufus for the Ruby scheduling components.  There was at least a two fold time savings using Ruby's Rufus gem compared to using Java's Quartz.  I am sure it will become even greater as my familiarity grows.

Although Ruby has been around for 10 years it is still very much a work in progress.   There are many well known and I am sure unknown rough edges.    Class variables don't work as expected.  Rubinious aside, the interpreter is not written in Ruby so full event propagations is not done due to the very heavy runtime costs.   There is no single comprehensive documentation repository.  Documentation is great as long as you use Google to find what you want and the material is highly accessible because of the many excellent public and commercial screencasts.   I enjoy building up systems from pre-existing pieces.  Ruby and Rails gems and plugins provide a very rich ecosystem in which to do that.

In summary, Ruby is simple, fast and fun.
I prefer Ruby to other languages (like Java) because:
  •     Method_missing vs cluttering every method with try catch
  •     Block closures vs adding iteration everywhere
  •     Conventions over configuration vs excessive XML and properties file configuration
  •     Light weight method completion with tabs vs heavy weight IDEs requiring strong typing
  •     Developer language mutability vs waiting for the next version of a language to be available.
  •     Late binding vs adding type information everywhere
  •     Most web applications can be written mostly in Ruby vs the web's multi language mess
  •     Milure of keeping code Dry vs running a copy and paste detector
  •     Strong emphasis on Duck Typing vs programming to an interface.

Created:
11/03/08
Modified:
02/25/09
Size:
5.2 KB
Comments