<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicio.us/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>Tim Barcz : Help</title><link>http://devlicio.us/blogs/tim_barcz/archive/tags/Help/default.aspx</link><description>Tags: Help</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Developer Book Club - Recommendations Needed</title><link>http://devlicio.us/blogs/tim_barcz/archive/2008/11/18/developer-book-club-recommendations-needed.aspx</link><pubDate>Wed, 19 Nov 2008 01:37:18 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:43130</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>33</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=43130</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2008/11/18/developer-book-club-recommendations-needed.aspx#comments</comments><description>&lt;p&gt;Today I tossed the idea of a developer book club out to the rest of my team.&amp;#160; They all seemed to be on board with varying degrees of enthusiasm.&amp;#160; I know that we won&amp;#39;t be the first to try this and so I&amp;#39;m hoping some of you out there can share some stories/ideas of what worked for your team.&lt;/p&gt;  &lt;p&gt;The goals are three-fold:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Team/community building&lt;/li&gt;    &lt;li&gt;Common knowledge &lt;/li&gt;    &lt;li&gt;Knowledge building/sharing&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Specifically I&amp;#39;m looking for three things:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;What books would be on your short list?&amp;#160; Which book should we start with?&lt;/li&gt;    &lt;li&gt;What works well to keep people excited/enthusiastic?&lt;/li&gt;    &lt;li&gt;What are the things we should absolutely stay away from, whether they be specific books or implementation details?&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So let me have it, what advice can you share?&amp;#160; What can we do to make our book club a success?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=43130" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Help/default.aspx">Help</category></item><item><title>Exercise Caution When Using Floating Point Numbers</title><link>http://devlicio.us/blogs/tim_barcz/archive/2008/11/05/exercise-caution-when-using-floating-point-numbers.aspx</link><pubDate>Wed, 05 Nov 2008 20:13:11 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:42907</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>28</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=42907</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2008/11/05/exercise-caution-when-using-floating-point-numbers.aspx#comments</comments><description>&lt;p&gt;I understand floating point numbers can be somewhat imprecise but I&amp;#39;m a bit bothered today when I see the following evaluates to false:&lt;/p&gt;  &lt;div&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;float&lt;/span&gt; f = .16f;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; d = .16d;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt; Assert.That(f, Is.EqualTo(d))&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Annoyingly I wanted to see what the two values are:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; Console.WriteLine((&lt;span style="color:#0000ff;"&gt;double&lt;/span&gt;)f)&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; Console.WriteLine(d);&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;produces the following respectively:&lt;/p&gt;

&lt;p&gt;.159999996423721&lt;/p&gt;

&lt;p&gt;.16&lt;/p&gt;

&lt;p&gt;What bothers me about this, and I&amp;#39;m hoping someone can eloquently explain this, the MSDN docs say this should be implicitly converted.&amp;#160; From the &lt;a href="http://msdn.microsoft.com/en-us/library/aa691282(VS.71).aspx"&gt;MSDN doc article on implicit numeric conversions&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;From &lt;code&gt;float&lt;/code&gt; to &lt;code&gt;double&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Float is 32-bit and double is 64-bit, so why can&amp;#39;t the float fit nicely inside the address space for the double?&lt;/p&gt;

&lt;p&gt;Hell, if you&amp;#39;re not going to respect the integrity of the number what&amp;#39;s the point of the implicit conversion?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=42907" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Rant/default.aspx">Rant</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Help/default.aspx">Help</category></item></channel></rss>