What is Ruby exactly is it a good language to start out with?

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 6330 Views - Last Post: 02 December 2009 - 10:04 AM Rate Topic: -----

#1 ScarfaceTheDon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 25-May 09

What is Ruby exactly is it a good language to start out with?

Post icon  Posted 15 October 2009 - 03:39 PM

I was wondering what is ruby and is it a good language to start out with.I just wanted to know the programs i need and where i should go to get started can someone tell me plz?
Is This A Good Question/Topic? 0
  • +

Replies To: What is Ruby exactly is it a good language to start out with?

#2 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 15 October 2009 - 07:24 PM

Ruby is a general-purpose programming language. Ruby is widely used for scripting and web-related tasks, however it's perfectly viable for Desktop applications.

Ruby is an alright first language, however, I'm not sure what to recommend for you to read. Most books on Ruby assume knowledge in at least one programming language previously. However, there are plenty of tutorials around, and if you just google stuff, I'm sure you'll find something to help you out.

As for what you need to download; you'll need the Ruby interpreter. If you're on Windows, just go to http://www.ruby-lang.org, navigate to downloads, and download the Ruby installer. It will install Ruby, RubyGems (I believe), and all other requirements to get you up in running. You can then download NetBeans or Eclipse, or some other IDE for Ruby development. I use Emacs, but that's a little far off for someone new to programming I suppose.

One book you can look at is "The Pickaxe" which is a book called Programming Ruby. You can find the version of the book that was written for Ruby 1.8 (previous version of Ruby) at http://www.rubycentral.com/book/, or you can purchase the 1.9 version from pragprog.

Another book you can look at is "The Ruby Programming Language".

Maybe someone else can fill in the void on books here. I'm not sure if any of the books I mentioned are really suitable for beginners, but they might be. Especially if you're committed.

As a final note. You'll be taken more seriously if you just go ahead and spell out the word 'please' instead of using 'plz'. It's an annoying abbreviation.
Was This Post Helpful? 0
  • +
  • -

#3 ScarfaceTheDon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 25-May 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 16 October 2009 - 03:59 AM

View PostRaynes, on 15 Oct, 2009 - 06:24 PM, said:

You'll be taken more seriously if you just go ahead and spell out the word 'please' instead of using 'plz'. It's an annoying abbreviation.

Im sorry about that in another forum community we use it all the time.
Was This Post Helpful? 0
  • +
  • -

#4 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 16 October 2009 - 05:02 AM

It's fine, I was just jocking you. :P
Was This Post Helpful? 0
  • +
  • -

#5 Jizzle  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-October 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 17 October 2009 - 02:31 AM

View Postskateatvu, on 15 Oct, 2009 - 02:39 PM, said:

I was wondering what is ruby and is it a good language to start out with.I just wanted to know the programs i need and where i should go to get started can someone tell me plz?



I am a total beginner and have found the book
"Learn to Program" by Chris Pine
(Second Edition, Published by The Pragmatic Programmers )
to be excellent. It starts with no assumed knowledge and takes you through learning Ruby at a gentle pace.

you can have a look at the first edition free online to see if it suits you at http://pine.fm/LearnToProgram/

I have now also bought the Pickaxe book that others have recommended (Programming Ruby: The Pragmatic Programmers' Guide, Second Edition, by Dave Thomas, with Chad Fowler and Andy Hunt) which is probably not good for a first introduction to programming but an excellent second book when you are starting to understand the basics.


Hope that helps
Was This Post Helpful? 0
  • +
  • -

#6 jaql  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 73
  • Joined: 19-October 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 19 October 2009 - 05:48 PM

View Postskateatvu, on 15 Oct, 2009 - 02:39 PM, said:

I was wondering what is ruby and is it a good language to start out with.I just wanted to know the programs i need and where i should go to get started can someone tell me plz?


Here's the weirdest/most fun book you'll read on Ruby -- http://mislav.uniqpa...poignant-guide/
Was This Post Helpful? 1
  • +
  • -

#7 noyesa  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 27
  • Joined: 01-April 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 10 November 2009 - 03:32 AM

Ruby is a general purpose object-oriented interpreted scripting language. Like many scripting languages, it is much easier to become acquainted with than compiled languages like C++.

However, for someone new to programming, I really can't recommend Ruby. It's a wonderful language to veteran programmers, but Ruby also contains a lot of obscure static semantics and idioms that are very unique to it, and don't exist in very many other languages, if at all. Many parts of the Ruby language are syntactic sugar added to help experienced and disciplined programmers write more terse and elegant code, however much of these subtleties seem like arbitrary nuances to beginning programmers.

If you're looking to learn programming, I would choose Python over Ruby. Python is a very elegant language, but at the same time its framers are also very strict about making language additions. Python is syntactically very similar to classical programming languages, like C and Java, albeit a lot cleaner, and a lot more modern. It includes a simple development environment (IDLE), so it's as easy as downloading Python, installing, and typing some code into IDLE and hitting F5 to load the code up in the shell.

Much of the craze over Ruby these days comes from the Ruby on Rails framework, which is designed to assist programmers in developing robust web applications easily. While Ruby is used for many other things, it is much less applicable than Python, which sees a much wider array of applications in practice than Ruby. Unfortunately, for the foreseeable future, Ruby will be intrinsically associated with web development.
Was This Post Helpful? 0
  • +
  • -

#8 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 10 November 2009 - 01:36 PM

View Postnoyesa, on 10 Nov, 2009 - 02:32 AM, said:

Ruby is a general purpose object-oriented interpreted scripting language. Like many scripting languages, it is much easier to become acquainted with than compiled languages like C++.

However, for someone new to programming, I really can't recommend Ruby. It's a wonderful language to veteran programmers, but Ruby also contains a lot of obscure static semantics and idioms that are very unique to it, and don't exist in very many other languages, if at all. Many parts of the Ruby language are syntactic sugar added to help experienced and disciplined programmers write more terse and elegant code, however much of these subtleties seem like arbitrary nuances to beginning programmers.

If you're looking to learn programming, I would choose Python over Ruby. Python is a very elegant language, but at the same time its framers are also very strict about making language additions. Python is syntactically very similar to classical programming languages, like C and Java, albeit a lot cleaner, and a lot more modern. It includes a simple development environment (IDLE), so it's as easy as downloading Python, installing, and typing some code into IDLE and hitting F5 to load the code up in the shell.

Much of the craze over Ruby these days comes from the Ruby on Rails framework, which is designed to assist programmers in developing robust web applications easily. While Ruby is used for many other things, it is much less applicable than Python, which sees a much wider array of applications in practice than Ruby. Unfortunately, for the foreseeable future, Ruby will be intrinsically associated with web development.


Well, as a start it isn't a scripting language. It's a full fledged programming language, as noted by the wikipedia page. It is indeed compiled as of Ruby 1.9 into YARV bytecode. Python is hardly close to C and Java on the syntax front. There is a huge Ruby community separate from the Rails community. Ruby isn't hard at all to learn, especially with Why's poignant guide still around. Python is still another good choice, but in my opinion Ruby is right up there as well.
Was This Post Helpful? 0
  • +
  • -

#9 xenor  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 148
  • Joined: 23-September 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 10 November 2009 - 03:19 PM

Any differences between Python and Ruby?
Was This Post Helpful? 0
  • +
  • -

#10 athlon32  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 116
  • View blog
  • Posts: 363
  • Joined: 20-August 08

Re: What is Ruby exactly is it a good language to start out with?

Posted 10 November 2009 - 11:01 PM

View Postxenor, on 10 Nov, 2009 - 02:19 PM, said:

Any differences between Python and Ruby?


Lots, but they're still both pretty close

http://www.zenspider...y/QuickRef.html
http://www.ibm.com/d...heatsheet3.html

look at those links, and you can compare the two

This post has been edited by iphoneorange: 10 November 2009 - 11:17 PM

Was This Post Helpful? 0
  • +
  • -

#11 noyesa  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 27
  • Joined: 01-April 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 11 November 2009 - 02:05 PM

View PostRaynes, on 10 Nov, 2009 - 12:36 PM, said:

Well, as a start it isn't a scripting language. It's a full fledged programming language, as noted by the wikipedia page. It is indeed compiled as of Ruby 1.9 into YARV bytecode. Python is hardly close to C and Java on the syntax front. There is a huge Ruby community separate from the Rails community. Ruby isn't hard at all to learn, especially with Why's poignant guide still around. Python is still another good choice, but in my opinion Ruby is right up there as well.


Ruby is indeed a scripting language, even if its features resemble those of a fully fledged systems language. Don't be quick to assume that calling a language a scripting language is a disparaging term. A scripting language is not necessarily less featured than a systems-level language, and in fact usually contain more features in their standard library (Ruby, Python, PHP all contain a far greater number of useful modules out of the box than, say, C++).

I suppose to be technical, it would be most correct to call Ruby a dynamic langauge--it is rarely used as glue, and in many cases, such as with Rails, is actually used for application programming. However, its source code is interpreted at runtime and it performs on-the-fly computation. Strictly speaking, Ruby is a dynamic scripting language, and involves large amounts of abstraction through its standard library.

The idea that Ruby code is compiled at run-time is a bit of a misconception. The Ruby 1.9 interpreter compiles Ruby source code into bytecode, which is then executed by the Ruby virtual machine, just like Python and PHP. Ruby code, however, is never compiled into machine code, and executes much slower than native compiled code.

If you get past the lack of braces and the usage of indentation in Python code, most of the Python/Pythonic idioms are directly descendant from procedural languages like C. Pythonic design patterns tend to be linear, just like C and C++, where Object-Oriented programming augments a more linear approach.

Ruby on the other hand, has syntactical idioms, semantics, and static semantics that simply don't exist in other languages, and is object-oriented to its core. Look at any of the code you'll see in introductory Ruby tutorials that are designed to "wow" the reader with Ruby's interesting and quirky syntax. These feats are either difficult or impossible to replicate in other programming languages, like Python. This is the difference between Ruby and Python; Ruby likes syntactic sugar, Python likes clean, easily understood, simple code.

My point in suggesting Python to a begging programmer is that Python is much closer to a traditional programming language than Ruby is. Ruby is honestly too quirky to teach to beginners, while Python is much more straightforward. I like Ruby much more than I like Python, but I can't imagine trying to teach its quirks and peculiar design to someone who had never programmed before. Ruby is loaded with ambiguous branching syntax, strange object oriented design patterns, and many of its basic operators perform differently than traditional languages.
Was This Post Helpful? 0
  • +
  • -

#12 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 12 November 2009 - 01:35 PM

View Postnoyesa, on 11 Nov, 2009 - 01:05 PM, said:

View PostRaynes, on 10 Nov, 2009 - 12:36 PM, said:

Well, as a start it isn't a scripting language. It's a full fledged programming language, as noted by the wikipedia page. It is indeed compiled as of Ruby 1.9 into YARV bytecode. Python is hardly close to C and Java on the syntax front. There is a huge Ruby community separate from the Rails community. Ruby isn't hard at all to learn, especially with Why's poignant guide still around. Python is still another good choice, but in my opinion Ruby is right up there as well.


Ruby is indeed a scripting language, even if its features resemble those of a fully fledged systems language. Don't be quick to assume that calling a language a scripting language is a disparaging term. A scripting language is not necessarily less featured than a systems-level language, and in fact usually contain more features in their standard library (Ruby, Python, PHP all contain a far greater number of useful modules out of the box than, say, C++).

I suppose to be technical, it would be most correct to call Ruby a dynamic langauge--it is rarely used as glue, and in many cases, such as with Rails, is actually used for application programming. However, its source code is interpreted at runtime and it performs on-the-fly computation. Strictly speaking, Ruby is a dynamic scripting language, and involves large amounts of abstraction through its standard library.

The idea that Ruby code is compiled at run-time is a bit of a misconception. The Ruby 1.9 interpreter compiles Ruby source code into bytecode, which is then executed by the Ruby virtual machine, just like Python and PHP. Ruby code, however, is never compiled into machine code, and executes much slower than native compiled code.

If you get past the lack of braces and the usage of indentation in Python code, most of the Python/Pythonic idioms are directly descendant from procedural languages like C. Pythonic design patterns tend to be linear, just like C and C++, where Object-Oriented programming augments a more linear approach.

Ruby on the other hand, has syntactical idioms, semantics, and static semantics that simply don't exist in other languages, and is object-oriented to its core. Look at any of the code you'll see in introductory Ruby tutorials that are designed to "wow" the reader with Ruby's interesting and quirky syntax. These feats are either difficult or impossible to replicate in other programming languages, like Python. This is the difference between Ruby and Python; Ruby likes syntactic sugar, Python likes clean, easily understood, simple code.

My point in suggesting Python to a begging programmer is that Python is much closer to a traditional programming language than Ruby is. Ruby is honestly too quirky to teach to beginners, while Python is much more straightforward. I like Ruby much more than I like Python, but I can't imagine trying to teach its quirks and peculiar design to someone who had never programmed before. Ruby is loaded with ambiguous branching syntax, strange object oriented design patterns, and many of its basic operators perform differently than traditional languages.


There is virtually nobody who consider Ruby a scripting language. If you don't believe me, you're welcome to contact the Ruby mailing list, or you could even try to ask Matz himself. I don't think I ever did say it was a systems language, but it's certainly a general purpose programming language.

And no, it isn't a misconception. It's absolutely true. Java is compiled in a highly similar way, and is referred to as a "compiled" language, so I'm not sure how it's a misconception.

And I take the perspective of "If they can't handle this, they might as well not even try to handle that." Ruby is a simple language, whether 'quirky' or not, and as a first language, those 'quirks' would be quite unnoticeable, considering the person is just learning what programming is in the first place. If I had my way, I would teach Haskell and Clojure as first languages for everybody, but that's just me (and some universities).

I'm not trying to argue with you, but most of what you said is your opinion, but doesn't necessarily constitute fact. Same with my opinions. Let's leave this thread be, we can argue over PMs and tea if we need to. ;)

This post has been edited by Raynes: 12 November 2009 - 01:36 PM

Was This Post Helpful? 0
  • +
  • -

#13 noyesa  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 27
  • Joined: 01-April 09

Re: What is Ruby exactly is it a good language to start out with?

Posted 13 November 2009 - 08:42 AM

Right you are, no need to hijack the thread with another scripting-language-vs-"real"-programming language debate, since I'm not convinced any two people on earth have the same viewpoint on it.
Was This Post Helpful? 0
  • +
  • -

#14 SpeedisaVirus  Icon User is offline

  • Baller
  • member icon

Reputation: 114
  • View blog
  • Posts: 855
  • Joined: 06-October 08

Re: What is Ruby exactly is it a good language to start out with?

Posted 01 December 2009 - 09:50 AM

Java gets precompiled to machine code at runtime(JIT). Ruby, exception to JRuby, can compile to ruby byte code which is interpreted. There are some JITs for Ruby but I don't think any are really ready for showtime(ludicrous).

They are not done in a "similar way."

To the topic: I wouldn't start with Ruby for the reasons already mentioned. Its nifty, powerful, but has some unique things that aren't going to translate to other languages very well. It would be better to start with Python, C#, or Java in my opinion.

This post has been edited by SpeedisaVirus: 01 December 2009 - 09:50 AM

Was This Post Helpful? 0
  • +
  • -

#15 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: What is Ruby exactly is it a good language to start out with?

Posted 01 December 2009 - 01:15 PM

View PostRaynes, on 12 Nov, 2009 - 03:35 PM, said:

If I had my way, I would teach Haskell and Clojure as first languages for everybody, but that's just me (and some universities).


I know this is a fairly old post I'm replying to, but that would probably scare more people away from programming than a language like Python or Java. I am not saying anything against Haskell/Clojure I think they are languages that everyone should learn at some point in their programming career, to mix things up and try something new and a different way of think of things. But from the earliest days of my programming life, when I was first comparing languages and seeing which to learn, functional programming scared me almost as much as assembly, it just didn't make sense. Which is why I picked up Python and C.


</off topic>


I would suggest that you learn both a language such as Java and a scripting/interpreted language such as Ruby or Python on the side.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2