<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Elements of Ruby Style</title>
	<atom:link href="http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/</link>
	<description>Running commentary about agile development, user experience design and Ajax.</description>
	<lastBuildDate>Fri, 05 Mar 2010 19:33:43 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: CSS Coding Standards &#124; Samurai Coder</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-6992</link>
		<dc:creator>CSS Coding Standards &#124; Samurai Coder</dc:creator>
		<pubDate>Fri, 17 Jul 2009 15:26:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-6992</guid>
		<description>[...] considered a constant, not a variable.) But still there&#8217;s wide open room for its style. Noel Rappin wrote a style guide,  which I found quite inspiring. Any similar efforts on CSS? Can any well-known CSS maven have a [...]</description>
		<content:encoded><![CDATA[<p>[...] considered a constant, not a variable.) But still there&#8217;s wide open room for its style. Noel Rappin wrote a style guide,  which I found quite inspiring. Any similar efforts on CSS? Can any well-known CSS maven have a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenn</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-4625</link>
		<dc:creator>Kenn</dc:creator>
		<pubDate>Sat, 20 Dec 2008 01:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-4625</guid>
		<description>Of course the beauty of using tabs for indentation is that your editor will display them at whatever width you prefer, while not imposing your own width preferences on others.

For the record, I do single-tab indent and display them with a width of four characters. Everyone wins.</description>
		<content:encoded><![CDATA[<p>Of course the beauty of using tabs for indentation is that your editor will display them at whatever width you prefer, while not imposing your own width preferences on others.</p>
<p>For the record, I do single-tab indent and display them with a width of four characters. Everyone wins.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-4151</link>
		<dc:creator>Barry</dc:creator>
		<pubDate>Sat, 15 Nov 2008 04:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-4151</guid>
		<description>@Harry,

Maybe even 
return if x.nil?</description>
		<content:encoded><![CDATA[<p>@Harry,</p>
<p>Maybe even<br />
return if x.nil?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juixe TechKnow &#187; The Rubyist: October Edition</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-4131</link>
		<dc:creator>Juixe TechKnow &#187; The Rubyist: October Edition</dc:creator>
		<pubDate>Fri, 14 Nov 2008 07:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-4131</guid>
		<description>[...] Elements of Ruby Style [...]</description>
		<content:encoded><![CDATA[<p>[...] Elements of Ruby Style [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: เร็วส์ หกสิบหก » นั่งเทียนเขียนข่าว#22</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-4003</link>
		<dc:creator>เร็วส์ หกสิบหก » นั่งเทียนเขียนข่าว#22</dc:creator>
		<pubDate>Sun, 02 Nov 2008 17:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-4003</guid>
		<description>[...] Elements of Ruby Style - Ruby Stylista - [...]</description>
		<content:encoded><![CDATA[<p>[...] Elements of Ruby Style &#8211; Ruby Stylista &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3966</link>
		<dc:creator>Sho</dc:creator>
		<pubDate>Fri, 31 Oct 2008 07:44:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3966</guid>
		<description>@gw:

Most Ruby users that I know care deeply about the &quot;look and feel&quot; of the language they use - that&#039;s the whole reason they love Ruby so much. Efforts to come up with the &quot;best practise&quot; for writing clear, understandable, good looking code are not elitism or an effort to become &quot;cool kids&quot;. It&#039;s more an effort to arrive at some kind of ideal standard form, by people who care deeply about style and function.

And more than 2 spaces is ridiculous. Maybe 4 spaces is necessary for Java, a much more verbose language, else the indentation gets lost in a sea of code .. but Ruby is far more concise. 2 spaces is fine in well written code. 

Also, I disagree that Ruby is becoming less friendly. There&#039;s a few new corporate wannabe wankers around, sure, but you get that anywhere. The ruby people I know are friendly as anything. Calm down, cheer up and have a little more faith in people.</description>
		<content:encoded><![CDATA[<p>@gw:</p>
<p>Most Ruby users that I know care deeply about the &#8220;look and feel&#8221; of the language they use &#8211; that&#8217;s the whole reason they love Ruby so much. Efforts to come up with the &#8220;best practise&#8221; for writing clear, understandable, good looking code are not elitism or an effort to become &#8220;cool kids&#8221;. It&#8217;s more an effort to arrive at some kind of ideal standard form, by people who care deeply about style and function.</p>
<p>And more than 2 spaces is ridiculous. Maybe 4 spaces is necessary for Java, a much more verbose language, else the indentation gets lost in a sea of code .. but Ruby is far more concise. 2 spaces is fine in well written code. </p>
<p>Also, I disagree that Ruby is becoming less friendly. There&#8217;s a few new corporate wannabe wankers around, sure, but you get that anywhere. The ruby people I know are friendly as anything. Calm down, cheer up and have a little more faith in people.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gw</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3937</link>
		<dc:creator>gw</dc:creator>
		<pubDate>Wed, 29 Oct 2008 07:03:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3937</guid>
		<description>2 spaces? no way. 80 char limit? no way. Standard if structure is much clearer than the proposed alternatives. Avoid ternary? Pfft, don&#039;t think so--especially for short lines. Leave out last return? Don&#039;t care for that at ll. Code should be explicit wherever possible. return x is instantly recognizable as to purpose and function. Stringing things together goes &quot;overboard&quot; very quickly IMO. smaller steps on more lines is usually easier to read than one-liner magic.

I like Ruby, but I don&#039;t care for a lot of the style and idioms that are completely counter to most other languages and practices just so the people using them can be the &quot;kewl kids.&quot; Worse is the flogging certain community folks give when their arbitrary favorite style isn&#039;t followed. It feels a lot like royal manners--designed to make a small group feel elite because they follow some arbitrary rules. It&#039;s just style snobbery and doesn&#039;t fit within the usually friendly atmosphere of teh Ruby community (slowly being eroded as elitism spreads).</description>
		<content:encoded><![CDATA[<p>2 spaces? no way. 80 char limit? no way. Standard if structure is much clearer than the proposed alternatives. Avoid ternary? Pfft, don&#8217;t think so&#8211;especially for short lines. Leave out last return? Don&#8217;t care for that at ll. Code should be explicit wherever possible. return x is instantly recognizable as to purpose and function. Stringing things together goes &#8220;overboard&#8221; very quickly IMO. smaller steps on more lines is usually easier to read than one-liner magic.</p>
<p>I like Ruby, but I don&#8217;t care for a lot of the style and idioms that are completely counter to most other languages and practices just so the people using them can be the &#8220;kewl kids.&#8221; Worse is the flogging certain community folks give when their arbitrary favorite style isn&#8217;t followed. It feels a lot like royal manners&#8211;designed to make a small group feel elite because they follow some arbitrary rules. It&#8217;s just style snobbery and doesn&#8217;t fit within the usually friendly atmosphere of teh Ruby community (slowly being eroded as elitism spreads).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruby Style Guides and Tools: How to Write Good Looking Ruby : WebNetiques</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3919</link>
		<dc:creator>Ruby Style Guides and Tools: How to Write Good Looking Ruby : WebNetiques</dc:creator>
		<pubDate>Tue, 28 Oct 2008 09:55:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3919</guid>
		<description>[...] week, Noel Rappin of Pathfinder Development wrote Elements of Ruby Style - an attempt at producing a Ruby &#8220;style guide.&#8221; After some initial feedback to this, [...]</description>
		<content:encoded><![CDATA[<p>[...] week, Noel Rappin of Pathfinder Development wrote Elements of Ruby Style &#8211; an attempt at producing a Ruby &#8220;style guide.&#8221; After some initial feedback to this, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nona</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3911</link>
		<dc:creator>Nona</dc:creator>
		<pubDate>Tue, 28 Oct 2008 02:06:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3911</guid>
		<description>Please divorce your current editor if it hides code on long lines.  Any programmer&#039;s editor will do the correct thing and wrap.</description>
		<content:encoded><![CDATA[<p>Please divorce your current editor if it hides code on long lines.  Any programmer&#8217;s editor will do the correct thing and wrap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vBharat.com &#187; Pathfinder Development » Elements of Ruby Style</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3910</link>
		<dc:creator>vBharat.com &#187; Pathfinder Development » Elements of Ruby Style</dc:creator>
		<pubDate>Mon, 27 Oct 2008 23:20:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3910</guid>
		<description>&lt;strong&gt;From vBharat.com &#187; Pathfinder Development » Elements of Ruby Style...&lt;/strong&gt;

Here are some thoughts on good Ruby &amp; Rails style -- I&#039;m mostly focusing on Ruby-specific guidelines here. This is somewhat closer to a brain dump than a fully-baked style guide, so it&#039;s something I intend to come back to, especially after hearing ev...</description>
		<content:encoded><![CDATA[<p><strong>From vBharat.com &#187; Pathfinder Development » Elements of Ruby Style&#8230;</strong></p>
<p>Here are some thoughts on good Ruby &amp; Rails style &#8212; I&#8217;m mostly focusing on Ruby-specific guidelines here. This is somewhat closer to a brain dump than a fully-baked style guide, so it&#8217;s something I intend to come back to, especially after hearing ev&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dani</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3907</link>
		<dc:creator>dani</dc:creator>
		<pubDate>Mon, 27 Oct 2008 20:07:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3907</guid>
		<description>&quot;Indenting Ruby code four spaces indicates that you are a very recent convert from Java&quot;

nice argument!</description>
		<content:encoded><![CDATA[<p>&#8220;Indenting Ruby code four spaces indicates that you are a very recent convert from Java&#8221;</p>
<p>nice argument!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ESPN Dev Blog &#187; Blog Archive &#187; Ruby Style Guides and Tools</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3904</link>
		<dc:creator>ESPN Dev Blog &#187; Blog Archive &#187; Ruby Style Guides and Tools</dc:creator>
		<pubDate>Mon, 27 Oct 2008 16:22:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3904</guid>
		<description>[...] highlights two useful posts about Ruby style (here and here) and includes a link to reek, a popular tool for sniffing out code smells.    [...]</description>
		<content:encoded><![CDATA[<p>[...] highlights two useful posts about Ruby style (here and here) and includes a link to reek, a popular tool for sniffing out code smells.    [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ab5tract</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3903</link>
		<dc:creator>ab5tract</dc:creator>
		<pubDate>Mon, 27 Oct 2008 16:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3903</guid>
		<description>2 spaces is the only way to go. For one, not everyone uses TextMate (big shock to many, I know). Even for those who do, many times it is just as easy to use a CLI editor for a quick fix. Dealing with 4/8 spaces in that context is &quot;insane&quot;. I can&#039;t imagine what kind of res/font size you would be using to not notice a 2 space indent... That said, this is really a project-by-project issue, where the team decides what standard to adopt. That said, when it comes up, in a &quot;tab vs whitespace&quot; debate, whitespace wins. And it&#039;s usually the 2 space variety. This is often a LCD issue, and older coders will chafe at tabs and blanch at &gt;2 space indents. Since you like your older coders, you go with them.

In terms of ternary operator, the author provides no legitimate reason not to use it. The justification is &quot;I don&#039;t like it&quot;. This is ridiculous. The &#039;? : &#039; operator is quite definitely a &quot;Ruby idiom&quot;, and is significantly more readable then the overly-verbose single-line example given.</description>
		<content:encoded><![CDATA[<p>2 spaces is the only way to go. For one, not everyone uses TextMate (big shock to many, I know). Even for those who do, many times it is just as easy to use a CLI editor for a quick fix. Dealing with 4/8 spaces in that context is &#8220;insane&#8221;. I can&#8217;t imagine what kind of res/font size you would be using to not notice a 2 space indent&#8230; That said, this is really a project-by-project issue, where the team decides what standard to adopt. That said, when it comes up, in a &#8220;tab vs whitespace&#8221; debate, whitespace wins. And it&#8217;s usually the 2 space variety. This is often a LCD issue, and older coders will chafe at tabs and blanch at &gt;2 space indents. Since you like your older coders, you go with them.</p>
<p>In terms of ternary operator, the author provides no legitimate reason not to use it. The justification is &#8220;I don&#8217;t like it&#8221;. This is ridiculous. The &#8216;? : &#8216; operator is quite definitely a &#8220;Ruby idiom&#8221;, and is significantly more readable then the overly-verbose single-line example given.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apeiros</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3900</link>
		<dc:creator>apeiros</dc:creator>
		<pubDate>Mon, 27 Oct 2008 13:02:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3900</guid>
		<description>I have to say that in the following code:

all_users.select(&amp;:is_active).map(&amp;:name).sort

&#039;is_active&#039; is violating my feelings :)
Using prefixes like &#039;is_&#039;, &#039;get_&#039; and &#039;set_&#039; is so java (and yes, java is a synonym for ugly here). In ruby instead of prefixing with &#039;is_&#039; you&#039;d use the postfixed questionmark, e.g.:

all_users.select(&amp;:active?).map(&amp;:name).sort

Regards
apeiros</description>
		<content:encoded><![CDATA[<p>I have to say that in the following code:</p>
<p>all_users.select(&amp;:is_active).map(&amp;:name).sort</p>
<p>&#8216;is_active&#8217; is violating my feelings <img src='http://www.pathf.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Using prefixes like &#8216;is_&#8217;, &#8216;get_&#8217; and &#8217;set_&#8217; is so java (and yes, java is a synonym for ugly here). In ruby instead of prefixing with &#8216;is_&#8217; you&#8217;d use the postfixed questionmark, e.g.:</p>
<p>all_users.select(&amp;:active?).map(&amp;:name).sort</p>
<p>Regards<br />
apeiros</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Zack</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3899</link>
		<dc:creator>Joe Zack</dc:creator>
		<pubDate>Mon, 27 Oct 2008 12:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3899</guid>
		<description>Call me crazy, but I think this

a_very_long_method_name(
  argument1,
  a + b,
  arg 3
)

looks much better than this


a_very_long_method_name(argument1,
    a + b, arg 3)


or this

a_very_long_method_name(argument1,
                        a + b, arg 3)</description>
		<content:encoded><![CDATA[<p>Call me crazy, but I think this</p>
<p>a_very_long_method_name(<br />
  argument1,<br />
  a + b,<br />
  arg 3<br />
)</p>
<p>looks much better than this</p>
<p>a_very_long_method_name(argument1,<br />
    a + b, arg 3)</p>
<p>or this</p>
<p>a_very_long_method_name(argument1,<br />
                        a + b, arg 3)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Apie</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3898</link>
		<dc:creator>Apie</dc:creator>
		<pubDate>Mon, 27 Oct 2008 12:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3898</guid>
		<description>Sentences that start with &quot;You should...&quot; normally loose me at the &#039;should&#039; :)</description>
		<content:encoded><![CDATA[<p>Sentences that start with &#8220;You should&#8230;&#8221; normally loose me at the &#8217;should&#8217; <img src='http://www.pathf.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leethal</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3897</link>
		<dc:creator>leethal</dc:creator>
		<pubDate>Mon, 27 Oct 2008 12:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3897</guid>
		<description>I prefer to not have a space after the curly bracket for block arguments. {&#124;foo&#124; foo.bar }, not { &#124;foo&#124; foo.bar }</description>
		<content:encoded><![CDATA[<p>I prefer to not have a space after the curly bracket for block arguments. {|foo| foo.bar }, not { |foo| foo.bar }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: เร็วส์ หกสิบหก » นั่งเทียนเขียนข่าว#20</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3883</link>
		<dc:creator>เร็วส์ หกสิบหก » นั่งเทียนเขียนข่าว#20</dc:creator>
		<pubDate>Sun, 26 Oct 2008 08:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3883</guid>
		<description>[...] Pathfinder Development » Elements of Ruby Style [...]</description>
		<content:encoded><![CDATA[<p>[...] Pathfinder Development » Elements of Ruby Style [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bubba</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3875</link>
		<dc:creator>bubba</dc:creator>
		<pubDate>Sat, 25 Oct 2008 04:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3875</guid>
		<description>I vote for 21.7 spaces.</description>
		<content:encoded><![CDATA[<p>I vote for 21.7 spaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pathfinder Development &#187; Ruby Stylista</title>
		<link>http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/comment-page-1/#comment-3866</link>
		<dc:creator>Pathfinder Development &#187; Ruby Stylista</dc:creator>
		<pubDate>Fri, 24 Oct 2008 20:06:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1205#comment-3866</guid>
		<description>[...] language fans, I&#039;m fascinated by programming as communication, and therefore also by thing like style guides that bridge the gap between the formal requirements of the compiler and the cognitive needs of the [...]</description>
		<content:encoded><![CDATA[<p>[...] language fans, I&#8217;m fascinated by programming as communication, and therefore also by thing like style guides that bridge the gap between the formal requirements of the compiler and the cognitive needs of the [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.340 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-21 20:47:56 -->
