Assignment 2: The Facets of Ruby, Part I
BackgroundPage 1 of 14

1. Learning a Programming Language

Before we begin coding in Ruby, let's briefly talk about learning a programming language.

The first programming language we will cover in this class is Ruby.

Its catch phrase, “Programmer's best friend,” is indeed true. It is a very programmer friendly language. The designer of the language, Yukihiro Matsumoto, even said:

“Ruby is designed to make programmers happy.”

You'll see why his claim is true very soon. However, I want to make couple points.

1. You might already be pretty good at Ruby.

If this is the case, I still encourage you to read next couple pages of background. And once we start talking about Ruby, you can go straight to problems.

2. Easy to code doesn't mean easy to learn.

I first learned Ruby during the winter break of my sophomore year. When I learned it then, I thought it was very counter-intuitive and hard to learn.

I re-learned it during my 2nd semester junior year, and this time, I understood it and found Ruby very easy to code in. I even did my 10-601 (Machine Learning) and 15-437 (Web Applications Development) assignments in Ruby.

Thinking back, I definitely learned it the wrong way at first. During my sophomore year, I was learning Ruby and Ruby on Rails at the same time, and that didn't quite work so well. I also learned Ruby from mostly copying pasting from random web sites, instead of getting a Ruby book to read.

However, I can guarantee you that if you haven't seen Ruby or Python, you'll find Ruby very confusing at first. And that's okay.

Ruby is definitely not the easiest language to learn. Keep that in your mind when you get stuck, but I'll try my best to guide you.

3. Remember the Dreyfus Model.

Before we begin, make sure you know exactly where you are in the Dreyfus Model for Ruby skill.

For the review, the five stages of Dreyfus model are:

  1. Novices who need recipes.
  2. Advanced Beginners who can get easy tasks done.
  3. Competents who can get most tasks done.
  4. Proficients who have big picture.
  5. Experts who work from intuition.

For the purpose of this course, the audience of this assignment is for Ruby Novices, which means you've never seen Ruby and I'll be guiding you through recipes at first.

However, that won't get you past the Novice stage. Later I'll provide you some bigger picture of Ruby.

Again, if you are above Competent level in Ruby, then this approach will not quite work for you - so feel free to skip most of backgrounds and go to problems.

4. The background pages are LONG.

Please don't be overwhelemed by the fact that there are a lot of background pages. It should only take you 3 hours to finish this assignment.

Next Page

We'll talk about Google in the next page. Next Page

Assignment 2:
The Facets of Ruby, Part I