We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,186 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Reasons to learn Ruby

Hi All

I am looking for a new language to learn and add to my language set that already contains PHP & C# in much depth. Ruby is one language i was thinking of learning.

Can you guys please give me practical uses and/or applications that use/may use Ruby.
I believe knowing this before learning it will surely give me some inspiration and direction when i begin my Ruby lessons.

Thanks.

4
Contributors
2
Replies
2 Weeks
Discussion Span
2 Years Ago
Last Updated
4
Views
Question
Answered
wilch
Junior Poster in Training
84 posts since Aug 2007
Reputation Points: 25
Solved Threads: 17
Skill Endorsements: 0

-- Brilliant community (check out ruby forums)
-- The code imo looks really nice, and there are alot of very helpful functions built in.

For example i was writing a script that would get the first day of the week and last day of the week.

In PHP i eventually managed to cut it down to 7 lines which is not bad at all.

In ruby I can just do this, 4 lines if you include the space :)

require 'active_support'

start_of_week = at_the_beginning_of_week
end_of_week = at_end_of_week


There are also many more functions that save you time like this

check out active support documentation

benjaminFowl87
Junior Poster in Training
74 posts since Aug 2010
Reputation Points: 17
Solved Threads: 1
Skill Endorsements: 0

in ruby everything is an object, unlike Python where the primitives are, well, primitive

Maybe you should look thing up before you talk.
http://www.diveintopython.org/getting_to_know_python/everything_is_an_object.html

Everything in Python is an object, and almost everything has attributes and methods. All functions have a built-in attribute doc, which returns the doc string defined in the function's source code. The sys module is an object which has (among other things) an attribute called path. And so forth.

As with Python, in Ruby,... Everything is an object
http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/
So there you have it from Ruby's own website: in Python everything is an object

.

snippsat
Posting Shark
957 posts since Aug 2008
Reputation Points: 482
Solved Threads: 344
Skill Endorsements: 8
Question Answered as of 2 Years Ago by benjaminFowl87 and snippsat

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.5260 seconds using 2.67MB