Ruby Metaprogramming Course – Start Thinking in Ruby

by Satish Talim on February 9, 2010

RubyLearning is honored to have Paolo Perrotta, author of the book Metaprogramming Ruby, who would be answering some of the questions in the course forum.

After the huge success of the first two “Ruby Metaprogramming” batches, RubyLearning now announces the third official batch from 6th Mar. 2010.

What’s Ruby Metaprogramming?

Paolo Perrotta 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 6th March 2010 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:

  • Practice with assignments on how to write a tiny app with Ruby Metaprogramming techniques. The assignments are being prepared.

For Newbies

We will provide you with short study notes. You can learn the following and discuss the same in the course forum.

  • Instance variables, Methods and Classes
  • Calling a method
  • Useful methods in Ruby Metaprogramming
  • Ruby Blocks and Bindings
  • Solved Problems (two examples)

For Intermediate Participants

We willl open the discussion forum with some advanced topics like “Compare Ruby Callable Objects” (Yugui’s blog posts) etc.

Who is conducting this course?

The course is conducted by Satoshi Asakawa from Japan with 24×7 help from the mentors at RubyLearning. Satoshi is a Japanese Ruby enthusiast.

Early Bird Registration Discounts

  • For the first 20 registrations, Course Fee: US$ 5 per participant.
  • For the next 20 registrations, Course Fee US$ 7 per participant.
  • After the first 40 registrations, Course Fee US$ 9 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

{ 5 comments… read them below or add one }

Paul February 11, 2010 at 6:06 pm

Hi. How does the course work, exactly? What form does it take – a series of webinars? It lasts for weeks? Is that 2 weeks of evening onlines classes? Thanks.


Satoshi Asakawa February 12, 2010 at 6:16 am

Thank you for your interest in the Ruby Metaprogramming course.

It takes a self-learning style: You log into the course at any time during the 2 weeks. At first, you read the articles which the course guide links to and try to do the exercises by yourself. Then you’ll post your solutions or findings into the relative forums and start to discuss about your posts with the other participants.

Asst. teachers including me will review your solutions or reply to your questions.

You can post everthing into the online forums at anytime for two weeks.

Hope I can see you again in the course forums. ;-)


Tom Dyer March 6, 2010 at 1:03 am


Thx for asking that question. I couldn’t find the format of the course anywhere? Too bad it’s not available anywhere on their site. At least I couldn’t find this info?

Thx for the explanation.


Andy April 7, 2010 at 9:47 pm

Hey ho – I’ve missed the course – are the materials / exercises still available (for a donation of course…)

let me know



ruby October 16, 2010 at 7:34 am

It’s easy to do meta programming in Ruby. Here is a 16-posts series on meta programming in Ruby.

ruby @ LearnBySoft


Leave a Comment

{ 23 trackbacks }

Previous post:

Next post: