<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for therealadam</title><link>http://disqus.com/by/therealadam/</link><description></description><atom:link href="http://disqus.com/therealadam/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 15 Feb 2011 20:50:54 -0000</lastBuildDate><item><title>Re: The Explicit Receiver Convention in Ruby</title><link>http://iampedantic.com/post/3312227203#comment-148044238</link><description>&lt;p&gt;I'm wary of doing anything to the way my code looks based on method call overhead. Consider that method calls _and_ object allocations were costly in early versions of Java and now they are very low overhead operations. Formatting your code to make method dispatch obvious is tantamount to object pools. If you've got an inner loop where that really matters, fine. Making a convention of this is going a bit far.&lt;/p&gt;&lt;p&gt;I think blaming one's loss of bearings on long methods on implicit receiver is blame shifting. The method is confusing because it's long, not because it takes a moment to figure out how a value comes to be.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">therealadam</dc:creator><pubDate>Tue, 15 Feb 2011 20:50:54 -0000</pubDate></item><item><title>Re: The Explicit Receiver Convention in Ruby</title><link>http://iampedantic.com/post/3312227203#comment-147782338</link><description>&lt;p&gt;I'm not a fan of this approach. I can't give you a really good, unifying reason I prefer to use implicit receiver. I think it comes down to noise.&lt;/p&gt;&lt;p&gt;With an implicit receiver, the beginning of every line is the real beginning of what's going on. I don't do any scanning around to find what's going on. There are few extraneous characters to skip past.&lt;/p&gt;&lt;p&gt;Each line of code is more dense; I try to keep every line of code within 80 columns and spending five on each method call makes that damn hard.&lt;/p&gt;&lt;p&gt;The thing I like most about implicit receiver is that it makes some extractions really, really easy. You take all the logic for assigning a local, drop it into a method of the same name, and you're done.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">therealadam</dc:creator><pubDate>Tue, 15 Feb 2011 15:50:05 -0000</pubDate></item><item><title>Re: drawohara - 11. Tools

 
Thirty spokes meet at a nave;...</title><link>http://drawohara.com/post/70709332#comment-5145924</link><description>&lt;p&gt;I'll keep this in my pocket for those who put tooling before doing.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">therealadam</dc:creator><pubDate>Thu, 15 Jan 2009 13:43:31 -0000</pubDate></item><item><title>Re: Adam @ Heroku. Database URLs</title><link>http://adam.blog.heroku.com/past/2008/9/14/database_urls/#comment-2355899</link><description>&lt;p&gt;Certainly the URL approach is more concise. On the other hand, a string is opaque to most tools, requiring some kind of parser to extract an easily manipulated object. Any thoughts on that trade-off?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">therealadam</dc:creator><pubDate>Mon, 15 Sep 2008 00:18:26 -0000</pubDate></item><item><title>Re: Bruce Williams: Arrow Lambdas, a Ruby 1.9 Vignette</title><link>http://codefluency.com/articles/2008/08/17/arrow-lambdas-a-ruby-1-9-vignette/#comment-1620041</link><description>&lt;p&gt;I think pointy lambdas really come into their own with APIs that encourage the use of passing lambdas _and_ procs to methods. Consider named_scope in ActiveRecord:&lt;/p&gt;&lt;p&gt;named_scope :posts_by, lambda { |topic| {:conditions =&amp;gt; {:topic =&amp;gt; topic}} } do&lt;br&gt;  def do_something &lt;br&gt;    ...&lt;br&gt;  end&lt;br&gt;end&lt;/p&gt;&lt;p&gt;In Ruby 1.9, this will read ever so slightly better:&lt;/p&gt;&lt;p&gt;named_scope :posts_by, -&amp;gt;(topic) { {:conditions =&amp;gt; {:topic =&amp;gt; topic}} } do&lt;br&gt;  def do_something &lt;br&gt;    ...&lt;br&gt;  end&lt;br&gt;end&lt;/p&gt;&lt;p&gt;It seems small, but after your sixth or seventh named scope, you come to appreciate the "sugar".&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">therealadam</dc:creator><pubDate>Mon, 18 Aug 2008 21:46:10 -0000</pubDate></item></channel></rss>