<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.vitarara.org/cms" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Vita Rara: A Life Uncommon - Metaprogramming</title>
 <link>http://www.vitarara.org/cms/taxonomy/term/89/all</link>
 <description></description>
 <language>en</language>
<item>
 <title>Ruby Mastery: The Most Important Chapter You Can Read on Ruby</title>
 <link>http://www.vitarara.org/cms/the_most_important_chapter_on_ruby</link>
 <description>&lt;p&gt;There are a decent number of books out there on Ruby. In my mind I consider Chapter 11 of &lt;a href=&quot;http://www.amazon.com/Ruby-Way-Second-Addison-Wesley-Professional/dp/0672328844/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1233172320&amp;amp;sr=8-1&quot;&gt;The Ruby Way, 2nd Edition&lt;/a&gt; the most important chapter you can read. Here&#039;s why.&lt;/p&gt;
&lt;p&gt;Mastery in Ruby involves moving past regular programming and embracing the dynamic features of the language. The dynamic nature of Ruby goes far beyond dynamic typing. Frequently programmers coming to Ruby from languages like Java, C++/C#, PHP, VB.Net, and other statically &lt;em&gt;and&lt;/em&gt; dynamically typed languages think that dynamic typing is the extent of what is dynamic about Ruby[1]. Chapter 11 of The Ruby Way will greatly disabuse them of this notion and put them on the pathway to Ruby mastery.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.vitarara.org/cms/the_most_important_chapter_on_ruby&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.vitarara.org/cms/the_most_important_chapter_on_ruby#comment</comments>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/89">Metaprogramming</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/7">Programming</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/82">Ruby</category>
 <pubDate>Wed, 28 Jan 2009 16:30:54 -0500</pubDate>
 <dc:creator>Mark</dc:creator>
 <guid isPermaLink="false">172 at http://www.vitarara.org/cms</guid>
</item>
<item>
 <title>Ruby Metaprogramming: Declaratively Adding Methods to a Class</title>
 <link>http://www.vitarara.org/cms/ruby_metaprogamming_declaratively_adding_methods_to_a_class</link>
 <description>&lt;p&gt;In this brief piece I will examine Ruby&#039;s support for metaprogramming and how to define class level methods that add instance methods to our class implementations at run time.&lt;/p&gt;
&lt;p&gt;Over the past few months I&#039;ve been learning Ruby on Rails. One of the most attractive features of Rails its declarative style of defining relationships and validations on models; and filters on actions. &lt;/p&gt;
&lt;p&gt;A simple example of this declarative style:&lt;/p&gt;
&lt;pre&gt;
class Party &amp;lt; ActiveRecord::Base
  has_many :addresses
end
&lt;/pre&gt;&lt;p&gt;
This class defines a Party model that can have many addresses. The simple &quot;has_many :addresses&quot; declaration is a great example of the power of Ruby. This simple statement adds a number of methods to our Party class, and allows us to easily manage relationships between our parties and their addresses.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.vitarara.org/cms/ruby_metaprogamming_declaratively_adding_methods_to_a_class&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.vitarara.org/cms/ruby_metaprogamming_declaratively_adding_methods_to_a_class#comment</comments>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/89">Metaprogramming</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/82">Ruby</category>
 <pubDate>Sun, 27 Jan 2008 22:36:01 -0500</pubDate>
 <dc:creator>Mark</dc:creator>
 <guid isPermaLink="false">158 at http://www.vitarara.org/cms</guid>
</item>
</channel>
</rss>

