School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,125 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,066 people online right now. Registration is fast and FREE... Join Now!




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

 

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

skateatvu

15 Oct, 2009 - 02:39 PM
Post #1

New D.I.C Head
*

Joined: 25 May, 2009
Posts: 11


My Contributions
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?

User is offlineProfile CardPM
+Quote Post


Raynes

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

15 Oct, 2009 - 06:24 PM
Post #2

Resident Witch. No, really.
Group Icon

Joined: 5 Jan, 2009
Posts: 957



Thanked: 14 times
Dream Kudos: 250
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

skateatvu

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

16 Oct, 2009 - 02:59 AM
Post #3

New D.I.C Head
*

Joined: 25 May, 2009
Posts: 11


My Contributions
QUOTE(Raynes @ 15 Oct, 2009 - 06:24 PM) *

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.
User is offlineProfile CardPM
+Quote Post

Raynes

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

16 Oct, 2009 - 04:02 AM
Post #4

Resident Witch. No, really.
Group Icon

Joined: 5 Jan, 2009
Posts: 957



Thanked: 14 times
Dream Kudos: 250
My Contributions
It's fine, I was just jocking you. tongue.gif
User is offlineProfile CardPM
+Quote Post

Jizzle

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

17 Oct, 2009 - 01:31 AM
Post #5

New D.I.C Head
*

Joined: 17 Oct, 2009
Posts: 1

QUOTE(skateatvu @ 15 Oct, 2009 - 02: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?



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

User is offlineProfile CardPM
+Quote Post

jaql

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

19 Oct, 2009 - 04:48 PM
Post #6

D.I.C Head
**

Joined: 19 Oct, 2009
Posts: 59



Thanked: 5 times
My Contributions
QUOTE(skateatvu @ 15 Oct, 2009 - 02: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?


Here's the weirdest/most fun book you'll read on Ruby -- http://mislav.uniqpath.com/poignant-guide/
User is offlineProfile CardPM
+Quote Post

noyesa

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

10 Nov, 2009 - 02:32 AM
Post #7

New D.I.C Head
*

Joined: 1 Apr, 2009
Posts: 26



Thanked: 4 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

Raynes

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

10 Nov, 2009 - 12:36 PM
Post #8

Resident Witch. No, really.
Group Icon

Joined: 5 Jan, 2009
Posts: 957



Thanked: 14 times
Dream Kudos: 250
My Contributions
QUOTE(noyesa @ 10 Nov, 2009 - 02: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.


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.
User is offlineProfile CardPM
+Quote Post

xenor

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

10 Nov, 2009 - 02:19 PM
Post #9

New D.I.C Head
*

Joined: 23 Sep, 2009
Posts: 39



Thanked: 1 times
My Contributions
Any differences between Python and Ruby?
User is offlineProfile CardPM
+Quote Post

iphoneorange

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

10 Nov, 2009 - 10:01 PM
Post #10

D.I.C Head
Group Icon

Joined: 20 Aug, 2008
Posts: 145



Thanked: 17 times
Dream Kudos: 75
My Contributions
QUOTE(xenor @ 10 Nov, 2009 - 02:19 PM) *

Any differences between Python and Ruby?


Lots, but they're still both pretty close

http://www.zenspider.com/Languages/Ruby/QuickRef.html
http://www.ibm.com/developerworks/library/l-cheatsheet3.html

look at those links, and you can compare the two

This post has been edited by iphoneorange: 10 Nov, 2009 - 10:17 PM
User is offlineProfile CardPM
+Quote Post

noyesa

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

11 Nov, 2009 - 01:05 PM
Post #11

New D.I.C Head
*

Joined: 1 Apr, 2009
Posts: 26



Thanked: 4 times
My Contributions
QUOTE(Raynes @ 10 Nov, 2009 - 12:36 PM) *


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.

User is offlineProfile CardPM
+Quote Post

Raynes

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

12 Nov, 2009 - 12:35 PM
Post #12

Resident Witch. No, really.
Group Icon

Joined: 5 Jan, 2009
Posts: 957



Thanked: 14 times
Dream Kudos: 250
My Contributions
QUOTE(noyesa @ 11 Nov, 2009 - 01:05 PM) *

QUOTE(Raynes @ 10 Nov, 2009 - 12:36 PM) *


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. wink2.gif

This post has been edited by Raynes: 12 Nov, 2009 - 12:36 PM
User is offlineProfile CardPM
+Quote Post

noyesa

RE: What Is Ruby Exactly Is It A Good Language To Start Out With?

13 Nov, 2009 - 07:42 AM
Post #13

New D.I.C Head
*

Joined: 1 Apr, 2009
Posts: 26



Thanked: 4 times
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 02:22PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month