<?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" xml:lang="en-US" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/atom/ns#">
  <title>The Code Kitchen</title>
  <tagline mode="escaped" type="text/html"/>
  <id>tag:www.codekitchen.net,2005:ozimodo</id>
  <generator url="http://ozimodo.rubyforge.org/">ozimodo</generator>
  <link href="http://codekitchen.net/" rel="alternate" type="text/html"/>
  <modified>2008-06-14T06:42:00Z</modified>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-19</id>
    <issued>2008-06-14T06:42:00Z</issued>
    <modified>2008-06-14T06:42:00Z</modified>
    <title>delicate arch in arches nationa...</title>
    <link href="http://codekitchen.net/2008/06/14/#19" rel="alternate" type="text/html"/>
    <dc:subject>utah</dc:subject>
    <content mode="escaped" type="text/html">&lt;img src="http://farm4.static.flickr.com/3129/2577070835_83a05c2510.jpg?v=0" alt="delicate arch in arches national park, utah"&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-18</id>
    <issued>2008-06-01T09:51:00Z</issued>
    <modified>2008-06-01T09:51:00Z</modified>
    <title>wildflower in foreground, mount...</title>
    <link href="http://codekitchen.net/2008/06/01/#18" rel="alternate" type="text/html"/>
    <dc:subject>utah</dc:subject>
    <content mode="escaped" type="text/html">&lt;img src="http://farm3.static.flickr.com/2244/2542145520_257dd587cf.jpg?v=0" alt="wildflower in foreground, mountains and clouds in background"&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-17</id>
    <issued>2008-05-31T10:26:00Z</issued>
    <modified>2008-05-31T10:26:00Z</modified>
    <title>Phun finally has an OS X port!&amp;...</title>
    <link href="http://codekitchen.net/2008/05/31/#17" rel="alternate" type="text/html"/>
    <dc:subject>games</dc:subject>
    <dc:subject>physics</dc:subject>
    <content mode="escaped" type="text/html">&lt;p&gt;&lt;a href="http://phun.cs.umu.se/wiki/Phun"&gt;Phun finally has an OS X port!&lt;/a&gt;&amp;nbsp;Playing with this game brings back memories of the first time I threw away the Lego instructions and decided to build what &lt;em&gt;I&lt;/em&gt; wanted to build.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-16</id>
    <issued>2008-05-31T10:08:00Z</issued>
    <modified>2008-05-31T10:08:00Z</modified>
    <title>Neo4j, a database storage engin...</title>
    <link href="http://codekitchen.net/2008/05/31/#16" rel="alternate" type="text/html"/>
    <dc:subject>databases</dc:subject>
    <dc:subject>programming</dc:subject>
    <content mode="escaped" type="text/html">&lt;p&gt;&lt;a href="http://www.neo4j.org/"&gt;Neo4j&lt;/a&gt;, a database storage engine that operates on nodes and &amp;quot;relationships&amp;quot; (edges). Designed for fast traversals of the network.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-15</id>
    <issued>2008-05-19T19:23:00Z</issued>
    <modified>2008-05-19T19:23:00Z</modified>
    <title>Greek Iced Coffee (Frappe)</title>
    <link href="http://codekitchen.net/2008/05/19/#15" rel="alternate" type="text/html"/>
    <dc:subject>recipes</dc:subject>
    <dc:subject>drink</dc:subject>
    <content mode="escaped" type="text/html">&lt;img alt="2507492352_a4c09f4944" src="http://farm4.static.flickr.com/3006/2507492352_a4c09f4944.jpg?v=0" style="float:right" width="200" /&gt;&lt;p&gt;Apparently this has become something of a national drink in Greece over the last 50 years. I was skeptical about using instant coffee, but it works really well in this recipe. You wouldn't get the same kind of foam on top with normal coffee grounds. It's a great summer alternative to iced latte if you don't have an espresso machine. My next experiment will be to pick up some irish creme or vanilla flavoring and try adding that.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Read on for the recipe.&lt;/em&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-13</id>
    <issued>2008-05-09T20:32:00Z</issued>
    <modified>2008-05-09T20:32:00Z</modified>
    <title>cool shyguy wall decoration</title>
    <link href="http://codekitchen.net/2008/05/09/#13" rel="alternate" type="text/html"/>
    <dc:subject>games</dc:subject>
    <dc:subject>projects</dc:subject>
    <dc:subject>art</dc:subject>
    <dc:subject>photos</dc:subject>
    <content mode="escaped" type="text/html">&lt;img src="http://farm3.static.flickr.com/2203/2449256665_7abf631aa4.jpg?v=0" alt="cool shyguy wall decoration"&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-8</id>
    <issued>2008-04-13T18:20:00Z</issued>
    <modified>2008-04-13T18:20:00Z</modified>
    <title>Cool looking spider sitting on...</title>
    <link href="http://codekitchen.net/2008/04/13/#8" rel="alternate" type="text/html"/>
    <dc:subject>photos</dc:subject>
    <content mode="escaped" type="text/html">&lt;img src="http://farm3.static.flickr.com/2020/2411809741_45211c1c22.jpg?v=0" alt="Cool looking spider sitting on our backyard hose"&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-11</id>
    <issued>2007-10-31T18:41:00Z</issued>
    <modified>2007-10-31T18:41:00Z</modified>
    <title>In The Beginning There Was: Pon...</title>
    <link href="http://codekitchen.net/2007/10/31/#11" rel="alternate" type="text/html"/>
    <dc:subject>games</dc:subject>
    <dc:subject>quartz</dc:subject>
    <content mode="escaped" type="text/html">&lt;p style="text-align:center"&gt;Requires Mac OS X 10.5 (Leopard) and Apple Safari. Yeah. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="/assets/0000/0005/pong.qtz"&gt; Download Source &lt;/a&gt;&lt;/p&gt;
&lt;script type="text/javascript"&gt;
(function() {
var matcher = /mac os x 10_5.*safari\//;
if (navigator.userAgent.toLowerCase().match(matcher)) {
document.write('&lt;embed type="application/x-quartzcomposer" src="/assets/0000/0005/pong.qtz" id="game-pong" width="400px" height="248px" opaque="true"&gt;&lt;/embed&gt;');
}
})();
&lt;/script&gt;
&lt;p&gt;Hard-coding the velocities and limiting the animation rate to 30 frames per second has not worked all that well (not surprising, locking the logic rate to the rendering frame rate is always asking for trouble). You can see how the speed of the ball and paddles isn't consistent. So fixed rate logic is out. Delta-based animation is in for the next project.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-6</id>
    <issued>2007-04-27T14:10:00Z</issued>
    <modified>2007-04-27T14:10:00Z</modified>
    <title>Kenta Cho's Mu-cade for OS X</title>
    <link href="http://codekitchen.net/2007/04/27/#6" rel="alternate" type="text/html"/>
    <dc:subject>games</dc:subject>
    <content mode="escaped" type="text/html">&lt;p&gt;An awesome snake-like shooter, now for Mac OS X 10.4.&lt;/p&gt;
&lt;img width="320" height="240" alt="" src="/assets/0000/0001/mcd_1.gif" /&gt;
&lt;p&gt;&lt;a href="http://www.asahi-net.or.jp/~cs8k-cyu/windows/mcd_e.html"&gt;Mu-cade&lt;/a&gt; for OS X.&lt;/p&gt;
&lt;blockquote&gt; The Physics Centipede Invasion. &lt;br /&gt;
Smashup waggly shmup, 'Mu-cade'. &lt;/blockquote&gt;
&lt;p&gt;(&lt;a href="/assets/0000/0003/mcd.dmg"&gt;download&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:smaller"&gt;&lt;a href="/assets/0000/0004/mcd_patch.diff"&gt;patch file&lt;/a&gt; if anybody wants to build it themselves.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I tried the game on a PowerPC Mac, and while it loads and runs just fine, it's not playable. There's probably some endian issues in the game's internal data structures. If I get some time I'll look into it, but for now this release is Intel-only. :'(&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-3</id>
    <issued>2007-04-03T14:08:00Z</issued>
    <modified>2007-04-03T14:08:00Z</modified>
    <title>Mozy Deathmatch II</title>
    <link href="http://codekitchen.net/2007/04/03/#3" rel="alternate" type="text/html"/>
    <dc:subject>ruby</dc:subject>
    <dc:subject>utah</dc:subject>
    <dc:subject>programming</dc:subject>
    <content mode="escaped" type="text/html">&lt;p&gt;We're putting on another coding deathmatch this month, April 14th. We've got $20,000 in prizes to give away this time and all it takes is a few hours on a Saturday to participate, so if you live in Utah &lt;a href="http://mozy.com/contest"&gt;give it a shot!&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.codekitchen.net,2005:ozimodo-2</id>
    <issued>2007-04-01T13:39:00Z</issued>
    <modified>2007-04-01T13:39:00Z</modified>
    <title>Further #to_proc Abuse</title>
    <link href="http://codekitchen.net/2007/04/01/#2" rel="alternate" type="text/html"/>
    <dc:subject>ruby</dc:subject>
    <dc:subject>hacks</dc:subject>
    <dc:subject>programming</dc:subject>
    <content mode="escaped" type="text/html">&lt;p&gt;Everybody &lt;a href="http://pragdave.pragprog.com/pragdave/2005/11/symbolto_proc.html"&gt;loves to abuse&lt;/a&gt; &lt;code class="ruby"&gt;#to_proc&lt;/code&gt;. The &lt;code class="ruby"&gt;Symbol#to_proc&lt;/code&gt; extension has even been &lt;a href="http://eigenclass.org/hiki.rb?Changes+in+Ruby+1.9+update+4"&gt;baked in to Ruby 1.9&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Why not continue the duck typing abuse? Let's build a cheap ActiveRecord knock-off for Enumerable:&lt;/p&gt;
&lt;pre&gt;&lt;code class="ruby"&gt;my_peeps.find_all(&amp;amp;{:last_name =&amp;gt; &amp;quot;Palmer&amp;quot;})  appointments.find_all(&amp;amp;{:description =&amp;gt; /billable/i, :time =&amp;gt; (start_time..end_time)})  my_socks.any?(&amp;amp;{:status =&amp;gt; 'washed'}) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The implementation is simple.&lt;/p&gt;
&lt;pre&gt;&lt;code class="ruby"&gt;class Hash; def to_proc   proc { |obj| self.inject(true) { |m,(k,v)| m &amp;amp;&amp;amp; v === obj.send(k) } } end; end &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, I wouldn't try to argue that it's as useful as &lt;code&gt;Symbol#to_proc&lt;/code&gt;. Fun to play with, though. I'm using it in a &lt;a href="http://rubyosa.rubyforge.org/"&gt;RubyOSA&lt;/a&gt; script that I'm building for Colleen. For completeness, this version performs a little better if the hash has many terms and a lot of records will be filtered out:&lt;/p&gt;
&lt;pre&gt;&lt;code class="ruby"&gt;class Hash; def to_proc     proc { |obj| self.inject(nil) { |_,(k,v)| v === obj.send(k) || (break false) } } end; end &lt;/code&gt;&lt;/pre&gt;</content>
  </entry>
</feed>
