Join over 55,891 Subscribers Today! FREE UPDATES!
Get The Only Freelancer crash course you will ever need to read!
Time to Ruby dooby do! It can take a lot of time, and be quite boring, to learn a new programming language. A .Net developer will jump up and say why should I even learn it? I am a professional .Net developer and my day job doesn’t give me time (and scope) to learn a new programming language. But, it isn’t like that. You learn a lot with new programming languages especially when they are a refined version of other optimized ones. Ruby is that sort of language. I agree that the transition from being a noob developer (in a particular programming language) to a pro is arduous but you will appreciate the experience. As of now all that I can do is let you guys know that if you stick around with Ruby then you won’t be at a loss. Just be positive.
Note: Consider this article to be a very basic discussion on Ruby (the programming language) and Rails (an application framework). My basic goal is to introduce you to Ruby and give you that initial push which is required when learning a programming language.
Ruby, as I said before, is a refined combination of various programming approaches. Ruby is the perfect mixture of python’s easy to understand flow, Smalltalk’s elegance and Perl’s easy to learn syntax style. Ruby is a high level object-oriented programming language (as is the case with most of the programming languages these days) which came into existence in mid 1990s in Japan. With time Ruby has started to become more dominant in the U.S. and Europe too.
Ruby is famous for its dynamic type system and automatic memory management. By dynamic type I mean that most of the type checking in a Ruby program is done during run time which means you don’t have to worry about integer and string types. Ruby will do that for you. We will see more about this in a short example later.
The basic purpose of launching Ruby was to make it easy for humans to interact with machines and understand codes. Yukihiro Matsumoto, the father of Ruby, insists that Ruby was designed for programmer productivity and not for machine optimization.
Often people, especially computer engineers, focus on the machines. They think, “By doing this, the machine will run faster. By doing this, the machine will run more effectively. By doing this, the machine will something something something.” They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves. – Yukihiro Matsumoto
Rails is an extremely productive application framework written in Ruby by David Heinemeier Hansson. It is said that developing a web application on Rails is ten times faster when compared to that of a Java based web application framework. Rails is open source (of course!) Ruby based framework that can be used for easy (and fast) database integration.
Rails is famous for over-the-top ideas which resulted in shunning conventions and picking up dynamic programming structure. The basic application code and the updated database will always contain everything that Rails will require to execute a program from start to finish.
See how interesting (and easy) things will get after this:
Code:
personal = “I don’t love my girlfriend”
puts personal
Output:
I don’t love my girlfriend
Yep! That will actually be it to print an output in console. No initialization, semicolons and main methods.
Now, let us see a quick difference in programming between PHP and Ruby when we have to reverse a string:
PHP:
strrev(“string”);
Ruby:
“string”.reverse
Voila! Your string will be reversed in no time. See the difference in effort in both the programming languages. A Ruby based programming language will make it easy for you to write a program. It is more like writing in English than in coded language. It is the future of programming languages.
I know the world of Ruby is big and I haven’t scratched the surface of it but a blog post will prove to be overly small to dive into the world of Ruby. Henceforth, let us directly go through the advantages of Ruby:
Now, let us go through some of the websites (really famous ones) that are using the overall strengths of Ruby. You will see how designers are taking their websites places with the help of Ruby.










You are not done yet. You really aren’t. Hang around with Ruby and keep riding the journey on Rails. Someday you will call yourself a Ruby Pro and who knows, your article might just come in handy for me. Ruby has its disadvantages and the most obvious of them all is the that it is very new to this game. It is still evolving and has a lot to prove. Still, we know that it is going to go places. Now, it is in our hands. Either we can wait and let it grow or else jump in and evolve as an expert when their is high demand for Ruby professionals.
Get The Only Freelancer crash course you will ever need to read!
Salman Siddiqui is an alpha geek, design guru and seasoned WordPress critic. Writing, for him, started out of ego but it has become the most luring and enlightening career option of his life. He is walking that extra mile for his freelancing dream.
Thursday, May 3rd, 2012 18:07
Been getting more and more into RoR lately, so far liking it.
Monday, February 6th, 2012 05:06
Nice article but your examples definitely don’t illustrate any advantage Ruby may have over PHP. Looking at this article form a PHP users point-of-view you don’t really make any plausible arguments to seriously consider Ruby for a moment (and subsequently you’re not giving us that “push” you described).
For example: “string”.reverse and strrev(“string”); only proves that Ruby is 1 character shorter than PHP, and your “Hello World” example is just as easily achieved in PHP.
Wednesday, April 11th, 2012 18:43
That’s totally not the point here though, the main difference is that Ruby is brilliantly intuitive, simple, and predictable – that leads to happy developers. Do you as a human think in terms of “strlen” or “length”? Ruby allows you to write code that makes sense, and is often close to human speech. I was a PHP dev for years, but converted to Ruby a few years ago and I can’t believe the difference it makes. I’m more productive, and happier, writing code in Ruby, mainly due to how the language allows you to relate to it. I’m not claiming it is better than PHP – PHP is plenty powerful enough for many purposes, but the speed of development, productivity and maintainability advantages of Ruby are undoubtable.
Thursday, February 2nd, 2012 12:36
Not “Rail” it is “Rails”
If not, then it's time to learn how to:
You can trust 1stWebDesigner to help you become a better web designer!
- Jacob Cass | Just Creative
Just enter your name and email below and click Get Updates!
dudie
Thursday, February 2nd, 2012 12:36
Not “Rail” it is “Rails”
Salman Siddiqui
Thursday, February 2nd, 2012 19:00
Thanks! Appreciated :)
Rean John Uehara
Thursday, February 2nd, 2012 13:59
I derped. Thanks!
Salman Siddiqui
Thursday, February 2nd, 2012 18:59
Google? Try and let me know if you end up hitting walls.
Daniel
Monday, February 6th, 2012 05:06
Nice article but your examples definitely don’t illustrate any advantage Ruby may have over PHP. Looking at this article form a PHP users point-of-view you don’t really make any plausible arguments to seriously consider Ruby for a moment (and subsequently you’re not giving us that “push” you described).
For example: “string”.reverse and strrev(“string”); only proves that Ruby is 1 character shorter than PHP, and your “Hello World” example is just as easily achieved in PHP.
John Maxwell
Wednesday, April 11th, 2012 18:43
That’s totally not the point here though, the main difference is that Ruby is brilliantly intuitive, simple, and predictable – that leads to happy developers. Do you as a human think in terms of “strlen” or “length”? Ruby allows you to write code that makes sense, and is often close to human speech. I was a PHP dev for years, but converted to Ruby a few years ago and I can’t believe the difference it makes. I’m more productive, and happier, writing code in Ruby, mainly due to how the language allows you to relate to it. I’m not claiming it is better than PHP – PHP is plenty powerful enough for many purposes, but the speed of development, productivity and maintainability advantages of Ruby are undoubtable.
Al
Thursday, May 3rd, 2012 18:07
Been getting more and more into RoR lately, so far liking it.