<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Spiced Ruby</title>
	<atom:link href="http://spicedcocoa.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://spicedcocoa.wordpress.com</link>
	<description>Ruby development blog + everything else</description>
	<lastBuildDate>Tue, 06 Dec 2011 08:32:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='spicedcocoa.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Spiced Ruby</title>
		<link>http://spicedcocoa.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://spicedcocoa.wordpress.com/osd.xml" title="Spiced Ruby" />
	<atom:link rel='hub' href='http://spicedcocoa.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Rails 2.x to Rails 3</title>
		<link>http://spicedcocoa.wordpress.com/2010/10/06/rails-2-x-to-rails-3/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/10/06/rails-2-x-to-rails-3/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 11:29:05 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=221</guid>
		<description><![CDATA[Today I&#8217;m starting on upgrading my Rails 2 project to Rails 3 and I thought I&#8217;d put all the changes I need to make to get it working here incase anyone runs in to the same problem(s). Prepping for this shit I made sure I had the following tools before I started (this step is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=221&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m starting on upgrading my Rails 2 project to Rails 3 and I thought I&#8217;d put all the changes I need to make to get it working here incase anyone runs in to the same problem(s).</p>
<h2>Prepping for this shit</h2>
<p>I made sure I had the following tools before I started (this step is VERY important):</p>
<ul>
<li>Enough Coffee</li>
<li>Get EVERYONE out of the house (Make sure your girlfriend or wife isn&#8217;t around. Porting Rails 2 to 3 may in some cases be bad for your relation ship due to shouting, cursing and/or throwing stuff at her)</li>
<li>Headphones</li>
<li>Good music — I prefer the following: <a href="http://listen.di.fm/public3/dubstep.pls">DI.fm dubstep</a></li>
<li>Porn (If that&#8217;s what keeps you calm! Hey I&#8217;m not saying I&#8217;m watching it .. but, you know, if that&#8217;s your thing go for it!)</li>
</ul>
<h2>My gems:</h2>
<p>Before I started I checked my environment for gems and made sure they were working with rails 3 and moved them over to the new rails project in to the Gemfile. The project uses the following Gems (=&gt; Replaced with):</p>
<ul>
<li><span style="color:#00ff00;">pluginaweek-state_machine</span></li>
<li>validation_reflection =&gt; <span style="color:#ff0000;">removed</span></li>
<li>authlogic =&gt; <span style="color:#00ff00;">devise</span></li>
<li>searchlogic =&gt; <span style="color:#00ff00;">meta_search</span></li>
<li>compass =&gt; <span style="color:#00ff00;">more/less</span></li>
<li>haml =&gt; <span style="color:#ff0000;">removed</span></li>
<li><span style="color:#00ff00;">formtastic</span></li>
<li><span style="color:#00ff00;">will_paginate</span></li>
<li><span style="color:#00ff00;">inherited_resources</span></li>
<li><span style="color:#00ff00;">responders</span></li>
<li><span style="color:#00ff00;">has_scope</span></li>
<li>hpricot =&gt; <span style="color:#00ff00;">nokogiri</span></li>
<li>gruff =&gt; <span style="color:#ff0000;">removed</span></li>
<li><span style="color:#00ff00;">rboss</span></li>
<li><span style="color:#00ff00;">exception_notifier</span></li>
</ul>
<h2>Errors Problems (notes)</h2>
<p>The problems I&#8217;ve run in to are none so far:</p>
<h4>SASS to Less</h4>
<p>This is an absolute pain, I swear. I haven&#8217;t been able to find a tool which can convert SASS to Less so I have to do everything by hand (If at this point you&#8217;re thinking, DUDE, you stupid fuck use XXXX for that or use XXX regexp for that. Then please do share!). I did came up with this Regexp which should make it a little bit easier if you&#8217;re using TextMate (or any other editor):</p>
<p>Find:</p>
<p><pre class="brush: ruby;">/^(\s*):?(\S*)([\s\S*]*)/i</pre></p>
<p>And replace:</p>
<p><pre class="brush: plain;">$1$2:$3;</pre></p>
<p>All you have to do by hand is add de brackets around your classes and IDs</p>
<h3>Active Record — Custom select</h3>
<p>I have the following scope with a custom select:</p>
<p><pre class="brush: ruby;">scope :include_matches_count, lambda {
select(&quot;organizations.*, SUM(spider_webs.matches_found) AS spider_matches_found&quot;).
joins(&quot;LEFT JOIN orders ON organizations.id = orders.organization_id LEFT JOIN spider_webs on orders.id = spider_webs.webs_id AND spider_webs.webs_type = 'Order'&quot;).
where('(spider_webs.id = (SELECT id FROM spider_webs AS n WHERE n.webs_id = orders.id AND n.webs_type = &quot;Order&quot; ORDER BY n.id DESC LIMIT 1) OR 1 = 1) AND organizations.customer_id = ?', User.current.customer_id).		group('organizations.id')
}</pre></p>
<p>If you would call this scope (say my model is called `MyObject`) MyObject.include_matches_count.empty? You&#8217;ll get the following error:</p>
<p><pre class="brush: plain;">undefined method `zero?' for #</pre></p>
<p>Hmm now that&#8217;s odd. Up on close inspection I noticed I had a very strange select in my console output:</p>
<p><pre class="brush: plain;">SELECT COUNT(*) AS count_all, organizations.id AS organizations_id FROM `organizations` LEFT JOIN orders ON organizations.id = orders.organization_id LEFT JOIN spider_webs on orders.id = spider_webs.webs_id AND spider_webs.webs_type = 'Order' WHERE ((spider_webs.id = (SELECT id FROM spider_webs AS n WHERE n.webs_id = orders.id AND n.webs_type = &quot;Order&quot; ORDER BY n.id DESC LIMIT 1) OR 1 = 1) AND organizations.customer_id = 3) GROUP BY organizations.id</pre></p>
<p>Huh? Where did my custom select go to? So I checked the rails code and it seems that if the object hasn&#8217;t been loaded before .empty? is called, Rails decides to just call count.zero? on the object. Ignoring your select and causing this error.</p>
<p>So if you have a custom select in a scope and you would like to check if the result is empty before displaying it make sure you call &#8220;.all&#8221; on it first:</p>
<p><pre class="brush: ruby;">MyObject.the_scope_with_a_custom_select.all.empty?</pre></p>
<p>updating while I&#8217;m on the train.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=221&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/10/06/rails-2-x-to-rails-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://listen.di.fm/public3/dubstep.pls" length="230" type="audio/x-scpls" />
<enclosure url="http://listen.di.fm/public3/dubstep.pls" length="230" type="audio/x-scpls" />
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on Rails queueing gem: Runner</title>
		<link>http://spicedcocoa.wordpress.com/2010/10/04/ruby-on-rails-queueing-gem-runner/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/10/04/ruby-on-rails-queueing-gem-runner/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 07:31:36 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=201</guid>
		<description><![CDATA[A week or so back we started porting projects to Rails 3 and all new projects were created using Rails 3. The project that I was working on (name irrelevant) needed some sort of concurrency. In the past we already tried a few existing Gems but there was always something missing or there was simply [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=201&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A week or so back we started porting projects to Rails 3 and all new projects were created using Rails 3. The project that I was working on (name irrelevant) needed some sort of concurrency. In the past we already tried a few existing Gems but there was always something missing or there was simply too much of something. Is most cases it was also hard to customize the gem or it simply didn&#8217;t live up to our expectations.</p>
<p>In the past we had also tried to create our own concurrency implementation but these either-way failed or were just too specifically designed. If you wanted to do something else than the feature it was designed for; you would have to rewrite parts of the code. You may call this design error, but it was simply not the intention to create a flexible concurrency implementation.</p>
<p>So our search for a new concurrency Gem went on; we tried two and came to the conclusion we would have to write something our self. I was given the task to create a new Gem. A new concurrency (queueing) Gem which would have to be flexible, maintainable and would have to be not as specific as we have been in the past. Or in fact this concurrency Gem had to be able to do all sort of tasks. From sending out mails to importing users from a CSV file.</p>
<p>I&#8217;d tried delayed_jobs and liked their implementation very much. The one thing we all agreed at here at the office was we didn&#8217;t want to have a separate Rake task which would require to be run in order to do some sort of concurrency. We wanted to be able to have the task been done within the application with whatever concurrency we specified; be it Forking or Threading or a simple yield, it all had to be possible. So with delayed_job in mind I started to design the Gem and came up with the name Runner (obvious name!).</p>
<p>I took me two days to implement a very basic version of the Gem. The only thing it could do back then was fork a method in the background without the need of an additional Rake task. At the current time of writing it has the following features:</p>
<ul>
<li>Supports various implementations of Concurrency (forking, threading and yielding. But the last isn&#8217;t really concurrency)</li>
<li>Developers using the Gem may add different kind of concurrency to gem by simply giving the concurrency class the Runner initializer</li>
<li>It has the ability to queue tasks which means you more or less park the tasks for later.</li>
<li>It may immediately run tasks in the background using the various concurrency methods.</li>
<li>Threading tasks requires no changes to your current classes.</li>
<li>Extending the backend (currently comes with ActiveRecord) only requires you to implement database specific code (scopes, etc.)</li>
</ul>
<p><span id="more-201"></span></p>
<p>As you can see after only a couple of days of hard work it can already do quite some things for any tasks you would like to run in the background. But as you probably wonder how does it really work and what&#8217;s the catch. Well there really is no catch, you only either way create a new block which you would like to run in the background or you specify a method to be always run in the background or you may call a method on the &#8220;chainable&#8221; spawn method as you will see below in the example code.</p>
<h2>Getting the gem</h2>
<p>If you like to try the Gem in an existing or new Rails 3 project you could add Runner to your Gemfile like so:</p>
<p><pre class="brush: plain;">gem 'runner', '0.1.4', :git =&gt; 'git://github.com/stygeo/runner.git' </pre></p>
<p>Or you could install it from the command line like:</p>
<p><pre class="brush: plain;">gem install runner</pre></p>
<h2>The examples</h2>
<p><em>Please note: the following class implementation of user will be used throughout the examples</em></p>
<p><pre class="brush: ruby;"># User.rb
class User
  def self.send_mass_mail
    # This tasks requires a lot of processing time
  end

  def say_hello
    puts &quot;Hello&quot;
  end

  def say_goodbye
    puts &quot;Good bye&quot;
  end
  handle_asynch :say_goodbye
end
</pre></p>
<p>You may immediately notice the handle_asynch class method. In short what this method does is it creates a new method on the class for the method you specify (in the case `say_goodbye`) which will handle all the background stuff. So if you&#8217;d do:</p>
<p><pre class="brush: ruby;"># example.rb
require 'user.rb'

u = User.new
u.say_goodbye</pre></p>
<p>It will automatically run the method `say_goodbye` in the background in a separate process or thread. There are times you&#8217;d like to run a method in the background at all times, such as say_goodbye. But there are times you&#8217;d like to run a method depending on some condition (background or not). If this is the case you could use the method `spawn` which is usable on every class (it&#8217;s included in class Object). This is how you could use spawn:</p>
<p><pre class="brush: ruby;"># example.rb
u = User.new
u.spawn.say_hello</pre></p>
<p>The spawn method uses a <strong>ProxyObject</strong> which creates a new <strong>PerformableMethod</strong>. PerformableMethod encapsulates your class (in this case `user`) and serializes the PerformableMethod with your class and the method you&#8217;d like to call. Once serialized it&#8217;s saved as a task in your database. Once it has been saved to the database it uses a <strong>TaskHandler</strong> which on its turn forks or threads a new process which deserialize your class&#8217; as a PerformableMethod. PerformableMethod plays a key role in the method calling. Here&#8217;s what it holds:</p>
<ul>
<li>Your class</li>
<li>The method to call (`say_hello`)</li>
</ul>
<p>The TaskHandler calls `perform` on the deserialized object (which is a PerformableMethod) in order to run the method you specified for the class you wanted to serialize. In some pseudo code this would be: <code>PerformableMethod (:class =&gt; user, :method =&gt; say_hello).perform { class.send(method) }</code> This is how Runner runs the tasks in the background in a nice and convenient way.</p>
<p>If you&#8217;d like to &#8220;park&#8221; a task in the queue (meaning you don&#8217;t run it immediately) you could pass :queue as the :method to spawn:</p>
<p><pre class="brush: ruby;">u.spawn(:method =&gt; :queue).say_hello</pre></p>
<p>or you could do</p>
<p><pre class="brush: ruby;">u.queue.say_hello</pre></p>
<p>The method `queue` is just short-hand for spawn(:method =&gt; :queue). When you queue a call it gets parked in a Task which you may resume to run at a later time. For example imagine that you&#8217;d like to, after a user signs up, the user receives an instruction manual at night by email. You could queue each `mail` method and, at night, use a Rake tasks (which you could set up with cron to run at night) which handles all tasks that are currently queued.</p>
<p>Early I talked about the different concurrency methods you may use with Runner. Runner supports by defaults 2 real concurrency method and a way to yield. You may use a fork or threading as concurrency methods, but you&#8217;re free to improve up on it if you so wish (more on that later). To use other than the default method (defaults can be set in the Runner initializer) you could pass the :with option spawn:</p>
<p><pre class="brush: ruby;"># example.rb
u = User.new
u.spawn(:with =&gt; :thread).say_hello</pre></p>
<p>The &lt;code&gt;:with =&gt; :thread&lt;/code&gt; option forces the task to run as thread instead of the default.  If you created a new concurrency method and added it to Runner (see below) you could also use the :with to force your own concurrency. For example you created the concurrency class <strong>Fibers</strong> (ConcurrencyFibers, Concurrency prefix is required) you could pass :fibers to the :with options so it will use your ConcurrencyFibers class as concurrency handler. (<em>Please note: This feature is not yet supported, you could however pass your newly created concurrency method as the default, which does work.)</em></p>
<p>So this is how Runner works and how you may use it. For more information about the Gem or if you have a feature request you could go see the <a href="http://github.com/stygeo/runner">Github page </a>. If you&#8217;d like to know more about the Gem&#8217;s internals, check out the code from github:</p>
<p><pre class="brush: plain;">git clone git://github.com/stygeo/runner.git</pre></p>
<p>and start reading from the <strong><em>message.rb</em></strong> file. This is the entry point and holds the <em>spawn </em>method, from there on you could just follow the code.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=201&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/10/04/ruby-on-rails-queueing-gem-runner/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>Name change — Spiced Ruby</title>
		<link>http://spicedcocoa.wordpress.com/2010/09/29/name-change-spiced-ruby/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/09/29/name-change-spiced-ruby/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 17:30:30 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=188</guid>
		<description><![CDATA[As you might have seen I&#8217;ve changed the name of the blog from Spiced Cocoa to Spiced Ruby. Simply said; I&#8217;m probably not going to blog about Cocoa anymore because I&#8217;m most likely no longer going to do any major development in the Objective-c/Cocoa area. It somehow saddens my heart to do it though, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=188&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As you might have seen I&#8217;ve changed the name of the blog from Spiced Cocoa to Spiced Ruby. Simply said; I&#8217;m probably not going to blog about Cocoa anymore because I&#8217;m most likely no longer going to do any major development in the Objective-c/Cocoa area.</p>
<p>It somehow saddens my heart to do it though, I mean I had some good times with Objective-c and a couple bads. I&#8217;ve honestly also lost a little interest in Objective-c. Yes, Objective-c. Not Apple development as a whole. I&#8217;m hoping it will be possible to get Ruby to the iPhone in the near future. So please for love of god Apple get Ruby to the iPhone, hot-cocoa is awesome!</p>
<p>Anywho, I hope some of you will stick around for Ruby&#8217;s sheer awesomeness!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=188&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/09/29/name-change-spiced-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>The Power of Ruby: Metaprogramming Part one</title>
		<link>http://spicedcocoa.wordpress.com/2010/09/25/the-power-of-ruby-metaprogramming-part-one/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/09/25/the-power-of-ruby-metaprogramming-part-one/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 23:58:01 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[metaprogramming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[1.9]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Ruby 1.9]]></category>
		<category><![CDATA[ruby19]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=156</guid>
		<description><![CDATA[Part one: Understanding Ruby Meta programming, who hasn&#8217;t heard of it these days? You see it everywhere, you perhaps do so your self without even knowing. But what exactly is this thing called Metaprogramming. In Ruby; it&#8217;s probably you best friend. And if it&#8217;s not, I&#8217;m pretty damn sure it will be! It&#8217;s hotter then [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=156&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Part one: Understanding Ruby</h1>
<p>Meta programming, who hasn&#8217;t heard of it these days? You see it everywhere, you perhaps do so your self without even knowing. But what exactly is this thing called Metaprogramming. In Ruby; it&#8217;s probably you best friend. And if it&#8217;s not, I&#8217;m pretty damn sure it will be! It&#8217;s hotter then your girlfriend or perhaps your boyfriend. Hell, it&#8217;s probably even hotter then your sister hottest girlfriend and that other girlfriend .. well you catch my drift! But in all seriousness it&#8217;s somewhat makes Ruby the awesome programming language as it is. But before we can actually use metaprogramming in language, you must understand the very basics of how Ruby works.<span id="more-156"></span></p>
<h2>Metaprogramming in one sentence</h2>
<p>Metaprogramming — Writing code that writes code.</p>
<p>Something which you have to understand about programming is that, mostly, or in some cases you try to make things a little easier for your self or perhaps others, no matter what language you program in. Take C for example; C is pretty close to machine code and thru machine code you try build abstract bridges from the silicon world to the more fluid word we inhabit. However the distance between those two world are rather large. But what if there were languages that were closer to application domain? Take Ruby for example, Ruby provides a much higher-level abstraction and lets you write code which is much closer to the target domain, which is why people consider higher-level languages. Who can blame them? Have you ever seen C code (I remember so well; I was so against high-level languages when I was doing C because it wasn&#8217;t cool enough)?</p>
<blockquote><p>But when you metaprogram, you are no longer limited to the set of abstractions built to your programming language. Instead, you can create new abstractions that are integrated into the host language. In effect, you&#8217;re creating a new, domain-specific programming language — one that&#8217;s designed to let you express the concepts you need to solve your particular problem.</p>
<p><em>Programming Ruby 1.9 — The pragmatic Programmers&#8217; Guide</em></p></blockquote>
<p>Ruby actually makes metaprogramming rather easy. Most advanced Ruby programmers mostly use metaprogramming in order to simplify their code or more dynamic.</p>
<h2>Meet the Classes and Objects</h2>
<p>Ruby is mostly all about Classes and Objects. There are a lot of different kind of types: classes, objects, class objects, instance methods, class methods, singleton classes, and virtual classes. But actually, Ruby is just basic. It has only one single underlying class and object structure</p>
<p>A Ruby object is nothing simply nothing more than: a set of flags, instance variables, and an associated classes. A Ruby class is an object of class <strong>Class</strong>. It has a set of method definitions and a reference to a superclass, which is a class itself. That&#8217;s basically all there is to a Ruby class.</p>
<h2>Me, self and I .. and Methods &#8230; and calling them, too</h2>
<p>Something which you might not know about ruby is that it has the concept of<em> current object</em>. The current object in Ruby is a read-only variable and you&#8217;ve probably been using it a lot. The current object is referenced by <em>self</em>.</p>
<p>The current object is taking care of a couple things. First off it controls how Ruby calls methods. In Ruby, as you might know, all method calls are done on some object. The object is also called the receiver. Second; the current object also controls how Ruby finds instance variables. When you access a variable it&#8217;s looked up in the current object by Ruby.</p>
<p>For example, if you make a method calls such as <em>puts &#8220;Hi there&#8221;</em>, there&#8217;s no explicit receiver. In this case, Ruby looks for the method &#8220;puts&#8221; in the current object as the receiver. It goes to self&#8217;s class and looks up the method (&#8220;puts&#8221;). If it can&#8217;t find puts in self&#8217;s class it&#8217;s being looked up in the superclass and so on. But what happens is that if you specify an implicit receiver such as <em>item.size</em> the process is very similar as calling a method without an implicit receiver. The only change is — however a vital one — is that the current object is being changed, for the duration of the call. Before the method lookup self is set to the receiver by Ruby (the object which is being referenced by the method). Once the method returns self is set back to what it once was.</p>
<p>Here&#8217;s a simple program</p>
<p><pre class="brush: ruby;">class Test
  def variable_test
    @var = 100
    two
  end

  def two
    @var
  end
end

test = Test.new
test.variable_test</pre></p>
<p><em>This produces:</em></p>
<p><pre class="brush: ruby;">100</pre></p>
<p>On the first line we create a new class of Test, assigning the return value, a new instance of Class Test, to test. On the second line we call variable_test with an implicit receiver which is test. When method variable_test is invoked, Ruby sets the current object to test. Inside variable_test we create a new variable @var and assign 100 to the newly created variable. @var Is created on the current object, and since the current object wasn&#8217;t changed since it&#8217;s set to instance test it will be created on instance test. After assigning @var method two is called, and since it has no explicit receiver it&#8217;s invoked on the current object, which is still our instance of class Test.</p>
<p>So now you know how Ruby looks up methods and assigns new variables. In the next in the Metaprogramming series I&#8217;ll discuss Class definitions, Singletons and probably also Inheritance. I hope you enjoyed the first one, and hopefully it has helped you a little bit in understanding the strange world of Ruby and Metaprogramming!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=156&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/09/25/the-power-of-ruby-metaprogramming-part-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on Rails Concurrency Gem</title>
		<link>http://spicedcocoa.wordpress.com/2010/09/24/ruby-on-rails-concurrency-gem/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/09/24/ruby-on-rails-concurrency-gem/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 19:55:33 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=166</guid>
		<description><![CDATA[I&#8217;ve just released a very alpha version of my Ruby on Rails concurrency Gem, Runner. The syntax is simple and doesn&#8217;t require any blocks. For example you could run a method in the background with as simple as: Which forces &#8220;my_method&#8221; to be executed in the background. Queue&#8217;ing methods With Runner it&#8217;s also possible to queue [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=166&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released a very alpha version of my Ruby on Rails concurrency Gem, Runner. The syntax is simple and doesn&#8217;t require any blocks. For example you could run a method in the background with as simple as:</p>
<p><pre class="brush: ruby;">Klass.spawn.my_method</pre></p>
<p>Which forces &#8220;my_method&#8221; to be executed in the background.</p>
<h2>Queue&#8217;ing methods</h2>
<p>With Runner it&#8217;s also possible to queue calls which will be executed at a later given time. For example you would like to do some very CPU intensive, long running method to be executed daily at 12AM:</p>
<p><pre class="brush: ruby;">class User
def takes_long_time
2 + 2 # I 'm not kidding!
end
end

# somewhere in your code:
user = User.new
user.spawn(:method =&gt; :queue).takes_long_time # =&gt; The method is now queued and won't be run

# In a rake task witch is run by cron at night
runner = Runner::TaskSpawner.new
runner.start_handlers # =&gt; All queued tasks are now being forked and run asynch in the background
</pre></p>
<p>For more information and features about the Gem please go to the <a href="http://github.com/stygeo/runner">github</a> repo.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=166&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/09/24/ruby-on-rails-concurrency-gem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby 1.9.2 released</title>
		<link>http://spicedcocoa.wordpress.com/2010/08/19/ruby-1-9-2-released/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/08/19/ruby-1-9-2-released/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 09:10:48 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby 1.9.2]]></category>
		<category><![CDATA[stable]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=149</guid>
		<description><![CDATA[Yoki Sonoda has just announced the stable release of Ruby 1.9.2! == About Ruby 1.9.2 Ruby 1.9.2 is mostly compatible with 1.9.1, except the following changes: * Many new methods * New socket API (IPv6 support) * New encodings * Random class that supports various random number generators * Time is reimplemented. There is no [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=149&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yoki Sonoda has just <a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/367983" target="_blank">announced</a> the stable release of Ruby 1.9.2!</p>
<blockquote>
<div id="_mcePaste">== About Ruby 1.9.2</div>
<div id="_mcePaste">Ruby 1.9.2 is mostly compatible with 1.9.1, except the</div>
<div id="_mcePaste">following changes:</div>
<div id="_mcePaste">* Many new methods</div>
<div id="_mcePaste">* New socket API (IPv6 support)</div>
<div id="_mcePaste">* New encodings</div>
<div id="_mcePaste">* Random class that supports various random number generators</div>
<div id="_mcePaste">* Time is reimplemented. There is no longer the year 2038 problem.</div>
<div id="_mcePaste">* some regexp enhancements</div>
<div id="_mcePaste">* $: no longer includes the current directory.</div>
<div id="_mcePaste">* dl is reimplemented on top of libffi.</div>
<div id="_mcePaste">* new psych library that wraps libyaml. You can use the library instead</div>
<div id="_mcePaste">of syck.</div>
</blockquote>
<div>More details to be found <a href="http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_0/NEWS">here</a> and <a href="http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_0/ChangeLog">here</a></div>
<div></div>
<div>It has been verified that 1.9.2 works on; Windows (32 and 64 bit  version as well as mingw 32), FreeBSD 6, MacOSX 10.5 (intel and 10.6, Solaris 10 and Symbian OS.</div>
<div>Let&#8217;s hope Rails 3 will get released this week too! :)</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=149&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/08/19/ruby-1-9-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>WANTED: Ruby on Rails Developers</title>
		<link>http://spicedcocoa.wordpress.com/2010/08/19/wanted-ruby-on-rails-developers/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/08/19/wanted-ruby-on-rails-developers/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 08:40:58 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=138</guid>
		<description><![CDATA[No, this ain&#8217;t some cheap ass ad campaign, this is an actual call for ruby developers interested in a job. The company that I currently work for is in a dire need of 2 new Ruby (on Rails) developers and asked us if we knew anyone or if we could be on the look out. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=138&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>No, this ain&#8217;t some cheap ass ad campaign, this is an actual call for ruby developers interested in a job. The company that I currently work for is in a dire need of 2 new Ruby (on Rails) developers and asked us if we knew anyone or if we could be on the look out.</p>
<p>So if you live in the Netherlands and happen to be somewhere near Hoofddorp, and you like .. no, absolutely <strong>love </strong>ruby then perhaps this might actually be a job for you! For more information you could look on our <a class="wp-caption" href="http://www.noxa.nl/vacatures" target="_blank">website</a> and apply if you&#8217;re interested.</p>
<p><span id="more-138"></span>Sorry &#8217;bout the Dutch</p>
<blockquote>
<h1>Ruby on Rails vacatures</h1>
<p><strong>Noxa is hard op zoek naar nieuwe programmeurs!</strong></p>
<p><strong> </strong></p>
<p><strong>Ben je geïnteresseerd in 1 van deze vacatures, neem dan contact met ons op via het <a href="http://noxa.nl/contact" target="_blank">contactformulier</a>.</strong></p>
<h2>Ruby on Rails programmeur</h2>
<p>Vanaf jonge leeftijd altijd bezig geweest met programmeren? Toen knutselen met HTML/Javascript en nu je ouder bent op goed niveau programmeren met bijvoorbeeld C++ en Java? Dan kunnen wij jou een hele leuke dynamische baan aanbieden! Wij zijn namelijk op zoek naar een slimme collega die zich graag wil ontwikkelen in <a href="http://www.rubyonrails.org">Ruby on Rails</a> bij een jong bedrijf.</p>
<p>Voor de verbetering en aanpassing van onze applicaties voor onze projecten gebruiken wij Ruby en het Rails framework. Het gebruik van Ruby on Rails zorgt ervoor dat we productief zijn en dat we meer lol hebben in programmeren.</p>
<p>Samen met 5 collega-programmeurs (gemiddelde leeftijd 25) draag jij zorg voor een state of the art omgeving en adviseer jij het management over de inrichting van applicaties en de implementatie van nieuwe features. Op het gezellige en informele hoofdkantoor van ons zusterbedrijf StudentenWerk werken inmiddels meer dan 100 collega’s.</p>
<p><strong>Arbeidsvoorwaarden</strong></p>
<ul>
<li>Uitstekend marktconform salaris, van € 2000,- tot € 4000,- bruto per maand</li>
<li>Goede secundaire arbeidsvoorwaarden binnen een snelgroeiende, jonge en informele organisatie</li>
</ul>
<p><a href="http://www.noxa.nl/vacatures" target="_blank">Entire job description</a></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=138&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/08/19/wanted-ruby-on-rails-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>Objectiveresource does it need rails?</title>
		<link>http://spicedcocoa.wordpress.com/2010/08/15/objectiveresource-does-it-need-rails/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/08/15/objectiveresource-does-it-need-rails/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 21:27:16 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[ObjectiveResource]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[no rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=112</guid>
		<description><![CDATA[A couple of days back I was looking over my Blog Stats and an interesting search query came up: objectiveresource does it need rails? This query got me interested in trying out Objective resource without rails, and technically it should be possible because ObjectiveResource just requires the fetched XML to be in a specific format. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=112&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A couple of days back I was looking over my Blog Stats and an interesting search query came up:</p>
<blockquote><p>objectiveresource does it need rails?</p></blockquote>
<p>This query got me interested in trying out Objective resource without rails, and technically it should be possible because ObjectiveResource just requires the fetched XML to be in a specific format. So what we can do is create a simple XML document in the same format as Rails out puts its XML. And while we&#8217;re at it, let&#8217;s create a simple webserver which outputs the XML (honestly I just don&#8217;t have Apache working here on my laptop and I seriously can&#8217;t be arsed to set it up, and its way too much fun to create a simple Ruby webserver.). So let&#8217;s get started!</p>
<p><span id="more-112"></span></p>
<h2>The Webserver</h2>
<p><pre class="brush: ruby;">require 'socket'
webserver = TCPServer.new('127.0.0.1', 7125)
while(session = webserver.accept)
	session.print &quot;HTTP/1.1 200/OK\rContent-type:text/xml\r\n\r\n&quot;
	session.print &lt;&lt;-XML
		&lt;sessions&gt;
			&lt;session&gt;
				&lt;name&gt;Jeffrey Wilcke&lt;/name&gt;
				&lt;password&gt;secter&lt;/password&gt;
				&lt;email&gt;someemail@gmail.com&lt;/email&gt;
			&lt;/session&gt;
		&lt;/sessions&gt;
	XML

	session.close
end
</pre></p>
<p>Well ain&#8217;t that a pretty small web server? ;)</p>
<p>Now let us fire up XCode, create a new project and create the necessary files and classes (I&#8217;m not going to demonstrate how to set up your entire project, you should know how to do that your self) and don&#8217;t forget to create the sessions file/class</p>
<p><pre class="brush: objc;">#import &lt;Foundation/Foundation.h&gt;
#import &lt;ObjectiveResource/ObjectiveResource.h&gt;

@interface Session : NSObject {
	NSString *sessionId;
	NSString *email;
        NSString *password;
}

@property (nonatomic, retain) NSString *userId;
@property (nonatomic, retain) NSString *email;
@property (nonatomic, retain) NSString *password
@end</pre></p>
<p>Now implement that file, load up your project and if you did everything correctly your OS X/iPhone application should display your sessions.</p>
<p>So what did actually happen? Our tiny little server accepts any HTTP requests and outputs our session (the path doesn&#8217;t matter). So when our iPhone or OS X application does a request for the session resource the server response with our session&#8217;s XML and ObjectiveResource parse the XML just as if it came from rails.</p>
<p>That proves ObjectiveResource doesn&#8217;t need rails!</p>
<p><strong>PS. I hope that the user that did the search query found this helpful! :)</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=112&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/08/15/objectiveresource-does-it-need-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing RVM, Ruby 1.9.2 and Rails 3 RC2</title>
		<link>http://spicedcocoa.wordpress.com/2010/08/14/installing-rvm-ruby-1-9-2-and-rails-3-rc2/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/08/14/installing-rvm-ruby-1-9-2-and-rails-3-rc2/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 22:46:15 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Ruby 1.9]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Ruby Version Manager]]></category>
		<category><![CDATA[RVM]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=106</guid>
		<description><![CDATA[So you want to try ruby 1.9 and rails 3? Awesome! You&#8217;ve come to the right place. Before installing ruby 1.9 or rails 3 you want to install RVM (Ruby Version Manager). RVM is a handy tool which allows you to have multiple version of Ruby installed on your system (along with gems, which include [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=106&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So you want to try ruby 1.9 and rails 3? Awesome! You&#8217;ve come to the right place. Before installing ruby 1.9 or rails 3 you want to install RVM (Ruby Version Manager). RVM is a handy tool which allows you to have multiple version of Ruby installed on your system (along with gems, which include Rails).</p>
<h2>RVM — Ruby Version Manager</h2>
<p>Straight from the RVM <a href="http://rvm.beginrescueend.com/" target="_blank">Website</a>:</p>
<blockquote><p>RVM is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems. RVM itself is easy to install!</p></blockquote>
<p>I couldn&#8217;t have explained it better my self. So let&#8217;s get started! In order to install RVM just download the gem<br />
sudo gem install rvm</p>
<p><span id="more-106"></span></p>
<p>The gem it self allows you to run the installer script, which setup the RVM environment  for you. Run it with <code>rvm-install</code> (Do NOT sudo it, it installs locally in your home folder). Once the installer is done you&#8217;re ready to install ruby 1.9 and rails 3 :)</p>
<p>Before I&#8217;ll explain how to use RVM let&#8217;s install Ruby 1.9.2 and while it compiles you may keep on reading. So if you haven&#8217;t loaded your shell do it now and type <code>rvm install 1.9.2</code> (at the time of writing 1.9.2 is the latest version Ruby). Now jump over to the <a href="http://rvm.beginrescueend.com/rvm/basics/" target="_blank">RVM Basics page</a> in order to understand more about RVM (I could copy and paste it here, but I&#8217;m sort of lazy and don&#8217;t wanna take credits for something I didn&#8217;t write)</p>
<p>Alright, so once you&#8217;ve read the basics about RVM let&#8217;s change our Ruby environment (if Ruby is done compiling and installing) with <code>rvm use 1.9.2</code> or shorter <code>rvm 1.9.2</code>. Now in order to install Rails 3 we first need to install some deps because rails pre doesn&#8217;t do it for you:<br />
<code>gem install tzinfo builder memcache-client rack rack-test erubis mail text-format bundler thor i18n<br />
gem install rails --pre</code></p>
<p>Note that you don&#8217;t install the gems with sudo simply because rvm has its own directory for this. It installs all your gems in its own .rvm directory in your home dir (~/.rvm/). Once the Rails 3 gems have been installed you&#8217;re ready to go. Run <code>rails -v</code> just to make sure, if it&#8217;s correctly shows you 3.0.0 RC2 you&#8217;re ready to create a new rails project with rails new &lt;Project name&gt;.</p>
<p>Enjoy rails 3 and ruby 1.9.2 :)</p>
<h2>Rails 3 and Ruby 1.9.2 links</h2>
<p><a href="http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1" target="_blank">Upgrading to rails 3 part 1 </a> and <a href="http://railscasts.com/episodes/226-upgrading-to-rails-3-part-2" target="_blank">part 2</a> (Railscasts)<br />
<a href="http://edgeguides.rubyonrails.org/3_0_release_notes.html" target="_blank">Rails 3.0 release notes</a> (RoR Guide)<br />
<a href="http://eigenclass.org/hiki.rb?Changes+in+Ruby+1.9" target="_blank">Changes in Ruby 1.9</a> (Eigenclass, Must read)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=106&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/08/14/installing-rvm-ruby-1-9-2-and-rails-3-rc2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
		<item>
		<title>Obj C + Cocoa vs everything else</title>
		<link>http://spicedcocoa.wordpress.com/2010/08/11/objc-cocoa-vs-everything-else/</link>
		<comments>http://spicedcocoa.wordpress.com/2010/08/11/objc-cocoa-vs-everything-else/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 17:51:50 +0000</pubDate>
		<dc:creator>Jeffrey Wilcke</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[1.9]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails 3]]></category>
		<category><![CDATA[rails3]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://spicedcocoa.wordpress.com/?p=100</guid>
		<description><![CDATA[I haven&#8217;t written anything for quite a while, mostly because I simply had nothing interesting to write about. Or at least nothing interesting about Cocoa or Objective-C. The last couple of weeks I&#8217;ve been doing less than the usual amount of Objective-C and/or Cocoa. One of the reasons is work and partly because I&#8217;ve been [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=100&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t written anything for quite a while, mostly because I simply had nothing interesting to write about. Or at least nothing interesting about Cocoa or Objective-C. The last couple of weeks I&#8217;ve been doing less than the usual amount of Objective-C and/or Cocoa. One of the reasons is work and partly because I&#8217;ve been lazy. With lazy I&#8217;m not saying I haven&#8217;t done any programming or reading about programming languages at all. Work has forced me in doing more Ruby/Ruby on Rails simply because the projects I&#8217;m on had higher priority than the iPhone apps. And to be fairly honest; I didn&#8217;t mind at all.</p>
<p><span id="more-100"></span></p>
<p>By forcing me in to the ruby world again I&#8217;ve come to realize the magical wonders of Ruby and Ruby on Rails again. And this is also where I&#8217;ve become lazy. Objective-C in all it&#8217;s awesomeness is still so much more complicated and requires so much more work in order to do something as`simple` as &#8220;a&#8221; + &#8220;b&#8221;.</p>
<p>I&#8217;ve been wanting to write about my `new` found love for Ruby for quite some time but I got put of by it somehow. To be honest however I don&#8217;t think this love is quite new. I think I had just lost my love for Ruby somewhere along the way, or perhaps I just came to accept the fact that ruby just is as how it goes with many good things in life. However my new-found love is definitely for Ruby 1.9(.2) and the latest and greatest Rails version (3.0.0 RC 2). So in that way, it&#8217;s new.</p>
<p>First I thought that perhaps I should create a new blog for Ruby specific things but then I thought, why? I&#8217;ve this blog and although the blog title is &#8220;Cocoa&#8221; why the fuck couldn&#8217;t I just use this for programming in general? Or to be more precise; Objective-C, Cocoa, Ruby and Ruby on Rails. Those 2 framework and programming languages I&#8217;ve come to love in the last 2 and a half-year (I&#8217;ve only been doing Obj-C for less than a year and Ruby for nearly 2 and a half) would go together, it&#8217;s ok for me to have more than one lover, wouldn&#8217;t you agree? So from this day forth, this blog will be used for everything programming related.</p>
<p>Oh and since I&#8217;m on the personal/emotional tour anyway; I&#8217;d like to thank the people that have put their faith in me (You know who you are!) and giving me the opportunity to actually learn something new. Trust seems, almost, impossible to earn these days.</p>
<p>Peace out my brother and sisters! And if you haven&#8217;t already check out Ruby 1.9 and Ruby on Rails 3 pre with RVM (more on that in the next post).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spicedcocoa.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spicedcocoa.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spicedcocoa.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spicedcocoa.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/spicedcocoa.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/spicedcocoa.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/spicedcocoa.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/spicedcocoa.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spicedcocoa.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spicedcocoa.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spicedcocoa.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spicedcocoa.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spicedcocoa.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spicedcocoa.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=spicedcocoa.wordpress.com&amp;blog=13891564&amp;post=100&amp;subd=spicedcocoa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://spicedcocoa.wordpress.com/2010/08/11/objc-cocoa-vs-everything-else/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85509aa7abacfc7f94e4799e2efd7e92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeffrey Wilcke</media:title>
		</media:content>
	</item>
	</channel>
</rss>
