If you enjoyed this article, get email updates (it's free).
Join over 77,235 Subscribers Today.
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:
personal = “I don’t love my girlfriend”
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:
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.
Join over 77,235 Subscribers Today.
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.