Ruby (Programming Language) – A Programmer’s Best Friend

rubyRuby is a dynamic, object oriented, open source and general purpose programming language. It is focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.

Ruby programming language was designed and developed by Yukihiro “Matz” Matsumoto in Japan and released in mid 1990s. Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp.

Ruby is free, free of charge, free to use, copy it, modify it and distribute it.

Ruby on Rails framework is very popular, it is developed using Ruby programming language. Ruby has key features like object oriented, mixins, dynamic, singleton classes, metaprogramming, flexibility, variables & scope, blocks, exceptions for error handling, garbage collector, etc. Ruby is supported with operating system like MAC OS X, Windows, Linux, DOS, etc.

Ruby Versions
Until now, so many Ruby versions released with different features like Ruby 1.8, Ruby 1.9, Ruby 2.0, Ruby 2.1, Ruby 2.2.

Right now, Ruby 2.3 (latest version) is available in the market and has many new features compared to previous versions. Some of these features include: frozen string literals, safe navigation operator, hash comparison, and dig method of hash & array. Ruby 2.3.0 is now also supported on Heroku (cloud platform as a service).

You can install single Ruby version into your machine for your application as well as multiple versions using RVM (Ruby Version Manager). Multiple Rubies are helpful when your applications are supported with different Ruby versions. For example, Blog Rails Application supported with Ruby 1.9.3 and School Management System Rails Application supported with Ruby 2.3.0.

Ruby Code
Ruby is used to write both basic and simple programs as well as complex applications. Here is example of a basic Ruby program:

class Codal
          def initialize
                 puts “Codal is a UX design and development agency based in Chicago.”
# create a new object

# run above program on terminal
$ ruby codal.rb
# output on terminal screen – “Codal is a UX design and development agency based in Chicago.”

Ruby program file’s extension is .rb and Ruby file is run with Ruby command on terminal.

Ruby also includes irb (interactive ruby), an interactive command line interpreter that can be used to test code quickly. The following sample code represents an irb session:

$ irb
irb(main):001:0> puts “Hello World”
Hello World
=> nil
irb(main):002:0> 1+2
=> 3

Gems are Ruby packages which can be installed via command line and will use into many Ruby and RoR applications. Most of the gems are libraries which are hosted on GitHub.

There are many resources available in the market for Ruby language such as online courses, screencasts, e-books, IRC channels, communities, blogs, forums, etc.

Conclusion: Rapidly Growing Language
Finally, as Ruby programming language is rapidly growing into the market, web-based companies are choosing the Ruby language for web application development more than ever before. Ruby is easy to learn, so many web developers are selecting Ruby to learn as a first language. One of the main reasons that Ruby is growing so rapidly is because of its popular framework, called Ruby on Rails.

Ruby (Programming Language) – A Programmer’s Best Friend

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s