<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Language Readability vs. Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx</link><description>In my previous post , I said: &amp;#8220;Unfortunately, language readability is often at odds with writability.&amp;#8221; And &amp;#8220;Generic method type parameters are inferred from the concrete parameters&amp;#8221; Here&amp;#8217;s what I&amp;#8217;m talking about: T</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Language Readability vs. Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#171234</link><pubDate>Thu, 01 Jul 2004 21:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:171234</guid><dc:creator>Kevin Dente</dc:creator><description>Hey, while you're at it how about automatically inserting type specifications when declaring in-line arrays. E.g. &amp;quot;{1,2,3}&amp;quot; becomes &amp;quot;new int[] {1,2,3}&amp;quot;. :) </description></item><item><title>re: Language Readability vs. Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#171242</link><pubDate>Thu, 01 Jul 2004 21:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:171242</guid><dc:creator>jaybaz [MS]</dc:creator><description>Kevin: I'll check it out.</description></item><item><title>Readability vs Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#172151</link><pubDate>Sat, 03 Jul 2004 01:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:172151</guid><dc:creator>stevencl's WebLog</dc:creator><description /></item><item><title>re: Language Readability vs. Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#178660</link><pubDate>Fri, 09 Jul 2004 19:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:178660</guid><dc:creator>Jeremy Marsch</dc:creator><description>I hope I'm not too late on this comment.  In terms of readability vs. writeability, our shop went with readability to extreme ends.  &lt;br&gt;&lt;br&gt;We require that all type names are fully qualified (we don't use the using statement for aliasing namespaces).  So, all variable/parameter/return value declarations are fully qualified.  We also preface all member items with this. when we refer to them.&lt;br&gt;&lt;br&gt;The refactoring stuff in the editor looks really exciting.  Is it possible to have an options to tell the editor to always use fully qualified type names and to use this. in the code that it writes on our behalf?</description></item><item><title>re: Language Readability vs. Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#178680</link><pubDate>Fri, 09 Jul 2004 19:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:178680</guid><dc:creator>jaybaz [MS]</dc:creator><description>Never too late!&lt;br&gt;&lt;br&gt;Jeremey: We'll use the FQN if the 'using' directives aren't there.  So, I think you'll be happy with the outcome.</description></item><item><title>re: Language Readability vs. Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#181229</link><pubDate>Tue, 13 Jul 2004 00:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:181229</guid><dc:creator>Darren Oakey</dc:creator><description>Hmm.. I think this is an odd post, because in all the explanations and examples, you've assumed something which I is not just &amp;quot;not necessarily true&amp;quot; - bust is actually rarely or even never true,&lt;br&gt;... that is - you've assumed for some reason that more information==more readable..  That's completely untrue - in fact, more irrelevant information decreases readability.&lt;br&gt;&lt;br&gt;Why?&lt;br&gt;Well, when you are reading or maintaining code, what is most important is understanding THE INTENT of the code.  It is NOT even vaguely important, in the first few runs through, to understand THE MECHANICS of the code.  For example:&lt;br&gt;&lt;br&gt;&amp;gt; Console.Writeline( Square(5) );&lt;br&gt;compared to &lt;br&gt;&amp;gt; Console.Writeline( Square&amp;lt;int&amp;gt;(5) );&lt;br&gt;&lt;br&gt;We read the first example, and we understand completely.  You say it's not obvious WHICH console.Writeline is called, but I would argue that you neither NEED nor WANT to know.  Anyone who tries to understand the underlying libraries at the same time as the piece of code they are actually investigating is a) doing a lot more work than they should and b) feeding too much information into our very limited brains, thus == confusion.  &lt;br&gt;&lt;br&gt;What you need to know is that 25 will appear on the screen - you don't need to know HOW. (unless there is a bug, you are confident Square works, then you can go and right click and go to definition, and try to track it down).  But the main point is, the function is actually more readily understood _without_ knowing which overload you are calling (or that the base function is actually overloaded at all.&lt;br&gt;&lt;br&gt;That's why I have a problem with all the examples above.  They focus on the unimportant information that is being shown (type specifiers and the like)... That's hungarian thinking... But the examples don't have real variable names, which is where readability actually needs to come in.  For instance I would shoot anyone in my team who wrote &lt;br&gt;&lt;br&gt;&amp;gt; foreach (i in foobar(x))&lt;br&gt;&lt;br&gt;That's just bad coding. But do we make the same conclusions about readability if we write it as it would actually appear -  eg:&lt;br&gt;&lt;br&gt;&amp;gt; foreach (employeeToCancel in theSetOfRetrenchedEmployees)&lt;br&gt;&lt;br&gt;is it any more readable to see&lt;br&gt;&lt;br&gt;&amp;gt; foreach (Employee employeeToCancel in theSetOfRetrenchedEmployees)&lt;br&gt;&lt;br&gt;I'd say no.   It's just like people say of comments - comments should say what the code INTENDS, not what the code DOES - people can just read the code for that.   The same thing with things like type inference etc - a good coder will always make that sort of thing obvious anyway - for instance we have an absolute unbreakable rule that no function (including the comments header) can be more than 25 lines...  which means whenever you are looking at a function, you can ALWAYS see the whole function - so always SEE the type definitions and so forth.  Having them repeated on the lines underneath is just redundant and unclear.&lt;br&gt;&lt;br&gt;One more example - how much more readable is&lt;br&gt;&lt;br&gt;&amp;gt; ShowColorChartsFor( {Color.Green, Color.Red, Color.Blue } );&lt;br&gt;&lt;br&gt;compared to&lt;br&gt;&lt;br&gt;&amp;gt; ShowColorChartsFor( new Drawing.Color [] {Color.Green, Color.Red, Color.Blue } );&lt;br&gt;&lt;br&gt;The latter gives you more _information_ but that information does not actually help your _understanding_ of the functionality, in fact it hinders it..   &lt;br&gt;Chomsky in his studies on human learning explains a phenomenon called blocking, which says that expected or redundant information actually inhibits comprehension [for instance if you show a kid the written word tree, and say &amp;quot;tree&amp;quot; - they will learn it, but if you show them the word tree near a picture of a tree, they will NOT learn it - because our brains are lazy and focus the easiest think they can - the kid knows the link between the picture and the spoken word, so do not need to form a link between the written word and the spoken word]  &lt;br&gt;&lt;br&gt;In the same way, in the lines above, your brain will zip off in a tangent thinking about the construction of a string array, and miss the point, which is that you are trying to show color swatches for the colors red, green and blue.  It is very important in code that we try to get the _mechanics_ out of the syntax/out of visibility as much as possible, so people can focus on the _intent_.&lt;br&gt;</description></item><item><title>re: Language Readability vs. Writability</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#181235</link><pubDate>Tue, 13 Jul 2004 00:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:181235</guid><dc:creator>jaybaz [MS]</dc:creator><description>Darren: very interesting.  Thanks for taking the time to write it all out.&lt;br&gt;&lt;br&gt;It'll take my brain a little time to process, for sure.&lt;br&gt;&lt;br&gt;Oh, and +2 points for referencing Chomsky. :-)</description></item><item><title> jaybaz MS WebLog Language Readability vs Writability | My Site</title><link>http://blogs.msdn.com/jaybaz_ms/archive/2004/07/01/171106.aspx#9674328</link><pubDate>Mon, 01 Jun 2009 06:57:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9674328</guid><dc:creator> jaybaz MS WebLog Language Readability vs Writability | My Site</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://patiochairsite.info/story.php?id=306"&gt;http://patiochairsite.info/story.php?id=306&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>