• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beginning Ruby - Questions

 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Peter,

I am unable to open the book's homepage link as it has been blocked in our office. Moreover, being pretty naive to ruby (but with Java EE background) just have couple of queries.

1. What type of language is Ruby?

2. To what extent Ruby facilitates the Java programmers?

3. How this book handles/compares the Java aspects?

4. If at all the 'power of ruby' seem to overtake Java (as what people seem to claim after using and i have been hearing), how far/soon is it going to be?

5. What are the salient features which Ruby offers that is not present in Java?

Thanks in advance.
 
Peter Cooper
Author
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thanks for your question - in fact, thank you all for your questions! I am a little bit late starting but I hope to make up for that by answering everyone I have had to skip a couple of questions as I don't have particularly good answers, though.

1. What type of language is Ruby?


It's a strongly, but dynamically, typed, "dynamic," object oriented programming language. That's the official spiel but I suspect that's just a list of buzzwords to many Being practical, if you're familiar with Python, it's a little like that in terms of its scope (i.e. not high performance, can be used as a "scripting" language, object oriented). Ruby is often called a "pure" object oriented language because everything is an object. This is not strictly true (e.g. a lot of the basic syntax isn't OO) but is a good way to compare it with other languages.

2. To what extent Ruby facilitates the Java programmers?


I don't have any professional experience with Java, so it's hard to compare for me although I am vaguely familiar with it. I wouldn't look at Ruby as facilitating Java developers though, it's a totally different system and a totally different "way". If it will do, I'd say it's "easier."

3. How this book handles/compares the Java aspects?


It doesn't at all. Java isn't really mentioned in the book. That said, the book is designed for people who are both new developers and those with some experience of programming but not necessarily OO.. so topics like OO are covered from the ground up in a Rubyesque way. This means any Java developer should find it easy to work with but it's also easy to skip bits you already know about.

4. If at all the 'power of ruby' seem to overtake Java (as what people seem to claim after using and i have been hearing), how far/soon is it going to be?


In the sort of high end enterprise applications Java is used for, it's unlikely Ruby will make a big dent. Ruby and Java have different focuses even now. That said, JRuby (an implementation of Ruby for the JVM) is helping tie the two languages together (i.e. you can use Java libraries from Ruby).

5. What are the salient features which Ruby offers that is not present in Java?


A lot of dynamism. Whether you consider things like rewriting classes and methods at runtime to be bad or not, there's no arguing Ruby is extremely dynamic, more so than Python even. If you really wanted 2 + 2 to equal 5 or the string "hello" to appear to have a length of 100, you can do it. These features lend Ruby to be particularly suited to "meta programming" and building DSLs.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Peter,

Glad you liked the questions and you liked to answer them all as well .

Thank you very much for the nice answers. The answer Qn #5 is quite surprising and increasing the eagerness to dive into Ruby
 
Michael Sullivan
Ranch Hand
Posts: 235
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've posted this before, but the book From Java to Ruby handles a lot of your questions.

One other thing I'd mention when comparing Java vs. Ruby is where Java came from, specifically it's C++ roots and peculiarities that are with it still.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael ! I shall look in to it.
 
Marco Emme
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,
Im a programmer curious about Ruby, familiar with OO, sometime using Java, sometime Python.
I'm kind of scared from your answer to 5.

Peter Cooper wrote:

5. What are the salient features which Ruby offers that is not present in Java?


A lot of dynamism. Whether you consider things like rewriting classes and methods at runtime to be bad or not, there's no arguing Ruby is extremely dynamic, more so than Python even. If you really wanted 2 + 2 to equal 5 or the string "hello" to appear to have a length of 100, you can do it. These features lend Ruby to be particularly suited to "meta programming" and building DSLs.


Are there tools to test statically the scripts and find bugs before the execution?
That's a problem that I encounter sometime in Python.

Then do you have a suggestion of some document or tutorial that I could try to get my feet wet with Ruby (realize its potential and estimate my learning curve)?
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco Emme wrote:

Are there tools to test statically the scripts and find bugs before the execution?
That's a problem that I encounter sometime in Python.

Then do you have a suggestion of some document or tutorial that I could try to get my feet wet with Ruby (realize its potential and estimate my learning curve)?


Hello Macro Emme,

Welcome to Ranch . Yes, that is indeed a good aspect to think of. Though it seems to be an issue (as it allows some peculiar stuff), there has to be way to deal.

Let's wait to hear from Peter.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic