How to Learn Ruby

Muhammad Ahtsham
3 min readJun 23, 2021

Subheader:
This article is about Ruby’s programming language. It will tell you about some strong concepts of Ruby. Its object-oriented behavior and some comparisons with python.

Why do you need to gain strong concepts of Ruby?
I have been a developer long enough to learn a few developer languages but Ruby is my favorite. We are not going to waste time to see how it works and its popular framework. By using Ruby programming language we can make some big sheathe.

Valuable basic concepts of ruby programming language?
It is a powerful open-source programming language, which focuses on intelligibility and productiveness.

# Output “I love Ruby”

say = “I love Ruby”

puts say

# Output “I *LOVE* RUBY”

say[‘love’] = “*love*”

puts say. upcase

# Output “I *love* Ruby”

# five times

5.times { puts say }

The above concepts came from the official ruby guide.

Reasons why ruby always welcomes’s Object-oriented programming?
When you think of scripting languages, do not think about object-oriented programming like java. Ruby is exactly that, it is an object-oriented scripting language. Even though ruby is object-oriented you actually wouldn’t know how to coding in it. Also, It will make your skills sharp. And for a time it is like regarded as a peer to python. Ruby has its dedicated package manager and in ruby, it’s called gem. So if you go on rubygems.org you can view all the different packages people write for ruby. It’s like npm for nodeJs. Ruby is a bit unique that’s Matsumoto wanted to make a language that made programmers happy to write coding. So in Ruby, everything is an object, even primitive numbers have a class type and you can call functions on them.

Take a look at the Comparison of ruby and python
For a time it was sort of regarded as peer to python. Ruby and python both are scripting languages. Which came up around the same time. And both are used in web programming like writing server and backend services. So there comes a big framework called ruby on rails and the other one is python’s Django.

Ruby’s primary goal is to combine functional and imperative programming styles. Which will make software development easier. Ruby’s popular web application framework is called ruby on rails(ROR). Rails philosophy lies in two principles. The first principle is convention over configuration. This means the developer only needs to specify unconventional aspects of the application. The Second one is YAGNI, which means implementing features that are needed now and avoiding writing a code for features that will be necessary for the future… Famous pages built with rails are Airbnb, Github, Shopify, and urban dictionary.

Now Python is named for Monty python. It is General purpose cross-platform language. Those are available under FSF and OSI licenses. Python follows an approach called zen of python. The model is represented by the list of principles. Such as beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex, readability counts, and others. Readability is crucial to python syntactic principles. famous projects built with python are Google, Youtube, Instagram, Spotify, Dropbox, and Yahoo.

Conclusion
In conclusion, I will say that if we make a comparison of ROR vs Django. Ruby has good demand and both have the same popularity. Ruby has friendly syntax by which developers can easily learn.

--

--