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

<channel>
	<title>Illuminerdi.com &#187; ruby</title>
	<atom:link href="http://illuminerdi.com/category/coding/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://illuminerdi.com</link>
	<description>Future science is magic!</description>
	<lastBuildDate>Thu, 09 Sep 2010 02:45:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Another Busy Weekend</title>
		<link>http://illuminerdi.com/2010/02/another-busy-weekend/</link>
		<comments>http://illuminerdi.com/2010/02/another-busy-weekend/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 06:56:59 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[adventures in drinking]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/?p=484</guid>
		<description><![CDATA[What all did I do this weekend?

Chores. Yes, I did chores.
Played with Oscar. So much playing. It was great. I need to add pictures to his site.
Finished Pratchett&#8217;s latest Discworld book, Making Money. It was great. I like the Moist Von Lipwig character, it&#8217;s adding dimension to Lord Vetinari, and since so many of the [...]]]></description>
			<content:encoded><![CDATA[<p>What all did I do this weekend?</p>
<ul>
<li>Chores. Yes, I did chores.</li>
<li>Played with Oscar. So much playing. It was great. I need to add pictures to <a href="http://oscarkilgore.com">his site</a>.</li>
<li>Finished Pratchett&#8217;s latest Discworld book, <a href="http://www.amazon.com/Making-Money-Discworld-Novels-Pratchett/dp/0061161659">Making Money</a>. It was great. I like the Moist Von Lipwig character, it&#8217;s adding dimension to Lord Vetinari, and since so many of the books have followed Commander Sam Vimes&#8217; adventures it&#8217;s nice to see him from a different perspective. Side Note: Pratchett&#8217;s storybook &#8220;Where&#8217;s my Cow?&#8221; featuring the City Watch cast is one of Oscar&#8217;s favorite books. (Side Note 2: looks like there&#8217;s another Discworld book out, with another soon to be released. Even diagnosed with Alzheimer&#8217;s, Pratchett continues to crank them out.)</li>
<li>Developed a multi-site single sign-on system in Rails. It allows a site using an API_CODE to register a user, which returns a token that can be used by another site to verify that the visitor is logged in and spawn a new session. The API allows a chunk of anonymous data to be registered along with the user to be passed along to the second site. Really, it&#8217;s a simple application with two RESTful web services. I&#8217;m pretty proud of it.</li>
<li>Discovered that the infused vodka we made last Fall mixes a little too well with cranberry juice.</li>
<li>Started playing back through God of War again, which is great fun and I wish I&#8217;d finished it back on the PS2 when I first got it years ago.</li>
<li>Purchased and currently enjoying the new Fear Factory album. I&#8217;ll write a review once I have it fully consumed. So far? Happiness.</li>
</ul>
<p>Things I didn&#8217;t do that I wanted to:</p>
<ul>
<li>While I moved the File Server out of the office into the living room and made a place for it, I didn&#8217;t plug it in and get it up and running again. This is annoying, I want access to my music library again.</li>
<li>I wanted to clean Oscar&#8217;s room today. Oh well.</li>
<li>I wanted to get a new DVD started for the Grandparents in PA.</li>
<li>I wanted to get started on the two short story ideas I&#8217;ve had going through my head the past week. I also wanted to get some edits into Down the Path while they were still fresh in my head from last Thursday&#8217;s North Sea Writers meeting.</li>
</ul>
<p>We also went shopping last night (Oscar played with a Nerf battle axe and talked me into buying a SpongeBob SquarePants DVD set), and we also went to Matt&#8217;s for dinner today and Oscar went silly playing with Callie, Matt&#8217;s Welsh Pembroke Corgi. Tomorrow Dena is bringing the kids downtown since they all have the day off and we&#8217;ll be meeting for coffee.</p>
<p>Exhausting.</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2010/02/another-busy-weekend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not a Stat Ho</title>
		<link>http://illuminerdi.com/2010/02/not-a-stat-ho/</link>
		<comments>http://illuminerdi.com/2010/02/not-a-stat-ho/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 18:31:10 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[cfwheels]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/?p=473</guid>
		<description><![CDATA[I&#8217;m not. I swear. But I decided to go and check on the two open source projects I&#8217;ve pushed to see how they were doing:

http://gemcutter.org/gems/nanowrimo
http://cfwheels.org/plugins/listing/23
http://defaultscopecfwheels.riaforge.org/

I was expecting meager numbers for the CF/Wheels plugin I built (total of 32 between the official plugin listing site and the RIAForge site), but the Nanowrimo gem has been downloaded [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not. I swear. But I decided to go and check on the two open source projects I&#8217;ve pushed to see how they were doing:</p>
<ul>
<li><a href="http://gemcutter.org/gems/nanowrimo">http://gemcutter.org/gems/nanowrimo</a></li>
<li><a href="http://cfwheels.org/plugins/listing/23">http://cfwheels.org/plugins/listing/23</a></li>
<li><a href="http://defaultscopecfwheels.riaforge.org/">http://defaultscopecfwheels.riaforge.org/</a></li>
</ul>
<p>I was expecting meager numbers for the CF/Wheels plugin I built (total of 32 between the official plugin listing site and the RIAForge site), but the Nanowrimo gem has been downloaded 159 times? That&#8217;s crazy cool. And a good chunk of those downloads (47?!) have been on the latest version, too. Pretty cool. I hope it&#8217;s useful for some people, and I&#8217;m pretty proud of the code in all its newbishness.</p>
<p>One of these days I&#8217;ll get around to finishing the Wrimostats.com site.</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2010/02/not-a-stat-ho/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new rails project time</title>
		<link>http://illuminerdi.com/2009/09/new-rails-project-time/</link>
		<comments>http://illuminerdi.com/2009/09/new-rails-project-time/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 06:45:13 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/?p=280</guid>
		<description><![CDATA[Rails Jukebox -
Needs a better name.
Features:

Rake task that scans a directory recursively for mp3 files, pulls out id3 data and puts it into a database
Rake task can be run multiple times for new files added
Front end displays library organized by artist, album, and song title
Ability to drag and drop artists, albums and/or song titles into [...]]]></description>
			<content:encoded><![CDATA[<p>Rails Jukebox -</p>
<p>Needs a better name.</p>
<p>Features:</p>
<ul>
<li>Rake task that scans a directory recursively for mp3 files, pulls out id3 data and puts it into a database</li>
<li>Rake task can be run multiple times for new files added</li>
<li>Front end displays library organized by artist, album, and song title</li>
<li>Ability to drag and drop artists, albums and/or song titles into a box that will act as a new &#8216;playlist&#8217;</li>
<li>Ability to save a playlist</li>
<li>Can load a playlist into an instance of XSPF Web Music Player (<a href="http://musicplayer.sourceforge.net/">http://musicplayer.sourceforge.net/</a>)</li>
</ul>
<p>I think this won&#8217;t be too rough to put together. Once it&#8217;s solid enough, I&#8217;ll release it to the world. I want this so that I can stream my music collection to anywhere. Figured it would be fun and might help some other people.</p>
<p>Seriously though, it needs a better name.</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2009/09/new-rails-project-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby example on WP-Syntax site</title>
		<link>http://illuminerdi.com/2009/07/ruby-example-on-wp-syntax-site/</link>
		<comments>http://illuminerdi.com/2009/07/ruby-example-on-wp-syntax-site/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 23:38:31 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/2009/07/ruby-example-on-wp-syntax-site/</guid>
		<description><![CDATA[Man, I miss the Ruby &#8211; must do more of it.
Anyway, this is what&#8217;s shown as an example of Ruby on the WP-Syntax notes/examples site:

1
2
3
4
5
class Example
  def example&#40;arg1&#41;
    return &#34;Hello: &#34; + arg1.to_s
  end
end

And I look at it and instantly I think about how much it doesn&#8217;t look like Ruby [...]]]></description>
			<content:encoded><![CDATA[<p>Man, I miss the Ruby &#8211; must do more of it.</p>
<p>Anyway, this is what&#8217;s shown as an example of Ruby on the WP-Syntax <a href="http://wordpress.org/extend/plugins/wp-syntax/other_notes/">notes/examples site</a>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> Example
  <span style="color:#9966CC; font-weight:bold;">def</span> example<span style="color:#006600; font-weight:bold;">&#40;</span>arg1<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#996600;">&quot;Hello: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> arg1.<span style="color:#9900CC;">to_s</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>And I look at it and instantly I think about how much it doesn&#8217;t look like Ruby code. So I edited it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> Example
  <span style="color:#9966CC; font-weight:bold;">def</span> example<span style="color:#006600; font-weight:bold;">&#40;</span>arg1<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#996600;">&quot;Hello: #arg1#&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>I thought about taking off the parentheses as well, but decided against it &#8211; more and more they are becoming necessary, and I&#8217;m sure a later version of the language will require them at some point. </p>
<p>&#8216;return&#8217; is bad form. Ruby by default returns the result of the last thing you process.</p>
<p>&#8216;.to_s&#8217; is sloppy, and concatenating strings with the &#8216;+&#8217; operator is more so. Simple string interpolation removes the need for a &#8216;.to_s&#8217; method call, and looks much better. More human-readable. </p>
<p>We&#8217;ll look past the design choices made with naming a method the same as the class that contains it.</p>
<p>That felt good.</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2009/07/ruby-example-on-wp-syntax-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Netflix API Wrapper</title>
		<link>http://illuminerdi.com/2009/06/ruby-netflix-api-wrapper/</link>
		<comments>http://illuminerdi.com/2009/06/ruby-netflix-api-wrapper/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 21:46:03 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/?p=178</guid>
		<description><![CDATA[My first quarter of Ruby I tried to build a Netflix API Wrapper (before I moved on to doing the Last.fm API wrapper when there were issues with the oauth gem for Ruby). I decided I would come back to it some day.
Just checked back with the Netflix.com Code Libraries page (http://developer.netflix.com/page/Resources), and it looks [...]]]></description>
			<content:encoded><![CDATA[<p>My first quarter of Ruby I tried to build a Netflix API Wrapper (before I moved on to doing the Last.fm API wrapper when there were issues with the oauth gem for Ruby). I decided I would come back to it some day.</p>
<p>Just checked back with the Netflix.com Code Libraries page (<a href="http://developer.netflix.com/page/Resources">http://developer.netflix.com/page/Resources</a>), and it looks like someone has added a library called &#8216;<a href="http://code.google.com/p/flix4r/">flix4r</a>&#8216;. It said it was really incomplete, so I figured I&#8217;d take a look at the source and see what it might take to help out. With the availability of social coding site github.com and the incredibly stable and universally-accepted release platform of rubyforge.org, I don&#8217;t understand why the codebase is sitting in Google Code. No gem has been released to Rubyforge or Github.</p>
<p>On top of that, it&#8217;s using tools from ActiveSupport, which is a Rails package. I&#8217;ve not seen this done in pure Ruby gems before, but I&#8217;m sure it happens. I just don&#8217;t like how this code looks. The structure of this package doesn&#8217;t look like any of the Ruby libraries I&#8217;ve worked on. I&#8217;m really not the right person to criticize, but if I wanted to help out on this project, there are just too many reasons not to. So I think once this year&#8217;s Nanowrimo is over and I&#8217;ve got Wrimostats.com working fairly well, I&#8217;ll shift gears and get back to the Retflix gem I wanted to build back in December.</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2009/06/ruby-netflix-api-wrapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>birthday</title>
		<link>http://illuminerdi.com/2009/05/birthday/</link>
		<comments>http://illuminerdi.com/2009/05/birthday/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:49:38 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/?p=145</guid>
		<description><![CDATA[
Yes, I turn 29 today.
Also in the news, I released Nanowrimo v0.7 to Rubyforge this morning. Happy birfday to that as well, then. You can find more information at the project page, http://rubyforge.org/projects/nanowrimo/
]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="is-mah-birfday" src="http://icanhascheezburger.files.wordpress.com/2007/06/is-mah-birfday-where-r-caek-dammit.jpg" alt="" width="400" height="408" /></p>
<p>Yes, I turn 29 today.</p>
<p>Also in the news, I released Nanowrimo v0.7 to Rubyforge this morning. Happy birfday to that as well, then. You can find more information at the project page, <a href="http://rubyforge.org/projects/nanowrimo/">http://rubyforge.org/projects/nanowrimo/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2009/05/birthday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fun with Ruby&#8217;s Enumerable</title>
		<link>http://illuminerdi.com/2009/05/fun-with-rubys-enumerable/</link>
		<comments>http://illuminerdi.com/2009/05/fun-with-rubys-enumerable/#comments</comments>
		<pubDate>Thu, 28 May 2009 22:05:15 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/?p=126</guid>
		<description><![CDATA[Ran into this on a legacy Rails app today:

1
&#60;% for alpha_link in &#91;'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y'&#93; -%&#62;

And thought &#8211; Hmm, someone doesn&#8217;t understand Enumerable. Otherwise they might have done this:

1
&#60;% &#40;'A'..'Z'&#41;.each do &#124;alpha_link&#124; -%&#62;

Concise!
]]></description>
			<content:encoded><![CDATA[<p>Ran into this on a legacy Rails app today:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">for</span> alpha_link <span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'A'</span>,<span style="color:#996600;">'B'</span>,<span style="color:#996600;">'C'</span>,<span style="color:#996600;">'D'</span>,<span style="color:#996600;">'E'</span>,<span style="color:#996600;">'F'</span>,<span style="color:#996600;">'G'</span>,<span style="color:#996600;">'H'</span>,<span style="color:#996600;">'I'</span>,<span style="color:#996600;">'J'</span>,<span style="color:#996600;">'K'</span>,<span style="color:#996600;">'L'</span>,<span style="color:#996600;">'M'</span>,<span style="color:#996600;">'N'</span>,<span style="color:#996600;">'O'</span>,<span style="color:#996600;">'P'</span>,<span style="color:#996600;">'Q'</span>,<span style="color:#996600;">'R'</span>,<span style="color:#996600;">'S'</span>,<span style="color:#996600;">'T'</span>,<span style="color:#996600;">'U'</span>,<span style="color:#996600;">'V'</span>,<span style="color:#996600;">'W'</span>,<span style="color:#996600;">'X'</span>,<span style="color:#996600;">'Y'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">-%&gt;</span></pre></td></tr></table></div>

<p>And thought &#8211; Hmm, someone doesn&#8217;t understand Enumerable. Otherwise they might have done this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'A'</span>..<span style="color:#996600;">'Z'</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>alpha_link<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#006600; font-weight:bold;">-%&gt;</span></pre></td></tr></table></div>

<p>Concise!</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2009/05/fun-with-rubys-enumerable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nanowrimo 0.5 released</title>
		<link>http://illuminerdi.com/2009/05/nanowrimo-05-released/</link>
		<comments>http://illuminerdi.com/2009/05/nanowrimo-05-released/#comments</comments>
		<pubDate>Mon, 25 May 2009 22:38:00 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[writing news]]></category>

		<guid isPermaLink="false">http://illuminerdi.com/?p=116</guid>
		<description><![CDATA[For your Ruby/Nanowrimo pleasure:
Nanowrimo v.05 has been released to the githubs. It wraps all basic functionality in the Nanwrimo wordcount API.
Next release will scrape user profile pages to pull the following:

User&#8217;s region
User&#8217;s novel name
User&#8217;s genre (this will be a bit tricky)
User&#8217;s writing buddy list

]]></description>
			<content:encoded><![CDATA[<p>For your Ruby/Nanowrimo pleasure:</p>

<a href='' title='picture-31'><img width="150" height="72" src="http://illuminerdi.com/wp-content/uploads/2009/05/picture-31-150x72.png" class="attachment-thumbnail" alt="" title="picture-31" /></a>
<a href='' title='picture-32'><img width="150" height="86" src="http://illuminerdi.com/wp-content/uploads/2009/05/picture-32-150x86.png" class="attachment-thumbnail" alt="" title="picture-32" /></a>
<a href='' title='picture-33'><img width="150" height="140" src="http://illuminerdi.com/wp-content/uploads/2009/05/picture-33-150x140.png" class="attachment-thumbnail" alt="" title="picture-33" /></a>

<p>Nanowrimo v.05 has been released to <a href="http://github.com/illuminerdi/nanowrimo/tree/master">the githubs</a>. It wraps all basic functionality in the Nanwrimo wordcount API.</p>
<p>Next release will scrape user profile pages to pull the following:</p>
<ul>
<li>User&#8217;s region</li>
<li>User&#8217;s novel name</li>
<li>User&#8217;s genre (this will be a bit tricky)</li>
<li>User&#8217;s writing buddy list</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://illuminerdi.com/2009/05/nanowrimo-05-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
