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.

Recommended Answers

All 2 Replies

-- 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

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

.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.