<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>rors.org - comments</title>
    <link>http://rors.org</link>
    <description>rors.org - comments</description>
    <language>en</language>
    <item>
      <title>#48: Dejan Simic on 'Editing /etc/hosts on Mac OS'</title>
      <description>&lt;p&gt;Cool tip, thanks!&lt;/p&gt;</description>
      <pubDate>Sun, 11 Oct 2009 20:19:05 +0000</pubDate>
      <author>Dejan Simic</author>
      <link>http://rors.org/2009/3/24/editing-etc-hosts-on-mac-os</link>
      <guid>http://rors.org/2009/3/24/editing-etc-hosts-on-mac-os</guid>
    </item>
    <item>
      <title>#33: Daniel Cadenas on 'Editing /etc/hosts on Mac OS'</title>
      <description>&lt;p&gt;And another related bash tip: if you want to see /etc/hosts contents just type @ and then tab&lt;/p&gt;</description>
      <pubDate>Wed, 07 Oct 2009 09:55:56 +0000</pubDate>
      <author>Daniel Cadenas</author>
      <link>http://rors.org/2009/3/24/editing-etc-hosts-on-mac-os</link>
      <guid>http://rors.org/2009/3/24/editing-etc-hosts-on-mac-os</guid>
    </item>
    <item>
      <title>#32: Dejan on 'My pet is growing'</title>
      <description>&lt;p&gt;Thank you Chris :)&lt;/p&gt;</description>
      <pubDate>Thu, 15 Jan 2009 14:06:10 +0000</pubDate>
      <author>Dejan</author>
      <link>http://rors.org/2009/1/14/my-pet-is-growing</link>
      <guid>http://rors.org/2009/1/14/my-pet-is-growing</guid>
    </item>
    <item>
      <title>#31: Chris on 'My pet is growing'</title>
      <description>&lt;p&gt;Congratulations, Dejan, those are impressive numbers! And it sounds like you enjoy your pet, too.&lt;/p&gt;</description>
      <pubDate>Thu, 15 Jan 2009 10:54:35 +0000</pubDate>
      <author>Chris</author>
      <link>http://rors.org/2009/1/14/my-pet-is-growing</link>
      <guid>http://rors.org/2009/1/14/my-pet-is-growing</guid>
    </item>
    <item>
      <title>#30: Konrad on 'Nested Ternary operator'</title>
      <description>&lt;p&gt;This is a very interesting way of coding a switch, and does allow you to use boolean expressions rather than constants, but you need to realize that this will be much slower than a switch.&lt;/p&gt;


	&lt;p&gt;Since this is one line, one statement, it will need to process the entire statement before continuing with the execution of the rest of the program.&lt;/p&gt;


	&lt;p&gt;If efficiency of code is not a high priority or you really need to user a boolean expression for a switch then by all means use the example.&lt;/p&gt;


	&lt;p&gt;Good example though.&lt;/p&gt;</description>
      <pubDate>Wed, 19 Nov 2008 10:01:05 +0000</pubDate>
      <author>Konrad</author>
      <link>http://rors.org/2008/1/20/nested-ternary-operator</link>
      <guid>http://rors.org/2008/1/20/nested-ternary-operator</guid>
    </item>
    <item>
      <title>#27: Dejan on 'Alternatives'</title>
      <description>&lt;p&gt;No, I haven&amp;#8217;t actually tried merb.&lt;/p&gt;


	&lt;p&gt;Post is kind of a joke that I&amp;#8217;d probably switched if I would tried it :) And, as you know, choosing any alternative technology over mainstream has its own advantages but also has its price(learning curve, smaller community(which leads to many bad things), managers don&amp;#8217;t like it&amp;#8230;)&lt;/p&gt;</description>
      <pubDate>Wed, 20 Aug 2008 08:40:46 +0000</pubDate>
      <author>Dejan</author>
      <link>http://rors.org/2008/8/18/alternatives</link>
      <guid>http://rors.org/2008/8/18/alternatives</guid>
    </item>
    <item>
      <title>#26: Srdjan Pejic on 'Alternatives'</title>
      <description>&lt;p&gt;Ne znam da li smijem ostavljati komentare na srpskom. Zbog toga cu prevesti na engleski ispod komentara.&lt;/p&gt;


	&lt;p&gt;Nego, da te pitam, zasto ne bi koristio Merb? Da li ima tehnickih razloga ili je samo nesto sto ne preferiras?&lt;/p&gt;


	&lt;p&gt;English:&lt;/p&gt;


	&lt;p&gt;Why not use Merb? Is it a technical reason or a preference?&lt;/p&gt;</description>
      <pubDate>Tue, 19 Aug 2008 13:45:50 +0000</pubDate>
      <author>Srdjan Pejic</author>
      <link>http://rors.org/2008/8/18/alternatives</link>
      <guid>http://rors.org/2008/8/18/alternatives</guid>
    </item>
    <item>
      <title>#24: roger degree search on 'andand'</title>
      <description>&lt;p&gt;It is true.  This is one of the nicest &amp;#8216;gems&amp;#8217; I&amp;#8217;ve run into for normal use.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Jul 2008 14:50:06 +0000</pubDate>
      <author>roger degree search</author>
      <link>http://rors.org/2008/3/18/andand</link>
      <guid>http://rors.org/2008/3/18/andand</guid>
    </item>
    <item>
      <title>#23: Eric on 'Nested Ternary operator'</title>
      <description>&lt;p&gt;Well, now that I think about it, he had something worse!&lt;/p&gt;


	&lt;p&gt;$mySort = ($sort==1) ? &amp;#8216;avg_rating &amp;#8217;.$sortOrder : (($sort==2) ? &amp;#8216;solved &amp;#8217;.$sortOrder : (($sort==4) ? &amp;#8216;articletype &amp;#8217; .$sortOrder : &amp;#8216;question &amp;#8217;.$sortOrder));&lt;/p&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:52:07 +0000</pubDate>
      <author>Eric</author>
      <link>http://rors.org/2008/1/20/nested-ternary-operator</link>
      <guid>http://rors.org/2008/1/20/nested-ternary-operator</guid>
    </item>
    <item>
      <title>#22: Eric on 'Nested Ternary operator'</title>
      <description>&lt;p&gt;It&amp;#8217;s pretty interesting!  I would not use it, though.&lt;br /&gt;I&amp;#8217;m currently updating a system and the developer that originally wrote the code had something like this:&lt;/p&gt;


	&lt;p&gt;var = col==0? person.getFirstName(): col==1? person.getLastName(): col==2? person.getAge(): col==3? person.getAddress(): null;&lt;/p&gt;


	&lt;p&gt;Everything in one line! That&amp;#8217;s almost impossible to read.&lt;br /&gt;This blog entry helped me a lot.&lt;br /&gt;We just need to remember that the machine can read the code anyways, but the average human being needs it more simple and easy to read.&lt;/p&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:32:43 +0000</pubDate>
      <author>Eric</author>
      <link>http://rors.org/2008/1/20/nested-ternary-operator</link>
      <guid>http://rors.org/2008/1/20/nested-ternary-operator</guid>
    </item>
    <item>
      <title>#21: Karl on 'Alternative join and split in Ruby'</title>
      <description>&lt;p&gt;Just my opinion here, but I don&amp;#8217;t like either of those conventions. To me they are not clear. If someone else was picking up my code, they might find those a bit confusing. The split nomenclature is farily common among several languages.&lt;/p&gt;


	&lt;p&gt;But I will give you that they are concise.&lt;/p&gt;</description>
      <pubDate>Thu, 10 Jul 2008 12:32:03 +0000</pubDate>
      <author>Karl</author>
      <link>http://rors.org/2008/7/09/alternative-join-and-split-in-ruby</link>
      <guid>http://rors.org/2008/7/09/alternative-join-and-split-in-ruby</guid>
    </item>
    <item>
      <title>#19: Dejan on 'andand'</title>
      <description>&lt;p&gt;Cool, thanks! :)&lt;/p&gt;</description>
      <pubDate>Mon, 24 Mar 2008 17:04:30 +0000</pubDate>
      <author>Dejan</author>
      <link>http://rors.org/2008/3/18/andand</link>
      <guid>http://rors.org/2008/3/18/andand</guid>
    </item>
    <item>
      <title>#18: Reg Braithwaite on 'andand'</title>
      <description>&lt;p&gt;Thank you! I hope you don&amp;#8217;t mind my quoting your post on &lt;a href="http://andand.rubyforge.org"&gt;andand&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 24 Mar 2008 16:45:37 +0000</pubDate>
      <author>Reg Braithwaite</author>
      <link>http://rors.org/2008/3/18/andand</link>
      <guid>http://rors.org/2008/3/18/andand</guid>
    </item>
    <item>
      <title>#17: Greg Weber on 'Self or default if empty, DRY way'</title>
      <description>&lt;pre&gt;gem install methodchain&lt;/pre&gt;

&lt;code&gt;
require 'rubygems'
require 'methodchain'

person.phone.and {not empty?} || "N/A" 
&lt;/code&gt;</description>
      <pubDate>Mon, 24 Mar 2008 15:28:21 +0000</pubDate>
      <author>Greg Weber</author>
      <link>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</link>
      <guid>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</guid>
    </item>
    <item>
      <title>#16: Mark Wilden on 'Eleventh'</title>
      <description>&lt;p&gt;Actually, it&amp;#8217;s the American &lt;em&gt;sportscaster&lt;/em&gt; style that makes the podcast unlistenable for me. This is when they use emphasis and pauses for no reason.&lt;/p&gt;


	&lt;p&gt;///ark&lt;/p&gt;</description>
      <pubDate>Mon, 24 Mar 2008 11:59:19 +0000</pubDate>
      <author>Mark Wilden</author>
      <link>http://rors.org/2008/2/11/eleventh</link>
      <guid>http://rors.org/2008/2/11/eleventh</guid>
    </item>
    <item>
      <title>#14: Sokolov Yura on 'Self or default if empty, DRY way'</title>
      <description>&lt;p&gt;I use this:&lt;br /&gt;somewhere in initialization&lt;/p&gt;


&lt;pre&gt;
class Object
  def or(v)
    blank? ? v : self
  end
end
&lt;/pre&gt;

	&lt;p&gt;in code&lt;br /&gt;&lt;pre&gt;
person.phone.or(&#8220;N/A&#8221;)
&lt;/pre&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 24 Mar 2008 09:56:36 +0000</pubDate>
      <author>Sokolov Yura</author>
      <link>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</link>
      <guid>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</guid>
    </item>
    <item>
      <title>#12: Arlen on 'Eleventh'</title>
      <description>&lt;p&gt;Excellent! Thank you. Admittedly the strong American accent on matz&amp;#8217; name is quite painful, but otherwise this is excellent to listen to.&lt;/p&gt;</description>
      <pubDate>Mon, 24 Mar 2008 00:04:40 +0000</pubDate>
      <author>Arlen</author>
      <link>http://rors.org/2008/2/11/eleventh</link>
      <guid>http://rors.org/2008/2/11/eleventh</guid>
    </item>
    <item>
      <title>#11: Dejan on 'Eleventh'</title>
      <description>&lt;p&gt;I&amp;#8217;ve found alternative link, so check again, it should work now. Thanks for reporting.&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 23:41:15 +0000</pubDate>
      <author>Dejan</author>
      <link>http://rors.org/2008/2/11/eleventh</link>
      <guid>http://rors.org/2008/2/11/eleventh</guid>
    </item>
    <item>
      <title>#10: Arlen on 'Eleventh'</title>
      <description>&lt;p&gt;As an aside, the link &amp;#8220;Listen&amp;#8221; doesn&amp;#8217;t work. Any hints?&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 23:24:15 +0000</pubDate>
      <author>Arlen</author>
      <link>http://rors.org/2008/2/11/eleventh</link>
      <guid>http://rors.org/2008/2/11/eleventh</guid>
    </item>
    <item>
      <title>#9: Arlen on 'Eleventh'</title>
      <description>&lt;p&gt;Incredible!&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 23:23:54 +0000</pubDate>
      <author>Arlen</author>
      <link>http://rors.org/2008/2/11/eleventh</link>
      <guid>http://rors.org/2008/2/11/eleventh</guid>
    </item>
    <item>
      <title>#8: Eric Anderson on 'Self or default if empty, DRY way'</title>
      <description>&lt;p&gt;I agree with Craig 100%. The code it&amp;#8217;s obvious and I would much prefer the non-DRY obvious code compared to the mentally complex &lt;span class="caps"&gt;DRY&lt;/span&gt; code. The &amp;#8220;default_to&amp;#8221; method sounds like a great idea to get the advantages of both (DRY and obvious).&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 21:28:36 +0000</pubDate>
      <author>Eric Anderson</author>
      <link>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</link>
      <guid>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</guid>
    </item>
    <item>
      <title>#7: Craig on 'Self or default if empty, DRY way'</title>
      <description>&lt;p&gt;This seems like &amp;#8220;clever&amp;#8221; code. Seeing it, I would need to open up &lt;span class="caps"&gt;IRB&lt;/span&gt; to figure out what it does. On the otherhand, person.phone.blank? ? person.phone : &amp;#8220;N/A&amp;#8221; is obvious. If you&amp;#8217;re really obsessed with &lt;span class="caps"&gt;DRY&lt;/span&gt;, create a method default_to for Object so you have person.phone.default_to(&amp;#8220;N/A&amp;#8221;)&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 20:49:00 +0000</pubDate>
      <author>Craig</author>
      <link>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</link>
      <guid>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</guid>
    </item>
    <item>
      <title>#6: coderrr on 'Self or default if empty, DRY way'</title>
      <description>&lt;p&gt;or better&amp;#8230;&lt;/p&gt;


	&lt;p&gt;s =~ /.+/m ? $&amp;#38; : &amp;#8216;N/A&amp;#8217;&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 19:05:19 +0000</pubDate>
      <author>coderrr</author>
      <link>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</link>
      <guid>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</guid>
    </item>
    <item>
      <title>#5: coderrr on 'Self or default if empty, DRY way'</title>
      <description>&lt;p&gt;w/o need for andand how about:&lt;/p&gt;


	&lt;p&gt;s =~ /(.+)/m ? $1 : &amp;#8216;N/A&amp;#8217;&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 19:01:18 +0000</pubDate>
      <author>coderrr</author>
      <link>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</link>
      <guid>http://rors.org/2008/3/19/self-or-default-if-empty-dry-way</guid>
    </item>
  </channel>
</rss>
