<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Yet Another Ruby on Rails Blog</title>
	<atom:link href="http://yarorb.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yarorb.wordpress.com</link>
	<description>Ruby, Rails, On... that stuff.</description>
	<lastBuildDate>Tue, 06 May 2008 14:17:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='yarorb.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Yet Another Ruby on Rails Blog</title>
		<link>http://yarorb.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://yarorb.wordpress.com/osd.xml" title="Yet Another Ruby on Rails Blog" />
	<atom:link rel='hub' href='http://yarorb.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Underscore and classify</title>
		<link>http://yarorb.wordpress.com/2008/05/06/underscore-and-classify/</link>
		<comments>http://yarorb.wordpress.com/2008/05/06/underscore-and-classify/#comments</comments>
		<pubDate>Tue, 06 May 2008 14:16:50 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[classify]]></category>
		<category><![CDATA[helpers]]></category>
		<category><![CDATA[Kernel.get_const]]></category>
		<category><![CDATA[underscore]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/?p=12</guid>
		<description><![CDATA[These are two Rails helpers that could be very useful when injecting new instance methods in a class. underscore Converts from a class name to a underscore attribute. classify Inverse method from underscore. Both, combined with singularize and pluralize, allows us to handle parent/child methods in a very handy way. For example: or things like<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=12&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These are two Rails helpers that could be very useful when injecting new instance methods in a class.</p>
<p><strong>underscore</strong></p>
<p>Converts from a class name to a underscore attribute.</p>
<p><pre class="brush: ruby;">

&gt;&gt; 'MyClassName'.underscore =&gt; my_class_name

</pre></p>
<p><strong>classify</strong></p>
<p>Inverse method from underscore.</p>
<p><pre class="brush: ruby;">

  &gt;&gt; &quot;cool_articles&quot;.classify
=&gt; &quot;CoolArticles&quot;

&gt;&gt; &quot;comment&quot;.classify
=&gt; &quot;Comment&quot;

</pre></p>
<p>Both, combined with singularize and pluralize, allows us to handle parent/child methods in a very handy way. For example:</p>
<p><pre class="brush: ruby;">

elements_in_ = self.send(parent).send(self.class.to_s.pluralize.underscore)

</pre></p>
<p>or things like</p>
<p><pre class="brush: ruby;">

Kernel.const_get(table_model.to_s.classify).find(:all) #Kernel.const_get gets an string and retrieves the class.

</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=12&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2008/05/06/underscore-and-classify/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>Procs &#8216;n&#8217; blocks</title>
		<link>http://yarorb.wordpress.com/2008/05/01/procs-n-blocks/</link>
		<comments>http://yarorb.wordpress.com/2008/05/01/procs-n-blocks/#comments</comments>
		<pubDate>Thu, 01 May 2008 10:05:44 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[blocks]]></category>
		<category><![CDATA[lambda]]></category>
		<category><![CDATA[procs]]></category>
		<category><![CDATA[yield]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/?p=11</guid>
		<description><![CDATA[A block in Ruby is an expression delimited by braces that has, to try to put it simple, no life by itself. Thus if we write: we&#8217;ll get a compile error. But blocks can be very powerful and go by the hand with other important concept in Ruby, namely the Procs. Procs, put again in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=11&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A block in Ruby is an expression delimited by braces that has, to try to put it simple, no life by itself. Thus if we write:</p>
<p><pre class="brush: ruby;">

irb(main):001:0&gt; {|x| x*x}
SyntaxError: compile error
</pre><br />
we&#8217;ll get a compile error. But blocks can be very powerful and go by the hand with other important concept in Ruby, namely the Procs. Procs, put again in a simple way, are blocks given life, thus are blocks bounded to some variables they can work with. To create a new proc, we can simply call the constructor of the class Proc or the kernel reserved word lambda, what will get us to the same thing, except that the latter will provide us argument checking. Thus:</p>
<p><pre class="brush: ruby;">

irb(main):002:0&gt; my_proc = Proc.new{|x| x*x}
=&gt; #&lt;Proc:0x00006a7c@(irb):2&gt;
irb(main):003:0&gt; my_other_proc = lambda{|x| x*x}
=&gt; #&lt;Proc:0x00086640@(irb):3&gt;
irb(main):005:0&gt; my_proc.call(5)
=&gt; 25
irb(main):006:0&gt; my_other_proc.call(5, 4)
(irb):3: warning: multiple values for a block parameter (2 for 1)
        from (irb):7
TypeError: can't convert Array into Integer
        from (irb):3:in `*'
        from (irb):3
        from (irb):7
        from :0
irb(main):007:0&gt; my_other_proc.call(5)
=&gt; 25

</pre><br />
Notice that a proc is executed by using the reserved word call. That means that we have to use it instead of yield when we are passing a proc rather than a block to a method:</p>
<p><pre class="brush: ruby;">

irb(main):032:0&gt; def gimme_those_five
irb(main):033:1&gt; 5.times {yield}
irb(main):034:1&gt; end
=&gt; nil
irb(main):035:0&gt; gimme_those_five{puts &quot;hi&quot;}
hi
hi
hi
hi
hi
=&gt; 5

</pre></p>
<p>but</p>
<p><pre class="brush: ruby;">

irb(main):038:0&gt; def gimme_just_one(kind)
irb(main):039:1&gt; kind.call
irb(main):040:1&gt; end
=&gt; nil
irb(main):041:0&gt; gimme_just_one lambda{puts &quot;hi&quot;}
hi
=&gt; nil

</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=11&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2008/05/01/procs-n-blocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>A handy enumerable to integer mapper creator</title>
		<link>http://yarorb.wordpress.com/2008/03/13/a-handy-enumerable-to-integer-mapper-creator/</link>
		<comments>http://yarorb.wordpress.com/2008/03/13/a-handy-enumerable-to-integer-mapper-creator/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 14:29:51 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[database mapping]]></category>
		<category><![CDATA[enumerables]]></category>
		<category><![CDATA[Hash]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/?p=10</guid>
		<description><![CDATA[This class allows the dynamical creation of enumerable types mapped to integers in the database, starting from 0. The constructor will take a list of symbols representing the keys and will create a Hash that will map each key to one integer value. Once created, we can have access to the Hash via the method [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=10&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: ruby;">
class EnumerableAttribute

  attr_reader :values

  def initialize(*args)

    @values = Hash.new

    0.upto(args.size-1) do |i|
      @values[args[i].to_s] = i
    end

    @values.each do |key, value|
      EnumerableAttribute.class_eval do
        define_method key do
          value
        end
      end
    end
  end
end

</pre>This class allows the dynamical creation of enumerable types mapped to integers in the database, starting from 0. The constructor will take a list of symbols representing the keys and will create a Hash that will map each key to one integer value. Once created, we can have access to the Hash via the method values or to the integer value of each key via the method called like the symbol.</p>
<p>E.g.</p>
<p><pre class="brush: ruby;">
class Car
  include EnumerableAttribute
end

&gt;&gt; engine_type = Car::EnumerableAttribute.new(:diesel, :gasoline, :solar)
=&gt; #&lt;EnumerableAttribute::EnumerableAttribute:0x2467f5c @values={&quot;diesel&quot;=&gt;0, &quot;gasoline&quot;=&gt;1, &quot;solar&quot; =&gt;2}&gt;

&gt;&gt; engine_type.values
=&gt; {&quot;diesel&quot;=&gt;0, &quot;gasoline&quot;=&gt;1, &quot;solar&quot; =&gt;2}

&gt;&gt; engine_type.gasoline
=&gt; &quot;1

</pre>Enjoy! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=10&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2008/03/13/a-handy-enumerable-to-integer-mapper-creator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on rails certifications</title>
		<link>http://yarorb.wordpress.com/2007/12/06/ruby-on-rails-certifications/</link>
		<comments>http://yarorb.wordpress.com/2007/12/06/ruby-on-rails-certifications/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 15:43:41 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[Certifications]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[java black belt]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/2007/12/06/ruby-on-rails-certifications/</guid>
		<description><![CDATA[&#160; There are none so far. Neither for only the Ruby language. Official certifications, I mean. The Java unofficial certification community JavaBlackBelt has a beta exam for Ruby certification. Yes, it’s still a beta because the number of questions on their database so far is not enough to release the exam. So if you are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=9&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="snap_preview">&nbsp;</p>
<p>There are none so far.</p>
<p>Neither for only the Ruby language.</p>
<p>Official certifications, I mean. The Java unofficial certification community <a href="http://www.javablackbelt.com/">JavaBlackBelt</a> has a <a href="http://www.answers.com/topic/beta?nafid=22" class="answerlink">beta</a> exam for Ruby certification. Yes, it’s still a beta because the number of questions on their database so far is not enough to release the exam. So if you are a Ruby programmer and you are willing to collaborate, you can start taking a look at the <a href="http://www.javablackbelt.com/QuestionnaireDefDisplay.wwa;jsessionid=F8457495B21F5648B6B19FDD916138C1?questPublicId=01548">exam objectives</a> and writing some questions for them.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=9&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2007/12/06/ruby-on-rails-certifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>Understanding Ruby symbols</title>
		<link>http://yarorb.wordpress.com/2007/12/04/understanding-ruby-symbols/</link>
		<comments>http://yarorb.wordpress.com/2007/12/04/understanding-ruby-symbols/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 16:02:03 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[symbols]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/2007/12/04/understanding-ruby-symbols/</guid>
		<description><![CDATA[Symbols are one of the most misunderstood Ruby features. Let&#8217;s try to explain it as lay as possible. The way I finally catched it is thinking about symbols as constants, whose value is the same as their name. The same as the integer 5 has the name 5 and the value 5, the symbol :thing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=8&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Symbols are one of the most misunderstood Ruby features. Let&#8217;s try to explain it as lay as possible.</p>
<p>The way I finally catched it is thinking about symbols as <strong>constants, whose value is the same as their name</strong>. The same as the integer 5 has the name 5 and the value 5, the symbol :thing has the name thing and the value &#8220;thing&#8221;. That&#8217;s why we can open an irb and do this:</p>
<p><pre class="brush: ruby;">

irb(main):008:0&gt; puts :myname
myname
=&gt; nil
irb(main):009:0&gt; :myname
=&gt; :myname

</pre><br />
Remember, <strong>symbols are not strings</strong>, therefore this is not possible:<br />
<pre class="brush: ruby;">

irb(main):010:0&gt; puts :myname + :othername
NoMethodError: undefined method `+' for :myname:Symbol
        from (irb):10

</pre><br />
Instead we can get the value of the symbol, and convert it to a String to get this:<br />
<pre class="brush: ruby;">

irb(main):011:0&gt; puts :myname.to_s + :othername.to_s

mynameothername

=&gt; nil

</pre><br />
<strong>Very cute. So what&#8217;s the point?</strong><strong>Symbols are mainly used to save memory</strong>. They have only one occurrence within a Ruby program, while strings with the same name are stored in different positions of memory every time. Check this:</p>
<p><pre class="brush: ruby;">

irb(main):012:0&gt; &quot;string&quot;.object_id
=&gt; 24125620
irb(main):013:0&gt; &quot;string&quot;.object_id
=&gt; 24122170
irb(main):014:0&gt; :string.object_id
=&gt; 68258
irb(main):015:0* :string.object_id
=&gt; 68258

</pre><br />
And don&#8217;t forget that <strong>symbols are objects</strong>, just like everything in Ruby. They have a name and a string value, as we said, but an integer value to be recognized by the program as well, a value that is always constant. That brings many performance benefits (while comparing symbols, for example). They are like strings with a value that must not be changed.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=8&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2007/12/04/understanding-ruby-symbols/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on Rails screencasts</title>
		<link>http://yarorb.wordpress.com/2007/12/03/ruby-on-rails-screencasts/</link>
		<comments>http://yarorb.wordpress.com/2007/12/03/ruby-on-rails-screencasts/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 18:28:36 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[screencasts]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/2007/12/03/ruby-on-rails-screencasts/</guid>
		<description><![CDATA[A fast post just to recommend a couple of links for those looking for Rails tutorials in video (screencasts). For people yet not involved with Rails, the official Rails webpage gives somes good video examples on what is Rails about. For people currently working with Rails we have the podcast Railscasts, which is constantly actualized [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=7&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A fast post just to recommend a couple of links for those looking for Rails tutorials in video (screencasts).</p>
<p>For people yet not involved with Rails, the official Rails webpage gives <a href="http://www.rubyonrails.org/screencasts">somes good video examples</a> on what is Rails about.</p>
<p>For people currently working with Rails we have the podcast <a href="http://railscasts.com/">Railscasts</a>, which is constantly actualized and brings a new screencast every 10 days aprox.</p>
<p>And for people interested not only in the Rails framework, <a href="http://www.bestechvideos.com/">BestTechVideos</a> provides technical videos  about Ruby on Rails and other languages and frameworks.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=7&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2007/12/03/ruby-on-rails-screencasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>Nice helper for testing model validation</title>
		<link>http://yarorb.wordpress.com/2007/12/03/nice-helper-for-testing-models/</link>
		<comments>http://yarorb.wordpress.com/2007/12/03/nice-helper-for-testing-models/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 14:24:32 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/2007/12/03/nice-helper-for-testing-models/</guid>
		<description><![CDATA[I found this this morning in Mr. Matt&#8217;s blog. Is a fantastic helper method to save us work testing our ActiveRecord models validation, available under the Creative Commons Attribution 2.0 UK: England &#38; Wales License. And is used as easy as this:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=6&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I found this this morning in <a href="http://matthall.wordpress.com">Mr. Matt&#8217;s blog</a>. Is a fantastic helper method to save us work testing our ActiveRecord models validation, available under the <a href="http://creativecommons.org/licenses/by/2.0/uk/" rel="license">Creative Commons Attribution 2.0 UK: England &amp; Wales License</a>.</p>
<p><pre class="brush: ruby;">

# In test_helper.rb 
  # Give this function an array of invalid values, an array of valid values, the object and 
  # attribute name to test, and it will ensure that only valid values are allowed 
  def validation_tester ( valid_values, invalid_values, attribute_name, test_object ) 
    valid_values.each do |val| 
      test_object.[]=(attribute_name, val) 
      assert test_object.save, &quot;#{attribute_name} should be valid: #{test_object.[](attribute_name)}&quot; 
      assert test_object.valid? 
      assert !test_object.errors.invalid?(attribute_name) 
    end  

    invalid_values.each do |val| 
      test_object.[]=(attribute_name, val) 
      assert !test_object.save, &quot;#{attribute_name} should NOT be valid: #{val}&quot; 
      assert !test_object.valid? 
      assert test_object.errors.invalid?(attribute_name) 
    end

end

</pre>And is used as easy as this:</p>
<p><pre class="brush: ruby;">

def test_email_validation
    valid_emails = ['matt@test.com', 'matt.hall@test.com', 'matt@test.ing.com', 'matt.hall@test.ing.com']
    invalid_emails = ['@test.com', 'test.com', 'matt@', 'matt.hall@com', '.matt@test.ing.co.uk', 'matt@@test.com', '', '.@.']

    u = create_user
    validation_tester( valid_emails, invalid_emails, 'email', u)
  end

</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=6&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2007/12/03/nice-helper-for-testing-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>Mocks and stubs in Ruby on Rails. The Mocha solution.</title>
		<link>http://yarorb.wordpress.com/2007/11/26/mocks-and-stubs-in-ruby-on-rails-the-mocha-solution/</link>
		<comments>http://yarorb.wordpress.com/2007/11/26/mocks-and-stubs-in-ruby-on-rails-the-mocha-solution/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 15:03:44 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/2007/11/26/mocks-and-stubs-in-ruby-on-rails-the-mocha-solution/</guid>
		<description><![CDATA[&#160; We know that we want our tests to be repeatable, simple and fast. Fast is the key word here. Some tests involve tasks that we don’t want to be run because they involve high time consumption. A classic example is trying to avoid the connection to the database when is not neccessary. This testing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=4&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="snap_preview">&nbsp;</p>
<p>We know that we want our tests to be repeatable, simple and fast. <strong>Fast</strong> is the key word here. Some tests involve tasks that we don’t want to be run because they involve high time consumption. A classic example is trying to avoid the connection to the database when is not neccessary. This testing approach has lead to a whole framework called <a href="http://unit-test-ar.rubyforge.org/">UnitRecord</a> that allows us to test <a href="http://www.answers.com/topic/active-record-pattern?nafid=22" class="answerlink">ActiveRecord</a> models without hitting the database. This nicely wrapped gem <a href="http://muness.blogspot.com/2006/12/unit-testing-rails-activerecord-classes.html">makes use of stubs for faking database columns.</a> But no so fast; let’s explain before what are stubs and mocks.</p>
<p>First of all should we point the difference (huge difference) between mocking and stubbing, as some times is not well understood. Stubs and mocks are similar concepts that drive to <strong>completely different testing philosophies</strong>, the classic <a href="http://www.answers.com/topic/tdd?nafid=22" class="answerlink">TDD</a> (Test Driven Development) and the fairly new <a href="http://dannorth.net/introducing-bdd/">BDD (Behaviour Driven Development)</a>.</p>
<p>On one hand, we would want to test our classes and methods by the results they give to us. If we have a method that takes an array of integers and returns it in ascendant order, we should consider writing a test which will take the array [4,3,5] and check that the result will be [3,4,5]. We don’t care about <strong>how</strong> our software do that, we care about whether <strong>what</strong> our software is giving as a result. This is classic TDD.On the other hand, we know that there are different algorithms for sorting an array. Maybe we were using an easy insertion sort algorithm, then we realised that the sets of numbers were getting bigger and bigger and decided to switch to a quick sort. The method is the same, the result as well, the way it does it is different. Testing our software paying attention at <strong>how</strong> it does it (and thus giving to the test cases our expectations on what the software is going to do in order to solve the task) is BDD.</p>
<p>A still-awake reader would have noticed that <strong><a href="http://www.answers.com/topic/barbados?nafid=22" class="answerlink">BBD</a> involves highly coupled tests</strong>. A mock will have our expectations on the behaviour of the method declared, and our expectations will change every time we change the internal algorithm of our method. This is, I think, the biggest drawback of BDD and mocks. It has many advantages though, especially about the need to think about the design of our software from the very begging, when we are writing our test (yes, <strong>before </strong>start coding the real app), <a href="http://googletesting.blogspot.com/2007/02/tott-naming-unit-tests-responsibly.html">if you name correctly your tests cases</a>, of course. BDD promotes also some good design techniques and autocomments the implementation code on the test (as we are describing there how our code works). Martin Fowler has <a href="http://martinfowler.com/articles/mocksArentStubs.html">an excellent article</a> comparing advantages and disadvantages of both approaches, with some examples written in <a href="http://www.answers.com/topic/java-programming-language?nafid=22" class="answerlink">Java</a>. And if you decide to go BDD, you should check <a href="http://rspec.rubyforge.org/">RSpec</a> for Ruby.If you still have to decide, we have in Ruby a marvellous tool that allows us to stub and mock with one single framework, called <a href="http://mocha.rubyforge.org/">Mocha</a>. RoR developers coming from Java will be happy as the syntax of Ruby Mocha is intended to be as close as possible to <strong>JMock</strong>. Here it is a brief test example of mocking:</p>
<p><pre class="brush: ruby;">
def test_should_start_engine
	engine=mock('engine')
	car=Car.new(engine)
	engine.expects(:start)
	car.start
end</pre>And an example of stubbing with Mocha:</p>
<p><pre class="brush: ruby;">
def test_should_return_false_for_failed_print
	document = stub(&quot;my document&quot;)
	document.stubs(:print).returns(false)
	ui = View.new(document)
	assert_equal false, ui.print
end</pre>Notice how in the first case we declare our expectations, while in the second case the <strong>assert</strong> the result of the test (this phase is called <strong>verification</strong>). We don’t have verification phase in BDD, thus we don’t have assertions.</p>
<p><strong>Further reading</strong></p>
<ul>
<li>James Mead, <a href="http://blog.floehopper.org/presentations/lrug-mock-objects-2007-07-09/">An Introduction To Mock Objects In Ruby</a>, extracted from a presentation in the London Ruby Group.</li>
<li>Mathew Williams, <a href="http://www.scribd.com/doc/248443/Ruby-on-Rails-or-How-I-Learned-to-Stop-Worrying-and-Love-Web-Application-Testing">How I Learned to Stop Worrying And Love Web Application Testing.</a></li>
<li>Bruce Tate, <a href="http://www-128.ibm.com/developerworks/library/wa-mockrails/">Mocking And Stubbing in Ruby On Rails</a>. The example that Bruce uses to illustrate the difference between mocking and stubbing could be clearer, in my opinion.</li>
<li>Ned Wolpert, <a href="http://www.codeheadsystems.com/blog/archives/142-Ruby-Mocha.html">Ruby Mocha</a>.</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=4&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2007/11/26/mocks-and-stubs-in-ruby-on-rails-the-mocha-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
		<item>
		<title>NetBeans 6.0 Ruby Edition</title>
		<link>http://yarorb.wordpress.com/2007/11/20/netbeans-60-ruby-edition/</link>
		<comments>http://yarorb.wordpress.com/2007/11/20/netbeans-60-ruby-edition/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 17:15:41 +0000</pubDate>
		<dc:creator>kabish</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://yarorb.wordpress.com/2007/11/20/netbeans-60-ruby-edition/</guid>
		<description><![CDATA[For those who definitely don’t like the acclaimed TextMate when developing Ruby on Rails applications, chances were not very wide so far. We had RadRails, a RoR focused IDE, who showed off months ago as a promising working frame in its earliest versions, but has been lately reported that its developers have start loosing interest [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=3&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For those who definitely don’t like the acclaimed <a href="http://www.answers.com/topic/textmate?nafid=22" class="answerlink">TextMate</a> when developing Ruby on Rails applications, chances were not very wide so far. We had RadRails, a RoR focused <a href="http://www.answers.com/topic/integrated-development-environment?nafid=22" class="answerlink">IDE</a>, who showed off months ago as a promising working frame in its earliest versions, but <a href="http://cwilliams.textdriven.com/articles/2007/03/06/radrails-dying-off">has been lately reported</a> that its developers have start loosing interest in improving it. We had also Eclipse, whose Ruby support has been also criticized.The finally we have since September the Ruby edition of the well-known <strong>NetBeans IDE</strong>. We have just installed it, so expect in the next day a comprehensive review. So far, it looks very promising. Let’s take a look at some of its advantages:</p>
<ul>
<li>Only <strong>19Mb</strong> to download, a fair memory consumption and a lot of helpful functionality out of the box.</li>
<li>It ships with <a href="http://lifeonrails.org/images/netbeans/1.png"><strong>code completion</strong></a> that works, extremely useful for those who never manage to learn by heart the rails framework. But also includes <strong>inline documentation</strong> just pressing CTRL + SPACE when typing a keyword.</li>
<li><a href="http://lifeonrails.org/images/netbeans/36.png"><strong>Rake support</strong></a> and generations of models, scaffolds, controllers… just in one click!</li>
<li><strong>Subversion integration</strong> to make your version control easier.</li>
<li>Of course, a lot of helpful <strong>syntax highlighting</strong> and helpers.</li>
<li>Built-in <strong>gem management</strong>!</li>
<li>Run test on the <a href="http://www.answers.com/topic/integrated-development-environment?nafid=22" class="answerlink">IDE</a> and <strong>RSpec support.</strong></li>
</ul>
<p align="left"><a href="http://lifeonrails.org/2007/8/30/netbeans-the-best-ruby-on-rails-ide">Here</a> you can find a great review of the NetBeans IDE, from where I have stealed the screenshots. Also you have the <a href="http://www.netbeans.org/kb/60/flash.html">screencasts</a> of the official NetBeans website.</p>
<p style="text-align:center;">&nbsp;</p>
<p style="text-align:center;" align="left">&nbsp;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/yarorb.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/yarorb.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yarorb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yarorb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yarorb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yarorb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yarorb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yarorb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yarorb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yarorb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yarorb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yarorb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yarorb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yarorb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yarorb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yarorb.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yarorb.wordpress.com&amp;blog=2164871&amp;post=3&amp;subd=yarorb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yarorb.wordpress.com/2007/11/20/netbeans-60-ruby-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad411880cdcaf541c1a3c7268fc479fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kabish</media:title>
		</media:content>
	</item>
	</channel>
</rss>
