<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for Hall Of Shame</title>
    <link>http://www.codeproject.com</link>
    <description>Latest postings for Hall Of Shame from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for Hall Of Shame</title>
      <url>http://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>http://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2013</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Mon, 20 May 2013 18:48:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>Why not: // just shoot me!</title>
      <description>&lt;pre lang="cs"&gt;
    &lt;span class="code-keyword"&gt;try&lt;/span&gt;
{
    account.Save();
}
&lt;span class="code-keyword"&gt;catch&lt;/span&gt; { ; } &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Not good!&lt;/span&gt;&lt;/pre&gt;
&lt;img src="/script/Forums/Images/smiley_mad.gif" align="top" alt="Mad | :mad:" /&gt;</description>
      <link>http://www.codeproject.com/Messages/4568882/Why-not-just-shoot-me.aspx</link>
      <author>esaulsberry</author>
      <pubDate>Mon, 20 May 2013 18:48:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Can't people read the form description anymore?</title>
      <description>I notice that a fair few of the recent posts here seem out of place.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Can't people read?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
ps. I guess that by posting this, I now have to include myself in that category, but I'm hoping to be indulged.&lt;br /&gt;
&lt;div class="signature"&gt;"If you don't fail at least 90 percent of the time, you're not aiming high enough."&lt;br /&gt;
Alan Kay.&lt;br /&gt;
&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4566177/Cant-people-read-the-form-description-anymore.aspx</link>
      <author>Rob Grainger</author>
      <pubDate>Thu, 16 May 2013 13:20:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Code Safety and The  .Net CLR &amp; Java Runtime</title>
      <description>Apologies if this subject has already been discussed before.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
After stumbling upon last September's Best C# Article &lt;a href="http://www.codeproject.com/Articles/463508/NET-CLR-Injection-Modify-IL-Code-during-Run-time?fid=1786055&amp;df=90&amp;mpp=25&amp;noise=3&amp;prof=False&amp;sort=Position&amp;view=Quick&amp;spc=Relaxed&amp;fr=26#xx0xx"&gt;NET-CLR-Injection-Modify-IL-Code-during-Run-time&lt;/a&gt; and learning about endless security issues with the Java Runtime.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Are these platforms actually safer than conventional compiled executables?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Isn't the whole point of Data Execution Prevention (DEP) meant to stop run-time modification of running code?  The CLR/JAVA Runtime engines have the only *native* code that DEP has any direct control of, but they are allowed to run without question, because of some dubious assumption that code for a virtual cpu/machine can do no real damage.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Maybe I'm wrong, but I can't help thinking that code under direct control of the 'real' cpu is safer than these virtualized runtime environments. &lt;img src="/script/Forums/Images/smiley_suss.gif" align="top" alt="Suspicious | :suss:" /&gt; &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I'm not fully versed in .NET or Java coding. Anyone care to shed more light on the subject.&lt;br /&gt;
&lt;div class="signature"&gt;&lt;br /&gt;
&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4560990/Code-Safety-and-The-Net-CLR-Java-Runtime.aspx</link>
      <author>dusty_dex</author>
      <pubDate>Thu, 09 May 2013 22:36:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Life of Software Developer</title>
      <description>I think the life of software developer is a nothing but "The journey between LOGIN &amp; LOGOUT"  &lt;img src="/script/Forums/Images/smiley_wink.gif" align="top" alt="Wink | ;)" /&gt; &lt;br /&gt;
What is your opinion??&lt;br /&gt;
&lt;div class="signature"&gt;eNJOY c0ding....&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4557770/Life-of-Software-Developer.aspx</link>
      <author>Juhi Paunikar</author>
      <pubDate>Mon, 06 May 2013 12:32:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>for(int i=0; i&lt;size; i++)</title>
      <description>I am sure this was one of the hello-world codes for many of us ... But I wonder why the letter "i" .. I mean why on earth? With "a" the leading character why "i" ...&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
After sometime I found out that Fortran language (which was/is historically used for scientific calculations) use "i" as a starting character for all integer type variables, and the quickest varible to write would be "i"&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Most authors and coders continued to use "i" even in C and then to C++ and then to C#, Java etc ... &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Is this an interpretation?</description>
      <link>http://www.codeproject.com/Messages/4553092/for-int-iequals0-i-size-iplusplus.aspx</link>
      <author>tumbledDown2earth</author>
      <pubDate>Tue, 30 Apr 2013 07:58:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Interesting Observation</title>
      <description>I was looking at one old SQL stored proc and found this strange behaviour.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="SQL"&gt;
&amp;nbsp;
&lt;span class="code-keyword"&gt;DECLARE&lt;/span&gt; @Scrap_Qty &lt;span class="code-keyword"&gt;int&lt;/span&gt;
&lt;span class="code-keyword"&gt;DECLARE&lt;/span&gt; @FilledQty &lt;span class="code-keyword"&gt;int&lt;/span&gt;
&lt;span class="code-keyword"&gt;SET&lt;/span&gt; @Scrap_Qty=10 &lt;span class="code-comment"&gt;--&lt;/span&gt;&lt;span class="code-comment"&gt;Change this to 1 and it still run
&lt;/span&gt;&lt;span class="code-keyword"&gt;SET&lt;/span&gt; @FilledQty = &lt;span class="code-digit"&gt;2&lt;/span&gt;
&amp;nbsp;
&lt;span class="code-keyword"&gt;BEGIN&lt;/span&gt;
&amp;nbsp;
&lt;span class="code-keyword"&gt;IF&lt;/span&gt; @Scrap_Qty  &amp;gt; @FilledQty
 &lt;span class="code-keyword"&gt;declare&lt;/span&gt; @currDate &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;10&lt;/span&gt;)   
 &lt;span class="code-keyword"&gt;Set&lt;/span&gt; @currDate= &lt;span class="code-keyword"&gt;Convert&lt;/span&gt;(&lt;span class="code-keyword"&gt;VARCHAR&lt;/span&gt;(&lt;span class="code-digit"&gt;10&lt;/span&gt;),GetDate(),&lt;span class="code-digit"&gt;103&lt;/span&gt;)  
 &lt;span class="code-keyword"&gt;PRINT&lt;/span&gt; @currDate
&amp;nbsp;
&lt;span class="code-keyword"&gt;END&lt;/span&gt;  
&amp;nbsp;
&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
Look at the if condition .. it does not have BEGIN..END... To make thing interesting weather if condition is true or false you will get the output for parameter @currDate&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
If I add PRINT @Scrap_Qty right after IF and run it again it will only print value for @Scrap_Qty if condition is true. Which leads to question why sql is not complaining about undeclared variable if @Scrap_Qty is less than @FilledQty ?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I would have assumed if condition without BEGIN .. END block will behave like a normal one line to execute if condition is true which in above block is declaration of @currDate variable.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="SQL"&gt;
&lt;span class="code-keyword"&gt;DECLARE&lt;/span&gt; @Scrap_Qty &lt;span class="code-keyword"&gt;int&lt;/span&gt;
&lt;span class="code-keyword"&gt;DECLARE&lt;/span&gt; @FilledQty &lt;span class="code-keyword"&gt;int&lt;/span&gt;
&lt;span class="code-keyword"&gt;SET&lt;/span&gt; @Scrap_Qty=10 &lt;span class="code-comment"&gt;--&lt;/span&gt;&lt;span class="code-comment"&gt;Change this to 1 and it won't output @Scrap_Qty
&lt;/span&gt;&lt;span class="code-keyword"&gt;SET&lt;/span&gt; @FilledQty = &lt;span class="code-digit"&gt;2&lt;/span&gt;
&amp;nbsp;
&lt;span class="code-keyword"&gt;BEGIN&lt;/span&gt;
&amp;nbsp;
&lt;span class="code-keyword"&gt;IF&lt;/span&gt; @Scrap_Qty  &amp;gt; @FilledQty
	&lt;span class="code-keyword"&gt;PRINT&lt;/span&gt; @Scrap_Qty
 &lt;span class="code-keyword"&gt;declare&lt;/span&gt; @currDate &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;10&lt;/span&gt;)   
 &lt;span class="code-keyword"&gt;Set&lt;/span&gt; @currDate= &lt;span class="code-keyword"&gt;Convert&lt;/span&gt;(&lt;span class="code-keyword"&gt;VARCHAR&lt;/span&gt;(&lt;span class="code-digit"&gt;10&lt;/span&gt;),GetDate(),&lt;span class="code-digit"&gt;103&lt;/span&gt;)  
 &lt;span class="code-keyword"&gt;PRINT&lt;/span&gt; @currDate
&amp;nbsp;
&lt;span class="code-keyword"&gt;END&lt;/span&gt;  
&lt;/pre&gt;
&lt;div class="signature"&gt;Zen and the art of software maintenance : rm -rf * &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Math is like love : a simple idea but it can get complicated.&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4552925/Interesting-Observation.aspx</link>
      <author>virang_21</author>
      <pubDate>Tue, 30 Apr 2013 00:45:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Not 'Clap' but 'CLAP', dammit.</title>
      <description>I'm trying out various command line option parser libraries, and those with verb or command options are few and far between. &lt;a href="http://adrianaisemberg.github.io/CLAP/#what"&gt;CLAP&lt;/a&gt;[&lt;a href="http://adrianaisemberg.github.io/CLAP/#what" target="_blank" title="New Window"&gt;^&lt;/a&gt;] is one that handles verbs, e.g. I don't need a separate Console application for each task, where the CLI library just parses the options for that command. I want a library where I can have one Console app, which accepts a command/verb and the options for that verb get parsed. So far I've found only CLAP and &lt;a href="https://github.com/fschwiet/"&gt;ManyConsole&lt;/a&gt;[&lt;a href="https://github.com/fschwiet/" target="_blank" title="New Window"&gt;^&lt;/a&gt;].&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
E.g. I don't want to have to have &lt;code&gt;import.exe filename [-repeat]&lt;/code&gt; but I want &lt;code&gt;console.exe import filename [-repeat]&lt;/code&gt;.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
So I built a console application called Clap, with this code:&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="cs"&gt;&lt;span class="code-keyword"&gt;using&lt;/span&gt; System;
&lt;span class="code-keyword"&gt;using&lt;/span&gt; CLAP;
&amp;nbsp;
&lt;span class="code-keyword"&gt;namespace&lt;/span&gt; Clap
{
    &lt;span class="code-keyword"&gt;class&lt;/span&gt; Program
    {
        &lt;span class="code-keyword"&gt;static&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; Main(&lt;span class="code-keyword"&gt;string&lt;/span&gt;[] args)
        {
            Parser.Run&amp;lt;Program&amp;gt;(args);
        }
&amp;nbsp;
        [Verb(Description = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Imports an Impro CSV report file."&lt;/span&gt;, Aliases = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;import,imp"&lt;/span&gt;)]
        &lt;span class="code-keyword"&gt;static&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; ImportCsv(
            [Required]
            [Description(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Full path to the file to import."&lt;/span&gt;)] &lt;span class="code-keyword"&gt;string&lt;/span&gt; filePath)
        {
            Console.WriteLine(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Will import "&lt;/span&gt; + filePath);
        }
    }
}&lt;/pre&gt;
When I run the application with &lt;code&gt;clap /?&lt;/code&gt; or &lt;code&gt;clap import xxx&lt;/code&gt;, I get the error message&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre&gt;Unhandled Exception: System.TypeLoadException: Could &lt;span class="code-keyword"&gt;not&lt;/span&gt; load type &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;CLAP.Parser'&lt;/span&gt; from assembly &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;Clap, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'&lt;/span&gt;.
   at Clap.Program.Main(&lt;span class="code-SDKkeyword"&gt;String&lt;/span&gt;[] args)&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
Google provided zero leads, so the problem was not well known. Well, how well known is CLAP itself? The &lt;code&gt;Version-=1.0.0.0&lt;/code&gt; gave me the key clue. It looked like the app was trying to load &lt;code&gt;CLAP.Parser&lt;/code&gt; from my Clap assembly, not the CLAP library assembly, which is version 4.3.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
All it took was to change my assembly name and default namespace to ClapCli and the problem vanished, but just BTW, CLAP is very, very thin. It throws exceptions when verbs arguments are omitted, and expects you to decorate a method to do something with the exception. It also has no built in help provider, and requires you to decorate a method that is called when the user requests help. You must compose and format your own help text for every verb and option.</description>
      <link>http://www.codeproject.com/Messages/4549627/Not-Clap-but-CLAP-dammit.aspx</link>
      <author>Brady Kelly</author>
      <pubDate>Thu, 25 Apr 2013 08:36:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Production code adds a BCC to email account of developer</title>
      <description>No idea why he was "spying" on a client.&lt;br /&gt;
We only found this out after he left and we took over the account.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="c#"&gt;
&lt;span class="code-keyword"&gt;private&lt;/span&gt; MailMessage BuildMailMessage(...)
{
...
&amp;nbsp;
mailMessage.BCC.Add(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;guys@address.com"&lt;/span&gt;);
&amp;nbsp;
..
}
&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
&lt;img src="/script/Forums/Images/smiley_confused.gif" align="top" alt="Confused | :confused:" /&gt; &lt;br /&gt;
&lt;div class="signature"&gt;.&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4549145/Production-code-adds-a-BCC-to-email-account-of-dev.aspx</link>
      <author>0bx</author>
      <pubDate>Wed, 24 Apr 2013 15:48:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Nested if-else statements...</title>
      <description>I found this in one of my old codes (it was a program to check whether a square was a &lt;a href="http://en.wikipedia.org/wiki/Magic_square"&gt;magic square&lt;/a&gt;[&lt;a href="http://en.wikipedia.org/wiki/Magic_square" target="_blank" title="New Window"&gt;^&lt;/a&gt;] or not)&lt;br /&gt;
&lt;pre lang="cs"&gt;
&lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; button1_Click(&lt;span class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)
{
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; lefttop = Convert.ToInt16(_1.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; centertop = Convert.ToInt16(_2.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; righttop = Convert.ToInt16(_3.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; leftcenter = Convert.ToInt16(_4.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; centercenter = Convert.ToInt16(_5.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; rightcenter = Convert.ToInt16(_6.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; leftbottom = Convert.ToInt16(_7.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; centerbottom = Convert.ToInt16(_8.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; rightbottom = Convert.ToInt16(_9.Text);
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; row1 = lefttop + centertop + righttop;
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; row2 = leftcenter + centercenter + rightcenter;
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; row3 = leftbottom + centerbottom + rightbottom;
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; col1 = lefttop + leftcenter + leftbottom;
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; col2 = centertop + centercenter + centerbottom;
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; col3 = righttop + rightcenter + rightbottom;
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; dia1 = lefttop + centercenter + rightbottom;
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; dia2 = leftbottom + centercenter + righttop;
    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (row1 == row2)
    {
        &lt;span class="code-keyword"&gt;if&lt;/span&gt; (row2 == row3)
        {
            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (row3 == col1)
            {
                &lt;span class="code-keyword"&gt;if&lt;/span&gt; (col1 == col2)
                {
                    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (col2 == col3)
                    {
                        &lt;span class="code-keyword"&gt;if&lt;/span&gt; (col3 == dia1)
                        {
                            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (dia1 == dia2)
                            {
                                MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Your magic square is correct!"&lt;/span&gt;);
                            }
                            &lt;span class="code-keyword"&gt;else&lt;/span&gt;
                            {
                                MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Wrong! Application will restart!"&lt;/span&gt;);
                                &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Close();
                                Process restart = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Process();
                                restart.StartInfo.FileName = &lt;span class="code-string"&gt;@"&lt;/span&gt;&lt;span class="code-string"&gt;path name here"&lt;/span&gt;;
                                restart.Start();
                            }
                        }
                        &lt;span class="code-keyword"&gt;else&lt;/span&gt;
                        {
                            MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Wrong! Application will restart!"&lt;/span&gt;);
                            &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Close();
                            Process restart = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Process();
                            restart.StartInfo.FileName = &lt;span class="code-string"&gt;@"&lt;/span&gt;&lt;span class="code-string"&gt;path name here"&lt;/span&gt;;
                            restart.Start();
                        }
                    }
                    &lt;span class="code-keyword"&gt;else&lt;/span&gt;
                    {
                        MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Wrong! Application will restart!"&lt;/span&gt;);
                        &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Close();
                        Process restart = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Process();
                        restart.StartInfo.FileName = &lt;span class="code-string"&gt;@"&lt;/span&gt;&lt;span class="code-string"&gt;path name here"&lt;/span&gt;;
                        restart.Start();
                    }
                }
                &lt;span class="code-keyword"&gt;else&lt;/span&gt;
                {
                    MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Wrong! Application will restart!"&lt;/span&gt;);
                    &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Close();
                    Process restart = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Process();
                    restart.StartInfo.FileName = &lt;span class="code-string"&gt;@"&lt;/span&gt;&lt;span class="code-string"&gt;path name here"&lt;/span&gt;;
                    restart.Start();
                }
            }
            &lt;span class="code-keyword"&gt;else&lt;/span&gt;
            {
                MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Wrong! Application will restart!"&lt;/span&gt;);
                &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Close();
                Process restart = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Process();
                restart.StartInfo.FileName = &lt;span class="code-string"&gt;@"&lt;/span&gt;&lt;span class="code-string"&gt;path name here"&lt;/span&gt;;
                restart.Start();
            }
        }
        &lt;span class="code-keyword"&gt;else&lt;/span&gt;
        {
            MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Wrong! Application will restart!"&lt;/span&gt;);
            &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Close();
            Process restart = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Process();
            restart.StartInfo.FileName = &lt;span class="code-string"&gt;@"&lt;/span&gt;&lt;span class="code-string"&gt;path name here"&lt;/span&gt;;
            restart.Start();
        }
    }
    &lt;span class="code-keyword"&gt;else&lt;/span&gt;
    {
        MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Wrong! Application will restart!"&lt;/span&gt;);
        &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Close();
        Process restart = &lt;span class="code-keyword"&gt;new&lt;/span&gt; Process();
        restart.StartInfo.FileName = &lt;span class="code-string"&gt;@"&lt;/span&gt;&lt;span class="code-string"&gt;path name here"&lt;/span&gt;;
        restart.Start();
    }
}
&lt;/pre&gt;
&lt;img src="/script/Forums/Images/smiley_doh.gif" align="top" alt="D'Oh! | :doh:" /&gt; &lt;img src="/script/Forums/Images/smiley_doh.gif" align="top" alt="D'Oh! | :doh:" /&gt; &lt;img src="/script/Forums/Images/smiley_dead.gif" align="top" alt="Dead | X|" /&gt;  &lt;img src="/script/Forums/Images/smiley_dead.gif" align="top" alt="Dead | X|" /&gt; &lt;br /&gt;
&lt;div class="signature"&gt;The quick red &lt;em style="color:red"&gt;&lt;strong&gt;ProgramFOX&lt;/strong&gt;&lt;/em&gt; jumps right over the &lt;code&gt;Lazy&amp;lt;Dog&amp;gt;&lt;/code&gt;.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
My latest article: &lt;a href="http://www.codeproject.com/Articles/544990/Understand-how-bitwise-operators-work-Csharp-and-V"&gt;Understand how bitwise operators work (C# and VB.NET examples)&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
My group: &lt;a href="http://www.codeproject.com/Members/CS-Programmers-Group"&gt;C# Programmers Group&lt;/a&gt;&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4548267/Nested-if-else-statements.aspx</link>
      <author> ProgramFOX</author>
      <pubDate>Tue, 23 Apr 2013 17:21:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>[Solved] Why Do Computer Counts from Zero.</title>
      <description>&lt;a href="http://www.howtogeek.com/149225/why-do-computers-count-from-zero/"&gt;Link to the article&lt;/a&gt;
  &lt;br /&gt;
&lt;a href="http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF"&gt;For More detail explanation(PDF)&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Counting arrays from 0 simplifies the computation of the memory address of each element.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
If an array is stored at a given position in memory (it’s called the address) the position of each element can be computed as&lt;br /&gt;
&lt;pre lang="c#"&gt;element(n) = address + n * size_of_the_element
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;If you consider the first element the first, the computation becomes
&lt;/span&gt;
element(n) = address + (n-1) * size_of_the_element
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Not a huge difference but it adds an unnecessary subtraction for each access.&lt;/span&gt;&lt;/pre&gt;</description>
      <link>http://www.codeproject.com/Messages/4547112/Solved-Why-Do-Computer-Counts-from-Zero.aspx</link>
      <author>kburman6</author>
      <pubDate>Mon, 22 Apr 2013 16:47:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Can anyone help me identify the strange condes that I have in my webserver  log files( asp.net application) and what to do to protect my data</title>
      <description>&lt;img src="/script/Forums/Images/smiley_confused.gif" align="top" alt="Confused | :confused:" /&gt; &lt;img src="/script/Forums/Images/smiley_confused.gif" align="top" alt="Confused | :confused:" /&gt; &lt;img src="/script/Forums/Images/smiley_confused.gif" align="top" alt="Confused | :confused:" /&gt; &lt;img src="/script/Forums/Images/smiley_confused.gif" align="top" alt="Confused | :confused:" /&gt; t=login%3CScript%20%3Ealert(%22HelloSIG%22)%3C/Script%3E&lt;small&gt;&lt;/small&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
t=%3CScript+%3Ealert%28%22HelloSIG%22%29%3C%2FScript%3E]&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
d=hTNonAxS6pSg7xdyL1eUirZ8bPjtkz-rbl6VNlqYedqYrHs_bDcid9Hlixt8Y2moR5bKlpB-ULt3A_lBqjmmdXhRotU1&amp;t=634998468650156250]&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
d=Cn8vDEmCPs6DIJo7uy2wx8MCXXrjrFmxAO4lFpLM5WYHX0ZUuWRP9mZkyIsA0rCRP-ZikEr4Dh-ukYRv7zjHSrAD9aM1&amp;t=634998468650156250&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
i=faqsys%3CScript%20%3Ealert(%22HelloSIG%22)%3C/Script%3E</description>
      <link>http://www.codeproject.com/Messages/4545990/Can-anyone-help-me-identify-the-strange-condes-tha.aspx</link>
      <author>Member 10001202</author>
      <pubDate>Sat, 20 Apr 2013 14:52:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Yet another Subversion rant</title>
      <description>I don't trust it. &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Two of us have been working on the same file today, so we agreed he would check his changes in first and I would update mine, merge and commit the merge. I get the go ahead to update, update tells me correctly that the exact same file we've worked on is conflicted. I look at the file. no "mine" or "r.6271" markers anywhere to be seen, but a load of interface implementations are missing. I update again, to no avail. I stubbed out the interface implementations, compiled, ran all my tests and tried to commit only to be told that my file is out of date and needs updating before I can commit so I update again, and hey presto, a handful of marked conflicts in the same file. Nobody else has committed anything in that time. WTF?&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Last week our build server failed to get the externals we'd set up on a repository, even though a local update got them all. Cue hours of digging around instead of actually being productive.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I really hate SVN.</description>
      <link>http://www.codeproject.com/Messages/4545438/Yet-another-Subversion-rant.aspx</link>
      <author>jim lahey</author>
      <pubDate>Fri, 19 Apr 2013 15:00:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Direct me to USB</title>
      <description>I'm implementing USB firmware in a device we are making.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I asked in &lt;a href="http://www.codeproject.com/Messages/4541038/USB.aspx"&gt;THIS PLACE&lt;/a&gt;[&lt;a href="http://www.codeproject.com/Messages/4541038/USB.aspx" target="_blank" title="New Window"&gt;^&lt;/a&gt;] (Design And Architecture) based on guessing what the desired topics are for a given forum.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I'm putting USB capability into the firmware of a device we are making.</description>
      <link>http://www.codeproject.com/Messages/4541045/Direct-me-to-USB.aspx</link>
      <author>C-P-User-3</author>
      <pubDate>Mon, 15 Apr 2013 17:57:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Best Practices turned into Coding Horrors.</title>
      <description>It is a well known good practice to use &lt;code&gt;StringBuilder&lt;/code&gt;s instead of doing many &lt;code&gt;string&lt;/code&gt; concatenations. Yet, I got really impressed when I saw a document telling to replace things like this:&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="cs"&gt;
  &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;const&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; SQL = 
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;SELECT "&lt;/span&gt; +
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;  ID, "&lt;/span&gt; +
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;  NAME, "&lt;/span&gt; +
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;  BIRTHDAY "&lt;/span&gt; +
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;FROM "&lt;/span&gt; +
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;  TABLE "&lt;/span&gt; +
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;WHERE "&lt;/span&gt; +
    &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;  NAME LIKE @PARAM"&lt;/span&gt;;
&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
By creating the &lt;code&gt;StringBuilder&lt;/code&gt; everytime in the method where the SQL was being used. Maybe I am wrong  &lt;img src="/script/Forums/Images/smiley_doh.gif" align="top" alt="D'Oh! | :doh:" /&gt;  , but I really believe &lt;code&gt;const&lt;/code&gt;s aren't doing bad string concatenations all the time.</description>
      <link>http://www.codeproject.com/Messages/4541017/Best-Practices-turned-into-Coding-Horrors.aspx</link>
      <author>Paulo Zemek</author>
      <pubDate>Mon, 15 Apr 2013 17:25:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Logical thinking could get very complicated</title>
      <description>Here is a simple stored procedure in company database that does a search and returns results in less than a second:&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="SQL"&gt;&lt;span class="code-keyword"&gt;CREATE&lt;/span&gt; &lt;span class="code-keyword"&gt;PROCEDURE&lt;/span&gt; [dbo].[WorkOrder_Search](@Description &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;250&lt;/span&gt;)) 
&lt;span class="code-keyword"&gt;AS&lt;/span&gt;
&lt;span class="code-keyword"&gt;Begin&lt;/span&gt;
	&lt;span class="code-keyword"&gt;SELECT&lt;/span&gt; Order_id,Dept_Code,Graphic_Number,[Description],Quantity,Date_Received &lt;span class="code-keyword"&gt;as&lt;/span&gt; [Recv. Date],Date_Due &lt;span class="code-keyword"&gt;as&lt;/span&gt; [Due Date],
	Date_Delivered &lt;span class="code-keyword"&gt;as&lt;/span&gt; [Delivered Date],proof_sent_date &lt;span class="code-keyword"&gt;as&lt;/span&gt; [Proof Date],print_date &lt;span class="code-keyword"&gt;as&lt;/span&gt; [&lt;span class="code-keyword"&gt;To&lt;/span&gt; &lt;span class="code-keyword"&gt;Print&lt;/span&gt;],
	dbo.func_grOrder_GetAssigned(Order_id) &lt;span class="code-keyword"&gt;as&lt;/span&gt; [Assign &lt;span class="code-keyword"&gt;To&lt;/span&gt;],Status,Note, Master_Cal_ID 
	&lt;span class="code-keyword"&gt;From&lt;/span&gt; grGraphic_Order  
	&lt;span class="code-keyword"&gt;where&lt;/span&gt; [Description] &lt;span class="code-keyword"&gt;like&lt;/span&gt; &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;%'&lt;/span&gt; + @Description + &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;%'&lt;/span&gt;
&lt;span class="code-keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;
But it used to be a really "BIG" stored procedure as shown below that did the same search and took about 5 minutes to return results. It did return the same results as the above does. &lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="SQL"&gt;&lt;span class="code-keyword"&gt;CREATE&lt;/span&gt; &lt;span class="code-keyword"&gt;PROCEDURE&lt;/span&gt; [dbo].[WorkOrder_search](@Description &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;250&lt;/span&gt;))
&lt;span class="code-keyword"&gt;AS&lt;/span&gt;
&lt;span class="code-keyword"&gt;begin&lt;/span&gt;
	&lt;span class="code-keyword"&gt;SET&lt;/span&gt; QUOTED_IDENTIFIER  &lt;span class="code-keyword"&gt;OFF&lt;/span&gt;    
	&lt;span class="code-keyword"&gt;SET&lt;/span&gt; ANSI_NULLS  &lt;span class="code-keyword"&gt;OFF&lt;/span&gt; 
	&lt;span class="code-keyword"&gt;SET&lt;/span&gt; NoCount &lt;span class="code-keyword"&gt;ON&lt;/span&gt;
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Declare&lt;/span&gt; @sql &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;8000&lt;/span&gt;)
	&lt;span class="code-keyword"&gt;Declare&lt;/span&gt; @Orig_1 &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;1000&lt;/span&gt;)
	&lt;span class="code-keyword"&gt;Declare&lt;/span&gt; @Declare &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;200&lt;/span&gt;),
	@From &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;100&lt;/span&gt;),@Into &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;50&lt;/span&gt;),@Groupby &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;300&lt;/span&gt;),
	@Orderby &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;400&lt;/span&gt;),@Select &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;400&lt;/span&gt;),@Select1 &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;400&lt;/span&gt;),@Select2 &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;300&lt;/span&gt;),
	@cursor1 &lt;span class="code-keyword"&gt;varchar&lt;/span&gt; (&lt;span class="code-digit"&gt;500&lt;/span&gt;),@cursor2 &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;4000&lt;/span&gt;),@create &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;4000&lt;/span&gt;)
&amp;nbsp;
	&lt;span class="code-keyword"&gt;set&lt;/span&gt; @Orig_1 = &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;'&lt;/span&gt;
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Create&lt;/span&gt; &lt;span class="code-keyword"&gt;table&lt;/span&gt; #Assignto_temp(Order_id &lt;span class="code-keyword"&gt;int&lt;/span&gt;, Assignto_names &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;500&lt;/span&gt;))
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Insert&lt;/span&gt; &lt;span class="code-keyword"&gt;into&lt;/span&gt; #Assignto_temp(Order_id )
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Select&lt;/span&gt; gro.order_id
	&lt;span class="code-keyword"&gt;From&lt;/span&gt; grassignto gro
	&lt;span class="code-keyword"&gt;Inner&lt;/span&gt; &lt;span class="code-keyword"&gt;join&lt;/span&gt; wfpmauser wf
	&lt;span class="code-keyword"&gt;On&lt;/span&gt; gro.user_id = wf.user_id
	&lt;span class="code-keyword"&gt;group&lt;/span&gt; &lt;span class="code-keyword"&gt;by&lt;/span&gt; gro.order_id
&amp;nbsp;
	&lt;span class="code-keyword"&gt;declare&lt;/span&gt; @order_number &lt;span class="code-keyword"&gt;int&lt;/span&gt;, @Assignto &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;255&lt;/span&gt;), @List_names &lt;span class="code-keyword"&gt;varchar&lt;/span&gt;(&lt;span class="code-digit"&gt;255&lt;/span&gt;),@order_number_prev &lt;span class="code-keyword"&gt;int&lt;/span&gt;
	&lt;span class="code-keyword"&gt;declare&lt;/span&gt; assignto &lt;span class="code-keyword"&gt;Cursor&lt;/span&gt;
	Local
	Forward_only
	&lt;span class="code-keyword"&gt;for&lt;/span&gt;
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Select&lt;/span&gt; gro.order_id,Wf.First_name+&lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt; '&lt;/span&gt;+Wf.Last_name &lt;span class="code-keyword"&gt;as&lt;/span&gt; Assignto
	&lt;span class="code-keyword"&gt;From&lt;/span&gt; grassignto gro
	&lt;span class="code-keyword"&gt;Inner&lt;/span&gt; &lt;span class="code-keyword"&gt;join&lt;/span&gt; wfpmauser wf
	&lt;span class="code-keyword"&gt;On&lt;/span&gt; gro.user_id = wf.user_id
	&lt;span class="code-keyword"&gt;order&lt;/span&gt; &lt;span class="code-keyword"&gt;by&lt;/span&gt; order_id 
&amp;nbsp;
	&lt;span class="code-keyword"&gt;open&lt;/span&gt; assignto
	&lt;span class="code-keyword"&gt;Fetch&lt;/span&gt; Next &lt;span class="code-keyword"&gt;from&lt;/span&gt; assignto &lt;span class="code-keyword"&gt;into&lt;/span&gt; @order_number, @Assignto
	&lt;span class="code-keyword"&gt;While&lt;/span&gt; @@Fetch_Status=0
	&lt;span class="code-keyword"&gt;begin&lt;/span&gt;
			&lt;span class="code-keyword"&gt;select&lt;/span&gt; @List_names=Assignto_names &lt;span class="code-keyword"&gt;from&lt;/span&gt; #Assignto_temp &lt;span class="code-keyword"&gt;where&lt;/span&gt; order_id=@order_number
	 	
		&lt;span class="code-keyword"&gt;if&lt;/span&gt; @List_names &lt;span class="code-keyword"&gt;is&lt;/span&gt; &lt;span class="code-keyword"&gt;null&lt;/span&gt; 
		&lt;span class="code-keyword"&gt;begin&lt;/span&gt;
			&lt;span class="code-keyword"&gt;update&lt;/span&gt; #Assignto_temp
			&lt;span class="code-keyword"&gt;set&lt;/span&gt; Assignto_names=@Assignto
			&lt;span class="code-keyword"&gt;where&lt;/span&gt; order_id=@order_number
		&lt;span class="code-keyword"&gt;end&lt;/span&gt;
		&lt;span class="code-keyword"&gt;else&lt;/span&gt;
		&lt;span class="code-keyword"&gt;begin&lt;/span&gt;
			&lt;span class="code-keyword"&gt;update&lt;/span&gt; #Assignto_temp
			&lt;span class="code-keyword"&gt;set&lt;/span&gt; Assignto_names=@list_names + &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;,'&lt;/span&gt; + @Assignto
			&lt;span class="code-keyword"&gt;where&lt;/span&gt; order_id=@order_number
		&lt;span class="code-keyword"&gt;end&lt;/span&gt;
		  &lt;span class="code-keyword"&gt;Fetch&lt;/span&gt; Next &lt;span class="code-keyword"&gt;from&lt;/span&gt; assignto &lt;span class="code-keyword"&gt;into&lt;/span&gt; @order_number, @Assignto
	&lt;span class="code-keyword"&gt;end&lt;/span&gt;
	&lt;span class="code-keyword"&gt;close&lt;/span&gt; assignto
	&lt;span class="code-keyword"&gt;deallocate&lt;/span&gt; assignto
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Set&lt;/span&gt; @Declare =&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Declare @Orig_1 varchar(1000),@Originator varchar(100),@order_id int,@Orig varchar(300) set @Orig_1 = '' "&lt;/span&gt; 
	&lt;span class="code-keyword"&gt;Set&lt;/span&gt; @Select =  &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt; SELECT distinct gro.* "&lt;/span&gt;
	&lt;span class="code-keyword"&gt;Set&lt;/span&gt; @Into = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Into #tmp1 "&lt;/span&gt;
	&lt;span class="code-keyword"&gt;Set&lt;/span&gt; @From = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;FROM grGraphic_Order Gro left join grOriginator gr on gro.order_id = gr.order_id "&lt;/span&gt;
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Set&lt;/span&gt; @Orderby = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;ORDER BY Gro.Graphic_number,Gro.dept_code Desc  "&lt;/span&gt;
	&lt;span class="code-keyword"&gt;Set&lt;/span&gt; @Select2 = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt; SELECT Order_id,Dept_Code ,Graphic_Number,Description,Quantity,Date_Received as [Recv. Date],
	Date_Due as [Due Date],Date_Delivered as [Delivered Date],proof_sent_date as [Proof Date],print_date as [To Print],
	Status,Note, master_cal_id [Master Calendar ID] From #tmp1  ORDER BY dept_code,Graphic_number  "&lt;/span&gt;
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Set&lt;/span&gt; @Create = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Create table #Assignto_temp(Order_id int, Assignto_names varchar(500))
			Insert into #Assignto_temp(Order_id )
			Select gro.order_id
			From grassignto gro
			Inner join wfpmauser wf
			On gro.user_id = wf.user_id
			group by gro.order_id
&amp;nbsp;

 			declare @order_number int, @Assignto varchar(255), @List_names varchar(255),@order_number_prev int
			declare assignto Cursor
			Local
			Forward_only
			for
		
			Select gro.order_id,Wf.First_name+' '+Wf.Last_name as Assignto
			From grassignto gro
			Inner join wfpmauser wf
			On gro.user_id = wf.user_id
			order by order_id 
		
			open assignto
			Fetch Next from assignto into @order_number, @Assignto
			While @@Fetch_Status=0
			begin
					select @List_names=Assignto_names from #Assignto_temp where order_id=@order_number
			 	
				if @List_names is null 
				begin
			
					update #Assignto_temp
					set Assignto_names=@Assignto
					where order_id=@order_number
			
				end
				else
				begin
					update #Assignto_temp
					set Assignto_names=@list_names + ',' + @Assignto
					where order_id=@order_number
				end
&amp;nbsp;
				  Fetch Next from assignto into @order_number, @Assignto
&amp;nbsp;
			end
			close assignto
			deallocate assignto
&amp;nbsp;
	SELECT #tmp1.Order_id,Dept_Code ,Graphic_Number,Description,Quantity,Date_Received as [Recv. Date],
	Date_Due as [Due Date],Date_Delivered as [Delivered Date],proof_sent_date as [Proof Date],print_date as [To Print],
	isnull(tmp.assignto_names,'Not Assigned') as [Assign To],Status,Note, #tmp1.Master_Cal_ID 
	From #tmp1 LEFT Join #Assignto_temp tmp ON #tmp1.order_id = tmp.order_id ORDER BY Dept_Code,Date_Received Desc"&lt;/span&gt;
&amp;nbsp;
	&lt;span class="code-keyword"&gt;Select&lt;/span&gt; @sql=@Declare + @Select + @Into + @From + &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt; where Description like '&lt;/span&gt; 
				+ &lt;span class="code-keyword"&gt;char&lt;/span&gt;(&lt;span class="code-digit"&gt;39&lt;/span&gt;) + &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;%'&lt;/span&gt; + @Description + &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;%'&lt;/span&gt;  + &lt;span class="code-keyword"&gt;char&lt;/span&gt;(&lt;span class="code-digit"&gt;39&lt;/span&gt;)+ @Orderby  + @create 
	&lt;span class="code-keyword"&gt;Exec&lt;/span&gt;(@sql)
&lt;span class="code-keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;div class="signature"&gt;TOMZ_KV&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4539719/Logical-thinking-could-get-very-complicated.aspx</link>
      <author>Tomz_KV</author>
      <pubDate>Sat, 13 Apr 2013 00:53:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Unambiguously Ambiguous</title>
      <description>&lt;pre lang="vb.net"&gt;
    &lt;span class="code-comment"&gt;'&lt;/span&gt;
    &lt;span class="code-comment"&gt;Finished Never Implemented&lt;/span&gt;
  &lt;/pre&gt;
Just came across that code comment above a function. Not sure what it means. Maybe they got fed up and decided that they were finished working (though the task itself was incomplete)? Or maybe the code is complete, but never got put to use?&lt;br /&gt;
&lt;div class="signature"&gt;&lt;a href="http://www.pangloss.com/seidel/Shaker/"&gt;Thou mewling ill-breeding pignut!&lt;/a&gt;&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4537834/Unambiguously-Ambiguous.aspx</link>
      <author>AspDotNetDev</author>
      <pubDate>Thu, 11 Apr 2013 01:53:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Let's "switch" to Something Else</title>
      <description>C++ code.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
This is either brilliant, or just bloody awful.  I'm coming down on the side of "bloody awful":&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
recv in the curr structure below is declared as:&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="c++"&gt;    
    BYTE recv[&lt;span class="code-digit"&gt;64&lt;/span&gt;];
&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="c++"&gt;
    DWORD   verb;
    ...
    verb = (upper[curr-&amp;gt;recv[&lt;span class="code-digit"&gt;0&lt;/span&gt;]] &amp;lt;&amp;lt; &lt;span class="code-digit"&gt;24&lt;/span&gt;) + (upper[curr-&amp;gt;recv[&lt;span class="code-digit"&gt;1&lt;/span&gt;]] &amp;lt;&amp;lt; &lt;span class="code-digit"&gt;16&lt;/span&gt;) + (upper[curr-&amp;gt;recv[&lt;span class="code-digit"&gt;2&lt;/span&gt;]] &amp;lt;&amp;lt; &lt;span class="code-digit"&gt;8&lt;/span&gt;) + 0x20;
&amp;nbsp;
    &lt;span class="code-keyword"&gt;switch&lt;/span&gt; (verb)
    {
    &lt;span class="code-keyword"&gt;case&lt;/span&gt; &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;CMD '&lt;/span&gt;:
       ...
       &lt;span class="code-keyword"&gt;break&lt;/span&gt;;
&amp;nbsp;
    &lt;span class="code-keyword"&gt;case&lt;/span&gt; &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;MON '&lt;/span&gt;:
       ...
       &lt;span class="code-keyword"&gt;break&lt;/span&gt;;
&amp;nbsp;
    &lt;span class="code-keyword"&gt;case&lt;/span&gt; &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;END '&lt;/span&gt;:
       ...
       &lt;span class="code-keyword"&gt;break&lt;/span&gt;;
&amp;nbsp;
    &lt;span class="code-keyword"&gt;case&lt;/span&gt; &lt;span class="code-string"&gt;'&lt;/span&gt;&lt;span class="code-string"&gt;EXT '&lt;/span&gt;:
       ...
       &lt;span class="code-keyword"&gt;break&lt;/span&gt;;
&amp;nbsp;
    &lt;span class="code-keyword"&gt;default&lt;/span&gt;:
        ...
        &lt;span class="code-keyword"&gt;break&lt;/span&gt;;
    }
&lt;/pre&gt;
&lt;div class="signature"&gt;WE ARE DYSLEXIC OF BORG.  Refutance is systile.  Your a$$ will be laminated.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
There are 10 kinds of people in the world:  People who know binary and people who don't.&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4531369/Lets-switch-to-Something-Else.aspx</link>
      <author>Tom Delany</author>
      <pubDate>Tue, 02 Apr 2013 19:31:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Things that make you go WTF...</title>
      <description>&lt;pre lang="C#"&gt;
    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (result != Common.ErrorMsg.ErrorNone)
{
    &lt;span class="code-keyword"&gt;this&lt;/span&gt;.Dispatcher.BeginInvoke((ThreadStart)&lt;span class="code-keyword"&gt;delegate&lt;/span&gt;()
    {
    });
    &lt;span class="code-keyword"&gt;return&lt;/span&gt;;
}&lt;/pre&gt;I found this in code that is guaranteed to be called on the dispatcher's thread. Sigh&lt;sup&gt;2&lt;/sup&gt;.&lt;br /&gt;
&lt;div class="signature"&gt;&lt;small&gt;&lt;i&gt;Software Zen:&lt;/i&gt; &lt;code&gt;delete this;&lt;/code&gt;&lt;/small&gt;&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4530201/Things-that-make-you-go-WTF.aspx</link>
      <author>Gary Wheeler</author>
      <pubDate>Mon, 01 Apr 2013 11:32:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>That was weird...</title>
      <description>I created a Windows Forms Control Library in one of my projects, and VS2012 displayed the 'Designer Error' page with the message that no classes in the user control could be designed.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Strangely, VS showed all references as missing. Changing the target framework to 4.0 then back to 4.5 fixed the issue.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I don't know what happened, but it startled me.&lt;br /&gt;
&lt;div class="signature"&gt;Gryphons Are Awesome! ‮Gryphons Are Awesome!‬&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4528515/That-was-weird.aspx</link>
      <author>Brisingr Aerowing</author>
      <pubDate>Thu, 28 Mar 2013 17:57:00 GMT</pubDate>
      <subject>Hall Of Shame</subject>
    </item>
  </channel>
</rss>