<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for Stefan Kleine Stegemann</title>
	<link>http://stefankst.net</link>
	<description>Weblog</description>
	<pubDate>Tue, 06 Jan 2009 23:04:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>Comment on Capture standard output in Ruby by Lancer Kind</title>
		<link>http://stefankst.net/2007/06/05/capture-standard-output-in-ruby/#comment-382</link>
		<dc:creator>Lancer Kind</dc:creator>
		<pubDate>Tue, 19 Feb 2008 19:57:06 +0000</pubDate>
		<guid>http://stefankst.net/2007/06/05/capture-standard-output-in-ruby/#comment-382</guid>
		<description>Great article!  This outlines a solution that goes a long way into solving unit testing of stdout that is a problem with Java/C#.  It's also great that based on the need you've set up for code reuse, you introduced blocks/yield.  

The problem around StringIO not working is interesting.  I agree with your conclusion about the code not using duck typing.  Duck typing is something new that a lot of us are going to need to work at to get used to.  Checking the type of the superclass in order to make decisions about its capabilities feels like the developer was still stuck in the strong type checking paradigm in Java/C#.  When Java was the new cool OO kid on the block in 1995, one saw a lot of Java code that was written as if it was C (poor encapsulation, lots of public fields, few/really-long methods, checking return codes instead of using exception handling).  I expect a lot of Ruby code is going to look like Java/C# code but implemented in Ruby for a while until people unlearn some habits.  (I know I'm working to do that.)  

Bravo!  Reading this has been a great use of my time!</description>
		<content:encoded><![CDATA[<p>Great article!  This outlines a solution that goes a long way into solving unit testing of stdout that is a problem with Java/C#.  It&#8217;s also great that based on the need you&#8217;ve set up for code reuse, you introduced blocks/yield.  </p>
<p>The problem around StringIO not working is interesting.  I agree with your conclusion about the code not using duck typing.  Duck typing is something new that a lot of us are going to need to work at to get used to.  Checking the type of the superclass in order to make decisions about its capabilities feels like the developer was still stuck in the strong type checking paradigm in Java/C#.  When Java was the new cool OO kid on the block in 1995, one saw a lot of Java code that was written as if it was C (poor encapsulation, lots of public fields, few/really-long methods, checking return codes instead of using exception handling).  I expect a lot of Ruby code is going to look like Java/C# code but implemented in Ruby for a while until people unlearn some habits.  (I know I&#8217;m working to do that.)  </p>
<p>Bravo!  Reading this has been a great use of my time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Capture standard output in Ruby by Nick</title>
		<link>http://stefankst.net/2007/06/05/capture-standard-output-in-ruby/#comment-9</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Fri, 21 Sep 2007 18:24:44 +0000</pubDate>
		<guid>http://stefankst.net/2007/06/05/capture-standard-output-in-ruby/#comment-9</guid>
		<description>This rocks.  I wrote a couple of scripts to check on mysql replication. The scripts write to a log file and stardard out, but I want to send a daily report on the replication, and this should make it easy to capture the output from the script and stick it in an email. Thanks</description>
		<content:encoded><![CDATA[<p>This rocks.  I wrote a couple of scripts to check on mysql replication. The scripts write to a log file and stardard out, but I want to send a daily report on the replication, and this should make it easy to capture the output from the script and stick it in an email. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Mixin Module Methods by Stefan Kleine Stegemann</title>
		<link>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-8</link>
		<dc:creator>Stefan Kleine Stegemann</dc:creator>
		<pubDate>Sat, 19 May 2007 16:40:26 +0000</pubDate>
		<guid>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-8</guid>
		<description>Thx, I changed this in the example. I also added a link to http://redcorundum.blogspot.com/2006/06/mixing-in-class-methods.html.</description>
		<content:encoded><![CDATA[<p>Thx, I changed this in the example. I also added a link to <a href="http://redcorundum.blogspot.com/2006/06/mixing-in-class-methods.html." rel="nofollow">http://redcorundum.blogspot.com/2006/06/mixing-in-class-methods.html.</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Mixin Module Methods by Gregory</title>
		<link>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-7</link>
		<dc:creator>Gregory</dc:creator>
		<pubDate>Sat, 19 May 2007 15:40:17 +0000</pubDate>
		<guid>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-7</guid>
		<description>This is nit-picky, but it's not ModuleMethods, but ClassMethods.

To see why, have a look at the docs for module_function

-greg</description>
		<content:encoded><![CDATA[<p>This is nit-picky, but it&#8217;s not ModuleMethods, but ClassMethods.</p>
<p>To see why, have a look at the docs for module_function</p>
<p>-greg</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Mixin Module Methods by Stefan Kleine Stegemann</title>
		<link>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-6</link>
		<dc:creator>Stefan Kleine Stegemann</dc:creator>
		<pubDate>Sat, 19 May 2007 12:27:39 +0000</pubDate>
		<guid>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-6</guid>
		<description>@Gregory: Thanks for the comments, I updated the post with your solution. And sorry for the lost indenation. I think you have to use &#60;pre&#62; instead of &#60;code&#62;.</description>
		<content:encoded><![CDATA[<p>@Gregory: Thanks for the comments, I updated the post with your solution. And sorry for the lost indenation. I think you have to use &lt;pre&gt; instead of &lt;code&gt;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Mixin Module Methods by Gregory Brown</title>
		<link>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-5</link>
		<dc:creator>Gregory Brown</dc:creator>
		<pubDate>Sat, 19 May 2007 05:55:40 +0000</pubDate>
		<guid>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-5</guid>
		<description>also, if you're *only* looking for class methods, you would extend rather than include a module, no singleton hacking needed :)</description>
		<content:encoded><![CDATA[<p>also, if you&#8217;re *only* looking for class methods, you would extend rather than include a module, no singleton hacking needed <img src='http://stefankst.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Mixin Module Methods by Gregory Brown</title>
		<link>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-4</link>
		<dc:creator>Gregory Brown</dc:creator>
		<pubDate>Sat, 19 May 2007 05:53:38 +0000</pubDate>
		<guid>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-4</guid>
		<description>whoops, looks like it killed my indentation :-/</description>
		<content:encoded><![CDATA[<p>whoops, looks like it killed my indentation :-/</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Mixin Module Methods by Gregory Brown</title>
		<link>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-3</link>
		<dc:creator>Gregory Brown</dc:creator>
		<pubDate>Sat, 19 May 2007 05:53:11 +0000</pubDate>
		<guid>http://stefankst.net/2007/05/18/mixin-module-methods/#comment-3</guid>
		<description>The way you describe this works, but it's usually better to use the hook that is meant to handle this:

&lt;code&gt;
module MyModule
  module ClassMethods
      def my_class_method
      end
  end
  def self.included(base)
      base.extend(ClassMethods)
  end
end
&lt;/code&gt;

This is the standard idiom most Rubyists use because it's more friendly to letting multiple modules be mixed in as nothing is directly overwritten.</description>
		<content:encoded><![CDATA[<p>The way you describe this works, but it&#8217;s usually better to use the hook that is meant to handle this:</p>
<p><code><br />
module MyModule<br />
  module ClassMethods<br />
      def my_class_method<br />
      end<br />
  end<br />
  def self.included(base)<br />
      base.extend(ClassMethods)<br />
  end<br />
end<br />
</code></p>
<p>This is the standard idiom most Rubyists use because it&#8217;s more friendly to letting multiple modules be mixed in as nothing is directly overwritten.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
