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.

Dani AI

Generated

A compact, practical view for on why Ruby is worth learning and where it pays off.

Ruby shines for building web apps and developer-facing tools. Typical uses: full-stack web apps (opinionated frameworks), small HTTP services and APIs, static-site generators, command-line utilities, automation and provisioning scripts, and internal company DSLs. The RubyGems ecosystem makes it straightforward to compose functionality (authentication, background jobs, testing, etc.) without reinventing the wheel — which is what was hinting at when praising built-in helpers.

A sensible learning path and workflow:

  • Learn core Ruby idioms first: blocks/closures, Enumerable methods, modules/mixins, and basic metaprogramming.
  • Use a Ruby version manager and Bundler to isolate projects and gems.
  • Pick a small project: a CLI tool, a JSON API, or a CRUD app. Build tests as you go (RSpec or Minitest) and add a background job or scheduled task to see real-world patterns.
  • Debug with an interactive console and byebug/pry-style tools; profile with simple timers before optimizing.

Example of an idiomatic Ruby transformation (small, practical starter to try in irb):

words = "Ruby is neat, fast and expressive".downcase.scan(/\w+/)
top = words.group_by { |w| w }.transform_values(&:size).sort_by { |_,c| -c }.first(3)

A couple of realistic cautions: Ruby’s single-threaded behavior in the main interpreter affects concurrency patterns, so learn background-job and async approaches if you need high throughput. Also, don’t start with a big framework until you understand the language foundations — frameworks assume Ruby fluency. Finally, was right to push back on simplistic comparisons with Python: both languages treat many things as objects; the practical differences are in idioms, tooling, and libraries rather than the slogan itself.

If you want a focused next step, convert a small PHP script to Ruby or make a tiny Sinatra app — you’ll see the language idioms quickly and get practical motivation.

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.