<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>the Wagaman Web &#187; Ruby on Rails</title>
	<atom:link href="http://wagaman.org/category/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://wagaman.org</link>
	<description>thoughts, theories, theology, and the rest</description>
	<lastBuildDate>Sat, 05 Jun 2010 18:18:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Core of the Core: Reflection Talk</title>
		<link>http://wagaman.org/2010/core-of-the-core-reflection-talk/</link>
		<comments>http://wagaman.org/2010/core-of-the-core-reflection-talk/#comments</comments>
		<pubDate>Mon, 17 May 2010 23:34:02 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=312</guid>
		<description><![CDATA[Tonight at the Columbus Ruby Brigade meeting, I gave part two of my &#8220;Core of the Core&#8221; speaking series. Part two was on Reflection in Ruby. Core of the Core: Reflection Presentation]]></description>
			<content:encoded><![CDATA[<p><a href="http://wagaman.org/wp-content/uploads/2010/05/ruby-reflection.jpg"><img src="http://wagaman.org/wp-content/uploads/2010/05/ruby-reflection.jpg" alt="ruby reflection" title="ruby reflection" width="135" height="150" class="alignright size-full wp-image-315" /></a>Tonight at the <a href="http://www.columbusrb.com/">Columbus Ruby Brigade</a> meeting, I gave part two of my &#8220;Core of the Core&#8221; speaking series.</p>
<p>Part two was on <strong>Reflection</strong> in Ruby.</p>
<p><a href='http://wagaman.org/wp-content/uploads/2010/05/Reflection.pdf'>Core of the Core: Reflection Presentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2010/core-of-the-core-reflection-talk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Core of the Core: Class Class</title>
		<link>http://wagaman.org/2010/core-of-the-core-class-class/</link>
		<comments>http://wagaman.org/2010/core-of-the-core-class-class/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 23:36:32 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=307</guid>
		<description><![CDATA[Here is the presentation from my Class Class Talk at the Columbus Ruby Brigade tonight.]]></description>
			<content:encoded><![CDATA[<p><a href='http://wagaman.org/wp-content/uploads/2010/04/Class_Class.pdf'>Here is the presentation from my Class Class Talk</a> at the <a href="http://www.columbusrb.com/">Columbus Ruby Brigade</a> tonight.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2010/core-of-the-core-class-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOLID design principles</title>
		<link>http://wagaman.org/2009/solid-design-principles/</link>
		<comments>http://wagaman.org/2009/solid-design-principles/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 13:01:52 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=290</guid>
		<description><![CDATA[I&#8217;m electronifying my notes from conferences and such. Here&#8217;s my notes from Jim Weirich&#8217;s SOLID design principles in Ruby talk from eRubyCon 2009. 1.) Single Responsibility Principle a class should have 1 reason to exist describe the purpose of your class in a single sentence (you shouldn&#8217;t need and/or) 2.) Open/Closed Principle you should be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m electronifying my notes from conferences and such.  Here&#8217;s my notes from Jim Weirich&#8217;s SOLID design principles in Ruby talk from eRubyCon 2009.</p>
<p>1.) Single Responsibility Principle<br />
a class should have 1 reason to exist<br />
describe the purpose of your class in a single sentence (you shouldn&#8217;t need and/or)</p>
<p>2.) Open/Closed Principle<br />
you should be able to extend a class&#8217; behavior without modifying it</p>
<p>3.) Liskov Substitution Priniciple<br />
require no more, promise no less</p>
<p>4.) Interface Segregation Principle</p>
<p>5.) Dependency Inversion Principle<br />
depend on abstractions, not concrete-tions</p>
<p>** Note that my notes are a little bit shotty, because the days prior to the conference I was totally totally strapped at work and thus rest-deprived.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2009/solid-design-principles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing my patience. A skeptic&#8217;s thoughts on beginning to write tests</title>
		<link>http://wagaman.org/2009/testing-my-patience-a-skeptics-thoughts-on-beginning-to-write-tests/</link>
		<comments>http://wagaman.org/2009/testing-my-patience-a-skeptics-thoughts-on-beginning-to-write-tests/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 03:43:43 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=220</guid>
		<description><![CDATA[It&#8217;s been a long time since I posted anything in my blog, so I thought I ought to break the silence. Lately, I&#8217;ve been trying to get myself caught up on the test-driven/behavior-driven development philosophy. If you are a programmer, maybe you can relate to my struggles of learning how to get it right. Test-Driven [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I posted anything in my blog, so I thought I ought to break the silence.  Lately, I&#8217;ve been trying to get myself caught up on the test-driven/behavior-driven development philosophy.  If you are a programmer, maybe you can relate to my struggles of learning how to get it right.</p>
<p>Test-Driven Development is a programming philosophy that encourages the developer to specify test test conditions before writing the code to meet the specification. To me, this is counter-intuitive. I guess I am naturally a brute and think the best way to figure something out is to play with it, and than after a while it should just work.</p>
<p>Ironically, the chapter on Testing in the Agile Web Development with Rails book comes well after the first attempts at hammering out Rails code for a shopping cart application.  I understand why the book is written the way that it is, and am greatly appreciative of the book, but there ought to be a Test-Driven version of the same tutorial, so that people can see first-hand how to test-first in development.</p>
<p>It also hasn&#8217;t helped that my first attempt at writing tests have been less than perfect too.  I&#8217;ll end up writing 6 or 7 lines of test code to test one case for a method. The verboseness of tests has negatively reinforced me in to thinking that testing is hard. </p>
<p>What&#8217;s more frustrating is that I&#8217;ve heard expert developers talk about only having a line or two of test code to test a method.  This has seemed to me to be an unatainable ideal.  How are you supposed to test code that is ten lines long (or more) with one or two lines of test code? That&#8217;s unpossible.</p>
<p>But, recently I came to the realization that if the methods I am writing are smaller and do more specific things, then they are a whole lot easier to test.  This is mostly because the tests can move towards the ideal of the expert: short, meaningful, specifications.  This in turn helps me to actually write the test first, because I know I can specify the behavior of code that is less complex.</p>
<p>Some of the recent developments in <a href="http://rspec.info">RSpec</a> have helped this ideal even further. For instance, see <a href="http://blog.davidchelimsky.net/2009/1/13/rspec-1-1-12-is-released">David Chelimsky&#8217;s post on RSpec 1.1.12</a> He notes that what you could have done </p>
<p>In order to test this:</p>
<pre><code>class Person
  validates_presence_of :email
end
</code></pre>
<p>You would have in previous versions of RSpec written:</p>
<pre><code>describe Person do
  it "should validate presence of email" do
    person = Person.new(:email => nil)
    person.should_not be_valid
    person.should have(1).error_on(:email)
  end
end
</code></pre>
<p>In RSpec 1.1.12, you can reduce this down to the following:</p>
<pre><code>describe Person do
  it { should validate_presence_of(:email) }
end
</code></pre>
<p>This is due to:</p>
<ul>
<li>an implicit receiver from the describe block Person.new</li>
<li>custom matchers for validate_presence_of (which are available through plugins like rspec-on-rails-matchers or you can make your own matchers</li>
<li>self commenting specification code</li>
</ul>
<p>Three lines of code.  Three lines of test.  That&#8217;s pretty darn cool.  Perhaps, it&#8217;s not possible to have a line by line spec for everything, but this is a lot better than before.</p>
<p>I&#8217;ve still got a fair bit of inertia to overcome before I&#8217;ve got TDD under my belt. The more I  tell myself that test-driven development is less about testing than it is about developing well-written code, the more motivated I am to do it.  I hope this is an encouragement to unit testing newbies.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2009/testing-my-patience-a-skeptics-thoughts-on-beginning-to-write-tests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MyRubyClass.reload!</title>
		<link>http://wagaman.org/2008/myrubyclassreload/</link>
		<comments>http://wagaman.org/2008/myrubyclassreload/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 20:46:18 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=213</guid>
		<description><![CDATA[Today I was writing some specs with RSpec, the Ruby BDD Testing Framework. In between tests, classes aren&#8217;t reloaded by default, so I went about try to figure out how to reload a class for certain tests. Active Support defines a method on Class called remove_class. This provides half of the equation. The other half [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was writing some specs with <a href="http://rspec.info/">RSpec</a>, the Ruby BDD Testing Framework.  In between tests, classes aren&#8217;t reloaded by default, so I went about try to figure out how to reload a class for certain tests.</p>
<p>Active Support defines a method on Class called <a href="http://www.noobkit.com/show/ruby/rails/rails-stable/activesupport/class/remove_class.html">remove_class</a>. This provides half of the equation.  The other half was to reload the class again.  So, I wrote a method on the Object class that should handle most cases.  Note, this may not work with namespaced classes, but it did the quick and dirty job of helping my specs to reload the class.</p>
<pre><code># Call this method like
# MyRubyClass.reload!
# or
# MyRubyClass.reload!('/path/to/file/my_ruby_class.rb')
class Object
  def reload!(file = nil)
    remove_class(self)
    load(file || "#{self.to_s.underscore}.rb")
  end
end
</code></pre>
<p>All I needed to do was then call this method when I needed to reload the class.</p>
<p><code>MyRubyClass.reload!</code></p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2008/myrubyclassreload/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RailsConf Speakers</title>
		<link>http://wagaman.org/2008/railsconf-speakers/</link>
		<comments>http://wagaman.org/2008/railsconf-speakers/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 16:50:38 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://wagaman.org/?p=209</guid>
		<description><![CDATA[Speakers for the main sessions of RailsConf 2008 are available now. A number of Columbus/Cincinnati Rubyists are showing: Jim Weirich, Joe O&#8217;Brien, Aaron Bedra, Dan Manges. I wish I could go. Oh well, maybe next year On another note, Blip TV has a number of the keynotes from RailsConf 2007 online.]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.oreilly.com/rails2008/public/schedule/topic/General">Speakers for the main sessions of RailsConf 2008</a> are available now.  A number of Columbus/Cincinnati Rubyists are showing: Jim Weirich, Joe O&#8217;Brien, Aaron Bedra, Dan Manges. I wish I could go.  Oh well, maybe next year</p>
<p>On another note, <a href="http://railsconf.blip.tv/">Blip TV has a number of the keynotes from RailsConf 2007 online</a>.</p>
<p><embed src="http://blip.tv/play/AwGGvAQ" type="application/x-shockwave-flash" width="450" height="370" allowscriptaccess="always" allowfullscreen="true"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2008/railsconf-speakers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Rails 2.0</title>
		<link>http://wagaman.org/2007/upgrading-to-rails-20/</link>
		<comments>http://wagaman.org/2007/upgrading-to-rails-20/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 17:45:51 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wagaman.org/2007/upgrading-to-rails-20/</guid>
		<description><![CDATA[With Rails 2.0 out now, it&#8217;s time to explore the new source. It&#8217;s hard to believe that it&#8217;s already been 2 years since I first checked out Rails 1.0 for the first time. To update your Rails code, you can run gem update rails However, when I tried to run this command I was unfortunately [...]]]></description>
			<content:encoded><![CDATA[<p>With Rails 2.0 out now, it&#8217;s time to explore the new source.  It&#8217;s hard to believe that it&#8217;s already been 2 years since I first checked out Rails 1.0 for the first time.</p>
<p>To update your Rails code, you can run<br />
<code>gem update rails</code></p>
<p>However, when I tried to run this command I was unfortunately greeted with a nasty error, when getting to update ActiveRecord.</p>
<p><code>Attempting remote update of activerecord<br />
ERROR:  While executing gem ... (Zlib::BufError)<br />
    buffer error</code></p>
<p>According to a <a href="http://www.ruby-forum.com/topic/134400">Ruby Form post</a>, I found a solution to the problem, updating ruby gems.</p>
<p>While you could run this line to update RubyGems to 0.9.5, I don&#8217;t recommend it.<br />
<code>gem update --system</code></p>
<p>Instead download <a href="http://rubyforge.org/frs/download.php/20990/rubygems-0.9.4.zip">rubygems-0.9.4</a>, unzip it and then run<br />
<code>ruby setup.rb</code></p>
<p>This will allow you to continue to use Mongrel, because there are some incompatibilities with Mongrel running on Win32 with RubyGems 0.9.5. See the following:</p>
<ul>
<li><a href="http://justaddwater.dk/2007/12/09/rails-20-gem-install-windows-mongrel-trouble/">justaddwater.dk blog</a></li>
<li><a href="http://www.ruby-forum.com/topic/133033">Ruby Forum Topic: Mongrel install crash on win32</a></li>
</ul>
<p>and then update rails as you would expect.<br />
<code>gem update rails</code></p>
<p>Voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2007/upgrading-to-rails-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Rankaroo</title>
		<link>http://wagaman.org/2007/introducing-rankaroo/</link>
		<comments>http://wagaman.org/2007/introducing-rankaroo/#comments</comments>
		<pubDate>Fri, 02 Feb 2007 19:05:39 +0000</pubDate>
		<dc:creator>Ben Wagaman</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://wagaman.org/2007/introducing-rankaroo/</guid>
		<description><![CDATA[<a href="http://www.rankaroo.com/contest/referral/23"><img src="/wp-content/rankaroo_logo.jpg" alt="rankaroo" style="margin: 0 0 10px 10px; float: right" /></a> After many months of hard labor, I am emerging victorious with my first large-scale web application called Rankaroo.  Rankaroo helps you organize your interests, share them with others, and connect with like-minded people.  Everyone is a guru at something.  Whether it's that you know about ski lodges in the Alps or Greek Mythology or Hip Hop, whatever it is you have something to keep organized and share with the world.  As we each share our interests we all benefit from mutual discovery.

In the traditional browser way of storing your favorites, you would put your favorites in a hierarchical set of folders and hope that you can remember where you put them later.  A few years ago, some sites like del.icio.us introduced the idea of eliminating the hierarchy and using tags instead (basically words).  But while this makes it easier to find things later, it's relatively difficult to find a cross section of these tags, plus you basically throw out your normal grammar in favor of an alphabet soup of words.

Rankaroo is based strongly on the Connect-by-Clicks technology.  Connect-by-Clicks is a system that turns simple language into connective tissue.  It works as following.

You want to categorize the following web site.  http://espn.go.com
Just type a simple phrase.  For instance.  <strong>espn sports news and scores</strong>

What Connect-by-Clicks does is creates interconnections between these words.  So, later you could find this favorite by going to <strong>sports -> scores</strong> or <strong>espn -> news</strong> or <strong>espn -> sports -> scores</strong>.

<a href="http://www.rankaroo.com/favorites/sports+news"><img src="/wp-content/rankaroo_scr.gif" alt="" style="margin: 0 0 10px 10px; float: right" /></a>While this is cool in itself, it's not nearly as cool as when hundred of people are all doing the same.  If my friend, Joe, enters a favorite on his basketball team and categorizes it by the phrase <strong>knicks basketball team scores</strong>, if I was searching for <strong>scores</strong>, I would find out about his basketball team.

You'll have to experience the power of <a href="http://www.rankaroo.com/favorites/sports+news">Connect-by-Clicks</a> yourself to see what I mean.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rankaroo.com/contest/referral/23"><img src="/wp-content/rankaroo_logo.jpg" alt="rankaroo" style="margin: 0 0 10px 10px; float: right" /></a> After many months of hard labor, I am emerging victorious with my first large-scale web application called Rankaroo.  Rankaroo helps you organize your interests, share them with others, and connect with like-minded people.  Everyone is a guru at something.  Whether it&#8217;s that you know about ski lodges in the Alps or Greek Mythology or Hip Hop, whatever it is you have something to keep organized and share with the world.  As we each share our interests we all benefit from mutual discovery.</p>
<p>In the traditional browser way of storing your favorites, you would put your favorites in a hierarchical set of folders and hope that you can remember where you put them later.  A few years ago, some sites like del.icio.us introduced the idea of eliminating the hierarchy and using tags instead (basically words).  But while this makes it easier to find things later, it&#8217;s relatively difficult to find a cross section of these tags, plus you basically throw out your normal grammar in favor of an alphabet soup of words.</p>
<p>Rankaroo is based strongly on the Connect-by-Clicks technology.  Connect-by-Clicks is a system that turns simple language into connective tissue.  It works as following.</p>
<p>You want to categorize the following web site.  http://espn.go.com<br />
Just type a simple phrase.  For instance.  <strong>espn sports news and scores</strong></p>
<p>What Connect-by-Clicks does is creates interconnections between these words.  So, later you could find this favorite by going to <strong>sports -> scores</strong> or <strong>espn -> news</strong> or <strong>espn -> sports -> scores</strong>.</p>
<p><a href="http://www.rankaroo.com/favorites/sports+news"><img src="/wp-content/rankaroo_scr.gif" alt="" style="margin: 0 0 10px 10px; float: right" /></a>While this is cool in itself, it&#8217;s not nearly as cool as when hundred of people are all doing the same.  If my friend, Joe, enters a favorite on his basketball team and categorizes it by the phrase <strong>knicks basketball team scores</strong>, if I was searching for <strong>scores</strong>, I would find out about his basketball team.</p>
<p>You&#8217;ll have to experience the power of <a href="http://www.rankaroo.com/favorites/sports+news">Connect-by-Clicks</a> yourself to see what I mean.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagaman.org/2007/introducing-rankaroo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
