<?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 for Gigu's blog</title>
	<atom:link href="http://blog.gigoo.org/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gigoo.org</link>
	<description>wEBbLOG</description>
	<lastBuildDate>Thu, 01 Jul 2010 23:53:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on A same cup of Java &#8230; by Greg Gigon</title>
		<link>http://blog.gigoo.org/2010/07/01/a-same-cup-of-java/comment-page-1/#comment-309</link>
		<dc:creator>Greg Gigon</dc:creator>
		<pubDate>Thu, 01 Jul 2010 23:53:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/2010/07/01/a-same-cup-of-java/#comment-309</guid>
		<description>True, but progress and innovation doesn&#039;t mean non-stability necessary. Heaving new features boos the productivity and adds more fun (I hope) to work. Switching to entirely different language is not option very often. 
It also could be the problem when not everyone in the team would like to switch.

I was mentioning iPhone more from usability perspective, to compare to  language used by developers.

Mmmmm, £1.40 hot dog :)</description>
		<content:encoded><![CDATA[<p>True, but progress and innovation doesn&#8217;t mean non-stability necessary. Heaving new features boos the productivity and adds more fun (I hope) to work. Switching to entirely different language is not option very often.<br />
It also could be the problem when not everyone in the team would like to switch.</p>
<p>I was mentioning iPhone more from usability perspective, to compare to  language used by developers.</p>
<p>Mmmmm, £1.40 hot dog <img src='http://blog.gigoo.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A same cup of Java &#8230; by Michael Austin</title>
		<link>http://blog.gigoo.org/2010/07/01/a-same-cup-of-java/comment-page-1/#comment-308</link>
		<dc:creator>Michael Austin</dc:creator>
		<pubDate>Thu, 01 Jul 2010 23:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/2010/07/01/a-same-cup-of-java/#comment-308</guid>
		<description>Surely if the platform is very stable, isn&#039;t it better for &quot;exciting&quot; and &quot;new&quot; functionality to come from the languages that run on JVM (like you stated Groovy and JRuby). I may be showing my naivety with these technologies, if so please put me in my place :D

The iPhone 4 isn&#039;t a good example this time :). From what I&#039;m hearing from other web devs the amount of hardware and software issues are higher from a first release. 

Plus don&#039;t disrespect a £1.40 Hot Dog Menu. Next time ask for a hot dog with a cup of beans and be amazed!</description>
		<content:encoded><![CDATA[<p>Surely if the platform is very stable, isn&#8217;t it better for &#8220;exciting&#8221; and &#8220;new&#8221; functionality to come from the languages that run on JVM (like you stated Groovy and JRuby). I may be showing my naivety with these technologies, if so please put me in my place <img src='http://blog.gigoo.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>The iPhone 4 isn&#8217;t a good example this time <img src='http://blog.gigoo.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . From what I&#8217;m hearing from other web devs the amount of hardware and software issues are higher from a first release. </p>
<p>Plus don&#8217;t disrespect a £1.40 Hot Dog Menu. Next time ask for a hot dog with a cup of beans and be amazed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Lasse</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-298</link>
		<dc:creator>Lasse</dc:creator>
		<pubDate>Sun, 28 Mar 2010 18:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-298</guid>
		<description>Does it matter which one you use? In the end, what matters is that you are forced to tackle the null...

So what if my method contract instead is: I&#039;ll return you a proper object, or throw a checked exception (heh, I guess it would only work in Java).

What you get out of that is the same as above, no problems with null. You are forced to deal with the exception, and importantly, the exception can carry much better failure information than your NullObjects or Maybe&#039;s.

What do you think?</description>
		<content:encoded><![CDATA[<p>Does it matter which one you use? In the end, what matters is that you are forced to tackle the null&#8230;</p>
<p>So what if my method contract instead is: I&#8217;ll return you a proper object, or throw a checked exception (heh, I guess it would only work in Java).</p>
<p>What you get out of that is the same as above, no problems with null. You are forced to deal with the exception, and importantly, the exception can carry much better failure information than your NullObjects or Maybe&#8217;s.</p>
<p>What do you think?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Hossam El-Deen M. Barakat</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-297</link>
		<dc:creator>Hossam El-Deen M. Barakat</dc:creator>
		<pubDate>Fri, 19 Mar 2010 09:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-297</guid>
		<description>I think that null objects makes the code clean and easier to read  than the other two patterns</description>
		<content:encoded><![CDATA[<p>I think that null objects makes the code clean and easier to read  than the other two patterns</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Christian Fredh</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-296</link>
		<dc:creator>Christian Fredh</dc:creator>
		<pubDate>Fri, 19 Mar 2010 09:03:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-296</guid>
		<description>Good post! As you write, null checks are not very descriptive, if they are not argument checks.

The Nullable struct in .NET is really useful but only works with value types, since classes are nullable as they are.

One thing to keep in mind though is that Empty objects are actual values, null represents the absence of a value. String.Empty vs a null string is a good example of this.

One easy thing to do is turn those null checks into booleans first, to make it more descriptive for the next person who works with the code:

Instead of:
if (serverResponse == null)
{
// DoStuff
}

Write:
bool serverNotAvailable = (serverResponse == null);
if (serverNotAvailable)
{
// DoStuff
}</description>
		<content:encoded><![CDATA[<p>Good post! As you write, null checks are not very descriptive, if they are not argument checks.</p>
<p>The Nullable struct in .NET is really useful but only works with value types, since classes are nullable as they are.</p>
<p>One thing to keep in mind though is that Empty objects are actual values, null represents the absence of a value. String.Empty vs a null string is a good example of this.</p>
<p>One easy thing to do is turn those null checks into booleans first, to make it more descriptive for the next person who works with the code:</p>
<p>Instead of:<br />
if (serverResponse == null)<br />
{<br />
// DoStuff<br />
}</p>
<p>Write:<br />
bool serverNotAvailable = (serverResponse == null);<br />
if (serverNotAvailable)<br />
{<br />
// DoStuff<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Dave Van den Eynde</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-295</link>
		<dc:creator>Dave Van den Eynde</dc:creator>
		<pubDate>Fri, 19 Mar 2010 09:02:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-295</guid>
		<description>How is 

if (value != null)

different from

if (value.HasValue)

If you really like the syntax for the latter, come up with an extension method that does the same thing.</description>
		<content:encoded><![CDATA[<p>How is </p>
<p>if (value != null)</p>
<p>different from</p>
<p>if (value.HasValue)</p>
<p>If you really like the syntax for the latter, come up with an extension method that does the same thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Greg Gigon</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-294</link>
		<dc:creator>Greg Gigon</dc:creator>
		<pubDate>Thu, 18 Mar 2010 23:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-294</guid>
		<description>Thanks for the comments guys. Good links, very helpfull :)
Would like to hear an opinion from someone on the dynamic language like Ruby or Python.
Cheers</description>
		<content:encoded><![CDATA[<p>Thanks for the comments guys. Good links, very helpfull <img src='http://blog.gigoo.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Would like to hear an opinion from someone on the dynamic language like Ruby or Python.<br />
Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Rafael Naufal</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-293</link>
		<dc:creator>Rafael Naufal</dc:creator>
		<pubDate>Thu, 18 Mar 2010 19:42:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-293</guid>
		<description>Interesting post, mainly regarding the Maybe pattern. I&#039;ve blogged about this subject before: http://rafaelnaufal.com/blog/2006/11/15/indicating-the-absence-of-an-object/</description>
		<content:encoded><![CDATA[<p>Interesting post, mainly regarding the Maybe pattern. I&#8217;ve blogged about this subject before: <a href="http://rafaelnaufal.com/blog/2006/11/15/indicating-the-absence-of-an-object/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/rafaelnaufal.com');" rel="nofollow">http://rafaelnaufal.com/blog/2006/11/15/indicating-the-absence-of-an-object/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Andy Palmer</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-292</link>
		<dc:creator>Andy Palmer</dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-292</guid>
		<description>I&#039;ve discussed similar things in the past, see &lt;a href=&quot;http://andypalmer.com/2008/08/returning-null-considered-dishonest&quot; rel=&quot;nofollow&quot;&gt;Returning null considered dishonest&lt;/a&gt; and &lt;a href=&quot;http://andypalmer.com/2010/01/the-curious-case-of-the-missing-present&quot; rel=&quot;nofollow&quot;&gt;The curious case of the missing present&lt;/a&gt;.
I think that the Maybe idea is sometime applicable, although you can still end up doing a check (if (result.hasValue())) instead of (if (result == null)).

My first option (which you don&#039;t have on your list) is to throw an exception. In practice, if I always ask a valid request, I&#039;ll never throw. When I do throw, it&#039;s because I ran into a problem that I hadn&#039;t previously expected, and now I can decide which pattern best fits (if any)

I try to defer making a decision on how to deal with it until I know just how much of a problem it is :-)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve discussed similar things in the past, see <a href="http://andypalmer.com/2008/08/returning-null-considered-dishonest" onclick="javascript:pageTracker._trackPageview('/outbound/comment/andypalmer.com');" rel="nofollow">Returning null considered dishonest</a> and <a href="http://andypalmer.com/2010/01/the-curious-case-of-the-missing-present" onclick="javascript:pageTracker._trackPageview('/outbound/comment/andypalmer.com');" rel="nofollow">The curious case of the missing present</a>.<br />
I think that the Maybe idea is sometime applicable, although you can still end up doing a check (if (result.hasValue())) instead of (if (result == null)).</p>
<p>My first option (which you don&#8217;t have on your list) is to throw an exception. In practice, if I always ask a valid request, I&#8217;ll never throw. When I do throw, it&#8217;s because I ran into a problem that I hadn&#8217;t previously expected, and now I can decide which pattern best fits (if any)</p>
<p>I try to defer making a decision on how to deal with it until I know just how much of a problem it is <img src='http://blog.gigoo.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to deal with nulls by Ian</title>
		<link>http://blog.gigoo.org/2010/03/18/how-to-deal-with-nulls/comment-page-1/#comment-291</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Thu, 18 Mar 2010 12:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gigoo.org/?p=4912#comment-291</guid>
		<description>The Maybe pattern is part of the .Net Framework since 2.0. They&#039;re called Nullable Types (see the C# spec - http://bit.ly/ci6lQf)</description>
		<content:encoded><![CDATA[<p>The Maybe pattern is part of the .Net Framework since 2.0. They&#8217;re called Nullable Types (see the C# spec &#8211; <a href="http://bit.ly/ci6lQf)" onclick="javascript:pageTracker._trackPageview('/outbound/comment/bit.ly');" rel="nofollow">http://bit.ly/ci6lQf)</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
