Archive for Ruby

Getting started with Ruby – TOC

// December 24th, 2010 // 1 Comment » // Ruby

Hi,

I have written a series of articles (in several parts) in an attempt to guide beginners to get comfortable with Ruby. This article is my attempt to build a TOC (Table of Contents) for it to act as an index for people to get a brief idea regarding what each article is about and help them get to the sections they are interested in.

(more…)

VN:F [1.9.13_1145]
Rating: 4.0/10 (3 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 6 – Example Problem

// November 3rd, 2010 // No Comments » // Ruby

After having covered most of the basics of Ruby, lets get started on an actual problem, just like I had promised in my previous article – Getting started with Ruby – Part 5

(more…)

VN:F [1.9.13_1145]
Rating: 1.0/10 (1 vote cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 5 – Ruby Loops

// October 26th, 2010 // 3 Comments » // Ruby

Hi in my previous article Getting started with Ruby – Part 4 I covered Hashes & blocks. Today I will take you through the various forms of loops in Ruby.

(more…)

VN:F [1.9.13_1145]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.13_1145]
Rating: +1 (from 1 vote)

Getting started with Ruby – Part 4 – Hashes & Blocks

// October 23rd, 2010 // 5 Comments » // Ruby

In my previous article Getting started with Ruby – Part 3 I started with Collections and covered basics of Ranges & Arrays. Like I mentioned towards the end of the article (in case you couldn’t manage to reach the end) I will start with one of the most commonly used Collection objects in Ruby, namely Hashes.

Hashes are essentially data structures to store key – value pairs, when you wish to store an element in the Hash you do so by assigning a unique key to it within the hash and while retrieving you do so with the help of that unique key. The beauty of hashes is the fact that the ‘key’ in question here could be just about any object in Ruby, most commonly however in practice strings or symbols (i’ll get to what these are soon) are used as keys.

(more…)

VN:F [1.9.13_1145]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 3 – Collections, Ranges & Arrays

// October 21st, 2010 // 5 Comments » // Ruby

In my previous article Getting started with Ruby – Part 2 I introduced you all to Ruby & its philosophy and I started out with data type classes in Ruby. I was able to give you an overview about Strings & Numbers in ruby. Today I will start with Collections.
(more…)

VN:F [1.9.13_1145]
Rating: 5.7/10 (3 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 2 – Introduction & Philosophy

// October 19th, 2010 // 5 Comments » // Ruby

Hi again, this is part 2 of my series of articles to help beginners getting started with the Ruby programming language. At this point of time I would like to quote the definition of Ruby from the Ruby-Lang official website.

A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.

I know I had already quoted Ruby’s definition from wikipedia in my previous article ‘Getting started with Ruby – Part 1‘, but that was more of a technical definition. Here I wanted to draw your attention to Yukihiro Matsumoto‘s, popularly known as Matz’s philosophy behind creating Ruby, which is making programming as simple & natural as humanely possible. We will be witnessing that very soon.

NOTE : Before diving into programming, I would like to bring to your notice the fact that most of the information that I will be sharing here in my articles, would be my interpretation of publicly available information, and based on my experiences, I will try to be as expressive as possible, however I can make mistakes and would appreciate your help in pointing out the same if I do. All my examples have been ran and tested on Ruby 1.9.2-p0.

(more…)

VN:F [1.9.13_1145]
Rating: 6.3/10 (4 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 1

// October 19th, 2010 // 6 Comments » // Ruby

Before we get started with Ruby, let me first give you a brief on who I am, I am Dhruva Sagar, a software engineer having a little over 4 years of professional experience having worked in technologies in and around Java, Javascript, Adobe Flex, PHP and Ruby. I have always been fascinated by programming languages and have been eager to learn new ones and I can also code comfortably in Perl, Python & Groovy, however I haven’t worked extensively on these. Right now I am working in a startup Artha42 Innovations Private Limited and am having the best time of my life!

If you have read my previous article Knowing VS Doing you might be aware of my views on the process of learning, my own process of learning Ruby has hence been on similar lines. I had first started with Ruby on Rails even before I knew anything about Ruby, which I realized much later, isn’t a very smart thing to do. Rails is an amazing web development framework, so amazing that it really feels magical (literally) when you first get started with it. But all of that magic, although great, also deprives one from the beauty that Ruby is in many ways, since there is a whole lot of stuff happening behind the scenes.

With these series of articles, I will try to take you through the essentials of Ruby with an aim to help a programmer, go from a beginner to an intermediate stage. By saying that I want to make it clear that I expect the audience to have some basic understanding of programming constructs. However, I will make an attempt to be as clear & precise as possible to make things understandable to all.

(more…)

VN:F [1.9.13_1145]
Rating: 8.6/10 (8 votes cast)
VN:F [1.9.13_1145]
Rating: +3 (from 3 votes)
Get Adobe Flash playerPlugin by wpburn.com wordpress themes