<?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: 10 C# Shorthands that improve productivity</title>
	<atom:link href="http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/</link>
	<description>Information, news about programming in C#</description>
	<lastBuildDate>Sat, 04 Jun 2011 10:24:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: pankaj</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-7316</link>
		<dc:creator>pankaj</dc:creator>
		<pubDate>Sun, 10 Apr 2011 23:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-7316</guid>
		<description>hiiiiiiii very nice post.learned some new things.thanks</description>
		<content:encoded><![CDATA[<p>hiiiiiiii very nice post.learned some new things.thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prasetiawan</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-5612</link>
		<dc:creator>Prasetiawan</dc:creator>
		<pubDate>Wed, 19 Jan 2011 09:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-5612</guid>
		<description>I love the programming and am very happy to visit your website. I will make your website one of my reference website to learn programming. thank you very much for this article helpful articles. Regards,
&lt;a href=&quot;http://c-tutorial888.blogspot.com/&quot;&gt;C Programming Blog&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I love the programming and am very happy to visit your website. I will make your website one of my reference website to learn programming. thank you very much for this article helpful articles. Regards,<br />
<a href="http://c-tutorial888.blogspot.com/">C Programming Blog</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Moutasem Alawa</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-4321</link>
		<dc:creator>Moutasem Alawa</dc:creator>
		<pubDate>Wed, 06 Oct 2010 06:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-4321</guid>
		<description>Thanks for sharing, the one thing i am stunned about is Null-Coalesce operator is totally new for me.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing, the one thing i am stunned about is Null-Coalesce operator is totally new for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rarius</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-3893</link>
		<dc:creator>Rarius</dc:creator>
		<pubDate>Wed, 01 Sep 2010 15:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-3893</guid>
		<description>Speaking as a software engineer of over 20 years experience, I hate coding shorthands. Time and again, I have found that they make code less readable and while they may make the initial coding faster (slightly), they have a much larger (detrimental) impact on code maintainability. Code should be written on the assumption that some poor programmer (usually you!) will need to read and understand the code sometime in the future, usually after all knowledge of the code has been forgotten.

IMHO the conditional evaluation and null-coalesce operators should never have been allowed in C#. The longhand for both of these operators is much clearer and takes only a few seconds to type.

While I think many of the other things described above are very useful and laudable (&quot;using&quot; for example) several of them as pure lazyness laying the code open to misinterpretation. This in turn impacts maintainability.</description>
		<content:encoded><![CDATA[<p>Speaking as a software engineer of over 20 years experience, I hate coding shorthands. Time and again, I have found that they make code less readable and while they may make the initial coding faster (slightly), they have a much larger (detrimental) impact on code maintainability. Code should be written on the assumption that some poor programmer (usually you!) will need to read and understand the code sometime in the future, usually after all knowledge of the code has been forgotten.</p>
<p>IMHO the conditional evaluation and null-coalesce operators should never have been allowed in C#. The longhand for both of these operators is much clearer and takes only a few seconds to type.</p>
<p>While I think many of the other things described above are very useful and laudable (&#8220;using&#8221; for example) several of them as pure lazyness laying the code open to misinterpretation. This in turn impacts maintainability.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-3191</link>
		<dc:creator>josh</dc:creator>
		<pubDate>Mon, 21 Jun 2010 21:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-3191</guid>
		<description>Why do

int max = (x &gt; y) ? x : y;

instead of

int max = Math.max(x, y):

?</description>
		<content:encoded><![CDATA[<p>Why do</p>
<p>int max = (x &gt; y) ? x : y;</p>
<p>instead of</p>
<p>int max = Math.max(x, y):</p>
<p>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-3134</link>
		<dc:creator>Coder</dc:creator>
		<pubDate>Fri, 11 Jun 2010 02:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-3134</guid>
		<description>Hey thanks for posting this, although I now prefer C++.</description>
		<content:encoded><![CDATA[<p>Hey thanks for posting this, although I now prefer C++.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Boyung</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-2982</link>
		<dc:creator>Charles Boyung</dc:creator>
		<pubDate>Fri, 21 May 2010 21:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-2982</guid>
		<description>#8 is a horrible thing to do. That item is a case of pure laziness and leads to less readable code in the long run. Usability is something you can strive for IN your code as well, not just with the resulting interface. And as the name of the usability book suggests - &quot;Don&#039;t Make Me Think&quot;. Why make the compiler and future maintainers of your code try to figure things like this out when you can very easily just define the type right then and there? Only valid reason is that you are too lazy to do it the right way.</description>
		<content:encoded><![CDATA[<p>#8 is a horrible thing to do. That item is a case of pure laziness and leads to less readable code in the long run. Usability is something you can strive for IN your code as well, not just with the resulting interface. And as the name of the usability book suggests &#8211; &#8220;Don&#8217;t Make Me Think&#8221;. Why make the compiler and future maintainers of your code try to figure things like this out when you can very easily just define the type right then and there? Only valid reason is that you are too lazy to do it the right way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rocky Madden</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-2441</link>
		<dc:creator>Rocky Madden</dc:creator>
		<pubDate>Mon, 08 Mar 2010 16:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-2441</guid>
		<description>Nice write up. I love short hand approaches to make every line of code count. I was unaware of the LINQ statements, thanks!</description>
		<content:encoded><![CDATA[<p>Nice write up. I love short hand approaches to make every line of code count. I was unaware of the LINQ statements, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Olsen</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-2391</link>
		<dc:creator>Nick Olsen</dc:creator>
		<pubDate>Fri, 26 Feb 2010 00:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-2391</guid>
		<description>Good info.  Didn&#039;t know about the ?? operator.  

Always looking for ways to reduce the number of characters I have to type!</description>
		<content:encoded><![CDATA[<p>Good info.  Didn&#8217;t know about the ?? operator.  </p>
<p>Always looking for ways to reduce the number of characters I have to type!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: juharr</title>
		<link>http://www.dijksterhuis.org/10-c-coding-shorthands-that-improve-productivity/comment-page-1/#comment-2322</link>
		<dc:creator>juharr</dc:creator>
		<pubDate>Mon, 15 Feb 2010 17:55:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=897#comment-2322</guid>
		<description>Wow, I use all of these except for #5, just never found the need.  And for #10 not only do I use that, I also wrote a little extention method (those should be on the list) to make it work the way I want it to

public bool IsNullOrEmpty(this string s) { return string.IsNullOrEmpty(s); }

This way I can have

if(myString.IsNullOrEmpty())

instead of

if(string.IsNullOrEmpty(myString))

which I think is more readable and more natural with intellisense.</description>
		<content:encoded><![CDATA[<p>Wow, I use all of these except for #5, just never found the need.  And for #10 not only do I use that, I also wrote a little extention method (those should be on the list) to make it work the way I want it to</p>
<p>public bool IsNullOrEmpty(this string s) { return string.IsNullOrEmpty(s); }</p>
<p>This way I can have</p>
<p>if(myString.IsNullOrEmpty())</p>
<p>instead of</p>
<p>if(string.IsNullOrEmpty(myString))</p>
<p>which I think is more readable and more natural with intellisense.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

