<?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; General</title>
	<atom:link href="http://thinkinginrails.com/category/general/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>Fri, 20 Jan 2012 19:17:21 +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>Cascadia Ruby Conference Registration Open!</title>
		<link>http://thinkinginrails.com/2011/04/cascadia-ruby-conference-registration-open/</link>
		<comments>http://thinkinginrails.com/2011/04/cascadia-ruby-conference-registration-open/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 23:38:36 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Cascadia]]></category>
		<category><![CDATA[Conference]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=647</guid>
		<description><![CDATA[Just got this email from the Cascadia Ruby Conference list: Big news! We&#8217;ve opened registration. Early bird tickets are available for $300 until Midnight, May 31, PDT. Regular registration will be $400, and available until July 25th at Midnight PDT. After that you&#8217;ll be out of luck. To register: http://cascadiarubyconf.com/register As a small aside, we [...]]]></description>
			<content:encoded><![CDATA[<p>Just got this email from the Cascadia Ruby Conference list:</p>
<blockquote>
<p>Big news! We&#8217;ve opened registration. Early bird tickets are available<br />
for $300 until Midnight, May 31, PDT. Regular registration will be $400,<br />
and available until July 25th at Midnight PDT. After that you&#8217;ll be out<br />
of luck. To register:</p>
<p>  <a href="http://cascadiarubyconf.com/register">http://cascadiarubyconf.com/register</a></p>
<p>As a small aside, we know that some of you may think it&#8217;s strange to<br />
open registration before the program is announced. Rest assured that<br />
you&#8217;ll have at least six weeks to register after we&#8217;ve finalized the<br />
program.</p>
<p>And finally, a related reminder: our CFP is open and we&#8217;re looking for<br />
great talks. If you&#8217;re interested, head over to:</p>
<p>  <a href="http://cascadiarubyconf.com/proposals">http://cascadiarubyconf.com/proposals</a></p>
<p>The CFP will remain open until May 15th and Midnight PDT. As always,<br />
keep your eyes on our site and @cascadiaruby for updates.
</p></blockquote>
<p>If you don&#8217;t know what Cascadia is, you can check out the <a href="http://cascadiarubyconf.org/">Cascadia Ruby Conf website</a> and if you&#8217;re in the Vancouver/Seattle area, definitely sign up and join us!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2011/04/cascadia-ruby-conference-registration-open/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anyone Interested in Ruby-Idioms.com?</title>
		<link>http://thinkinginrails.com/2011/04/anyone-interested-in-ruby-idioms-com/</link>
		<comments>http://thinkinginrails.com/2011/04/anyone-interested-in-ruby-idioms-com/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 19:16:21 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=645</guid>
		<description><![CDATA[Almost a year ago I had a grand idea to create a site that could become a canonical source for Ruby Idioms, and grabbed ruby-idioms.com, pointed it to this site, and proceeded to not be able to find the time do do much more than a skeleton rails site. The renewal for the domain is [...]]]></description>
			<content:encoded><![CDATA[<p>Almost a year ago I had a grand idea to create a site that could become a canonical source for Ruby <a href="http://en.wikipedia.org/wiki/Idiom">Idioms</a>, and grabbed <strong>ruby-idioms.com</strong>, pointed it to this site, and proceeded to not be able to find the time do do much more than a skeleton rails site.</p>
<p>The renewal for the domain is coming up now and I have still not yet done anything with it, so maybe someone out there in the community can do better than me. </p>
<p>If you&#8217;re interested in doing the site, or getting the domain, please contact me at either <a href="http://twitter.com/arcterex">@arcterex</a> or by email at alan @ ufies.org.  Hopefully the domain will do someone in the Ruby and Rails community some good!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2011/04/anyone-interested-in-ruby-idioms-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing Everything To Instant*</title>
		<link>http://thinkinginrails.com/2010/11/optimizing-everything-to-instant/</link>
		<comments>http://thinkinginrails.com/2010/11/optimizing-everything-to-instant/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 16:33:38 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Funny]]></category>
		<category><![CDATA[Metrics]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=628</guid>
		<description><![CDATA[So here&#8217;s a wacky idea on how Rails, Perl, Python, and everything else can be optimized to be so fast as it&#8217;d be almost instant.  Bear with me here&#8230;. First, you find some code, a framework, a program, whatever it is you&#8217;re into, and find a benchmark or test suite you can run on it. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thinkinginrails.com/wp-content/uploads/2010/11/black-hole.jpg"><img class="size-medium wp-image-629 alignright" title="Black Hole of Optimization - via http://necessarycool.com/2009/05/nc-local-black-hole-comix/" src="http://thinkinginrails.com/wp-content/uploads/2010/11/black-hole-224x300.jpg" alt="Black Hole of Optimization" width="224" height="300" /></a></p>
<p>So here&#8217;s a wacky idea on how Rails, Perl, Python, and everything else can be optimized to be so fast as it&#8217;d be almost instant.  Bear with me here&#8230;.</p>
<ol>
<li> First, you find some code, a framework, a program, whatever it is you&#8217;re into, and find a benchmark or test suite you can run on it.</li>
<li> Next, grab some sort of code metrics suite that can record the time it takes for your test suite to run through it.  Something like <a href="http://metric-fu.rubyforge.org/">metric_fu</a>, the built in <a href="http://www.skorks.com/2010/03/timing-ruby-code-it-is-easy-with-benchmark/">benchmark module</a>, <a href="http://www.newrelic.com/features.html">New Relic RPM</a>, or some other <a href="http://guides.rubyonrails.org/performance_testing.html">performance test</a> system.</li>
<li>Run the benchmark and review the code metrics.  You will probably see a few &#8220;hot spots&#8221; where certain functions or operations take longer than others.</li>
<li>Here&#8217;s the tricky part, but in the grand scheme of things, just a minor detail.  Optimize the function, or the bit of the function that&#8217;s causing issues.  This could take a short time (unused code, recursive loops, something like that) or a long time (refactor, iterate, rinse, repeat).</li>
<li>Now run the benchmark again, find the next hotspot, and repeat the process until no more hotspots are found.</li>
<li>Now the code will run instantly, as you have <a href="http://slashdot.org/articles/01/03/31/0516216.shtml">optimized it down to zero</a>.  Taking this method to it&#8217;s completely logical conclusion you could run another benchmark and find the next set of hotspots, or run it against the next module or part of the framework until you&#8217;ve optimized it all down to zero.</li>
</ol>
<p>Congratulations, now Rails requests (obviously taking things like network latency into account, until you turn your now optimized optimizing brain to <em>that</em> problem) all run in 0.0 seconds.  You won!</p>
<p><span style="color: #888888;"><sup>*</sup> Ok, so obviously (I hope) this is a post that is in jest, as at some point you <em>will</em> run up against issues that can&#8217;t be optimized, either because of latency you can&#8217;t avoid from disk loading, <a href="http://thinkinginrails.com/2010/05/database-and-performance-in-web-applications/">more database indexes vs loading from disk</a>, the laws of physics, code complexity vs readability, etc.  It is however something though that I hope gave you a bit of a giggle (that&#8217;s maybe a stretch I admit) or a slight pause to think that maybe, just maybe this <em>could</em> (in some fashion) work for you for some situation.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/11/optimizing-everything-to-instant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WhyDay</title>
		<link>http://thinkinginrails.com/2010/08/whyday/</link>
		<comments>http://thinkinginrails.com/2010/08/whyday/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 18:33:20 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=616</guid>
		<description><![CDATA[Anyone in the Ruby community probably knows about Why The Lucky Stiff and his numerous contributions to Ruby and the Ruby community[0].  They&#8217;ll also know that a while back _Why decided to disappear, removing his code, sites, and closing down his various accounts.  In celebration of what he brought to us Today, August 19th is [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone in the Ruby community probably knows about <a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff">Why The Lucky Stiff</a> and his numerous contributions to Ruby and the Ruby community[0].  They&#8217;ll also know that a while back _Why decided to disappear, removing his code, sites, and closing down his various accounts.  In celebration of what he brought to us Today, August 19th is <a href="http://whyday.org">Why Day</a>, in which people are encouraged to:</p>
<ul>
<li>See how far you can push some weird corner of Ruby (or some other language).</li>
<li>Try that wild idea you&#8217;ve been sitting on because it&#8217;s too crazy.</li>
<li>or <a href="http://whyday.org">others&#8230;.</a></li>
</ul>
<p>One thing I know you can do is to use <a href="http://www.skype.com">Skype</a> to call &#8220;coderpath&#8221; and leave a message about what you think of _Why and Why Day.   <a href="skype:coderpath?call">Call coderpath&#8217;s skype</a> (you of course need Skype installed and a Skype account&#8230;).</p>
<p>If you&#8217;re looking for a reminder of what _Why brought to the community, you can check out <a href="http://github.com/whymirror">whymirror on github</a>, where most of _Why&#8217;s various projects have been restored and preserved.  Most special though (in my opinion anyway) are:</p>
<ul>
<li><a href="http://github.com/whymirror/TryRuby">TryRuby</a> &#8211; running ruby in the browser, like IRB</li>
<li><a href="http://mislav.uniqpath.com/poignant-guide/">Why&#8217;s Poignant Guide To Ruby</a> &#8211; The man, the book, the legend.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/08/whyday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinking on The New Paradigm Of Web Application Development</title>
		<link>http://thinkinginrails.com/2010/07/thinking-on-the-new-paradigm-of-web-application-development/</link>
		<comments>http://thinkinginrails.com/2010/07/thinking-on-the-new-paradigm-of-web-application-development/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 05:45:56 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=600</guid>
		<description><![CDATA[This is probably old news to everyone who reads this, but today I had a bit of an epiphany.  I was watching Charles Max Wood&#8217;s excellent Teach Me To Code Screen-cast and realized (after watching two parts of his &#8220;building a blog&#8221; series) that he wasn&#8217;t ever actually looking at the output of his coding, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Mind Blown Dude" src="http://3.bp.blogspot.com/_UKZle04oFnc/SFdGKUPYevI/AAAAAAAAAqw/FjFvQ5Jhf4Q/s400/dope%2Bexploding%2Bhead.jpg" alt="" width="305" height="400" />This is probably old news to everyone who reads this, but today I had a bit of an epiphany.  I was watching Charles Max Wood&#8217;s excellent <a href="http://www.teachmetocode.com/itunes.rss">Teach Me To Code Screen-cast</a> and realized (after watching <a href="http://teachmetocode.com/screencasts/rails-3-building-a-blog-part-1-test-setup-generators">two</a> <a href="http://teachmetocode.com/screencasts/rails-3-building-a-blog-part-2-crud-show-and-create">parts</a> of his &#8220;building a blog&#8221; series) that he wasn&#8217;t ever actually looking at the output of his coding, at least in the traditional sense.</p>
<p>The way I&#8217;ve coded since, well, forever has been like this.  I open up my editor window, and an output window.  When I was writing C code back in the dot com days this was another terminal with a &#8220;make &amp;&amp; ./app&#8221; in it, and in my newer web application days, a browser window with my mouse hand on the reload button. After a bit of code was written, I&#8217;d either hit &#8220;up-arrow enter&#8221; for C code or reload the browser, and see what&#8217;s happened.</p>
<p>Watching the screen-cast I realize that Charles was doing the following (as far as I can tell, as I&#8217;m pretty new to the whole <a href="http://thinkinginrails.com/2010/04/ruby-on-rails-lingo-for-beginners/">TDD thing</a>):</p>
<ul>
<li>Writing a scenario or feature (using <a href="http://wiki.github.com/aslakhellesoy/cucumber/">cucumber</a>)</li>
<li>Using that to generate tests (with <a href="http://rspec.info">rspec</a>, I think)</li>
<li>Running the test, watching it fail</li>
<li>Writing the code to make the test pass</li>
<li>Running the test, watching it pass</li>
<li>Repeat&#8230;</li>
</ul>
<p>Now the last four steps I do know about, those are standard TDD methodology, broken down into Red (write a failing test), Green (make it pass), Refactor (make the code better), but I was blown away with the realization that he wasn&#8217;t looking at the output of the code he was writing, but instead was letting the testing framework do the work, so instead of having to verify with your own eyes that the [insert web page you're interested in here] is showing properly, you have it checked programmatically, no browser needed (in fact, at the point in part two when the browser is needed, there&#8217;s that uncomfortable pause while FireFox groans and raises itself into a running state).</p>
<p>Is that what TDD is really about?  I&#8217;ve always imagined it as an augmentation to the previously-described way I used to code in that before I coded and reloaded the browser window you&#8217;d write the test, then the code, then the browser reload, then the test again to make sure it passed.</p>
<p>This is a whole new world that&#8217;s frankly thrown me for a loop, and into a fervor of reading up on <a href="http://wiki.github.com/aslakhellesoy/cucumber/">cucumber</a>.  I&#8217;m not sure how this will affect my code writing, but this makes the whole world of TDD a <em>lot</em> more interesting!  Course, I&#8217;ll have to re-watch the two episodes to make sure I truly grok the tools that he&#8217;s using.</p>
<p><strong>Further Reading / Links</strong></p>
<ul>
<li><a href="http://teachmetocode.com/screencasts/rails-3-building-a-blog-part-1-test-setup-generators">Part 1</a> and <a href="http://teachmetocode.com/screencasts/rails-3-building-a-blog-part-2-crud-show-and-create">Part 2</a> of the screencast in question</li>
<li><a href="http://teachmetocode.com/">Teach Me To Code Screencasts</a> (TMTC hold two coveted places on my <a href="http://thinkinginrails.com/2010/04/favorite-ruby-and-rails-podcasts/">list of programmer podcasts</a>)</li>
<li>@<a href="http://twitter.com/teachmetocode">teachmetocode</a> and @<a href="http://twitter.com/charlesmaxwood">charlesmaxwood</a> on Twitter</li>
<li>The <a href="http://webchat.freenode.net/?channels=teachmetocode">#teachmetocode</a> IRC channel on Freenode, come by and hang out and chat</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/07/thinking-on-the-new-paradigm-of-web-application-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building a New Site With Rails Part 1</title>
		<link>http://thinkinginrails.com/2010/06/building-a-new-site-with-rails-part-1/</link>
		<comments>http://thinkinginrails.com/2010/06/building-a-new-site-with-rails-part-1/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 06:14:03 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Fear]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=554</guid>
		<description><![CDATA[You may have noticed that my &#8216;blog 6 days a week&#8217; has lately been kinda lax lately, but I finally, finally, started work on Ruby-idioms.com.  Nothing out there public yet, but I&#8217;ve finally found the time and energy, and quite frankly, got through that old friend of mine, fear of getting stuff done instead of [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Fear on the Brain" src="http://static.howstuffworks.com/gif/fear-9.gif" alt="Fear on the Brain" width="240" height="216" />You may have noticed that my &#8216;blog 6 days a week&#8217; has lately been kinda lax lately, but I finally, <em>finally</em>, started work on Ruby-idioms.com.  Nothing out there public yet, but I&#8217;ve finally found the time and energy, and quite frankly, got through that old friend of mine, fear of getting stuff done instead of watching TV and reading RSS feeds, and actually got some code down on&#8230; uhm&#8230; an editor.</p>
<p>I figure that it&#8217;d be a good idea to start blogging the experience of building a site from scratch with Rails by a newbie (not that there aren&#8217;t a hundred of those already).  <a href="http://readmycode.org/">Read My Code</a> was done in 24 hours, I figure a week or so, or heck, a day or two per feature, ought to be enough.</p>
<p>I started by breaking things into some steps:</p>
<ol>
<li>Create the Idiom scaffold, model validation, etc</li>
<li>User authentication and login</li>
<li>User integration (edit your own Idioms)</li>
<li>Site layout, look and feel</li>
<li>Commenting</li>
<li>Tagging</li>
<li>More site layout stuff (I&#8217;m thinking this might be the hardest part for me, as I am a programmer and not a designer for a <em>very good</em> reason <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>That&#8217;s of course a bit over simplified, and I&#8217;m probably missing out something huge, but that&#8217;s the current attack plan.  All things are flexible of course.  My grand plan is to code one day, blog the results and anything interesting or challenging that I find. I&#8217;ll make sure I push things up to the <a href="http://github.com/arcterex/ruby-idioms.com">GitHub project page</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/06/building-a-new-site-with-rails-part-1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Shout Out To RailsConf!</title>
		<link>http://thinkinginrails.com/2010/06/shout-out-to-railsconf/</link>
		<comments>http://thinkinginrails.com/2010/06/shout-out-to-railsconf/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 06:07:38 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=557</guid>
		<description><![CDATA[Well, it didn&#8217;t work out for me this year, but a few of my buddies from the FV.rb are over at RailsConf right now, having a good time I&#8217;m sure.  I&#8217;m sure that @milesforrest, @djbell, @krutten, and whomever else is there is having a blast right now.  You guys better bring back schwag, pictures, and [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it didn&#8217;t work out for me this year, but a few of my buddies from the <a href="http://fvrb.org/">FV.rb</a> are over at <a href="http://www.railsconf.com/">RailsConf</a> right now, having a good time I&#8217;m sure.  I&#8217;m sure that @<a href="http://twitter.com/milesforrest">milesforrest</a>, @<a href="http://twitter.com/djbell">djbell</a>, @<a href="http://twitter.com/krutten">krutten</a>, and whomever else is there is having a blast right now.  You guys better bring back schwag, pictures, and good stories for next week&#8217;s meeting.  Also a thanks to the <a href="http://www.jetbrains.com/ruby/">RubyMine</a> guys over at JetBrains for throwing me a T-Shirt.  I&#8217;m not sure if they were giving them out to everyone, but they did say to send someone over, so I did.  Thanks guys!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/06/shout-out-to-railsconf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Functional Vs. Object Oriented Programming In Ruby</title>
		<link>http://thinkinginrails.com/2010/06/functional-vs-object-oriented-programming-in-ruby/</link>
		<comments>http://thinkinginrails.com/2010/06/functional-vs-object-oriented-programming-in-ruby/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 21:45:52 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=543</guid>
		<description><![CDATA[When I came to ruby I knew that in Ruby Everything Is An Object, but until I started writing &#8220;real&#8221; code, I didn&#8217;t realize that the Ruby world works that much better if your code is object oriented as well. Case in point my simple Twitter to HTML program.  When I first wrote it, it [...]]]></description>
			<content:encoded><![CDATA[<p>When I came to ruby I knew that in Ruby Everything Is An Object, but until I started writing &#8220;real&#8221; code, I didn&#8217;t realize that the Ruby world works that much better if <em>your code</em> is object oriented as well.</p>
<p>Case in point my simple <a href="http://thinkinginrails.com/2010/05/evolving-a-simple-twitter-to-blog-ruby-program-part-1/">Twitter to HTML</a> program.  When I <a href="https://gist.github.com/382571/b65095722c28f2773293655bcc951037769e4e69">first</a> wrote it, it was pretty much written from the point of view of where I was at, a old and functional programming Perl coder.</p>
<p>So what is the difference between the styles of <a href="http://en.wikipedia.org/wiki/Functional_programming">functional programming</a> and <a href="http://en.wikipedia.org/wiki/Object_oriented_programming">object oriented programming</a>?  For me, this meant that I was basically writing a program with no classes defined with a top to bottom program flow.  There was a &#8220;main()&#8221; (if you are familiar with C programming) which basically ran a set of functions and then ended.</p>
<p>Ruby itself discourages you from doing this.  There isn&#8217;t (as far as I can tell) the concept of pre-defining functions, so you have to write functions that you use before you use them.  So if you have a line that calls &#8220;foo(x,y)&#8221; you have to make sure that you have foo() defined above that in the program.  and if foo() calls bar() then bar has to be defined above foo(), and so on.  Not fun if you want to make your source code readable and nicely laid out.</p>
<p>Once I let Ruby&#8217;s object oriented nature take over a bit though, and defined the functionality in a class, and then just created an instance of the class to do foo() and bar() operations, it didn&#8217;t matter in what order code was assigned in the file, because the entire class is parsed by the interpreter before anything is done to it<small></small><small><sup>*</sup></small>.</p>
<p><em><small></small><small><sup>*</sup></small> I&#8217;m sure this isn&#8217;t 100% true from a compiler / systems design point of view, but for the end user that&#8217;s basically what it looks like.</em></p>
<p>So what else does this give you, or more specifically, force you to do?  Well, lots or Rubyist type things.  This encourages you to&#8230;</p>
<ul>
<li>create your programs in terms of data types (&#8220;this is a thing&#8221;)</li>
<li>group functionality together (&#8220;this thing does these operations&#8221;)</li>
<li>create objects that function together or off of each other (&#8220;this thing is a sub or superset of this other thing&#8221;)</li>
<li>ensure your methods play nicely (ie: method chaining)</li>
</ul>
<p>As many have said before, you can write bad C code in <em>any</em> language, but I had to come to the realization that just because I was writing in Ruby didn&#8217;t mean that I didn&#8217;t have to change <em>how</em> I was programming to take the most advantage of it.</p>
<p>Not that <strong>every</strong> program needs to be &#8220;objectified&#8221;, that 10 liner to parse out some some text and insert it into a database probably doesn&#8217;t need to be split into 2 modules and get 100% code coverage, but then again, maybe you&#8217;ll re-use it again next week, or maybe it&#8217;ll turn into the central convert-everything utility program for your job, and if so, wouldn&#8217;t it be nice if it was OO and tested from the start, instead of having those &#8220;extra&#8221; bits of safety tacked on after it becomes apparent that it&#8217;s more than just a quick and dirty little hack?  (For me it&#8217;s happened way too often that I don&#8217;t realize this until <em>way</em> too late&#8230;.) <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/06/functional-vs-object-oriented-programming-in-ruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Peepcode Hits Two Out Of The Park</title>
		<link>http://thinkinginrails.com/2010/06/peepcode-hits-two-out-of-the-park/</link>
		<comments>http://thinkinginrails.com/2010/06/peepcode-hits-two-out-of-the-park/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 15:33:31 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=540</guid>
		<description><![CDATA[Browsing the twitters this morning I found a couple of high end posts from Peepcode that I thought deserved some attention (assuming everyone in my audience isn&#8217;t hitting their blog on a regular basis already that is): First is the Live Blogging a Rails 3 Upgrade.  I think I saw one of these somewhere before, [...]]]></description>
			<content:encoded><![CDATA[<p>Browsing the twitters this morning I found a couple of high end posts from Peepcode that I thought deserved some attention (assuming everyone in my audience isn&#8217;t hitting <a href="http://blog.peepcode.com/archives">their blog</a> on a regular basis already that is):</p>
<ul>
<li>First is the <a href="http://blog.peepcode.com/tutorials/2010/live-coding-rails-3-upgrade">Live Blogging a Rails 3 Upgrade</a>.  I think I saw one of these somewhere before, maybe on <a href="http://railscasts.com">RailsCasts</a>, but the closer Rails 3 gets the more you&#8217;re going to want to see these so you&#8217;ll be that much more ready to do the upgrade yourself.  Now this is a post from February I realize, so it&#8217;s a couple of months old, but still looks great and is still <em>very</em> relevant.  Well worth the 25 minutes to watch <a href="http://topfunky.com/">TopFunky</a> do his thing.</li>
<li>Second on the list is an actual new post, entitled <a href="http://blog.peepcode.com/tutorials/2010/file-navigation-in-text-editors">Am I The Only One To Use a Text Editor To Edit Files</a>, listing out some requirements and what&#8217;s available for file navigation and searching in editors today.  In a twist ending that I&#8217;ll ruin for you here, the resulting list of features has morphed into a real application that works with a host of the favorite editors for the Mac.</li>
</ul>
<p>Great stuff all around, both blog posts (as the Peepcode blog always are) look beautiful and are amazingly laid out with great graphics and typography.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/06/peepcode-hits-two-out-of-the-park/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Laid Plans</title>
		<link>http://thinkinginrails.com/2010/05/best-laid-plans/</link>
		<comments>http://thinkinginrails.com/2010/05/best-laid-plans/#comments</comments>
		<pubDate>Sat, 29 May 2010 03:24:38 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Fear]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=532</guid>
		<description><![CDATA[So minimal posting this week cause I&#8217;ve been hit with the cold/flu/sinus-torture-from-hell I did get some design done on the two projects I&#8217;ve had rattling around in my head for the last few weeks and months.  Only problem was, when I really thought about it, they are both kinda silly and pointless. My idea for [...]]]></description>
			<content:encoded><![CDATA[<p>So minimal posting this week cause I&#8217;ve been hit with the cold/flu/sinus-torture-from-hell <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I did get some design done on the two projects I&#8217;ve had rattling around in my head for the last few weeks and months.  Only problem was, when I really thought about it, they are both kinda silly and pointless.</p>
<ul>
<li>My idea for a memory capture (ie: put in memories of your past) is, I realized, essentially a blog with a better way of adding by date (fuzzy dates).  Really, just a blog.  Do I want to end up re-writing <a href="http://wordpress.org">wordpress</a> or <a href="http://movabletype.org">movable type</a> again, poorly?</li>
<li>The ruby-idioms site that I spoke about a while ago appears to have been written already over at <a href="http://readmycode.org">http://readmycode.org</a>.  While I applaud the author for getting the site out in 24 hours, he also basically created what I wanted to.  Grrr&#8230;..</li>
</ul>
<p>Now, that&#8217;s not to say that I don&#8217;t have passion for the projects, and definitely doesn&#8217;t mean I won&#8217;t still do them (nothing says you can&#8217;t <a href="http://vaynermedia.com/2009/11/build-an-application-even-if-it-already-exists/">create something if it exists already</a>).  Shows the dangers of not committing and waiting, instead of getting stuff done NOW.</p>
<p>Guess it&#8217;s just a bummer to get to the realization that my fantastic ideas maybe aren&#8217;t that wonderful&#8230;. Bleah.</p>
<p>Anyway, keep on coding out there, got some ideas here for some hopefully interesting posts coming up next week as I get better and closer to upright!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/05/best-laid-plans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

