<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Quality of Data</title>
	<atom:link href="http://qualityofdata.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://qualityofdata.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Fri, 30 Nov 2012 16:51:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on How to run most of the recursive functions iteratively! by Rich</title>
		<link>http://qualityofdata.com/2012/02/03/how-to-run-most-of-the-recursive-functions-iteratively/#comment-116</link>
		<dc:creator><![CDATA[Rich]]></dc:creator>
		<pubDate>Fri, 30 Nov 2012 16:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=356#comment-116</guid>
		<description><![CDATA[This is a great article. Do you think you could come up with a couple examples where this approach would not work, or when this approach might actually have worse performance than recursion? That might help readers (like me) to have a better idea of when and when not to use this type of helper. Thanks again for a very useful and informative article!!]]></description>
		<content:encoded><![CDATA[<p>This is a great article. Do you think you could come up with a couple examples where this approach would not work, or when this approach might actually have worse performance than recursion? That might help readers (like me) to have a better idea of when and when not to use this type of helper. Thanks again for a very useful and informative article!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nullsafe dereference operator (?.) in C# by naiem</title>
		<link>http://qualityofdata.com/2011/01/27/nullsafe-dereference-operator-in-c/#comment-114</link>
		<dc:creator><![CDATA[naiem]]></dc:creator>
		<pubDate>Thu, 22 Nov 2012 12:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=136#comment-114</guid>
		<description><![CDATA[You&#039;ve got a point here. Unfortunately .net generics does not allow for a totally graceful approach with one method.]]></description>
		<content:encoded><![CDATA[<p>You&#8217;ve got a point here. Unfortunately .net generics does not allow for a totally graceful approach with one method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nullsafe dereference operator (?.) in C# by Alex D</title>
		<link>http://qualityofdata.com/2011/01/27/nullsafe-dereference-operator-in-c/#comment-113</link>
		<dc:creator><![CDATA[Alex D]]></dc:creator>
		<pubDate>Thu, 22 Nov 2012 10:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=136#comment-113</guid>
		<description><![CDATA[Oh, look, the comment system ate all the generic type specifiers.... hehe, how @#@# awesome.]]></description>
		<content:encoded><![CDATA[<p>Oh, look, the comment system ate all the generic type specifiers&#8230;. hehe, how @#@# awesome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nullsafe dereference operator (?.) in C# by Alex D</title>
		<link>http://qualityofdata.com/2011/01/27/nullsafe-dereference-operator-in-c/#comment-112</link>
		<dc:creator><![CDATA[Alex D]]></dc:creator>
		<pubDate>Wed, 21 Nov 2012 22:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=136#comment-112</guid>
		<description><![CDATA[Actually, it doesn&#039;t make sense to return default(TOut) either. Eg, if Employee is null, his age should also be null, not 0. (The rest of the program logic might silently start to think you&#039;re employing newborns in some hair-brained embezzling scheme.) The return type should never be a value type, it should be a nullable type.

If the property is a value type, cast to a nullable inside the lambda like so:
Employee.NullSafe( e =&gt; (double?) e.Sallary )

To remind the users of this, rewrite the extension methods as follows:

public static TOut NullSafe(this TIn obj, Func memberAction ) where TIn : class where TOut : class
        { return ReferenceEquals(obj, null) ? null : memberAction(obj); }

public static TOut? NullSafe(this TIn obj, Func memberAction ) where TIn : class where TOut : struct
        { return ReferenceEquals(obj, null) ? null : memberAction(obj); }

public static TOut NullSafe(this TIn? obj, Func memberAction ) where TIn : struct where TOut : class
        { return obj.HasValue ? memberAction(obj.Value) : null; }

public static TOut? NullSafe(this TIn? obj, Func memberAction ) where TIn : struct where TOut : struct
        { return obj.HasValue ? memberAction(obj.Value) : null; }

It might seem possible to get rid of the requirement to cast to Nullable through some generic magic. It almost is. Unfortunately, the compiler complains when two generic functions differ only in their generic type constraints and return value. But you can add the following extension methods to the mix:

public static TOut? NullSafeV(this TIn obj, Func memberAction ) where TIn : class where TOut : struct
        { return ReferenceEquals(obj, null) ? (TOut?)null : memberAction(obj); }

public static TOut? NullSafeV(this TIn? obj, Func memberAction ) where TIn : struct where TOut : struct
        { return obj.HasValue ? memberAction(obj.Value) : (TOut?)null; }]]></description>
		<content:encoded><![CDATA[<p>Actually, it doesn&#8217;t make sense to return default(TOut) either. Eg, if Employee is null, his age should also be null, not 0. (The rest of the program logic might silently start to think you&#8217;re employing newborns in some hair-brained embezzling scheme.) The return type should never be a value type, it should be a nullable type.</p>
<p>If the property is a value type, cast to a nullable inside the lambda like so:<br />
Employee.NullSafe( e =&gt; (double?) e.Sallary )</p>
<p>To remind the users of this, rewrite the extension methods as follows:</p>
<p>public static TOut NullSafe(this TIn obj, Func memberAction ) where TIn : class where TOut : class<br />
        { return ReferenceEquals(obj, null) ? null : memberAction(obj); }</p>
<p>public static TOut? NullSafe(this TIn obj, Func memberAction ) where TIn : class where TOut : struct<br />
        { return ReferenceEquals(obj, null) ? null : memberAction(obj); }</p>
<p>public static TOut NullSafe(this TIn? obj, Func memberAction ) where TIn : struct where TOut : class<br />
        { return obj.HasValue ? memberAction(obj.Value) : null; }</p>
<p>public static TOut? NullSafe(this TIn? obj, Func memberAction ) where TIn : struct where TOut : struct<br />
        { return obj.HasValue ? memberAction(obj.Value) : null; }</p>
<p>It might seem possible to get rid of the requirement to cast to Nullable through some generic magic. It almost is. Unfortunately, the compiler complains when two generic functions differ only in their generic type constraints and return value. But you can add the following extension methods to the mix:</p>
<p>public static TOut? NullSafeV(this TIn obj, Func memberAction ) where TIn : class where TOut : struct<br />
        { return ReferenceEquals(obj, null) ? (TOut?)null : memberAction(obj); }</p>
<p>public static TOut? NullSafeV(this TIn? obj, Func memberAction ) where TIn : struct where TOut : struct<br />
        { return obj.HasValue ? memberAction(obj.Value) : (TOut?)null; }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nullsafe dereference operator (?.) in C# by Alex D</title>
		<link>http://qualityofdata.com/2011/01/27/nullsafe-dereference-operator-in-c/#comment-111</link>
		<dc:creator><![CDATA[Alex D]]></dc:creator>
		<pubDate>Wed, 21 Nov 2012 21:33:06 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=136#comment-111</guid>
		<description><![CDATA[I do not understand your comment &quot;Note we should not use obj != null because it can not test value types and also compiler has to lift the type to a nullable type for doing the comparision with null.&quot; Why would you ever want to apply this to value types?

The correct way to handle both reference and nullable types is the following:

public static TOut NullSafe(
            this TIn obj, 
            Func memberAction ) where TIn : class
        {
            return ReferenceEquals(obj, null) ? default(TOut) : memberAction(obj);
        }

public static TOut NullSafe(
              this TIn? obj,
              Func memberAction ) where TIn : struct
            {
                return obj.HasValue ? memberAction(obj.Value) : default(TOut);
            }]]></description>
		<content:encoded><![CDATA[<p>I do not understand your comment &#8220;Note we should not use obj != null because it can not test value types and also compiler has to lift the type to a nullable type for doing the comparision with null.&#8221; Why would you ever want to apply this to value types?</p>
<p>The correct way to handle both reference and nullable types is the following:</p>
<p>public static TOut NullSafe(<br />
            this TIn obj,<br />
            Func memberAction ) where TIn : class<br />
        {<br />
            return ReferenceEquals(obj, null) ? default(TOut) : memberAction(obj);<br />
        }</p>
<p>public static TOut NullSafe(<br />
              this TIn? obj,<br />
              Func memberAction ) where TIn : struct<br />
            {<br />
                return obj.HasValue ? memberAction(obj.Value) : default(TOut);<br />
            }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nullsafe dereference operator (?.) in C# by Michiel Cornille</title>
		<link>http://qualityofdata.com/2011/01/27/nullsafe-dereference-operator-in-c/#comment-93</link>
		<dc:creator><![CDATA[Michiel Cornille]]></dc:creator>
		<pubDate>Fri, 09 Mar 2012 17:38:37 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=136#comment-93</guid>
		<description><![CDATA[there should be a NOT  (!) in front of the IEQualityComparer of you NullSafe extension
  
 public static TOut NullSafe(this TIn obj, Func memberAction)
        {
            //Note we should not use obj != null because it can not test value types and also
            //compiler has to lift the type to a nullable type for doing the comparision with null.
            return (!EqualityComparer.Default.Equals(obj, default(TIn))) ? memberAction(obj) : default(TOut);

        }]]></description>
		<content:encoded><![CDATA[<p>there should be a NOT  (!) in front of the IEQualityComparer of you NullSafe extension</p>
<p> public static TOut NullSafe(this TIn obj, Func memberAction)<br />
        {<br />
            //Note we should not use obj != null because it can not test value types and also<br />
            //compiler has to lift the type to a nullable type for doing the comparision with null.<br />
            return (!EqualityComparer.Default.Equals(obj, default(TIn))) ? memberAction(obj) : default(TOut);</p>
<p>        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on About Naiem Yeganeh by Bobby</title>
		<link>http://qualityofdata.com/about/#comment-78</link>
		<dc:creator><![CDATA[Bobby]]></dc:creator>
		<pubDate>Mon, 21 Nov 2011 07:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.wordpress.com/?page_id=2#comment-78</guid>
		<description><![CDATA[Hey. I am currently a Junior in Computer Science at UIUC and just came across your Kinect Gesture Language idea. I was doing some kinect stuff for a course, and your idea interested me. If you are still working on this and need help let me know because I would love to contribute.
Thank you

--------------
Thanks mate. I believe the kinnect gesture recognition database idea is a good one and is certainly worth spending some time. Unfortunately I have not been able to work on it as yet. If you are interested, go ahead and kickstart the project and let me know about it.]]></description>
		<content:encoded><![CDATA[<p>Hey. I am currently a Junior in Computer Science at UIUC and just came across your Kinect Gesture Language idea. I was doing some kinect stuff for a course, and your idea interested me. If you are still working on this and need help let me know because I would love to contribute.<br />
Thank you</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Thanks mate. I believe the kinnect gesture recognition database idea is a good one and is certainly worth spending some time. Unfortunately I have not been able to work on it as yet. If you are interested, go ahead and kickstart the project and let me know about it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Freebase by Structured_Web</title>
		<link>http://qualityofdata.com/2011/09/18/freebase/#comment-43</link>
		<dc:creator><![CDATA[Structured_Web]]></dc:creator>
		<pubDate>Mon, 10 Oct 2011 23:21:36 +0000</pubDate>
		<guid isPermaLink="false">https://qualityofdata.wordpress.com/2011/09/18/freebase/#comment-43</guid>
		<description><![CDATA[We are using Freebase&#039;s data dump at our website to showcase our technology in making it easier to search for information in Wikpedia.  Have a look at our about page (scroll down for the Quick Demo): http://goo.gl/f4wKm]]></description>
		<content:encoded><![CDATA[<p>We are using Freebase&#8217;s data dump at our website to showcase our technology in making it easier to search for information in Wikpedia.  Have a look at our about page (scroll down for the Quick Demo): <a href="http://goo.gl/f4wKm" rel="nofollow">http://goo.gl/f4wKm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A gesture recognition database for Kinnect! by Willy</title>
		<link>http://qualityofdata.com/2011/09/22/a-gesture-recognition-database-for-kinnect/#comment-42</link>
		<dc:creator><![CDATA[Willy]]></dc:creator>
		<pubDate>Thu, 29 Sep 2011 12:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=309#comment-42</guid>
		<description><![CDATA[Hey friend,

Nice blog. I will post a link on my tumblr page.]]></description>
		<content:encoded><![CDATA[<p>Hey friend,</p>
<p>Nice blog. I will post a link on my tumblr page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A little puzzle by naiem</title>
		<link>http://qualityofdata.com/2011/08/11/a-little-puzzle/#comment-38</link>
		<dc:creator><![CDATA[naiem]]></dc:creator>
		<pubDate>Sat, 13 Aug 2011 05:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://qualityofdata.com/?p=254#comment-38</guid>
		<description><![CDATA[Bravo! You are smart Karen. 
The way I would solve it is this, not as brilliant as yours though:
1.5 (chiken) * 1.5 (day) = 1.5 (egg) * k (chiken.day per egg)
So it is easy enough to find out the k. k = 1.5 which means each egg takes 1.5 (or 3/2) chiken.days
From that is easy to calculate the answer which is 3 * (1/1.5) = 2

Non mathematical way is to say, well a chicken and half lays three eggs in three days, so a chicken lays two eggs in three days.]]></description>
		<content:encoded><![CDATA[<p>Bravo! You are smart Karen.<br />
The way I would solve it is this, not as brilliant as yours though:<br />
1.5 (chiken) * 1.5 (day) = 1.5 (egg) * k (chiken.day per egg)<br />
So it is easy enough to find out the k. k = 1.5 which means each egg takes 1.5 (or 3/2) chiken.days<br />
From that is easy to calculate the answer which is 3 * (1/1.5) = 2</p>
<p>Non mathematical way is to say, well a chicken and half lays three eggs in three days, so a chicken lays two eggs in three days.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
