<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   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/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Simone 'Wiz' Tellini - Coding fun</title>
    <link>http://tellini.info/blog/</link>
    <description>To strive, to seek, to find, and not to yield.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3 - http://www.s9y.org/</generator>
    <pubDate>Tue, 20 May 2008 00:13:34 GMT</pubDate>

    <image>
        <url>http://tellini.info/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Simone 'Wiz' Tellini - Coding fun - To strive, to seek, to find, and not to yield.</title>
        <link>http://tellini.info/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>If at first you don't succeed... try, try again...</title>
    <link>http://tellini.info/blog/archives/58-If-at-first-you-dont-succeed...-try,-try-again....html</link>
            <category>Coding fun</category>
    
    <comments>http://tellini.info/blog/archives/58-If-at-first-you-dont-succeed...-try,-try-again....html#comments</comments>
    <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=58</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tellini.info/blog/rss.php?version=2.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    

    <author>nospam@example.com (Simone)</author>
    <content:encoded>
    Here&#039;s another &lt;em&gt;interesting&lt;/em&gt; piece of code I&#039;ve just digged up in a C# application I&#039;m reviewing.&lt;br /&gt;
&lt;br /&gt;
If you can come up with a bright idea about what those try/catch blocks are supposed to do, you&#039;ve got more imagination than me... &lt;img src=&quot;http://tellini.info/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;csharp&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;class&lt;/span&gt; Foo&lt;br /&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;int&lt;/span&gt; bar;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008080; font-style: italic;&quot;&gt;// ...snip...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;int&lt;/span&gt; GetNewBar&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #FF0000;&quot;&gt;int&lt;/span&gt; ret = &lt;span style=&quot;color: #FF0000;&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;lock&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0600FF;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;try&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; bar++;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ret = bar;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;catch&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;try&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; bar++;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ret = bar;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;catch&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;return&lt;/span&gt; ret;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008080; font-style: italic;&quot;&gt;// ...snip...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Mon, 19 May 2008 16:57:02 -0700</pubDate>
    <guid isPermaLink="false">http://tellini.info/blog/archives/58-guid.html</guid>
    <category>coding fun</category>
<category>fun</category>
<category>software development</category>

</item>
<item>
    <title>Don't code like this at home, kids</title>
    <link>http://tellini.info/blog/archives/57-Dont-code-like-this-at-home,-kids.html</link>
            <category>Coding fun</category>
    
    <comments>http://tellini.info/blog/archives/57-Dont-code-like-this-at-home,-kids.html#comments</comments>
    <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=57</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tellini.info/blog/rss.php?version=2.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    

    <author>nospam@example.com (Simone)</author>
    <content:encoded>
    Sometimes when you&#039;re reviewing someone else&#039;s code, you find interesting pieces of &quot;&lt;em&gt;art&lt;/em&gt;&quot;. Like the following loop construct in a C# application:&lt;br /&gt;
&lt;div class=&quot;csharp&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #FF0000;&quot;&gt;int&lt;/span&gt; i = anArray.&lt;span style=&quot;color: #0000FF;&quot;&gt;Length&lt;/span&gt; - &lt;span style=&quot;color: #FF0000;&quot;&gt;1&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0600FF;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;i &amp;lt; &lt;span style=&quot;color: #FF0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;...&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000FF;&quot;&gt;i&lt;/span&gt;--;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Doh.&lt;br /&gt;
&lt;br /&gt;
You might be tempted to rewrite it as:&lt;br /&gt;
&lt;div class=&quot;csharp&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #0600FF;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;int&lt;/span&gt; i = anArray.&lt;span style=&quot;color: #0000FF;&quot;&gt;Length&lt;/span&gt; - &lt;span style=&quot;color: #FF0000;&quot;&gt;1&lt;/span&gt;; i &amp;gt;= &lt;span style=&quot;color: #FF0000;&quot;&gt;0&lt;/span&gt;; i-- &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;...&amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
but it would be too simple, too boring, wouldn&#039;t it? 
    </content:encoded>

    <pubDate>Wed, 14 May 2008 10:25:13 -0700</pubDate>
    <guid isPermaLink="false">http://tellini.info/blog/archives/57-guid.html</guid>
    <category>coding fun</category>
<category>fun</category>
<category>software development</category>

</item>

</channel>
</rss>