<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>ConceptSpace blog feed</title>
		<link>http://conceptspace.wikidot.com</link>
		<description>Open Source Projects,  Blog for Ruby on Rails, Erlang, Firefox, Linux</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://conceptspace.wikidot.com/blog:46</guid>
				<title>Wee!</title>
				<link>http://conceptspace.wikidot.com/blog:46</link>
				<description>

&lt;p&gt;&quot;&lt;a href=&quot;http://www.ntecs.de/projects/wee/doc/rdoc/&quot;&gt;Wee&lt;/a&gt; is a light-weight, very high-level and modern web-framework that makes Web engineering easy. It mainly inherits many ideas and features from Seaside, but was written from scratch without ever looking at the Seaside (or any other) sources. All code was developed from ideas and lots of discussions with &lt;a href=&quot;http://twitter.com/avibryant&quot;&gt;Avi Bryant&lt;/a&gt;.&quot;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 08 Oct 2009 20:39:45 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>"<a href="http://www.ntecs.de/projects/wee/doc/rdoc/">Wee</a> is a light-weight, very high-level and modern web-framework that makes Web engineering easy. It mainly inherits many ideas and features from Seaside, but was written from scratch without ever looking at the Seaside (or any other) sources. All code was developed from ideas and lots of discussions with <a href="http://twitter.com/avibryant">Avi Bryant</a>."</p> <p>Quickly see it working and be amazed:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">sudo</span><span class="hl-code"> </span><span class="hl-identifier">gem</span><span class="hl-code"> </span><span class="hl-identifier">install</span><span class="hl-code"> </span><span class="hl-identifier">wee</span><span class="hl-code"> </span><span class="hl-identifier">cd</span><span class="hl-quotes"> /</span><span class="hl-string">usr</span><span class="hl-quotes">/</span><span class="hl-identifier">lib</span><span class="hl-code">/</span><span class="hl-identifier">ruby</span><span class="hl-code">/</span><span class="hl-identifier">gems</span><span class="hl-code">/</span><span class="hl-number">1.8</span><span class="hl-code">/</span><span class="hl-identifier">gems</span><span class="hl-code">/</span><span class="hl-identifier">wee</span><span class="hl-code">-</span><span class="hl-number">2.0.0</span><span class="hl-code">/</span><span class="hl-identifier">examples</span><span class="hl-code">/ </span><span class="hl-identifier">ruby</span><span class="hl-code"> </span><span class="hl-identifier">demo</span><span class="hl-code">.</span><span class="hl-identifier">rb</span><span class="hl-code"> </span><span class="hl-comment">#Now goto http://localhost:2000/</span> </pre></div> </div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:45</guid>
				<title>Rails Integration Test Bugfix for Metal and Rack Applications</title>
				<link>http://conceptspace.wikidot.com/blog:45</link>
				<description>

&lt;p&gt;I am using Sinatra to write Metal for my Rails Applications and using Webrat to test all. But it does not matter, there is a bug that prevents the integration tests of all rack applications as well as Metals inside a Rails project. Including this little patch inside &#039;test_helper.rb&#039; fixes the problem.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 11 Sep 2009 00:15:11 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>I am using Sinatra to write Metal for my Rails Applications and using Webrat to test all. But it does not matter, there is a bug that prevents the integration tests of all rack applications as well as Metals inside a Rails project. Including this little patch inside 'test_helper.rb' fixes the problem.</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">module</span><span class="hl-code"> </span><span class="hl-identifier">Rack</span><span class="hl-code"> </span><span class="hl-reserved">module</span><span class="hl-code"> </span><span class="hl-identifier">Utils</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">HeaderHash</span><span class="hl-code"> </span><span class="hl-identifier">puts</span><span class="hl-code"> </span><span class="hl-quotes">"</span><span class="hl-string">Rack::Utils::HeaderHash bug fix on #replace</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-reserved">def</span><span class="hl-code"> </span><span class="hl-identifier">replace</span><span class="hl-code"> </span><span class="hl-identifier">other</span><span class="hl-code"> </span><span class="hl-reserved">self</span><span class="hl-code">.</span><span class="hl-identifier">clear</span><span class="hl-code"> </span><span class="hl-identifier">other</span><span class="hl-code">.</span><span class="hl-identifier">each</span><span class="hl-code"> { |</span><span class="hl-identifier">k</span><span class="hl-code">,</span><span class="hl-identifier">v</span><span class="hl-code">| </span><span class="hl-reserved">self</span><span class="hl-brackets">[</span><span class="hl-identifier">k</span><span class="hl-brackets">]</span><span class="hl-code"> = </span><span class="hl-identifier">v</span><span class="hl-code"> } </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-reserved">end</span> </pre></div> </div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:44</guid>
				<title>Delegation Pattern in Ruby</title>
				<link>http://conceptspace.wikidot.com/blog:44</link>
				<description>

&lt;p&gt;Sometimes I need to pass an object to an API. But my object does not have the required methods…. And I don&#039;t want go and change the 3rd party class definition of my object. In Ruby the solution is easy. Another scenario is I have classes that do parts of the job required. And you need to combine them. &lt;a href=&quot;http://www.fromjavatoruby.com/2008/10/delgation-in-ruby.html&quot;&gt;There are many ways of implementing the delegation pattern in Ruby&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;div class=&quot;hl-main&quot;&gt;
&lt;pre&gt;
&lt;span class=&quot;hl-code&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;Whatever&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;  
     &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;delegate&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; :&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;first_name&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;, :&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;last_name&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;, :&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; =&amp;gt; :&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;@user&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;  
 
     &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;initialize&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;  
       &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;@user&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;  
     &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;  
   &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 04 Aug 2009 22:50:08 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Sometimes I need to pass an object to an API. But my object does not have the required methods…. And I don't want go and change the 3rd party class definition of my object. In Ruby the solution is easy. Another scenario is I have classes that do parts of the job required. And you need to combine them. <a href="http://www.fromjavatoruby.com/2008/10/delgation-in-ruby.html">There are many ways of implementing the delegation pattern in Ruby</a>:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Whatever</span><span class="hl-code"> </span><span class="hl-identifier">delegate</span><span class="hl-code"> :</span><span class="hl-identifier">first_name</span><span class="hl-code">, :</span><span class="hl-identifier">last_name</span><span class="hl-code">, :</span><span class="hl-identifier">to</span><span class="hl-code"> =&gt; :</span><span class="hl-var">@user</span><span class="hl-code"> </span><span class="hl-reserved">def</span><span class="hl-code"> </span><span class="hl-identifier">initialize</span><span class="hl-brackets">(</span><span class="hl-identifier">user</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-var">@user</span><span class="hl-code"> = </span><span class="hl-identifier">user</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-reserved">end</span> </pre></div> </div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:43</guid>
				<title>Rails Deployment; Capistrano, Passenger, NGINX</title>
				<link>http://conceptspace.wikidot.com/blog:43</link>
				<description>

&lt;p&gt;For the easiest deployment experience, I think, we should deploy using &lt;a href=&quot;http://www.zorched.net/2008/06/17/capistrano-deploy-with-git-and-passenger/&quot;&gt;Capistrano with Git and Passenger&lt;/a&gt;. Of course, we should modify that recipe &lt;a href=&quot;http://akitaonrails.com/2009/04/16/just-released-phusion-passenger-support-for-nginx&quot;&gt;to use NGINX&lt;/a&gt;. While Apache uses half a gig of memory, NGINX can do the same job using 30 megabytes. So it&#039;s a must if you are using virtual machines.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 19 Jul 2009 22:17:03 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>For the easiest deployment experience, I think, we should deploy using <a href="http://www.zorched.net/2008/06/17/capistrano-deploy-with-git-and-passenger/">Capistrano with Git and Passenger</a>. Of course, we should modify that recipe <a href="http://akitaonrails.com/2009/04/16/just-released-phusion-passenger-support-for-nginx">to use NGINX</a>. While Apache uses half a gig of memory, NGINX can do the same job using 30 megabytes. So it's a must if you are using virtual machines.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:42</guid>
				<title>YAML Configuration File</title>
				<link>http://conceptspace.wikidot.com/blog:42</link>
				<description>

&lt;p&gt;In Ruby on Rails, you can create application specific configuration files. Put in &quot;config/initializers/myapp.rb&quot;&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;div class=&quot;hl-main&quot;&gt;
&lt;pre&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;MYAPP_CONFIG&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;YAML&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;ERB&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;IO&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;#{RAILS_ROOT}/config/myapp.yml&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;RAILS_ENV&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;symbolize_keys&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In &quot;config/myapp.ytml&quot;&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;
&lt;code&gt;development:
    mode: development
test:
    mode: test
production:
    mode: production&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can access MYAPP_CONFIG throughout the application:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;div class=&quot;hl-main&quot;&gt;
&lt;pre&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;MYAPP_CONFIG&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;#=&amp;gt; &#039;development&#039;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 09 Jul 2009 10:22:24 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>In Ruby on Rails, you can create application specific configuration files. Put in "config/initializers/myapp.rb"</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">MYAPP_CONFIG</span><span class="hl-code">=</span><span class="hl-identifier">YAML</span><span class="hl-code">::</span><span class="hl-identifier">load</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-identifier">ERB</span><span class="hl-code">.</span><span class="hl-identifier">new</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-identifier">IO</span><span class="hl-code">.</span><span class="hl-identifier">read</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-quotes">"</span><span class="hl-string">#{RAILS_ROOT}/config/myapp.yml</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">result</span><span class="hl-code"> </span><span class="hl-brackets">)[</span><span class="hl-identifier">RAILS_ENV</span><span class="hl-brackets">]</span><span class="hl-code">.</span><span class="hl-identifier">symbolize_keys</span> </pre></div> </div> <p>In "config/myapp.ytml"</p> <div class="code"> <pre> <code>development: mode: development test: mode: test production: mode: production</code> </pre></div> <p>You can access MYAPP_CONFIG throughout the application:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">MYAPP_CONFIG</span><span class="hl-brackets">[</span><span class="hl-code">:</span><span class="hl-identifier">mode</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-comment">#=&gt; 'development'</span> </pre></div> </div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:41</guid>
				<title>Tokyo Cabinet, Tokyo Tyrant and Rufus Tokyo in Ubuntu from Github</title>
				<link>http://conceptspace.wikidot.com/blog:41</link>
				<description>

&lt;p&gt;After reading &lt;a href=&quot;http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/&quot;&gt;the performance of Tokyo Cabinet&lt;/a&gt;, it was necessary to try it. It&#039;s easy to install it and try it in Ruby:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 08 Jul 2009 16:22:23 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>After reading <a href="http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/">the performance of Tokyo Cabinet</a>, it was necessary to try it. It's easy to install it and try it in Ruby:</p> <p><em>Hint:</em> CTRL+SHIFT+V pastes in Ubuntu terminal. You can paste the code from web pages.</p> <p>Install Tokyo Cabinet and Tokyo Tyrant from Github:</p> <div class="code"> <pre> <code>cd /usr/local/src git clone git://github.com/clement/tokyo-cabinet.git git clone git://github.com/etrepum/tokyo-tyrant.git cd tokyo-cabinet/ ./configure make sudo make install cd .. cd tokyo-tyrant/ ./configure make sudo make install</code> </pre></div> <p>Those instructions are similar to <a href="http://openwferu.rubyforge.org/tokyo.html">that of Openwferu</a> but, at least today, <a href="http://github.com/clement">clement</a> is more up-to-date then <a href="http://github.com/etrepum">etrepum</a>.</p> <p>Then install the Ruby interface</p> <div class="code"> <pre> <code>sudo gem install rufus-tokyo</code> </pre></div> <p>Fire your <strong>irb</strong> and play with the <a href="http://github.com/jmettraux/rufus-tokyo/tree/master" >examples</a></p> <p>For example,</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-code"> </span><span class="hl-reserved">require</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">rubygems</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-reserved">require</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">rufus/tokyo</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-identifier">db</span><span class="hl-code"> = </span><span class="hl-identifier">Rufus</span><span class="hl-code">::</span><span class="hl-identifier">Tokyo</span><span class="hl-code">::</span><span class="hl-identifier">Cabinet</span><span class="hl-code">.</span><span class="hl-identifier">new</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">data.tch</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">db</span><span class="hl-brackets">[</span><span class="hl-quotes">'</span><span class="hl-string">nada</span><span class="hl-quotes">'</span><span class="hl-brackets">]</span><span class="hl-code"> = </span><span class="hl-quotes">'</span><span class="hl-string">surf</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-identifier">p</span><span class="hl-code"> </span><span class="hl-identifier">db</span><span class="hl-brackets">[</span><span class="hl-quotes">'</span><span class="hl-string">nada</span><span class="hl-quotes">'</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-comment"># =&gt; 'surf'</span><span class="hl-code"> </span><span class="hl-identifier">p</span><span class="hl-code"> </span><span class="hl-identifier">db</span><span class="hl-brackets">[</span><span class="hl-quotes">'</span><span class="hl-string">lost</span><span class="hl-quotes">'</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-comment"># =&gt; nil</span><span class="hl-code"> </span><span class="hl-identifier">db</span><span class="hl-code">.</span><span class="hl-identifier">close</span> </pre></div> </div> <p>Check also <a href="http://conceptspace.wikidot.com/blog:40">On the Way to Faster, Bigger Rails Applications</a></p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:40</guid>
				<title>On the Way to Faster, Bigger Rails Applications</title>
				<link>http://conceptspace.wikidot.com/blog:40</link>
				<description>

&lt;p&gt;To write large scale applications you need a few more tools than just using ActiveRecord:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/&quot;&gt;Tokyo Cabinet&lt;/a&gt; stores 1 million records in 0.7 seconds. Used by &lt;strong&gt;Japanese Facebook&lt;/strong&gt; You need to use faster storage. Ordinary DB might not be sufficient.
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/jmettraux/rufus-tokyo/tree/master&quot;&gt;Rufus Tokyo&lt;/a&gt; Ruby Interface&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://conceptspace.wikidot.com/blog:41&quot;&gt;Installing all from GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://shooting-star.rubyforge.org/wiki/wiki.pl&quot;&gt;Shooting Star, A Ruby implemetation&lt;/a&gt; of &lt;a href=&quot;http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications&quot;&gt;Comet&lt;/a&gt;, which is used by &lt;strong&gt;Google Talk&lt;/strong&gt;. Polling is expensive. You need to handle real time events from the server for your AJAX applications.
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://juggernaut.rubyforge.org/&quot;&gt;Juggernaut&lt;/a&gt; is actually easier to use.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://rubypond.com/articles/2008/07/17/the-complete-guide-to-setting-up-starling/&quot;&gt;Starling&lt;/a&gt;, the job queue manager. Your API has to return as soon as possible. Queue the requests. Used in &lt;strong&gt;Twitter&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/defunkt/cache_fu/tree/master&quot;&gt;cache_fu, acts_as_cached&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://errtheblog.com/static/pdfs/memcached.pdf&quot;&gt;Presentation&lt;/a&gt; of &lt;a href=&quot;http://github.com/defunkt&quot;&gt;Chris Wanstrath&lt;/a&gt;, &lt;strong&gt;github&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ninajansen.dk/2008/05/21/testing-caching-with-memcache-cache_fu-and-spec/&quot;&gt;Testing Caching&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/rubycas-server/&quot;&gt;RubyCAS Server&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Central authentication in one place for many applications&lt;/li&gt;
&lt;li&gt;You can manage it with &lt;a href=&quot;http://giantrobots.thoughtbot.com/2009/2/9/clearance-rails-authentication-for-developers-who-write-tests&quot;&gt;Clearance - The Rails Authentication For Developers Who Write Tests&lt;/a&gt; (&lt;a href=&quot;http://github.com/thoughtbot/clearance/tree/master&quot;&gt;source at github&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 07 Jul 2009 14:47:07 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>To write large scale applications you need a few more tools than just using ActiveRecord:</p> <ul> <li><a href="http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/">Tokyo Cabinet</a> stores 1 million records in 0.7 seconds. Used by <strong>Japanese Facebook</strong> You need to use faster storage. Ordinary DB might not be sufficient. <ul> <li><a href="http://github.com/jmettraux/rufus-tokyo/tree/master">Rufus Tokyo</a> Ruby Interface</li> <li><a href="http://conceptspace.wikidot.com/blog:41">Installing all from GitHub</a></li> </ul> </li> <li><a href="http://shooting-star.rubyforge.org/wiki/wiki.pl">Shooting Star, A Ruby implemetation</a> of <a href="http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications">Comet</a>, which is used by <strong>Google Talk</strong>. Polling is expensive. You need to handle real time events from the server for your AJAX applications. <ul> <li><a href="http://juggernaut.rubyforge.org/">Juggernaut</a> is actually easier to use.</li> </ul> </li> <li><a href="http://rubypond.com/articles/2008/07/17/the-complete-guide-to-setting-up-starling/">Starling</a>, the job queue manager. Your API has to return as soon as possible. Queue the requests. Used in <strong>Twitter</strong></li> <li><a href="http://github.com/defunkt/cache_fu/tree/master">cache_fu, acts_as_cached</a> <ul> <li><a href="http://errtheblog.com/static/pdfs/memcached.pdf">Presentation</a> of <a href="http://github.com/defunkt">Chris Wanstrath</a>, <strong>github</strong></li> <li><a href="http://ninajansen.dk/2008/05/21/testing-caching-with-memcache-cache_fu-and-spec/">Testing Caching</a></li> </ul> </li> <li><a href="http://code.google.com/p/rubycas-server/">RubyCAS Server</a> <ul> <li>Central authentication in one place for many applications</li> <li>You can manage it with <a href="http://giantrobots.thoughtbot.com/2009/2/9/clearance-rails-authentication-for-developers-who-write-tests">Clearance - The Rails Authentication For Developers Who Write Tests</a> (<a href="http://github.com/thoughtbot/clearance/tree/master">source at github</a>)</li> </ul> </li> </ul> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:39</guid>
				<title>Factory Girl for Rails can do more...</title>
				<link>http://conceptspace.wikidot.com/blog:39</link>
				<description>

&lt;div class=&quot;image-container floatright&quot;&gt;&lt;img src=&quot;http://thoughtbot.com/assets/icon-factorygirl.png&quot; height=&quot;48px&quot; alt=&quot;icon-factorygirl.png&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Unit testing with &lt;a href=&quot;http://thoughtbot.com/projects/factory_girl&quot;&gt;FactoryGirl&lt;/a&gt; is very DRY. The power of Ruby enables you to do more cool and elaborate things with factories. &lt;a href=&quot;http://thoughtbot.com/projects/factory_girl&quot;&gt;Factories&lt;/a&gt; can be equipped with useful custom methods. Let&#039;s define a child factory that always uses the same default parent:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 25 Jun 2009 13:31:50 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container floatright"><img src="http://thoughtbot.com/assets/icon-factorygirl.png" height="48px" alt="icon-factorygirl.png" class="image" /></div> <p>Unit testing with <a href="http://thoughtbot.com/projects/factory_girl">FactoryGirl</a> is very DRY. The power of Ruby enables you to do more cool and elaborate things with factories. <a href="http://thoughtbot.com/projects/factory_girl">Factories</a> can be equipped with useful custom methods. Let's define a child factory that always uses the same default parent:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Factory</span><span class="hl-code">.</span><span class="hl-reserved">define</span><span class="hl-code"> :</span><span class="hl-identifier">child</span><span class="hl-code"> </span><span class="hl-reserved">do</span><span class="hl-code"> |</span><span class="hl-identifier">f</span><span class="hl-code">| </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">sequence</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">name</span><span class="hl-brackets">)</span><span class="hl-code"> {|</span><span class="hl-identifier">n</span><span class="hl-code">| </span><span class="hl-quotes">"</span><span class="hl-string">Child#{n}</span><span class="hl-quotes">"</span><span class="hl-code">} </span><span class="hl-reserved">def</span><span class="hl-code"> </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">default_parent</span><span class="hl-code"> </span><span class="hl-var">@default_parent</span><span class="hl-code"> ||= </span><span class="hl-identifier">Factory</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">parent</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">parent_id</span><span class="hl-code"> { </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">default_parent</span><span class="hl-code">.</span><span class="hl-identifier">id</span><span class="hl-code"> } </span><span class="hl-reserved">end</span> </pre></div> </div> <p>Now every child created will have the same default parent. Instead of abusing the global space, instead of having to modify class Factory, the method and variable its using is neatly included in the factory instance.</p> <p>And whenever you want, you can use another parent in the tests.</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">child</span><span class="hl-code"> = </span><span class="hl-identifier">Factory</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">child</span><span class="hl-code">, :</span><span class="hl-identifier">parent_id</span><span class="hl-code">=</span><span class="hl-identifier">another_parent</span><span class="hl-code">.</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span> </pre></div> </div> <p>But the default child will come with the single default parent. More speed and space</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">child1</span><span class="hl-code"> = </span><span class="hl-identifier">Factory</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">child</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">child2</span><span class="hl-code"> = </span><span class="hl-identifier">Factory</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">child</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-comment"># child1.parent == child2.parent</span> </pre></div> </div> <p>You can access the custom method elsewhere</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">f</span><span class="hl-code"> = </span><span class="hl-identifier">Factory</span><span class="hl-code">.</span><span class="hl-identifier">factory_by_name</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">child</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">default_parent</span> </pre></div> </div> <p>As you see, you can treat the factories like classes - with custom methods and properties. This allows possibilities which are not evident from the syntax of <a href="http://thoughtbot.com/projects/factory_girl">Thoughtbot Factory Girl</a></p> <p>Remember. In Ruby, object instances can have their custom methods!</p> <p>To be able to do whatever you can do in a normal class declaration, here is an alternative syntax:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Factory</span><span class="hl-code">.</span><span class="hl-reserved">define</span><span class="hl-code"> :</span><span class="hl-identifier">child</span><span class="hl-code"> </span><span class="hl-reserved">do</span><span class="hl-code"> |</span><span class="hl-identifier">f</span><span class="hl-code">| </span><span class="hl-reserved">class</span><span class="hl-code"> &lt;&lt; </span><span class="hl-identifier">f</span><span class="hl-code"> </span><span class="hl-comment">#do whatever you can do in a normal class definition</span><span class="hl-code"> </span><span class="hl-reserved">def</span><span class="hl-code"> </span><span class="hl-identifier">default_parent</span><span class="hl-code"> </span><span class="hl-var">@default_parent</span><span class="hl-code"> ||= </span><span class="hl-identifier">Factory</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">parent</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">sequence</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">name</span><span class="hl-brackets">)</span><span class="hl-code"> {|</span><span class="hl-identifier">n</span><span class="hl-code">| </span><span class="hl-quotes">"</span><span class="hl-string">Child#{n}</span><span class="hl-quotes">"</span><span class="hl-code">} </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">parent_id</span><span class="hl-code"> { </span><span class="hl-identifier">f</span><span class="hl-code">.</span><span class="hl-identifier">default_parent</span><span class="hl-code">.</span><span class="hl-identifier">id</span><span class="hl-code"> } </span><span class="hl-reserved">end</span> </pre></div> </div> <p><a href="http://thoughtbot.com/projects/factory_girl">Thoughtbot Factory Girl</a> will allow you write your tests easier than using fixtures.</p> <p>Happy unit testing… Don't forget to use <a href="http://thoughtbot.com/projects/shoulda">Shoulda</a>!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:38</guid>
				<title>Rails Integration Tests</title>
				<link>http://conceptspace.wikidot.com/blog:38</link>
				<description>

&lt;p&gt;Integration tests used to be a pain. Now you can really write the scenarios as they should be and have your integration tests: &lt;a href=&quot;http://blog.bitmacro.com/2008/11/14/shoulda-factory_girl-webrat&quot;  &gt;Shoulda + Factory_Girl + Webrat for Rails Integration Tests&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 24 Jun 2009 14:46:09 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Integration tests used to be a pain. Now you can really write the scenarios as they should be and have your integration tests: <a href="http://blog.bitmacro.com/2008/11/14/shoulda-factory_girl-webrat" >Shoulda + Factory_Girl + Webrat for Rails Integration Tests</a>:</p> <p>Matt Lins has a beautiful example there:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">AdminLoginTest</span><span class="hl-code"> &lt; </span><span class="hl-identifier">ActionController</span><span class="hl-code">::</span><span class="hl-identifier">IntegrationTest</span><span class="hl-code"> </span><span class="hl-identifier">context</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">An employee</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-reserved">do</span><span class="hl-code"> </span><span class="hl-identifier">setup</span><span class="hl-code"> </span><span class="hl-reserved">do</span><span class="hl-code"> </span><span class="hl-var">@employee</span><span class="hl-code"> = </span><span class="hl-identifier">Factory</span><span class="hl-brackets">(</span><span class="hl-code">:</span><span class="hl-identifier">employee</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-identifier">should</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">be able to login with a valid username and password</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-reserved">do</span><span class="hl-code"> </span><span class="hl-identifier">visit</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">/admin</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-identifier">assert</span><span class="hl-code"> </span><span class="hl-identifier">https</span><span class="hl-code">? </span><span class="hl-identifier">assert_equal</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">/admin/sessions/new</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-identifier">path</span><span class="hl-code"> </span><span class="hl-identifier">fills_in</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">Email</span><span class="hl-quotes">'</span><span class="hl-code">, :</span><span class="hl-identifier">with</span><span class="hl-code"> =&gt; </span><span class="hl-var">@employee</span><span class="hl-code">.</span><span class="hl-identifier">user</span><span class="hl-code">.</span><span class="hl-identifier">email</span><span class="hl-code"> </span><span class="hl-identifier">fills_in</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">Password</span><span class="hl-quotes">'</span><span class="hl-code">, :</span><span class="hl-identifier">with</span><span class="hl-code"> =&gt; </span><span class="hl-var">@employee</span><span class="hl-code">.</span><span class="hl-identifier">user</span><span class="hl-code">.</span><span class="hl-identifier">password</span><span class="hl-code"> </span><span class="hl-identifier">clicks_button</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">Log In</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-identifier">assert_equal</span><span class="hl-code"> </span><span class="hl-var">@employee</span><span class="hl-code">.</span><span class="hl-identifier">user</span><span class="hl-code">.</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">session</span><span class="hl-brackets">[</span><span class="hl-code">:</span><span class="hl-identifier">user_id</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-identifier">should</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">be denied access with an invalid username or password</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-reserved">do</span><span class="hl-code"> </span><span class="hl-identifier">visit</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">/admin</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-identifier">assert</span><span class="hl-code"> </span><span class="hl-identifier">https</span><span class="hl-code">? </span><span class="hl-identifier">assert_equal</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">/admin/sessions/new</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-identifier">path</span><span class="hl-code"> </span><span class="hl-identifier">fills_in</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">Email</span><span class="hl-quotes">'</span><span class="hl-code">, :</span><span class="hl-identifier">with</span><span class="hl-code"> =&gt; </span><span class="hl-var">@employee</span><span class="hl-code">.</span><span class="hl-identifier">user</span><span class="hl-code">.</span><span class="hl-identifier">email</span><span class="hl-code"> </span><span class="hl-identifier">fills_in</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">Password</span><span class="hl-quotes">'</span><span class="hl-code">, :</span><span class="hl-identifier">with</span><span class="hl-code"> =&gt; </span><span class="hl-quotes">'</span><span class="hl-string">wrongpassord</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-identifier">clicks_button</span><span class="hl-code"> </span><span class="hl-quotes">'</span><span class="hl-string">Log In</span><span class="hl-quotes">'</span><span class="hl-code"> </span><span class="hl-identifier">assert_nil</span><span class="hl-code"> </span><span class="hl-identifier">session</span><span class="hl-brackets">[</span><span class="hl-code">:</span><span class="hl-identifier">user_id</span><span class="hl-brackets">]</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-reserved">end</span><span class="hl-code"> </span><span class="hl-reserved">end</span> </pre></div> </div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:37</guid>
				<title>Validations and Regular Expressions</title>
				<link>http://conceptspace.wikidot.com/blog:37</link>
				<description>

&lt;p&gt;While reading about &lt;a href=&quot;http://guides.rubyonrails.org/activerecord_validations_callbacks.html&quot;  &gt;Validations in Ruby on Rails&lt;/a&gt;, you&#039;ve found out that you need to know &lt;a href=&quot;http://en.wikipedia.org/wiki/Regular_expression&quot;  &gt;Regular Expression&lt;/a&gt;s to validate the format of strings. &lt;a href=&quot;http://www.gskinner.com/RegExr/&quot;  &gt;You can test and learn regular expressions online easily here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 10 Jun 2009 20:14:39 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>While reading about <a href="http://guides.rubyonrails.org/activerecord_validations_callbacks.html" >Validations in Ruby on Rails</a>, you've found out that you need to know <a href="http://en.wikipedia.org/wiki/Regular_expression" >Regular Expression</a>s to validate the format of strings. <a href="http://www.gskinner.com/RegExr/" >You can test and learn regular expressions online easily here</a>.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:35</guid>
				<title>Poll: Ruby on Rails Deployment</title>
				<link>http://conceptspace.wikidot.com/blog:35</link>
				<description>

&lt;p&gt;&lt;a href=&quot;http://www.moreganize.ch/bbef3c513df5f7387310548a31c48f0cc&quot;  &gt;Do you need an up-to-date deployment tutorial for Ruby and Rails? Vote Here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Sun, 07 Jun 2009 19:27:16 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p><a href="http://www.moreganize.ch/bbef3c513df5f7387310548a31c48f0cc" >Do you need an up-to-date deployment tutorial for Ruby and Rails? Vote Here.</a></p> <span style="font-size:20%;"></span> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:34</guid>
				<title>Ruby vs Java</title>
				<link>http://conceptspace.wikidot.com/blog:34</link>
				<description>

&lt;p&gt;I defend my point! This is the Ruby code&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 05 Jun 2009 22:29:45 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>I defend my point! This is the Ruby code</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">a</span><span class="hl-code"> = </span><span class="hl-identifier">gets</span><span class="hl-code">.</span><span class="hl-identifier">to_i</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code"> = </span><span class="hl-identifier">gets</span><span class="hl-code">.</span><span class="hl-identifier">to_i</span><span class="hl-code"> </span><span class="hl-identifier">c</span><span class="hl-code"> = </span><span class="hl-identifier">a</span><span class="hl-code"> + </span><span class="hl-identifier">b</span><span class="hl-code"> </span><span class="hl-identifier">puts</span><span class="hl-code"> </span><span class="hl-identifier">c</span> </pre></div> </div> <p>And this is the corresponding Java code</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">import</span><span class="hl-code"> </span><span class="hl-identifier">java</span><span class="hl-code">.</span><span class="hl-identifier">io</span><span class="hl-code">.*; </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Addup</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">[])</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">InputStreamReader</span><span class="hl-code"> </span><span class="hl-identifier">stdin</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">InputStreamReader</span><span class="hl-brackets">(</span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">in</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">BufferedReader</span><span class="hl-code"> </span><span class="hl-identifier">console</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">BufferedReader</span><span class="hl-brackets">(</span><span class="hl-identifier">stdin</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">i1</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-identifier">i2</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">; </span><span class="hl-identifier">String</span><span class="hl-code"> </span><span class="hl-identifier">s1</span><span class="hl-code">,</span><span class="hl-identifier">s2</span><span class="hl-code">; </span><span class="hl-reserved">try</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">s1</span><span class="hl-code"> = </span><span class="hl-identifier">console</span><span class="hl-code">.</span><span class="hl-identifier">readLine</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-identifier">i1</span><span class="hl-code"> = </span><span class="hl-identifier">Integer</span><span class="hl-code">.</span><span class="hl-identifier">parseInt</span><span class="hl-brackets">(</span><span class="hl-identifier">s1</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">s2</span><span class="hl-code"> = </span><span class="hl-identifier">console</span><span class="hl-code">.</span><span class="hl-identifier">readLine</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-identifier">i2</span><span class="hl-code"> = </span><span class="hl-identifier">Integer</span><span class="hl-code">.</span><span class="hl-identifier">parseInt</span><span class="hl-brackets">(</span><span class="hl-identifier">s2</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">catch</span><span class="hl-brackets">(</span><span class="hl-identifier">IOException</span><span class="hl-code"> </span><span class="hl-identifier">ioex</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Input error</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">exit</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">catch</span><span class="hl-brackets">(</span><span class="hl-identifier">NumberFormatException</span><span class="hl-code"> </span><span class="hl-identifier">nfex</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-special">\"</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">nfex</span><span class="hl-code">.</span><span class="hl-identifier">getMessage</span><span class="hl-brackets">()</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-special">\"</span><span class="hl-string"> is not numeric</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">exit</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-identifier">i1</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string"> + </span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">i2</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string"> = </span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">i1</span><span class="hl-code">+</span><span class="hl-identifier">i2</span><span class="hl-brackets">))</span><span class="hl-code">; </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">exit</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> %&gt; </span><span class="hl-identifier">javac</span><span class="hl-code"> </span><span class="hl-identifier">Addup</span><span class="hl-code">.</span><span class="hl-identifier">java</span><span class="hl-code"> %&gt; </span><span class="hl-identifier">java</span><span class="hl-code"> </span><span class="hl-identifier">Addup</span> </pre></div> </div> <p>No more comments.</p> <p>(Code blocks borrowed from <a href="http://www.ariel.com.au/a/teaching-programming.html">http://www.ariel.com.au/a/teaching-programming.html</a>)</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:33</guid>
				<title>Rails: Switching the Database in Use to Another</title>
				<link>http://conceptspace.wikidot.com/blog:33</link>
				<description>

&lt;p&gt;You might easilty switch to another database in Rails. But defautl Rails projects use SQLite. To see the supported databases execute:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 05 Jun 2009 00:09:07 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>You might easilty switch to another database in Rails. But defautl Rails projects use SQLite. To see the supported databases execute:</p> <div class="code"> <pre> <code>rails | grep database</code> </pre></div> <p>If you want to use Postgresql, for example, create a dummy project with it:</p> <div class="code"> <pre> <code>rails dummy -d postgresql</code> </pre></div> <p>Then copy and edit dummy/config/database.yml on to your_project/config/database.yml and create the tables</p> <div class="code"> <pre> <code>cd your_project rake db:create:all rake db:migrate</code> </pre></div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:32</guid>
				<title>Serving from a Virtual Box Machine</title>
				<link>http://conceptspace.wikidot.com/blog:32</link>
				<description>

&lt;div class=&quot;image-container floatleft&quot;&gt;&lt;img src=&quot;http://www.virtualbox.org/graphics/vbox_logo2_gradient.png&quot; height=&quot;64px&quot; alt=&quot;vbox_logo2_gradient.png&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Your virtual machine on &lt;a href=&quot;http://www.virtualbox.org/&quot;  &gt;VirtualBox&lt;/a&gt; can be a server. Let&#039;s say you have a virtual machine named &quot;My Server&quot;. Execute the script below on your host (not the virtual machine):&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 04 Jun 2009 09:41:24 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container floatleft"><img src="http://www.virtualbox.org/graphics/vbox_logo2_gradient.png" height="64px" alt="vbox_logo2_gradient.png" class="image" /></div> <p>Your virtual machine on <a href="http://www.virtualbox.org/" >VirtualBox</a> can be a server. Let's say you have a virtual machine named "My Server". Execute the script below on your host (not the virtual machine):</p> <div class="code"> <pre> <code>VBoxManage setextradata "My Server" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP VBoxManage setextradata "My Server" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22 VBoxManage setextradata "My Server" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222 VBoxManage setextradata "My Server" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP VBoxManage setextradata "My Server" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 3000 VBoxManage setextradata "My Server" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 3000</code> </pre></div> <p>Now you are able to ssh into the virtual machine:</p> <div class="code"> <pre> <code>ssh localhost -p 2222</code> </pre></div> <p>And you can browse the web service on port 3000</p> <div class="code"> <pre> <code>firefox http://localhost:3000</code> </pre></div> <p>Err, what is port 3000? The default port for rails of course. I am testing the Ruby on Rails deployment on a virtual machine.</p> <p>You've got the idea. Map your ports as you wish.</p> <p>You will always have a fresh machine for setup tests with <a href="http://www.virtualbox.org/" >VirtualBox VirtualBox</a>. Experience has shown me that you cannot debug deployment on an already installed development machine.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:31</guid>
				<title>Multiple conflicting GEM libraries; Ghost Ruby on Rails</title>
				<link>http://conceptspace.wikidot.com/blog:31</link>
				<description>

&lt;p&gt;Make sure that /usr/lib/ruby/gems and /var/lib/gems are actually the same directory if you haven&#039;t done that before. If you have both of directories on your machine then things have gone wrong about your &lt;a href=&quot;http://conceptspace.wikidot.com/rails101:basic-ruby-on-rails-installation&quot;&gt;Ruby on Rails Installation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 03 Jun 2009 20:14:14 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Make sure that /usr/lib/ruby/gems and /var/lib/gems are actually the same directory if you haven't done that before. If you have both of directories on your machine then things have gone wrong about your <a href="http://conceptspace.wikidot.com/rails101:basic-ruby-on-rails-installation">Ruby on Rails Installation</a>.</p> <div class="code"> <pre> <code>sudo cp -a /var/lib/gems/* /usr/lib/ruby/gems/ sudo rm -R /var/lib/gems/* sudo ln -nfs /usr/lib/ruby/gems/1.8 /var/lib/gems/</code> </pre></div> <hr /> <p>I have seen this problem appearing on Ubuntu when both apt-get and downloaded tar used to install rubygems. So the machine end up with 2 conflicting rubygems installations.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:30</guid>
				<title>Stop Smoking, Keep Geeking</title>
				<link>http://conceptspace.wikidot.com/blog:30</link>
				<description>

&lt;div class=&quot;image-container floatleft&quot;&gt;&lt;img src=&quot;http://i46.photobucket.com/albums/f124/LiveToFlow/jolt.jpg&quot; alt=&quot;jolt.jpg&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Programming really made me smoke more. Debugging was smoking. Conceiving new ideas was smoking. Creativity was smoking. And getting double caffeine… One more coffee…&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 03 Jun 2009 12:08:34 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container floatleft"><img src="http://i46.photobucket.com/albums/f124/LiveToFlow/jolt.jpg" alt="jolt.jpg" class="image" /></div> <p>Programming really made me smoke more. Debugging was smoking. Conceiving new ideas was smoking. Creativity was smoking. And getting double caffeine… One more coffee…</p> <p>In 80's, we were defined as the beasts taking our double caffeine to keep programming until the morning. I clearly remember the <a href="http://www.joltawards.com/" >Jolt</a> logo and the words "Double Caffeine" on the cover of <a href="http://www.ddj.com/" >Dr Dobb's Magazine</a> in 80's. But never mind. I like <a href="http://www.joltawards.com/" >Jolt Awards</a>.</p> <p>Anyway double caffeine was our life…</p> <p>After programming for decades, I decided to become more healthy to keep programming many more decades. Alas because computers remind me smoking, I am delaying my articles a bit. Using Nicotinell chewing gums, I am having an experience similar to <a href="http://www.ciao.co.uk/Nicotinell_Chewing_gum_Nicotine_Extra_Strength__Review_5565905" >the experience of Christina</a>. If it all goes well then I might even proceed to <a href="http://www.lifehack.org/articles/lifestyle/top-5-ways-to-double-your-energy-without-caffeine.html" >the top 5 ways to double your energy without caffeine</a>. We'll see…</p> <p>Cheers;<br /> <a href="http://conceptspace.wikidot.com/umur">Umuro</a></p> <hr /> <p><strong>PS</strong>. Somebody tells me: "To keep up your spirit, let me remind you to some of the benefits a smokeless life will bring: health improvement, saving lots of money, easy excess cute smoke-free girls, no worries about that 'last one' in the package, the happiness to your parents, no fights with the future wife being pregnant (and annoyed about nearly everything, especially you smoking), 50% less chance on cancer, less littering, less paint jobs, smelling better, or smelling better (which might not be such a benefit to you).."</p> <hr /> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:29</guid>
				<title>Rails 2.3 Engines, Reusability</title>
				<link>http://conceptspace.wikidot.com/blog:29</link>
				<description>

&lt;div class=&quot;image-container floatleft&quot;&gt;&lt;img src=&quot;http://www.aosi.or.id/english/img/uploaded/thumbs/2310rails.jpg&quot; width=&quot;32px&quot; alt=&quot;2310rails.jpg&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;We want reusable components in our applications. With engines, whole model, view and persistence, a whole slice of application is available for reuse. Engines used to be a Rails plugin. Now it&#039;s embedded in Rails 2.3&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://railscasts.com/episodes/149-rails-engines&quot;  &gt;Railscasts: Rails Engines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/tsechingho/the-power-of-rails-23-engines-templates&quot;  &gt;Slideshow: Power of Rails Engines and Templates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mikeperham.com/2009/04/18/engines-in-rails-23/&quot;  &gt;Engines in Rails 2.3 by Mike Perham&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://asciicasts.com/episodes/149-rails-engines&quot;  &gt;ASCIICasts Rails Engines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://maulanaruby.wordpress.com/2009/02/04/getting-started-with-engines-development-in-rails-23/&quot;  &gt;Getting Started with Engines Development in Rails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To make sure you are not behind take a look at &lt;a href=&quot;http://ryandaigle.com/articles/2009/2/2/rails-2-3-released-summary-of-features&quot;  &gt;Ryan&#039;s Scraps on New Rails 2.3 Features&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 28 May 2009 13:07:40 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container floatleft"><img src="http://www.aosi.or.id/english/img/uploaded/thumbs/2310rails.jpg" width="32px" alt="2310rails.jpg" class="image" /></div> <p>We want reusable components in our applications. With engines, whole model, view and persistence, a whole slice of application is available for reuse. Engines used to be a Rails plugin. Now it's embedded in Rails 2.3</p> <ul> <li><a href="http://railscasts.com/episodes/149-rails-engines" >Railscasts: Rails Engines</a></li> <li><a href="http://www.slideshare.net/tsechingho/the-power-of-rails-23-engines-templates" >Slideshow: Power of Rails Engines and Templates</a></li> <li><a href="http://www.mikeperham.com/2009/04/18/engines-in-rails-23/" >Engines in Rails 2.3 by Mike Perham</a></li> <li><a href="http://asciicasts.com/episodes/149-rails-engines" >ASCIICasts Rails Engines</a></li> <li><a href="http://maulanaruby.wordpress.com/2009/02/04/getting-started-with-engines-development-in-rails-23/" >Getting Started with Engines Development in Rails</a></li> </ul> <p>To make sure you are not behind take a look at <a href="http://ryandaigle.com/articles/2009/2/2/rails-2-3-released-summary-of-features" >Ryan's Scraps on New Rails 2.3 Features</a></p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:28</guid>
				<title>Why Rails Developers Need God</title>
				<link>http://conceptspace.wikidot.com/blog:28</link>
				<description>

&lt;div class=&quot;image-container floatleft&quot;&gt;&lt;img src=&quot;http://i195.photobucket.com/albums/z140/LucyRed6/Art/Michaelangelo__adams_hand.png&quot; width=&quot;100px&quot; alt=&quot;Michaelangelo__adams_hand.png&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;By &lt;a href=&quot;http://ezinearticles.com/?expert=Ben_Myles&quot;&gt;Ben Myles&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 26 May 2009 23:28:35 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container floatleft"><img src="http://i195.photobucket.com/albums/z140/LucyRed6/Art/Michaelangelo__adams_hand.png" width="100px" alt="Michaelangelo__adams_hand.png" class="image" /></div> <p><em>By <a href="http://ezinearticles.com/?expert=Ben_Myles">Ben Myles</a></em></p> <p>Anyone that reads blogs from the Rails community has probably already heard about God. No, not the deity in the sky, but an excellent monitoring application that watches your processes and keeps them running. I've mostly seen it used for taming mongrel but it can be used to monitor any process.</p> <p>We're running God for all our managed hosting clients to make sure their mongrels don't pass out from exhaustion. It's held up great so far. See the resources at the end of this article for our init script and a sample global config.</p> <p>The God configuration file should be self explanatory. It's just Ruby code, nothing magic going on there. I've just wrapped the core God.watch code around some loops to enable support for monitoring an unlimited number of applications. One small note about the init.d script: it first launches God, and then loads the config file via the 'god load' command. I'm aware that you can send god the -c parameter when launching it, but I've found that sometimes (seemingly randomly) that won't load the config.</p> <p>The init.d script should work fine on any RHEL/CentOS system. Once you add the file to /etc/init.d/god just do:</p> <div class="code"> <pre> <code>chmod +x /etc/init.d/god chkconfig --add god chkconfig --level 345 god on /etc/init.d/god start</code> </pre></div> <p>Now you're good to go. Let those misbehaving K-9 devils do their best - they're no match for God.</p> <p>Here are a couple resources relevant to this article:</p> <ul> <li><a href="http://god.rubyforge.org/">God</a></li> <li><a href="http://integralimpressions.com/services/managed-rails-hosting">Integral Impressions managed hosting service</a></li> <li><a href="http://pastie.caboo.se/110483">/etc/init.d/god</a></li> <li><a href="http://pastie.caboo.se/110408">/etc/god.conf</a></li> </ul> <p>Ben Myles is a web developer for Integral Impressions, an <a href="http://integralimpressions.com">interactive marketing firm</a> that specializes in Internet marketing products and services.</p> <p>Article Source: <a href="http://EzineArticles.com/?expert=Ben_Myles">Ben Myles</a>, <a href="http://EzineArticles.com/?Why-Rails-Developers-Need-God&amp;id=845672">EzineArticles</a></p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:27</guid>
				<title>Ruby the Smalltalk Way</title>
				<link>http://conceptspace.wikidot.com/blog:27</link>
				<description>

&lt;div class=&quot;image-container floatleft&quot;&gt;&lt;img src=&quot;http://www.smalltalk.org/images/squeak1.gif&quot; alt=&quot;squeak1.gif&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Maybe you have been hearing that Ruby is inspired by Smalltalk. Huw Collingbourn gives you a chance to feel it by &lt;a href=&quot;http://www.sapphiresteel.com/Ruby-The-Smalltalk-Way-1&quot;  &gt;comparing the two languages&lt;/a&gt;. You can discover a lot more about the power of Ruby learning the powers of Smalltalk. &lt;a href=&quot;http://www.sapphiresteel.com/Ruby-The-Smalltalk-Way-1&quot;  &gt;Here is the full story...&lt;/a&gt; Uh, if you are still saying what is Ruby on Rails then you can &lt;a href=&quot;http://conceptspace.wikidot.com/rails101:introduction&quot;&gt;enjoy a quick but productive first experience of Ruby on Rails here&lt;/a&gt;. And you can immediately start to play with Smalltalk using &lt;a href=&quot;http://www.squeak.org/&quot;  &gt;Squeak&lt;/a&gt; or &lt;a href=&quot;http://www.object-arts.com/&quot;  &gt;Dolphin Smalltalk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 25 May 2009 12:35:05 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container floatleft"><img src="http://www.smalltalk.org/images/squeak1.gif" alt="squeak1.gif" class="image" /></div> <p>Maybe you have been hearing that Ruby is inspired by Smalltalk. Huw Collingbourn gives you a chance to feel it by <a href="http://www.sapphiresteel.com/Ruby-The-Smalltalk-Way-1" >comparing the two languages</a>. You can discover a lot more about the power of Ruby learning the powers of Smalltalk. <a href="http://www.sapphiresteel.com/Ruby-The-Smalltalk-Way-1" >Here is the full story...</a> Uh, if you are still saying what is Ruby on Rails then you can <a href="http://conceptspace.wikidot.com/rails101:introduction">enjoy a quick but productive first experience of Ruby on Rails here</a>. And you can immediately start to play with Smalltalk using <a href="http://www.squeak.org/" >Squeak</a> or <a href="http://www.object-arts.com/" >Dolphin Smalltalk</a></p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://conceptspace.wikidot.com/blog:26</guid>
				<title>Updated Tutorial: Ruby On Rails With One Model</title>
				<link>http://conceptspace.wikidot.com/blog:26</link>
				<description>

&lt;p&gt;Now with test data to ease your tutorial experience:&lt;/p&gt;
&lt;div class=&quot;image-container aligncenter&quot;&gt;&lt;a href=&quot;http://conceptspace.wikidot.com/rails101:ruby-on-rails-with-one-model&quot;&gt;&lt;img src=&quot;http://i617.photobucket.com/albums/tt260/umuro/conceptspace/simply-people-screen-1.png&quot; width=&quot;480px&quot; alt=&quot;simply-people-screen-1.png&quot; class=&quot;image&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;http://conceptspace.wikidot.com/rails101:ruby-on-rails-with-one-model&quot;&gt;Here is the updated tutorial!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common--images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=208545)&quot; /&gt;&lt;!--&lt;![endif]--&gt;&lt;!--[if lt IE 7]&gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/common&amp;#45;&amp;#45;images/avatars/208/208545/a16.png&quot; alt=&quot;Umur&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod=&#039;scale&#039;)&quot;/&gt;&lt;![endif]--&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/umur&quot;  &gt;Umur&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 20 May 2009 10:35:08 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Now with test data to ease your tutorial experience:</p> <div class="image-container aligncenter"><a href="http://conceptspace.wikidot.com/rails101:ruby-on-rails-with-one-model"><img src="http://i617.photobucket.com/albums/tt260/umuro/conceptspace/simply-people-screen-1.png" width="480px" alt="simply-people-screen-1.png" class="image" /></a></div> <p><a href="http://conceptspace.wikidot.com/rails101:ruby-on-rails-with-one-model">Here is the updated tutorial!</a></p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/umur" ><!--[if gte IE 7]><!--><img class="small" src="http://www.wikidot.com/common--images/avatars/208/208545/a16.png" alt="Umur" style="background-image:url(http://www.wikidot.com/userkarma.php?u=208545)" /><!--<![endif]--><!--[if lt IE 7]><img class="small" src="http://www.wikidot.com/common&#45;&#45;images/avatars/208/208545/a16.png" alt="Umur" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://www.wikidot.com/userkarma.php?u=208545,sizingMethod='scale')"/><![endif]--></a><a href="http://www.wikidot.com/user:info/umur" >Umur</a></span></p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>