MIT: Independent Activities Period: IAP

IAP 2014



Caffeinated Crash Course in Ruby

Ben Weissmann

Jan/09 Thu 05:00PM-08:00PM 4-237

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 takes 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.

This class is an introduction to ruby for those with prior programming experience. If you are not comfortable writing simple programs, please look at the offerings targeted toward new programmers. This course moves quickly, and will leave you behind if you're unprepared.

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

Participants should try to have Ruby 1.9 or 2.0 and RubyGems installed before coming to the session so we can start right away. On Mac/Linux, use RVM (https://rvm.io) to install Ruby; on Windows, use RubyInstaller (http://rubyinstaller.org/). To confirm it's correctly installed, type "irb" at a terminal, confirm that you enter Ruby's REPL, and 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