<?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>Thinking In Rails &#187; Resources</title>
	<atom:link href="http://thinkinginrails.com/category/resources/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkinginrails.com</link>
	<description>A Perl Programmer&#039;s Exploration of The World of Ruby on Rails</description>
	<lastBuildDate>Thu, 12 Apr 2012 03:37:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Learn Python The Hard Way Released</title>
		<link>http://thinkinginrails.com/2010/11/learn-python-the-hard-way-released/</link>
		<comments>http://thinkinginrails.com/2010/11/learn-python-the-hard-way-released/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 15:26:11 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[eBook]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=625</guid>
		<description><![CDATA[Learn Python The Hard Way is a new free eBook by the most epic Zed Shaw, born out of (I think) frustration with other teaching methods in books.  I know it&#8217;s not Ruby, Rails, or a combination thereof, but Python and Rails live in a very similar open source, develop/learn in the open community, so [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://learnpythonthehardway.org/index">Learn Python The Hard Way</a> is a new free eBook by the most epic <a href="http://www.zedshaw.com/">Zed Shaw</a>, born out of (I think) frustration with other teaching methods in books.  I know it&#8217;s not Ruby, Rails, or a combination thereof, but Python and Rails live in a very similar open source, develop/learn in the open community, so it&#8217;s worth noting.  Also Ruby programmers more than anyone should be open to learning other languages to improve skills in their own. Also, if you want to work at Google, this is probably a <a href="http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=google+and+python&amp;qscrl=1">good thing</a> to check out.</p>
<p>And as I say on my <a href="http://ufies.org">other site</a>, hey, free is free <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/11/learn-python-the-hard-way-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using VIM In Your Workflow</title>
		<link>http://thinkinginrails.com/2010/08/using-vim-in-your-workflow/</link>
		<comments>http://thinkinginrails.com/2010/08/using-vim-in-your-workflow/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 17:40:04 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=610</guid>
		<description><![CDATA[After a bit of a wait, my buddy Curtis McHale has posted the article I wrote for his site, yourworkflow.ca.  You can check out the Using Vim As A Text Editor article over on the site.  It&#8217;s not just about Vim, but more the day to day coding workflow that I was using, so it [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-611" title="vim-editor_logo-150x150" src="http://thinkinginrails.com/wp-content/uploads/2010/08/vim-editor_logo-150x150.png" alt="" width="150" height="150" />After a bit of a wait, my buddy <a href="http://twitter.com/curtismchale">Curtis McHale</a> has posted the article I wrote for his site, <a href="http://yourworkflow.ca/">yourworkflow.ca</a>.  You can check out the <a href="http://yourworkflow.ca/2010/08/how-to/using-vim-as-a-text-editor/"><strong>Using Vim As A Text Editor</strong></a> article over on the site.  It&#8217;s not <em>just</em> about Vim, but more the day to day coding workflow that I was using, so it includes things like Firefox plugins, Unix utilities, etc.</p>
<p>So head over and check out the workflow site and read not only my <em>fine</em> fine article, but also the other news and podcasts he&#8217;s got going on over there.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/08/using-vim-in-your-workflow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails Tutorial Updated To Rails 3.0</title>
		<link>http://thinkinginrails.com/2010/07/rails-tutorial-updated-to-rails-3-0/</link>
		<comments>http://thinkinginrails.com/2010/07/rails-tutorial-updated-to-rails-3-0/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 03:12:43 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=605</guid>
		<description><![CDATA[Huge congrats go out to Michael Hartl for upgrading his awesome RailsTutorial.org for Rails 3.0.  Now you have the choice of reading the 2.x version or the 3.0 version of the site.  Many thanks go to Michael for his hard work and huge contribution to the Ruby and Rails community!]]></description>
			<content:encoded><![CDATA[<p>Huge congrats go out to Michael Hartl for upgrading his awesome <a href="http://railstutorial.org">RailsTutorial.org</a> <a href="http://news.railstutorial.org/ruby-on-rails-3-tutorial-book-including-pdf-d">for Rails 3.0</a>.  Now you have the choice of reading the 2.x version or the 3.0 version of the site.  Many thanks go to Michael for his hard work and <em>huge</em> contribution to the Ruby and Rails community!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/07/rails-tutorial-updated-to-rails-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is A Site For Ruby Idioms Needed? [Update: Yes!]</title>
		<link>http://thinkinginrails.com/2010/05/a-site-for-ruby-idioms/</link>
		<comments>http://thinkinginrails.com/2010/05/a-site-for-ruby-idioms/#comments</comments>
		<pubDate>Mon, 03 May 2010 17:59:25 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=385</guid>
		<description><![CDATA[I&#8217;ve noticed lately that there is definitely a &#8220;Ruby way&#8221; to write Ruby code. When I first read Effective Perl Programming years and years ago I went from writing code that looks like this (note that I know the &#8220;FILE&#8221; is wrong, but the wordpress auto-syntax highlighter thingy doesn&#8217;t seem to deal well with the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed lately that there is definitely a &#8220;Ruby way&#8221; to write Ruby code.  When I first read Effective Perl Programming years and years ago I went from writing code that looks like this (note that I know the &#8220;FILE&#8221; is wrong, but the wordpress auto-syntax highlighter thingy doesn&#8217;t seem to deal well with the correct bracketed syntax):</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$line</span> <span style="color: #339933;">=</span> FILE <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/foo/</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;$line&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>(which isn&#8217;t all that un-perl-y to begin with, but that&#8217;s 15 years of perl in my brain stopping me from writing really un-idiomatic code) to far more idiomatic:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>FILE<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066;">print</span> <span style="color: #b1b100;">if</span> <span style="color: #009966; font-style: italic;">/foo/</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The point being that there are certain conventions and ways that your programming style will adapt to the given language.  The following loop</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #0000dd;">10</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Is perfectly natural in C, but if you saw it in perl or ruby, while it might be perfectly valid, it would look <em>way</em> out of place in either language, and you&#8217;d get funny looks if you presented it to a code review.</p>
<p>In ruby some of these would be to not do this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">t.<span style="color:#CC0066; font-weight:bold;">gsub!</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>http<span style="color:#006600; font-weight:bold;">|</span>https<span style="color:#006600; font-weight:bold;">&#41;</span>biglonguglyandhardlyworksregex<span style="color:#006600; font-weight:bold;">/</span>, <span style="color:#996600;">&quot;&lt;a href=&quot;</span>\<span style="color:#996600;">&quot;&gt;<span style="color:#000099;">\1</span>&lt;/a&gt;&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>But instead do this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">    <span style="color:#CC00FF; font-weight:bold;">URI</span>.<span style="color:#9900CC;">extract</span><span style="color:#006600; font-weight:bold;">&#40;</span>t, <span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#91;</span> http https ftp <span style="color:#006600; font-weight:bold;">&#93;</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>url<span style="color:#006600; font-weight:bold;">|</span>
      t.<span style="color:#CC0066; font-weight:bold;">gsub!</span><span style="color:#006600; font-weight:bold;">&#40;</span>url, <span style="color:#996600;">&quot;&lt;a href=&quot;</span>\<span style="color:#996600;">&quot;&gt;#{url}&lt;/a&gt;&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Or maybe instead of this</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">sum = <span style="color:#006666;">0</span>
list = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span>,<span style="color:#006666;">2</span>,<span style="color:#006666;">3</span><span style="color:#006600; font-weight:bold;">&#93;</span>
<span style="color:#9966CC; font-weight:bold;">for</span> i <span style="color:#9966CC; font-weight:bold;">in</span> list <span style="color:#9966CC; font-weight:bold;">do</span>
  sum <span style="color:#006600; font-weight:bold;">+</span>= i
<span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#008000; font-style:italic;"># sum is now 6</span></pre></div></div>

<p>you use the must more awesomeer (yes it&#8217;s a word)</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">list = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span>,<span style="color:#006666;">2</span>,<span style="color:#006666;">3</span><span style="color:#006600; font-weight:bold;">&#93;</span>
sum = list.<span style="color:#9900CC;">inject</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>s,v<span style="color:#006600; font-weight:bold;">|</span> s <span style="color:#006600; font-weight:bold;">+</span> v <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#008000; font-style:italic;"># sum =&amp;gt; 6</span></pre></div></div>

<p>Of course, you can write bad code in almost any language pretty easily (note how I&#8217;m not making a php/python/<a href="http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29">whitespace</a>/<a href="http://en.wikipedia.org/wiki/Brainfuck">brainfuck</a> joke here!)</p>
<p>So my question is this.  Is there some grand collection of these Ruby idioms?  Is there a need for them?  Would a fusion of <a href="http://stackoverflow.com">StackOverflow</a> and <a href="http://refactormycode.com/">Refactor My Code</a> be a useful collection to have somewhere?  Or are the resources out there (which are a bit scattered) good enough?</p>
<p>So far I&#8217;ve found:</p>
<ul>
<li>This StackOverflow list of peoples <a href="http://stackoverflow.com/questions/613985/common-ruby-idioms">favorite Ruby Idioms</a></li>
<li>A <a href="http://cbcg.net/talks/rubyidioms/">presentation</a> from 2005</li>
<li>Yehuda&#8217;s <a href="http://yehudakatz.com/2009/11/12/better-ruby-idioms/">list from late 2009</a> isn&#8217;t <em>quite</em> what I was looking for, but shouldn&#8217;t be ignored</li>
</ul>
<p>Alternatively there are a lot of places where you can read other&#8217;s code to learn idiomatic Ruby by osmosis.  Github, RefactorMyCode, the popular Gems in the community, <a href="http://rubyquiz.com/">The Ruby Quiz</a> are all great resources for this.</p>
<p>My vision is a melding of StackOverflow (maybe using their new StackExchange community software?) and Refactor My Code where you can search for an idiom or programming operation based on code, Class, or tag, vote, and comment or submit a different version.  Sort of like a Perl Golf contest except instead of the fewest keystrokes being the goal it&#8217;s the cleanest/nicest/most effective way of doing the operation.</p>
<p>So what do you think, would this be useful to work on with the Ruby community, or is there enough information out there already that is google-able enough?  Everyone will also have their own way of doing things, but Ruby <em>is</em> an opinionated language (or is that only Rails?) so maybe there is One (or two) &#8220;correct&#8221; ways to do things.</p>
<p>Your thoughts appreciated.</p>
<p><strong>Update</strong> &#8211; So a bit of discussion here, and lots of great comments on <a href="http://thinkinginrails.com/2010/05/a-site-for-ruby-idioms/">proggit</a> show me that this idea does deserve a go of it.  I&#8217;ve registered <a href="http://ruby-idioms.com">ruby-idioms.com</a> (pointed here for now) and hope to have something up in the next couple of weeks, and will take a few beta tests to have a run at it.  Keep an eye here for any news by subscribing to the <a href="http://thinkinginrails.com/feed/">RSS</a> or following me on <a href="http://twitter.com/thinkinginrails">Twitter</a>.  Thanks everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/05/a-site-for-ruby-idioms/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Favorite Ruby and Rails Podcasts</title>
		<link>http://thinkinginrails.com/2010/04/favorite-ruby-and-rails-podcasts/</link>
		<comments>http://thinkinginrails.com/2010/04/favorite-ruby-and-rails-podcasts/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 04:23:42 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Help]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=309</guid>
		<description><![CDATA[Podcasts have been a great help to get some great information about Ruby and Rails, as well as to discover and connect with more of the community.  I figured I'd list a few that I listen to, and would appreciate folks passing back any good ones I might be missing.]]></description>
			<content:encoded><![CDATA[<p>Podcasts have been a great help to get some great information about Ruby and Rails, as well as to discover and connect with more of the community.  I figured I&#8217;d list a few that I listen to, and would appreciate folks passing back any good ones I might be missing.</p>
<p>Some will be old hat to the ruby folks, but there might be some new ones that could <span style="text-decoration: line-through;">peak</span> pique your interest.  If you&#8217;re a newbie to Rails like me, I suggest you add these to your podcast watcher of choice immediately!  Most of these will fall into either the &#8220;news of the week&#8221;, &#8220;interviews&#8221;, &#8220;howto&#8221; or &#8220;training&#8221; categories.  I&#8217;ll categorize them for you a bit so you can pick and choose if you prefer one or the other.  There are a few that I&#8217;ve picked out that aren&#8217;t strictly Rails or Ruby oriented, but they still get prime location in my weekly podcast listening.</p>
<ul>
<li><strong><a href="http://coderpath.com/">Coderpath</a></strong> [<a href="http://itunes.apple.com/podcast/coderpath-podcast/id214162182">itunes</a>] (audio,interviews) <a href="http://twitter.com/milesforrest">@milesforrest</a> and <a href="http://twitter.com/curtismchale">@curtismchale</a><br />
Ok, so even though this is a bit of shameless not-quite-my-own self promotion, and Miles and Curtis are buddies of mine, I do have to honestly recommend the Coderpath podcast.  They do interviews of some of the big names in the Rails community such as DHH, Ryan Bates, Wayne Seguin and others, and ask a lot of good questions about some of the &#8220;how&#8221; of the community, the sort of questions someone like me might ask (and I do).  Also keep an eye on Miles&#8217; twitter feed as he&#8217;ll send out where you can submit questions for the podcast.</li>
<li><strong><a href="http://railscasts.com">RailsCasts</a></strong> [<a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=218282043">itunes</a>] (video, training) <a href="http://twitter.com/rbates">@rbates</a><br />
Ryan Bates&#8217; great podcast is a staple of the Rails community, and he gives short, bite sized chunks of information on different aspects of rails programming.  One week it might be how to do something like nested routes, another will be a series of Rails 3 howtos.  Awesome stuff.  Personally I&#8217;d recommend watching these and not deleting them, so you can go back for further reference later on.</li>
<li><strike><strong><a href="http://charlesmaxwood.com/">Rails Coach</a></strong></strike> <strong><a href="http://teachmetocode.com/podcast/">Teach Me To Code Podcast</a></strong> [<a href="http://itunes.apple.com/ca/podcast/teach-me-to-code-podcast/id346089573">itunes</a>] (audio, interviews, training and howto) <a href="http://twitter.com/charlesmaxwood">@charlesmaxwood</a> <strong>Note: </strong>Updated link, RailsCoach is now Teach Me To Code Podcast<br />
This is a recent discovery of mine, and Charles does a great job in intermixing interviews and talking about how to do various issues, such as finding a mentor or how to take the best advantage of your first (Rails|Ruby)Conf.  My favourite part of this podcast is that he seems to be (and no insult intended) about on my level, or a bit above, so a lot of the questions he asks would be pretty much exactly what I&#8217;d want to know in the same situation.</li>
<li><strong><a href="http://vimcasts.org/">VimCasts</a></strong> [<a href="http://itunes.apple.com/ca/podcast/vimcasts/id350035635">itunes</a>] (video, training) <a href="http://twitter.com/nelstrom">@nelstrom</a><br />
Not purely a Ruby or Rails podcast, but vim is a skill that every programmer should know, and Drew does a great job in giving both a newbie friendly, and old-hat educating, series of screencasts.  If it says anything to you, I&#8217;ve been using vi and vim since around 1995 and was still learning things from the first podcast.  Great stuff in easy to digest chunks like <a href="http://railscasts.com">RailsCasts</a>.</li>
<li><strong><a href="http://railslab.newrelic.com/scaling-rails">RailsLab Scaling Rails</a></strong> [<a href="http://itunes.apple.com/ca/podcast/railslab-scaling-rails/id303252563">itunes</a>] (video, training) <a href="http://twitter.com/greggpollack">@greggpollack</a><br />
This is a 21 part series that isn&#8217;t being updated anymore, but is a must-watch for anyone who wants to know a bit more about Scaling Rails.  This isn&#8217;t going to be applicable to 90% of what 90% of the audience does, but is still invaluable information in giving you the background information to know why certain decisions you make in technology can have big (or small) impacts on scaling down the road.</li>
<li><strong><a href="http://yourworkflow.ca/">Your Workflow</a></strong> [<a href="http://itunes.apple.com/ca/podcast/id368881313">itunes</a>] (audio, interviews) <a href="http://twitter.com/curtismchale">@curtismchale</a><br />
Ok this is another bit of not-quite-my-own self promotion, as Curtis is a buddy of mine from the <a href="http://fvrb.org/">Fraser Valley Ruby Brigade</a> (FV.rb).  This podcast addresses a niche that isn&#8217;t really addressed in other places, and takes that tack of &#8220;how do you get your job done&#8221; and talks about the workflow that people have.  Curtis is a <a href="http://www.curtismchale.ca">designer</a> and so far his interview has focused on wordpress development, but the site and podcast is all about people&#8217;s workflow, and you&#8217;re sure to find something new.</li>
<li><strong><a href="http://www.rubypulse.com/">Ruby Pulse</a></strong> [<a href="http://itunes.apple.com/ca/podcast/rubypulse/id329025086">itunes</a>] (video, training) <a href="http://github.com/aaalex">aaalex</a><br />
Ruby Pulse is to Ruby what RailsCasts is to Rails.  Alex takes a small chunk of code, a gem, or technology concept and works with it in a 5-10 minute podcast.  Ruby Pulse is unique is that it&#8217;s done in one go, with no editing, so as the intro says, sometimes unexpected things will happen.  More often than not, you&#8217;ll get a nice introduction to a new and interesting gem or two.</li>
<li><strong><a href="http://ruby5.envylabs.com/">Ruby 5</a></strong> [<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=327234205">itunes</a>] (audio, news) <a href="http://envylabs.com/">Envy Labs</a><br />
Ruby5 is the bite size chunk news show, and gives you the Ruby and Rails news of the week in a five minute podcast a couple of times a week.  Ruby5 was split off of Rails Envy for people who wanted their news a bit more compressed and less &#8220;chatty&#8221;.  Great way to hear what&#8217;s new and interesting and keep yourself right on the edge.</li>
<li><strong><a href="http://5by5.tv/rubyshow">The Ruby Show</a></strong> [<a href="http://itunes.apple.com/ca/podcast/the-ruby-show/id265693109">i</a>], <a href="http://5by5.tv/devshow">The Dev Show</a> [<a href="http://itunes.apple.com/ca/podcast/the-dev-show/id352611845">i</a>] and other good stuff from <a href="http://5by5.tv/shows">5by5</a> (audio, news, interviews)<br />
Those familiar with Rails Envy will recognize these as cut from that tree.  5by5 has a very good series of podcasts with various names in the Rails and open source community, and has a great mix of news and interview shows.  The Ruby Show and the Dev Show are the ones that are on my podcast weekly, but I&#8217;ve also recently discovered <a href="http://5by5.tv/pipeline">The Pipeline</a>, which is an interview show with innovators and newsmakers, and it deserves a listen as well.</li>
<li><strong><a href="http://blog.stackoverflow.com/category/podcasts/">Stack Overflow Podcast</a></strong> [<a href="http://itunes.apple.com/ca/podcast/stackoverflow/id345346712">itunes</a>] (audio, news, howto and interviews) <a href="http://twitter.com/spolsky">@spolsky</a> and <a href="http://twitter.com/jeffatwood">@jeffatwood</a><br />
Another not-really Rails oriented, but Joel Spolsky is a name that should be familiar to anyone doing development, as will StackOverflow.com.  You&#8217;ll also recognize Jeff Atwood from his great <a href="http://codinghorror.com">codinghorror.com</a> site.  The guys get into some of the programming practices they follow, business, and interviewing people in their circle.  It&#8217;s a really interesting look into the development and business of the <a href="http://stackoverflow.com">StackOverflow</a> community.  Just ignore the whole &#8220;.NET&#8221; thing <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><strong><a href="http://thechangelog.com/">The Changelog</a></strong> [<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=341623264&amp;subMediaType=Audio">itunes</a>] (audio, interview) <a href="http://twitter.com/adamstac">@adamstac</a> and <a href="http://twitter.com/pengwynn">@pengwynn</a><br />
These are the guys behind <a href="http://tail.thechangelog.com/">tail.thechangelog.com</a> and the <a href="http://github.com/explore">github.com/explore</a> pages, and give a great weekly interview with someone in the open source community, and really get into it from the philosophical point of view.  Being able to get a dose of what&#8217;s going on in the Open Source community is definitely an asset and their show (and the opening and closing music) is my Saturday must-have-on-while-driving podcast.</li>
<li><strong><a href="http://37signals.com/podcast">37signals Podcast</a></strong> [<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=338108364">itunes</a>] (interview, howto) <a href="http://twitter.com/dhh">@dhh</a> and <a href="http://twitter.com/jasonfried">@jasonfried</a><br />
If you ask for a Rails oriented podcast, how can you not include one from the company that started it all.  This one features DHH and Jason Fried sitting down and talking about all things community, rails and 37signals related.  Sometimes they are just chilling talking about Rails, sometimes it&#8217;s interviewing the sysadmin team, and somtimes it&#8217;s chatting about how the business side of the uhm, business works.  DHH is never one to hide his opinion about things, so it&#8217;s always a great and educational listen.</li>
</ul>
<p>So there you go, hope you enjoy the list and find something new.  Remember though that you don&#8217;t want to get caught up in listening to podcasts about coding, and forget to do the coding yourself.  These will definitely give you a boost of inspiration, training, or just a weekly re-connection with the community.  Also please comment if I&#8217;ve missed any good ones!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/04/favorite-ruby-and-rails-podcasts/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Personal Projects For Learning</title>
		<link>http://thinkinginrails.com/2010/04/personal-projects-for-learning/</link>
		<comments>http://thinkinginrails.com/2010/04/personal-projects-for-learning/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 04:39:49 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Help]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=285</guid>
		<description><![CDATA[One of the biggest struggles I&#8217;ve had is when learning something starts getting &#8220;stale&#8221;.  It&#8217;s a bit like a relationship, you go from the fun and new &#8220;getting to know you&#8221; stage and eventually plateau into the &#8220;how was your day dear?&#8221; &#8220;grunt&#8221; &#8220;that&#8217;s nice dear&#8221; stage. I plateaued with Perl a while back I [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest struggles I&#8217;ve had is when learning something starts getting &#8220;stale&#8221;.  It&#8217;s a bit like a relationship, you go from the fun and new &#8220;getting to know you&#8221; stage and eventually plateau into the &#8220;how was your day dear?&#8221; &#8220;<em>grunt</em>&#8221; &#8220;that&#8217;s nice dear&#8221; stage.</p>
<p>I plateaued with Perl a while back I think, I definitely didn&#8217;t learn anything (I&#8217;m still picking things up from the <a href="http://www.amazon.com/Perl-Best-Practices-Damian-Conway/dp/0596001738">Perl Best Practices</a> book I have), but I found the set of functionality that works for me for 99% of what I need, and that I can manhandle into working for the remaining 1%.  It&#8217;s not a bad thing, but it&#8217;s not a good one either, because I don&#8217;t have the drive to new things with it.</p>
<p>I don&#8217;t think I&#8217;m at that stage with Ruby yet, but I was thinking today on the treadmill about how to avoid that and how to keep things fresh and interesting.  I figure that just like in photography, having a <a href="http://www.yourphototips.com/2008/11/24/start-a-new-personal-photography-project/">Personal Project</a> is a great way to keep things fresh and interesting.  I came up with a few ideas.</p>
<ul>
<li><strong>A Code Sprint</strong> &#8211; They use the term &#8220;sprint&#8221; at my day job to mean a team that is concentrating on getting a new chunk of functionality or application out and done with minimul distraction.  I figure that I can do the same thing, set up a new idea for a site or project and work on <em>nothing but that</em> in my personal coding time (never at the day job of course).  This means when you&#8217;re done the initial fun stuff, database setup, object relationships, etc, you keep on going through the functionality, contact forms, logo, design, etc until it&#8217;s done.  It doesn&#8217;t have to be huge or take a month of your time to do, just make sure you don&#8217;t sit down and say &#8220;you know, adding feature XYZ&#8230; I&#8217;m not feeling it, maybe I&#8217;ll just catch up on Lost some more&#8221; (this is my personal battle right now!)</li>
<li><strong>Learn a Class or Set of Functions <em>Really, Really Well</em></strong> &#8211; Sure it&#8217;ll just be one class (<a href="http://ruby-doc.org/core/classes/Hash.html">Hash</a> for example), or one set of functions (<a href="http://ruby-doc.org/core/classes/Enumerable.html#M003121">grep</a> and array searching for example), and there&#8217;s probably no way to learn <em>everything</em>, but imagine the power to know that you have Hash under your belt, and that you know six ways till Sunday how to search arrays and similar objects, <em>and</em> the best practices and best idioms for it?  And that next week you can choose another class or set of functions to learn.</li>
<li><strong>Answer X Questions A Day</strong> &#8211; The best way to learn I&#8217;ve found is to teach others.  Even if you just know a little bit you can probably bumble your way into some knowledge, and in that way you both learn.  Why not take on a question a day (or 5, or 10) on a forum like the <a href="http://stackoverflow.com/questions/tagged/ruby">StackOverflow ruby</a> questions, or <a href="http://reddit.com/r/ruby">ruby reddit</a>, or the <a href="http://www.ruby-forum.com/forum/4">ruby forums</a>, and fully and completely, to the best of your ability, answer them.  Even if you spend the whole day researching and come up with the same answer that 10 other people have already given, you end up with a greater understanding, and you get to help other people.</li>
<li><strong>Duplicate A Plugin</strong> &#8211; Sure you can just install <a href="http://github.com/technoweenie/restful-authentication">Restful Authentication</a>, or <a href="http://github.com/ryanb/cancan">CanCan</a> for Authorization, or <a href="http://github.com/zargony/activerecord_symbolize">activerecord symbolize</a>, but why not learn what they are actually doing, and create that same core functionality &#8220;by hand&#8221;.  No need to do every nuance of what the plugins do, but creating an auth(entication|orization) system by hand is a great challenge so you know what&#8217;s going on under the hood next time you rely on just running &#8220;script/plugin install&#8230;.&#8221;</li>
</ul>
<p>Those are some good suggestions, what do you other ruby and rails hackers do to learn more or keep yourself sharp?</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/04/personal-projects-for-learning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>At Home With Nested Routes and Resources</title>
		<link>http://thinkinginrails.com/2010/04/at-home-with-nested-routes-and-resources/</link>
		<comments>http://thinkinginrails.com/2010/04/at-home-with-nested-routes-and-resources/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 00:16:13 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=152</guid>
		<description><![CDATA[When I first heard about nested routes, as with most things in Rails, I completely ignored them, discounting them as something I&#8217;d get to learning when I needed to, but right now they were yet another one of those things that I didn&#8217;t quite grok as I didn&#8217;t have the other base knowledge of the [...]]]></description>
			<content:encoded><![CDATA[<p>When I first heard about nested routes, as with most things in Rails, I completely ignored them, discounting them as something I&#8217;d get to learning when I needed to, but right now they were yet another one of those things that I didn&#8217;t quite grok as I didn&#8217;t have the other base knowledge of the Rails system to know why I needed them.  To be fair, I&#8217;m not that much closer now, and started to realize the the other day I didn&#8217;t really quite understand REST and having a RESTful site.</p>
<p>But when I started looking at how my site was structured, and how things were really encapsulated in each other, such as clubs &#8220;having&#8221; fields, and fields &#8220;having&#8221; games, I started to understand the need.  Actually it was more doing the scaffolding of the site and seeing that I had to set field in a dropdown each time I created a game, or the club each time I created a field.  It didn&#8217;t make sense and it seemed like a stupid way to do it.</p>
<p>Back in the old days in perl, I&#8217;d pass the ID of the main object when I created a sub-object.  So if I had a club editing page with a &#8216;create new field&#8217; button on it, that button would pass a hidden &#8220;club_id=$id&#8221; when it was pressed.</p>
<p>Rails comes with a nicer way of doing it.  It allows you to nest related resources.  Probably the best place to start is with Ryan Bates excellent <a href="http://railscasts.com/episodes/139-nested-resources">Nested Resources screencast</a>, or Adam&#8217;s <a href="http://adamblog.heroku.com/past/2007/12/20/nested_resources_in_rails_2/">Nested Resources in Rails 2 page</a>.</p>
<p>For this I set up the following in my routes.rb as such:</p>
<div id="_mcePaste">

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">map.<span style="color:#9900CC;">resources</span> <span style="color:#ff3333; font-weight:bold;">:clubs</span>, <span style="color:#ff3333; font-weight:bold;">:has_many</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:areas</span>, <span style="color:#ff3333; font-weight:bold;">:shallow</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span></pre></div></div>

</div>
<p>And then running &#8220;rake routes&#8221; will show you what the routes will actually be:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">     club_areas GET    <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>:club_id<span style="color:#006600; font-weight:bold;">/</span>areas<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>            <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;index&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;areas&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
                POST   <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>:club_id<span style="color:#006600; font-weight:bold;">/</span>areas<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>            <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;create&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;areas&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
  new_club_area GET    <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>:club_id<span style="color:#006600; font-weight:bold;">/</span>areas<span style="color:#006600; font-weight:bold;">/</span>new<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>        <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;new&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;areas&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
          clubs GET    <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>                           <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;index&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;clubs&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
                POST   <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>                           <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;create&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;clubs&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
       new_club GET    <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>new<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>                       <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;new&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;clubs&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      edit_club GET    <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>:id<span style="color:#006600; font-weight:bold;">/</span>edit<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>                  <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;edit&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;clubs&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
           club GET    <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>:id<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>                       <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;show&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;clubs&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
                PUT    <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>:id<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>                       <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;update&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;clubs&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
                DELETE <span style="color:#006600; font-weight:bold;">/</span>clubs<span style="color:#006600; font-weight:bold;">/</span>:id<span style="color:#006600; font-weight:bold;">&#40;</span>.:<span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span>                       <span style="color:#006600; font-weight:bold;">&#123;</span>:action<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;destroy&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span><span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#996600;">&quot;clubs&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">The biggest, <em>biggest</em> thing to notice here is the &#8220;:id&#8221; and &#8220;:club_id&#8221; in some of the routes.  This tripped me up a few times.</span></p>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">Nested routes let you automagically pass &#8220;club_id&#8221; (in this case) to paths.  So in your controller or views you can now use the variable from the first column.  So you can do a </span></p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">redirect_to clubs_path
<span style="color:#008000; font-style:italic;"># instead of:</span>
redirect_to <span style="color:#ff3333; font-weight:bold;">:controller</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;clubs&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:action</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;index&quot;</span></pre></div></div>

<p>for example, and it would go to the /clubs/index path and do the right thing.  It also lets you do things like:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">redirect_to new_club_area<span style="color:#006600; font-weight:bold;">&#40;</span>@club<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#008000; font-style:italic;"># sends you to /clubs/1/areas/new</span></pre></div></div>

<p>Note that you have to pass the club before this will work.  This took me <em>forever</em> to figure out, cause sometimes it worked and sometimes it didn&#8217;t.  What I found was looking for either :id or :[object]_id in the routes path would tell you both if you have to pass the route the object or not, but also if you&#8217;re processing the path in the controller, that :club_id will be passed auto-magically to it.  So for the &#8220;/clubs/:club_id/areas/new&#8221; route above, you&#8217;d process it in your areas_controller, and in the &#8216;new&#8217; def, you&#8217;d automatically get club_id for free.  IE:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># in app/controllers/area_controller.rb, possibly via new_club_area_path(@club)</span>
<span style="color:#9966CC; font-weight:bold;">def</span> new
   <span style="color:#0066ff; font-weight:bold;">@club</span> = Club.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:club_id</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
   <span style="color:#0066ff; font-weight:bold;">@area</span> = <span style="color:#0066ff; font-weight:bold;">@club</span>.<span style="color:#9900CC;">areas</span>.<span style="color:#9900CC;">new</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>You know that club_id is being passed because the rake_route for that path has &#8220;club_id&#8221; in it: &#8220;/clubs/:club_id/areas/new&#8221;.</p>
<p>Next up, finishing converting as much of the rest of my code from the controller/action syntax for redirecting and rendering to a more &#8220;restful&#8221; setup.</p>
<p><strong>Update:</strong> There is a cool sounding <a href="http://szeryf.wordpress.com/2010/03/31/introducing-rails-routes-textmate-bundle/">TextMate bundle</a> to help you with some of the brain games needed to understand nested resources.  Hat tip to <a href="http://5by5.tv/rubyshow/112">The Ruby Show</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/04/at-home-with-nested-routes-and-resources/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Discovering Ruby With Ruby Warrior</title>
		<link>http://thinkinginrails.com/2009/05/discovering-ruby-with-ruby-warrior/</link>
		<comments>http://thinkinginrails.com/2009/05/discovering-ruby-with-ruby-warrior/#comments</comments>
		<pubDate>Fri, 15 May 2009 02:55:04 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=46</guid>
		<description><![CDATA[Thanks to the FV.rb last night I discovered Ruby Warrior, a neat and fun way of learning ruby.  It goes like this&#8230;. First, head to http://github.com/ryanb/ruby-warrior/tree/master and download the tree by using &#8220;git clone&#8220;, then simply run &#8220;bin/rubywarrior&#8221; out of the main ruby-warrior directory that the git clone command creates.  The first run will create [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_47" class="wp-caption alignright" style="width: 250px"><img class="size-full wp-image-47" title="Code from Level 6" src="http://thinkinginrails.com/wp-content/uploads/2009/05/warrior.png" alt="Code from Level 6" width="240" height="299" align="right"/><p class="wp-caption-text">Code from Level 6</p></div>
<p>Thanks to the <a href="http://www.meetup.com/fvrb-org/">FV.rb</a> last night I discovered <a href="http://github.com/ryanb/ruby-warrior/tree/master">Ruby Warrior</a>, a neat and fun way of learning ruby.  It goes like this&#8230;.</p>
<p>First, head to <a href="http://github.com/ryanb/ruby-warrior/tree/master"><tt>http://github.com/ryanb/ruby-warrior/tree/master</tt></a> and download the tree by using &#8220;<tt>git clone</tt>&#8220;, then simply run &#8220;<tt>bin/rubywarrior</tt>&#8221; out of the main ruby-warrior directory that the git clone command creates.  The first run will create a profile and set up the initial part of the &#8220;game&#8221;.</p>
<p>The &#8220;game&#8221; is a bit like the old adventure text games, with a simple ASCII &#8220;dungeon&#8221; that you see your guy move through, and as the levels progress you will encounter monsters, harder monsters, captives to rescue, and so on as you move from one side of the dungeon to the stairs on the other side.  The system is turn based, so you are basically creating yourself a little state machine.  You basically check to see if there&#8217;s something in front of you and if not walk, if it&#8217;s an enemy, attack, etc.</p>
<p>To do this you end up doing something like this:</p>
<ol>
<li>You look at the README file in the <tt>ruby-warrior/beginner-tower/level-001/</tt> directory.  You may have &#8220;intermediate-tower&#8221; instead of beginner depending on the level you chose during the initial setup.</li>
<li>Follow what the README file says and edit the file <tt>ruby-warrior/beginner-tower/level-001/player.rb</tt> adding code to make your warrior move and fight.</li>
<li>Run <tt>bin/rubywarrior</tt> and see how well your warrior moves and fights.  It will either succeed and allow you to continue to the next level (in which case go to step 1, substituting the right number in the &#8220;<tt>level-00N</tt>&#8221; directory), or you will fail, in which case, re-edit the warrior.rb file and try again.</li>
</ol>
<p>The game isn&#8217;t for complete and total programming n00bs, but might be a bit simple for people who know programming, but not ruby <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   It starts out with simple commands and simple if/then/else control structures.  However, it does make it cool and interesting enough that it has kept my interest for at least until now.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2009/05/discovering-ruby-with-ruby-warrior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Resources</title>
		<link>http://thinkinginrails.com/2009/05/rails-resources/</link>
		<comments>http://thinkinginrails.com/2009/05/rails-resources/#comments</comments>
		<pubDate>Mon, 04 May 2009 05:55:32 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Help]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=30</guid>
		<description><![CDATA[As with all noobie learners, one of the best ways to learn about Ruby and Rails is to read sites on the net.  This has it&#8217;s good sides and bad sides.  On the good side, there&#8217;s a vast amount of information out there, free for the taking.  People are willing to throw out information about [...]]]></description>
			<content:encoded><![CDATA[<p>As with all noobie learners, one of the best ways to learn about Ruby and Rails is to read sites on the net.  This has it&#8217;s good sides and bad sides.  On the good side, there&#8217;s a <em>vast</em> amount of information out there, free for the taking.  People are willing to throw out information about coding skills, projects, give you access to their source code&#8230;. all for free.  On the bad side, it&#8217;s the wild west.  There&#8217;s scads of information, mostly unsorted, and a lot of the people sharing it are on the edge of the technology, and it&#8217;s <em>very</em> easy to get lost in the latest-and-greatest and completely miss learning the simple and fundamental lessons.</p>
<p>To quote a game programming book I read once long ago: &#8220;First make it work, then make it work fast.&#8221;  It&#8217;s fairly easy to move that to the ruby world.  &#8220;First write a rails app, then write one with the latest wiz-bang plugin.&#8221;  OK, maybe it doesn&#8217;t work <em>that</em> well <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s a list of some of the sites I keep in my <a href="http://google.com/reader">RSS reader</a> for keeping up to date&#8230;</p>
<p><span id="more-30"></span><strong>Ruby</strong></p>
<ul>
<li><a href="http://blog.rubybestpractices.com">Ruby Best Practices</a> &#8211; Just found this one, a nice collection of Ruby skills and &#8220;proper&#8221; ways to do it.</li>
<li><a href="http://rubylearning.com/blog/">Ruby Learning Blog</a></li>
<li><a href="http://www.rubyinside.com/">Ruby Inside</a> &#8211; Daily news and links.</li>
<li><a href="http://on-ruby.blogspot.com/">On Ruby</a></li>
</ul>
<p><strong>Ruby on Rails</strong></p>
<ul>
<li><a href="http://railsapi.com/">Rails API</a> &#8211; A web based collection of the Rails API.  See <a href="http://mocra.com/2009/04/24/accessing-rails-documentation-fast/">this site</a> for a great tip on how to integrate this into your local search on a mac if you use <a href="http://www.obdev.at/products/launchbar/index.html">Launchbar</a>.</li>
<li><a href="http://www.railsinside.com/">Rails Inside</a></li>
<li><a href="http://zedshaw.com/blog/index.html">Zed Shaw</a> &#8211; A very notable member of the Rails community, and creator of Mongrel.</li>
<li><a href="http://weblog.jamisbuck.org/">The Bucklogs Here</a></li>
<li><a href="http://ryandaigle.com/">Ryan&#8217;s Scraps</a> &#8211; Lost of the latest news from the edges of Rails and Ruby.</li>
<li><a href="http://weblog.rubyonrails.org/">Riding Rails</a> &#8211; The official RoR weblog.</li>
<li><a href="http://www.railsjedi.com/">Rails Jedi</a> &#8211; How can you <em>not</em> read a blog with this title??</li>
<li><a href="http://rubyplus.org/">Ruby Plus</a> &#8211; Lots more awesome screencasts (though not updated in a while)</li>
</ul>
<p><strong>Podcasts</strong></p>
<ul>
<li><a href="http://railsenvy.com/">Rails Envy</a> &#8211; These guys go through the latest and greatest in the Rails world.  Not a show for the faint hearted though <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><a href="http://sdruby.com/podcast/">The SD Ruby Podcast</a> &#8211; Nice screencasts from the Sand Diego Ruby group, a wide variety of topics.</li>
<li><a href="http://railscasts.com/">Railscasts</a> &#8211; Ryan Bates&#8217; awesome snippets of knowledge.  4-10 minute screencasts which nicely wrap up a topic or idea.  <em>Highly</em> recommended.</li>
<li><a href="http://www.buildingwebapps.com/podcasts">Learning Rails</a> &#8211; A series of both audio and video podcasts, starting from &#8220;what is rails&#8221; and eventually building to server deployment, version control, alternate markup languages, etc.</li>
</ul>
<p><strong>Other Misc Tools</strong></p>
<ul>
<li><a href="http://github.com/blog">The GitHub Blog</a></li>
<li><a href="http://blog.heroku.com/">Heroku Blog</a></li>
<li><a href="http://blog.phusion.nl/">Phusion Passenger Blog</a> &#8211; Blog of the apache/rails module</li>
</ul>
<p>That&#8217;s it for now&#8230;  Hopefully some of these will help you out in the quest for knowledge!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2009/05/rails-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

