Ruby Metaprogramming A New Course Announced

by Satish Talim on July 23, 2009

RL offers online courses in Ruby programming, Git & GitHub, FXRuby, Shoes, JRuby, Sinatra and Merb. Since 2005, over 12000 participants spread across 140+ countries have learned Ruby and other Ruby related timely topics. This has been possible due to the extensive support provided by the patrons, mentors and assistant teachers of these courses. RL strives hard to improve the methodology and course content based on the extensive and critical feedback we receive. Thanks to YOU, the Ruby community, people like Fabio Akita and companies like Locaweb who make this possible. Our Alumni are our best ambassadors.

After the huge success of the first-ever “Ruby Metaprogramming” beta course, RubyLearning now announces the first official batch from 5th Sept. 2009.

What’s Ruby Metaprogramming?

Paolo Perrotta, author of the book “Metaprogramming Ruby” has this to say:

As a Ruby programmer, you already know how much fun it is. Now see how to unleash its power, digging under the surface and exploring the language’s most advanced features: a collection of techniques and tricks known as metaprogramming. Once the domain of expert Rubyists, metaprogramming is now accessible to programmers of all levels – from beginner to expert.

Paolo goes on to say the following in a recent interview:

I realized that metaprogramming sits at the very heart of the language, and when you understand metaprogramming, that’s the moment you start “thinking in Ruby”.

Who’s It For?

Anyone who has some background in Core Ruby can make the most out of this course.


The course starts on 5th Sep. 2009 and runs for 2 weeks. You first need to register on the site and then enroll into the course.

What Will I Learn?

The brief outline of this course is:

First Week:

  • Review the object model of Ruby itself:
    • read-only variable self
    • singleton class
    • scope of variables
  • Learn a lot of methods:
    • eval
    • instance_eval
    • class_eval (aka: module_eval)
    • class_variable_set
    • class_variable_get
    • class_variables (Try it out: instance_variables)
    • instance_variable_set (Try it out: instance_variable_get)
    • define_method
    • const_set
    • const_get (Try it out: constants)
    • (Try it out:
    • binding (Try it out: lambda)
    • send (Try it out: method)
    • remove_method
    • undef_method
    • method_missing
    • include
    • extend
    • included
    • extended
  • Do the following five exercises and discuss them in the forum.
    • Exercise 1: Get the values from outside the class.
    • Exercise 2: Add your code to display ‘I like metaprogramming!’
    • Exercise 3: Show lots of ways to define singleton method.
    • Exercise 4: Glance inside Ruby with binding method.
    • Exercise 5: Define a class without class and def.

Second Week:

  • Do practice with two assignments on how to write a tiny app with Ruby Metaprogramming techniques.
    • Assignment 1: Define class Dog – There are three dogs named Lassie, Fido and Stimpy. Lassie and Fido can dance, but Stimpy can’t… (to be continued later)
    • Assignment 2: Create a tiny XML generator – Consider about our tiny DSL code to create the output (xml format text)

Who is conducting this course?

The course is conducted by Satoshi Asakawa from Japan with 24×7 help from the assistant teachers, mentors and patrons at RubyLearning. Satoshi is a Japanese Ruby enthusiast and a Patron of all courses at RubyLearning.

Early Bird Registration Discounts

  • For the first 10 registrations, Course Fee: US$ 3 per participant.
  • For the next 20 registrations, Course Fee US$ 4 per participant.
  • After the first 30 registrations, Course Fee US$ 5 per participant.

The course fee goes towards maintaining RubyLearning and helps provide quality content to you.

So hurry, registrations have started.

By the end of the course, and to reiterate what Paolo Perrotta said, you will understand metaprogramming and that’s the moment you will start “thinking in Ruby”.

Technorati Tags: , , , , ,

Posted by Satish Talim

{ 1 comment… read it below or add one }

Victor Goff July 23, 2009 at 9:58 am

Awesome course. It is a good chance to get your feet wet with some good interaction!


Leave a Comment

{ 14 trackbacks }

Previous post:

Next post: