Learn Ruby Programming

Ruby is a dynamic, reflective, object-oriented, general-purpose programming language.

It was designed and developed in the mid-1990s by Yukihiro “Matz” Matsumoto in Japan. According to its creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp.

It supports multiple programming paradigms, including functional, object-oriented, and imperative. It also has a dynamic type system and automatic memory management.

Why Ruby and Rails?

Ruby on Rails is a super-productive environment for developing applications. It’s faster to build apps in Rails than in Java or .Net, hands down.

  1. Ruby is a powerful, easy to learn, fully object oriented language. Rails is nothing without Ruby.
  2. JRuby. Java is not going to fade away. It is and will continue to be an integral part of the enterprise. JRuby allows Rails to fit into that environment and leverage the hell out of it.
  3. Ruby’s community is growing by leaps and bounds every day… and so are its gems (libraries), plugins, etc.
  4. Built in tempting engine to generate web pages, emails, xml and text documents.
  5. Pragmatic philosophy of convention over configuration.
  6. Migration for applying or roll back database changes.
Object Oriented Programming Language.

Ruby is true object oriented programming language. Everything in ruby is an object. Every bit of information and code can be given their own properties and actions.

"Hello Ruby".length

Here ‘Hello Ruby’ is string. Here length is the properties of of ‘Hello Ruby’ string and

"Hello Ruby".reverse

reverse is the action of ‘Hello Ruby’ string. So here ‘Hello Ruby’ is an object which have both properties and actions. In ruby even string and integers are object.

Ruby is Dynamic type language

Dynamic programming language, in computer science, is a class of high-level programming languages which, at runtime, execute many common programming behaviors that static programming languages perform during compilation.

Here is simple example:

2 + 3 = 5

"2" + "3" = "23"

Here when I add two integer 2 and 3 it gives addition of 2 and 3 which is 5 and when I add two string “2” and “3”, it concatenate two string which results “23”.

Books Recommended for Beginners

To learn any programming language good books really help you. Here are few books that are recommended for beginners and mid level Ruby developers.

1. The Ruby Programming Language

The Ruby Programming Language is the authoritative guide to Ruby and provides comprehensive coverage of versions 1.8 and 1.9 of the language. It was written (and illustrated!) by an all-star team:

    • David Flanagan, bestselling author of programming language “bibles” (including JavaScript: The Definitive Guide and Java in a Nutshell) and committer to the Ruby Subversion repository.
  • Yukihiro “Matz” Matsumoto, creator, designer and lead developer of Ruby and author of Ruby in a Nutshell, which has been expanded and revised to become this book.

This book begins with a quick-start tutorial to the language, and then explains the language in detail from the bottom up: from lexical and syntactic structure to datatypes to expressions and statements and on through methods, blocks, lambdas, closures, classes and modules.

Get this book

2. Head First Ruby: A Brain-Friendly Guide

What will you learn from this book?

What’s all the buzz about this Ruby language? Is it right for you? Well, ask yourself: are you tired of all those extra declarations, keywords, and compilation steps in your other language? Do you want to be a more productive programmer? Then you’ll love Ruby. With this unique hands-on learning experience, you’ll discover how Ruby takes care of all the details for you, so you can simply have fun and get more done with less code.

Why does this book look so different?

Based on the latest research in cognitive science and learning theory, Head First Ruby uses a visually rich format to engage your mind, rather than a text-heavy approach to put you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.

Get this book

Sharing Is Caring…….