MIT: Independent Activities Period: IAP

IAP 2013



Caffeinated Crash Course in Ruby

Ben Weissmann

Jan/15 Tue 08:00PM-11:00PM 4-231

Enrollment: Unlimited: No advance sign-up
Prereq: Some familiarity with some scripting language

Ruby is a language that was designed by Yukihiro "Matz" Matsumoto, to be "more powerful than Perl, and more object-oriented than Python" It was designed taking some of the best ideas from Perl, Python, LISP, and Smalltalk to create a language "natural, not simple" but, above all, it was designed to make programming with it an enjoyable experience.

In a quick 3 hour course I will take you through a nearly-complete tour of the Ruby language including such standbys as syntax, data structures, class creation, and control flow, along with the more unique concepts of blocks/functional programming, mixins, method aliasing, and duck typing. If time allows, we will explore Ruby metaprogramming to do frightening things such as implement roman numeral literals, and perhaps look at Sinatra, a Ruby web microframework.

Participants should try to have Ruby 1.9 and RubyGems installed on their systems before coming to the session so we can get started right away. On Mac/Linux, use RVM (https://rvm.io) to install Ruby; on Windows, use RubyInstaller (http://rubyinstaller.org/). To confirm that you've got ruby correctly installed, type "irb" at a terminal, confirm that you enter Ruby's REPL, and then check the version, like this:

 

ben@ceviche:~$ irb

ruby-1.9.3-p194 :001 > RUBY_VERSION

 => "1.9.3" 

 

Come to class a little early if you need help getting set up.

Sponsor(s): Student Information Processing Board, Electrical Engineering and Computer Science
Contact: Ben Weissmann, sipb-iap-caffruby@mit.edu