<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>My Blog &#187; CodeSOD</title>
	<atom:link href="http://bitlords.com/wp/category/codesod/feed/" rel="self" type="application/rss+xml" />
	<link>http://bitlords.com/wp</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 12 Dec 2009 07:04:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CodeSOD: Thank You for Enabling JavaScript!</title>
		<link>http://thedailywtf.com/Articles/Thank-You-for-Enabling-JavaScript!.aspx</link>
		<comments>http://thedailywtf.com/Articles/Thank-You-for-Enabling-JavaScript!.aspx#comments</comments>
		<pubDate>Wed, 09 Dec 2009 14:00:00 +0000</pubDate>
		<dc:creator>Mark Bowytz</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[ABCDEFGHIJKLMNOPQRSTUVWXYZa]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[area]]></category>
		<category><![CDATA[bcdefghijklmnopqrstuvwxyz]]></category>
		<category><![CDATA[brain]]></category>
		<category><![CDATA[Brion]]></category>
		<category><![CDATA[bunch]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[control keys]]></category>
		<category><![CDATA[curious name]]></category>
		<category><![CDATA[Dec]]></category>
		<category><![CDATA[decimal point]]></category>
		<category><![CDATA[dedicate]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[e key]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[everybody]]></category>
		<category><![CDATA[finite number]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[fromCharCode]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[goodness]]></category>
		<category><![CDATA[guy]]></category>
		<category><![CDATA[happy guy]]></category>
		<category><![CDATA[indexOf]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jump]]></category>
		<category><![CDATA[key control]]></category>
		<category><![CDATA[keychar]]></category>
		<category><![CDATA[keyCode]]></category>
		<category><![CDATA[myfield]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[nasties]]></category>
		<category><![CDATA[nbsp]]></category>
		<category><![CDATA[newline]]></category>
		<category><![CDATA[newline characters]]></category>
		<category><![CDATA[NULL]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[point]]></category>
		<category><![CDATA[point jump]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[professional recognition]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[quot quot]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[true numbers]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[var]]></category>
		<category><![CDATA[window]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">6729</guid>
		<description><![CDATA[<p>Clean data makes me smile.</p>
<p>No really! When I have a finite number of brain cycles to dedicate to some process that receives user data, it makes me quite the happy guy knowing that it has been pre-scrubbed for such nasties as newline characters, the occasional <span style="font-size: large">☺</span>, or worse, the dreaded <span style="font-size: medium">ಠ_ಠ</span>.</p>
<p><strong>Brion </strong>sent in this function which is supposed to prevent users from entering unclean text into a &#34;thank you note&#34; text area on a professional recognition site.&#160; Now, before bashing the function for it's curious name, I must say that it does indeed work at filtering out a bunch of characters that&#160;the original developer&#160;thought would&#160;cause an issue.</p>
<blockquote>
<pre>
function numbersonly(myfield, e, dec)
{
  var key;
  var keychar;

  if (window.event)
    key = window.event.keyCode;
  else if (e)
    key = e.which;
  else
    return true;
  keychar = String.fromCharCode(key);

  // control keys
  if ((key==null) &#124;&#124; (key==0) &#124;&#124; (key==8) &#124;&#124;
      (key==9) &#124;&#124; (key==13) &#124;&#124; (key==27) )
    return true;

  // numbers
  else if (((&#34;0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZa&#34; +
             &#34;bcdefghijklmnopqrstuvwxyz.,-/?!$ &#34;).indexOf(keychar) &#62; -1))
    return true;

  // decimal point jump
  else if (dec &#38;&#38; (keychar == &#34;.&#34;))
  {
    myfield.form.elements[dec].focus();
    return false;
  }
  else
    return false;
}
</pre>
</blockquote>
<p>Thank goodness everybody always runs JavaScript.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/vXhIMtxbhlKWOf13JSUOjpXki30/0/da"><img src="http://feedads.g.doubleclick.net/~a/vXhIMtxbhlKWOf13JSUOjpXki30/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/vXhIMtxbhlKWOf13JSUOjpXki30/1/da"><img src="http://feedads.g.doubleclick.net/~a/vXhIMtxbhlKWOf13JSUOjpXki30/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=PedBT3C3aR8:IXCwbC90o80:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/PedBT3C3aR8" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/Thank-You-for-Enabling-JavaScript!.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: A Spacy Problem</title>
		<link>http://thedailywtf.com/Articles/A-Spacy-Problem.aspx</link>
		<comments>http://thedailywtf.com/Articles/A-Spacy-Problem.aspx#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:00:00 +0000</pubDate>
		<dc:creator>Alex Papadimoulis</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[boss]]></category>
		<category><![CDATA[bunch]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[company]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[Curious]]></category>
		<category><![CDATA[datafeed]]></category>
		<category><![CDATA[DON]]></category>
		<category><![CDATA[double spaces]]></category>
		<category><![CDATA[dreams]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[high hopes]]></category>
		<category><![CDATA[itemDesc]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[low expectations]]></category>
		<category><![CDATA[original]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[peek]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[processing company]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[pull]]></category>
		<category><![CDATA[question]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[quot quot quot quot]]></category>
		<category><![CDATA[regexReplace]]></category>
		<category><![CDATA[replacements]]></category>
		<category><![CDATA[right]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[stringReplace]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[support ticket]]></category>
		<category><![CDATA[thing]]></category>
		<category><![CDATA[ticket]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">6734</guid>
		<description><![CDATA[<p>Like most of his past jobs, <b>Don R</b> started at a new company with high hopes and low expectations. And also like many of his past jobs, his dreams were quickly whisked away. This time, it happened on his first support ticket.</p>
<p>&#34;This'll be an easy one,&#34; his programmer-turned-manager boss said, &#34;this used to happen quite a bit, and I've fixed it a few times. Sometimes we'll get descriptions with extra spaces, and when we send a datafeed to the processing company, it can mess up their systems. But I'm sure you'll be able to figure it out, it's in the clean-up routines.&#34;</p>
<p>Don's boss was right, it was pretty easy to find. The code in question looked as follows....</p>
<blockquote>
<pre>
// pull double spaces
itemDesc = 
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
      itemDesc, 
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;);
    </pre>
</blockquote>
<p>Curious as to why he chose twenty four replacements, Don took a peek in source control at the previus version...</p>
<blockquote>
<pre>
// pull double spaces
itemDesc = 
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
    stringReplace(stringReplace(
      itemDesc, 
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),&#34;  &#34;, &#34; &#34;);
    </pre>
</blockquote>
<p>And then he went to the version before that...</p>
<blockquote>
<pre>
// pull double spaces
itemDesc = 
    stringReplace(
    stringReplace(
    stringReplace(
    stringReplace(
      itemDesc, 
    &#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;);
    </pre>
</blockquote>
<p>A pattern was starting to emerge. He went back another version....</p>
<blockquote>
<pre>
// pull double spaces
itemDesc = stringReplace(stringReplace(
    stringReplace(itemDesc, &#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;);
    </pre>
</blockquote>
<p>And another version...</p>
<blockquote>
<pre>
// pull double spaces
itemDesc = stringReplace(
    stringReplace(itemDesc, &#34;  &#34;, &#34; &#34;),
    &#34;  &#34;, &#34; &#34;);
    </pre>
</blockquote>
<p>Until finally, he reached the original....</p>
<blockquote>
<pre>
// pull double spaces
itemDesc = stringReplace(itemDesc, &#34;  &#34;, &#34; &#34;);
</pre>
</blockquote>
<p>As tempted as Don was to simply add in another bunch of stringReplace calls just for fun, he replaced the whole thing with this.</p>
<blockquote>
<pre>
// pull double spaces
regexReplace(itemDesc, &#34;[ ][ ]+&#34;, &#34; &#34;);</pre>
</blockquote>
<p><a href="http://feedads.g.doubleclick.net/~a/U0GNsG0OMjL3aKqrt8YpkWmMnik/0/da"><img src="http://feedads.g.doubleclick.net/~a/U0GNsG0OMjL3aKqrt8YpkWmMnik/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/U0GNsG0OMjL3aKqrt8YpkWmMnik/1/da"><img src="http://feedads.g.doubleclick.net/~a/U0GNsG0OMjL3aKqrt8YpkWmMnik/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=UkhcJUVlFlE:2PUodkZxdOM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/UkhcJUVlFlE" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/A-Spacy-Problem.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: The &#8220;Who Knows?&#8221; Code</title>
		<link>http://thedailywtf.com/Articles/The-Who-Knows-Code.aspx</link>
		<comments>http://thedailywtf.com/Articles/The-Who-Knows-Code.aspx#comments</comments>
		<pubDate>Wed, 02 Dec 2009 14:00:00 +0000</pubDate>
		<dc:creator>Mark Bowytz</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[amp nbsp]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[blood]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[combination]]></category>
		<category><![CDATA[Daily]]></category>
		<category><![CDATA[day]]></category>
		<category><![CDATA[department]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[disposal]]></category>
		<category><![CDATA[Edvard]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[exit]]></category>
		<category><![CDATA[face]]></category>
		<category><![CDATA[Facing]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[following]]></category>
		<category><![CDATA[Format]]></category>
		<category><![CDATA[GoTo]]></category>
		<category><![CDATA[hand]]></category>
		<category><![CDATA[Henrik]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[kom]]></category>
		<category><![CDATA[ldquo]]></category>
		<category><![CDATA[legacy]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[nbsp]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[part]]></category>
		<category><![CDATA[place]]></category>
		<category><![CDATA[quizzed]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[rdquo]]></category>
		<category><![CDATA[reconciliation]]></category>
		<category><![CDATA[right]]></category>
		<category><![CDATA[screw]]></category>
		<category><![CDATA[Simon]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[source file]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[uplift]]></category>
		<category><![CDATA[Viktor]]></category>
		<category><![CDATA[Vladimir]]></category>

		<guid isPermaLink="false">6722</guid>
		<description><![CDATA[<p>When <b>Vladimir </b>first received his orders, the blood drained from his face.&#160;He was to take the legacy VB5 application, a system used daily by scores of users daily, and uplift it to C++.</p>
<p>After reviewing a few parts of the application,&#160;things began looking hopeless, however there was some good news!&#160;Vladimir had a department full of developers at his disposal and most of them had a hand in the creating and maintenance of the application.&#160;</p>
<p>After finding the following snippet of code, he printed it out and proceeded to grill every developer who was shown to have touched the source file in he past.</p>
<p>&#8220;No idea, go try Henrik,&#8221; said Edvard.</p>
<p>&#8220;Sorry, you might want to check in with Viktor, he wrote the reconciliation part of the system,&#8221; suggested Henrik.</p>
<p>&#8220;Nope, did you talk to Simon?&#8221; quizzed Viktor.</p>
<p>Simon lead to another developer, who suggested someone else and, skip ahead right on back to Edvard, the developer he had asked in the first place.</p>
<p>Facing a dead end and needing to move on with his life, Vladimir took the cavalier <i>Oh, just screw it</i> approach and pasted the code into the C++ app hoping that some day, it wouldn't come down to him having to explain what the code did.</p>
<blockquote>
<pre>
If m(1) = 0 Then GoTo i2 
  For i1 = 1 To m(1) 
i2: If m(2) = 0 Then GoTo i3 
   For i2 = 1 To m(2) 
      If i2 = i1 Then Exit For 
i3: If m(3) = 0 Then GoTo i4 
      For i3 = 1 To m(3) 
        If i3 = i1 Or i3 = i2 Then Exit For 
i4:   If m(4) = 0 Then GoTo i5 
        For i4 = 1 To m(4) 
          If i4 = i1 Or i4 = i2 Or i4 = i3 Then Exit For 
i5:     If m(5) = 0 Then GoTo i6 
          For i5 = 1 To m(5) 
            If i5 = i1 Or i5 = i2 Or i5 = i3 Or i5 = i4 Then Exit For 
i6:       If m(6) = 0 Then GoTo i7 
            For i6 = 1 To m(6) 
              If i6 = i1 Or i6 = i2 Or i6 = i3 Or i6 = i4 Or _
	         i6 = i5 Then Exit For 
i7:         If m(7) = 0 Then GoTo i8 
              For i7 = 1 To m(7) 
                If i7 = i1 Or i7 = i2 Or i7 = i3 Or i7 = i4 Or _
		   i7 = i5 Or i7 = i6 Then Exit For 
i8:           If m(8) = 0 Then GoTo i9 
                For i8 = 1 To m(8) 
                  If i8 = i1 Or i8 = i2 Or i8 = i3 Or i8 = i4 Or _
		     i8 = i5 Or i8 = i6 Or i8 = i7 Then Exit For 
i9:             If m(9) = 0 Then GoTo i10 
                  For i9 = 1 To m(9) 
                    If i9 = i1 Or i9 = i2 Or i9 = i3 Or i9 = i4 Or _
		       i9 = i5 Or i9 = i6 Or i9 = i7 Or i9 = i8 Then Exit For
i10:              If m(10) = 0 Then GoTo i11 
                    For i10 = 1 To m(10) 
                      If i10 = i1 Or i10 = i2 Or i10 = i3 Or i10 = i4 Or _
		         i10 = i5 Or i10 = i6 Or i10 = i7 Or i10 = i8 Or _
			 i10 = i9 Then Exit For
i11:                If m(11) = 0 Then GoTo i12 
                      For i11 = 1 To m(11) 
                        If i11 = i1 Or i11 = i2 Or i11 = i3 Or i11 = i4 Or _
			   i11 = i5 Or i11 = i6 Or i11 = i7 Or i11 = i8 Or _
			   i11 = i9 Or i11 = i10 Then Exit For
i12:                  If m(12) = 0 Then GoTo i13 
                        For i12 = 1 To m(12) 
                          If i12 = i1 Or i12 = i2 Or i12 = i3 Or i12 = i4 Or _
			     i12 = i5 Or i12 = i6 Or i12 = i7 Or i12 = i8 Or _
			     i12 = i9 Or i12 = i10 Or i12 = i11 Then Exit For
i13:                    If m(13) = 0 Then GoTo i14 
                          For i13 = 1 To m(13) 
                            If i13 = i1 Or i13 = i2 Or i13 = i3 Or i13 = i4 Or _
			       i13 = i5 Or i13 = i6 Or i13 = i7 Or i13 = i8 Or _
			       i13 = i9 Or i13 = i10 Or i13 = i11 Or _
			       i13 = i12 Then Exit For
i14:                      If m(14) = 0 Then GoTo i15 
                            For i14 = 1 To m(14) 
                              If i14 = i1 Or i14 = i2 Or i14 = i3 Or _
			         i14 = i4 Or i14 = i5 Or i14 = i6 Or _
				 i14 = i7 Or i14 = i8 Or i14 = i9 Or _
				 i14 = i10 Or i14 = i11 Or _
				 i14 = i12 Or i14 = i13 Then Exit For
i15:                        If m(15) = 0 Then GoTo i16 
                                For i15 = 1 To m(15) 
                              If i15 = i1 Or i15 = i2 Or i15 = i3 Or _
			         i15 = i4 Or i15 = i5 Or i15 = i6 Or _
				 i15 = i7 Or i15 = i8 Or i15 = i9 Or _
				 i15 = i10 Or i15 = i11 Or i15 = i12 _
				 Or i15 = i13 Or i15 = i14 Then Exit For
i16:                          If m(16) = 0 Then GoTo i17 
                                  For i16 = 1 To m(16) 
                                If i16 = i1 Or i16 = i2 Or i16 = i3 Or _
				   i16 = i4 Or i16 = i5 Or i16 = i6 Or _
				   i16 = i7 Or i16 = i8 Or i16 = i9 Or _
				   i16 = i10 Or i16 = i11 Or i16 = i12 _
				   Or i16 = i13 Or i16 = i14 Or i16 = i15 Then Exit For
i17:                                 
                            Combination(kom + 1) = Format(i16, &#34;00&#34;) &#38; _
			      Format(i15, &#34;00&#34;) &#38; Format(i14, &#34;00&#34;) &#38; _
			      Format(i13, &#34;00&#34;) &#38; Format(i12, &#34;00&#34;) &#38; _
			      Format(i11, &#34;00&#34;) &#38; Format(i10, &#34;00&#34;) &#38; _
			      Format(i9, &#34;00&#34;) &#38; Format(i8, &#34;00&#34;) &#38; _
			      Format(i7, &#34;00&#34;) &#38; Format(i6, &#34;00&#34;) &#38; _
			      Format(i5, &#34;00&#34;) &#38; Format(i4, &#34;00&#34;) &#38; _
			      Format(i3, &#34;00&#34;) &#38; Format(i2, &#34;00&#34;) &#38; _
			      Format(i1, &#34;00&#34;)
                            kom = kom + 1 
                                Next i16 
n16:                           If m(15) = 0 Then GoTo n15 
                              Next i15 
n15:                         If m(14) = 0 Then GoTo n14 
                            Next i14 
n14:                       If m(13) = 0 Then GoTo n13 
                          Next i13 
n13:                     If m(12) = 0 Then GoTo n12 
                        Next i12 
n12:                   If m(11) = 0 Then GoTo n11 
                      Next i11 
n11:                 If m(10) = 0 Then GoTo n10 
                    Next i10 
n10:               If m(9) = 0 Then GoTo n9 
                  Next i9 
n9:              If m(8) = 0 Then GoTo n8 
                Next i8 
n8:            If m(7) = 0 Then GoTo n7 
              Next i7 
n7:          If m(6) = 0 Then GoTo n6 
            Next i6 
n6:        If m(5) = 0 Then GoTo n5 
          Next i5 
n5:      If m(4) = 0 Then GoTo n4 
        Next i4 
n4:    If m(3) = 0 Then GoTo n3 
      Next i3 
n3:  If m(2) = 0 Then GoTo n2 
    Next i2 
n2: If m(1) = 0 Then GoTo n1 
  Next i1 
n1:</pre>
</blockquote>
<p><a href="http://feedads.g.doubleclick.net/~a/bD8U1MBmbz9igQBZO-5ILygLVro/0/da"><img src="http://feedads.g.doubleclick.net/~a/bD8U1MBmbz9igQBZO-5ILygLVro/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/bD8U1MBmbz9igQBZO-5ILygLVro/1/da"><img src="http://feedads.g.doubleclick.net/~a/bD8U1MBmbz9igQBZO-5ILygLVro/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=EKmbJb4v00Y:YJcm2Gk9R90:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/EKmbJb4v00Y" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/The-Who-Knows-Code.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: Pretty Basic Validation</title>
		<link>http://thedailywtf.com/Articles/Pretty-Basic-Validation.aspx</link>
		<comments>http://thedailywtf.com/Articles/Pretty-Basic-Validation.aspx#comments</comments>
		<pubDate>Mon, 30 Nov 2009 14:00:00 +0000</pubDate>
		<dc:creator>Alex Papadimoulis</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[admin module]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[asa]]></category>
		<category><![CDATA[asax]]></category>
		<category><![CDATA[ascx]]></category>
		<category><![CDATA[ashx]]></category>
		<category><![CDATA[asmx]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[asp php]]></category>
		<category><![CDATA[aspx]]></category>
		<category><![CDATA[axd]]></category>
		<category><![CDATA[bat]]></category>
		<category><![CDATA[cdx]]></category>
		<category><![CDATA[cer]]></category>
		<category><![CDATA[colleague]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[comprehension]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[config cs]]></category>
		<category><![CDATA[Contains]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[coworkers]]></category>
		<category><![CDATA[csproj]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[DOC]]></category>
		<category><![CDATA[eighteen]]></category>
		<category><![CDATA[ERROR]]></category>
		<category><![CDATA[error message]]></category>
		<category><![CDATA[exe]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[fileName]]></category>
		<category><![CDATA[GetExtension]]></category>
		<category><![CDATA[hand]]></category>
		<category><![CDATA[htr]]></category>
		<category><![CDATA[htw]]></category>
		<category><![CDATA[ida]]></category>
		<category><![CDATA[idc]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[idq]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[import feature]]></category>
		<category><![CDATA[Incorrect]]></category>
		<category><![CDATA[ini]]></category>
		<category><![CDATA[InvalidExtensions]]></category>
		<category><![CDATA[IO]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[Kristof]]></category>
		<category><![CDATA[LastIndexOf]]></category>
		<category><![CDATA[licx]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[Proceed]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[quot quot]]></category>
		<category><![CDATA[rem]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[resx]]></category>
		<category><![CDATA[right]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[shtm]]></category>
		<category><![CDATA[shtml]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[step]]></category>
		<category><![CDATA[stm]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[Substring]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[ToLower]]></category>
		<category><![CDATA[ToString]]></category>
		<category><![CDATA[txt]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[vbproj]]></category>
		<category><![CDATA[vsdisco]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web application]]></category>
		<category><![CDATA[webinfo]]></category>
		<category><![CDATA[yeah]]></category>

		<guid isPermaLink="false">6730</guid>
		<description><![CDATA[<p>&#34;For reasons beyond my comprehension,&#34; <b>Kristof</b> writes, &#34;one of my coworkers has managed to keep his job after more than eighteen months of messing about. His latest project was to build an import feature in the admin module of our web application. The idea behind the feature was that the administrators could upload a tab-delimited text file containing a list of products, and the application would insert or update the products in the database.&#34;</p>
<p>&#34;Of course, the import feature required some pretty basic validation,&#34; Kristof continued. &#34;Is it actually a text file? Is it tab delimited? Are the columns correct? And so on.&#34;</p>
<p>&#34;To solve this, my colleague figured the best way was to verify that the uploaded file's name had the correct extension of .txt. It's a decent first step that one would normally code as follows.&#34;</p>
<blockquote>
<pre>
if (System.IO.Path.GetExtension(fileName).ToLower() == &#34;txt&#34;)
{
    // The extension is OK. Proceed with the rest of the validation
}
else
{
    // Incorrect extension. Show error message.
}</pre>
</blockquote>
<p>&#34;My colleague, on the other hand, came up with this.&#34;</p>
<blockquote>
<pre>
string InvalidExtensions = &#34;.exe;.dll;.com;.bat;.ini;.sys;.aspx;&#34;
   + &#34;.asp;.php;.htw;.ida;.idq;.asp;.cer;.cdx;.asa;.htr;.idc;.shtm;&#34;
   + &#34;.shtml;.stm;.printer;.asax;.ascx;.ashx;.asmx;.aspx;.axd;.rem;&#34;
   + &#34;.soap;.config;.cs;.csproj;.vb;.vbproj;.webinfo;.licx;.resx;&#34;
   + &#34;.resources;.vsdisco;&#34;;

if (!InvalidExtensions.Contains(fileName.ToString().Substring(fileName.ToString().LastIndexOf(&#34;.&#34;))))
{
    // The extension is OK. Proceed with the rest of the validation
}
else
{
    // Incorrect extension. Show error message.
}</pre>
</blockquote>
<p>&#34;That's right,&#34; Kristof wrote. &#34;He put a very limited list of invalid extensions in a string, and then made sure that the extension of the uploaded file was not in that list.&#34;</p>
<p>He added, &#34;when I asked my colleague what would happen if someone uploaded a .doc file or a .pdf file, he replied 'Oh yeah, you're right... I should add those to the list as well!' I was stupefied.&#34;</p>
<p><a href="http://feedads.g.doubleclick.net/~a/UFWI7B8yi5H__mP_hG1uGO2hwL4/0/da"><img src="http://feedads.g.doubleclick.net/~a/UFWI7B8yi5H__mP_hG1uGO2hwL4/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/UFWI7B8yi5H__mP_hG1uGO2hwL4/1/da"><img src="http://feedads.g.doubleclick.net/~a/UFWI7B8yi5H__mP_hG1uGO2hwL4/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=1Ilyy0MBDlo:eEq7s1-Xyio:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/1Ilyy0MBDlo" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/Pretty-Basic-Validation.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: A Random PHP Script</title>
		<link>http://thedailywtf.com/Articles/A-Random-PHP-Script.aspx</link>
		<comments>http://thedailywtf.com/Articles/A-Random-PHP-Script.aspx#comments</comments>
		<pubDate>Wed, 25 Nov 2009 14:00:00 +0000</pubDate>
		<dc:creator>Mark Bowytz</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[addParam]]></category>
		<category><![CDATA[amp nbsp]]></category>
		<category><![CDATA[base]]></category>
		<category><![CDATA[CDATA]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[eye]]></category>
		<category><![CDATA[FFFFFF]]></category>
		<category><![CDATA[flashcontent]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[line amp]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[macmousewheel]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Michael]]></category>
		<category><![CDATA[nbsp]]></category>
		<category><![CDATA[ndash]]></category>
		<category><![CDATA[ocean]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php echo]]></category>
		<category><![CDATA[php script]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[quot quot]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[right]]></category>
		<category><![CDATA[rsquo]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script type]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[static html files]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[SWFMacMouseWheel]]></category>
		<category><![CDATA[SWFObject]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[text javascript]]></category>
		<category><![CDATA[theswf]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[vanilla]]></category>
		<category><![CDATA[var]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">6721</guid>
		<description><![CDATA[<p>Some time ago when <strong>Michael </strong>was tasked with updating some of code on an old website, one file on the server caught his eye.</p>
<p>Amid an ocean of static HTML files, it turned out that there was exactly one PHP script. Not sure what to expect, he was surprised when he discovered that the script was entirely comprised of vanilla HTML save for one line.</p>
<blockquote>
<pre>
&#60;script type=&#34;text/javascript&#34;&#62; 
  // &#60;![CDATA[                
  var so = new SWFObject(
      &#34;../theswf.swf?rand=&#60;?php echo rand(100,999); ?&#62;&#34;, 
      &#34;theswf&#34;, &#34;100%&#34;, &#34;100%&#34;, &#34;8&#34;, &#34;#FFFFFF&#34;);

  so.addParam(&#34;menu&#34;, &#34;false&#34;); 
  so.addParam(&#34;base&#34;, &#34;../&#34;); 
  if( so.write('flashcontent') ) 
                        { 
    var macmousewheel = new SWFMacMouseWheel( so ); 
  } 
// ]]&#62;&#60;/script&#62; </pre>
</blockquote>
<p>That&#8217;s right &#8211; the only reason this particular page was rendered via a script was to use PHP&#8217;s rand() function, which was obviously superior to Javascript's Math.random()&#160;</p>
<p><a href="http://feedads.g.doubleclick.net/~a/jAJ4ORQ1F6E6qh6er_OCUNn1_VI/0/da"><img src="http://feedads.g.doubleclick.net/~a/jAJ4ORQ1F6E6qh6er_OCUNn1_VI/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/jAJ4ORQ1F6E6qh6er_OCUNn1_VI/1/da"><img src="http://feedads.g.doubleclick.net/~a/jAJ4ORQ1F6E6qh6er_OCUNn1_VI/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=qBkc09gC4Vo:J1bUKUuvSwA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/qBkc09gC4Vo" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/A-Random-PHP-Script.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: Starring The Admin</title>
		<link>http://thedailywtf.com/Articles/Starring-The-Admin.aspx</link>
		<comments>http://thedailywtf.com/Articles/Starring-The-Admin.aspx#comments</comments>
		<pubDate>Mon, 23 Nov 2009 14:00:00 +0000</pubDate>
		<dc:creator>Alex Papadimoulis</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Adam]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[administration module]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[card]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[credit]]></category>
		<category><![CDATA[credit card numbers]]></category>
		<category><![CDATA[double star]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[ecommerce website]]></category>
		<category><![CDATA[IsAdmin]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[kick ass]]></category>
		<category><![CDATA[magnitudes]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[predecessor]]></category>
		<category><![CDATA[priority]]></category>
		<category><![CDATA[privileges]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[right]]></category>
		<category><![CDATA[SESSION]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[str]]></category>
		<category><![CDATA[strstr]]></category>
		<category><![CDATA[sweet web]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[top priority]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[username admin]]></category>
		<category><![CDATA[users groups]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web application]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">6726</guid>
		<description><![CDATA[<p>We've all been there before. You spend all this time building a kick-ass, ultra-awesome, super-sweet web application and <em>then</em> you realize you need to build some stupid &#34;administration&#34; module that needs to do the boring, run-of-the-mill things like maintain users, groups, privileges, and so on.</p>
<p>There are several different magnitudes of complexity that can be involved with an administration module, ranging from the full-on set of tables including users, groups, roles, tasks, operations, etc., to a simple IsAdmin column on the users table. Actually, it turns out there's an <em>even simpler</em> way, and that <b>Adam P's</b> predecessor discovered and implemented it for their client's fairly large ecommerce website.</p>
<blockquote>
<pre>
if(strstr($username, '**')) {

    $admin = 1;
    $username = str_replace('**', '', $username);
    $_SESSION['admin'] = 1;

} else {

    $admin = 0;

}</pre>
</blockquote>
<p>That's right: simply add a double-star (&#34;**&#34;) to your name when logging in, and you'd have full admin access, including payment records with complete credit card numbers. While you'd think this issue would be Adam's top priority to fix, it turns out that there were <em>even more pressing</em> issues to address, such as being able to enter &#34;/admin/payments&#34; as the URL's path and see those complete payment records without even logging in.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/O9adkLCREae4EIb-9CdNqR9nDhE/0/da"><img src="http://feedads.g.doubleclick.net/~a/O9adkLCREae4EIb-9CdNqR9nDhE/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/O9adkLCREae4EIb-9CdNqR9nDhE/1/da"><img src="http://feedads.g.doubleclick.net/~a/O9adkLCREae4EIb-9CdNqR9nDhE/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=GnKkA_uAPKE:UR83qV6DuCY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/GnKkA_uAPKE" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/Starring-The-Admin.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: modHmm</title>
		<link>http://thedailywtf.com/Articles/modHmm.aspx</link>
		<comments>http://thedailywtf.com/Articles/modHmm.aspx#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:00:00 +0000</pubDate>
		<dc:creator>Alex Papadimoulis</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[access project]]></category>
		<category><![CDATA[adCmdText]]></category>
		<category><![CDATA[adlockoptimistic]]></category>
		<category><![CDATA[ADODB]]></category>
		<category><![CDATA[adoRst]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Bank]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[Call]]></category>
		<category><![CDATA[Cheque]]></category>
		<category><![CDATA[Close]]></category>
		<category><![CDATA[Club]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[code 39]]></category>
		<category><![CDATA[company]]></category>
		<category><![CDATA[comRate]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[cr]]></category>
		<category><![CDATA[Creditor]]></category>
		<category><![CDATA[CurrentProject]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database option]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[ddd]]></category>
		<category><![CDATA[Dealer]]></category>
		<category><![CDATA[Dim]]></category>
		<category><![CDATA[diner]]></category>
		<category><![CDATA[dude]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[EOF]]></category>
		<category><![CDATA[Explicit]]></category>
		<category><![CDATA[Fdate]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[finding my way]]></category>
		<category><![CDATA[Fine]]></category>
		<category><![CDATA[Format]]></category>
		<category><![CDATA[FROM]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[GetGLCode]]></category>
		<category><![CDATA[ggggg]]></category>
		<category><![CDATA[GLAccount]]></category>
		<category><![CDATA[Global]]></category>
		<category><![CDATA[Globally]]></category>
		<category><![CDATA[Hmmmmm]]></category>
		<category><![CDATA[jklsadjflksd]]></category>
		<category><![CDATA[look]]></category>
		<category><![CDATA[Loop]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[microsoft access]]></category>
		<category><![CDATA[modHmm]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[mood]]></category>
		<category><![CDATA[MoveNext]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[need]]></category>
		<category><![CDATA[New]]></category>
		<category><![CDATA[OnConsignment]]></category>
		<category><![CDATA[OnConsignmentItem]]></category>
		<category><![CDATA[Open]]></category>
		<category><![CDATA[option]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[Public]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[Recordset]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rst]]></category>
		<category><![CDATA[sbWriteGLTransaction]]></category>
		<category><![CDATA[SELECT]]></category>
		<category><![CDATA[Sent]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[setDateCompleteOnConsignmentItem]]></category>
		<category><![CDATA[Stock]]></category>
		<category><![CDATA[StockMovement]]></category>
		<category><![CDATA[StockNumber]]></category>
		<category><![CDATA[Stuart]]></category>
		<category><![CDATA[stuff]]></category>
		<category><![CDATA[Sub]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[Transaction]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[UpdateThing]]></category>
		<category><![CDATA[useADO]]></category>
		<category><![CDATA[variables]]></category>
		<category><![CDATA[view]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[WHERE]]></category>
		<category><![CDATA[yyyy]]></category>

		<guid isPermaLink="false">6723</guid>
		<description><![CDATA[<p>&#34;I was put on a new Microsoft Access project recently,&#34; <b>Stuart A</b> writes, &#34;and I've slowly been finding my way around the system as the need arises (read: as bugs are reported). As my eyes drifted over the numerous modules, one stopped me in my tracks. It was a module named 'modHmm'. I guessed the programmer was in a ponderous mood?. So naturally, I had a look inside...&#34;</p>
<blockquote>
<pre>
Option Compare Database
Option Explicit

Global t1qq
Global t2qq
Global t3qq
...</pre>
</blockquote>
<p>&#34;The file started off as usual,&#34; Stuart continued, &#34;Globally declared variables without types that were poorly named and to be used who-knows-where. It was pretty standard stuff for our modules. So I continued looking...&#34;</p>
<blockquote>
<pre>
Public Sub UpdateThing()
    Dim adoRst As New ADODB.Recordset
    Dim comRate As Double
   
    adoRst.Open _
        &#34;SELECT * FROM view91 WHERE Transaction_GLAccount_Code = '12055'&#34;, _
         Application.CurrentProject.Connection, adOpenStatic, adLockOptimistic, adCmdText
   
    Do Until adoRst.EOF
        adoRst!Transaction_GLAccount_Code = &#34;12056&#34;
        adoRst.Update
        adoRst.MoveNext
    Loop
   
    adoRst.Close
   
End Sub</pre>
</blockquote>
<p>&#34;Okay. So the function names were turning out to be as descriptive as the module name. Fine. But then I saw...&#34;</p>
<blockquote>
<pre>
Public Sub dude()
    Call sbWriteGLTransaction(&#34;2003CD1182&#34;, _
          &#34;Cheque Sent Bank&#34;, Fdate(&#34;2002-07-10&#34;), -4097.47, _
          &#34;Dealer: Diner's Club&#34;, glClass.Company_Code, &#34;12025&#34;)
    Call sbWriteGLTransaction(&#34;2003CD1182&#34;, _
          &#34;Cheque Sent Creditor&#34;, Fdate(&#34;2002-07-10&#34;), 4097.47, _
          &#34;Dealer: Diner's Club&#34;, glClass.Company_Code, glClass.GetGLCode(&#34;CR&#34;))
End Sub</pre>
</blockquote>
<p>&#34;Dude?!&#34; Stuart wrote, &#34;not only Dude, but that but Public Dude?! What are we doing?? My eyes continued down the page...&#34;</p>
<blockquote>
<pre>
Public Sub hhhhhfjhskjfds()
    Dim rst As ADODB.Recordset
    Set rst = useADO(&#34;View57&#34;, 2, , , 1)

    Do Until rst.EOF
        Call ocClass.setDateCompleteOnConsignmentItem( _
          Format(rst!StockMovement_Date, &#34;dd/mm/yyyy&#34;), _
          &#34;Stock Written Off&#34;, , _
          rst!OnConsignmentItem_OnConsignment_ID, _
          rst!StockMovement_StockNumber)
        rst.MoveNext
    Loop
End Sub</pre>
</blockquote>
<p>&#34;I'm stunned!&#34; Stuart added, &#34;the rest of the functions were similarily named: jklsadjflksd(), ggggg(), ddd(), etc.&#34;</p>
<p>&#34;Hmmmmm, indeed.&#34;</p>
<p><a href="http://feedads.g.doubleclick.net/~a/OXMJC_8jLY3ds79YmT9cVV2nvjg/0/da"><img src="http://feedads.g.doubleclick.net/~a/OXMJC_8jLY3ds79YmT9cVV2nvjg/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/OXMJC_8jLY3ds79YmT9cVV2nvjg/1/da"><img src="http://feedads.g.doubleclick.net/~a/OXMJC_8jLY3ds79YmT9cVV2nvjg/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=9Q3Sjs5Bab4:dyC_WQQvscE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/9Q3Sjs5Bab4" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/modHmm.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: For the Ease of Maintenance</title>
		<link>http://thedailywtf.com/Articles/For-the-Ease-of-Maintenance.aspx</link>
		<comments>http://thedailywtf.com/Articles/For-the-Ease-of-Maintenance.aspx#comments</comments>
		<pubDate>Mon, 16 Nov 2009 14:00:00 +0000</pubDate>
		<dc:creator>Alex Papadimoulis</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[ACCT]]></category>
		<category><![CDATA[ACTIVE]]></category>
		<category><![CDATA[ADUSR]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[Call]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database queries]]></category>
		<category><![CDATA[database table]]></category>
		<category><![CDATA[day]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[ease]]></category>
		<category><![CDATA[FNACL]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[FROM]]></category>
		<category><![CDATA[identifier]]></category>
		<category><![CDATA[kind]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[manag]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[mdash]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[new release]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[order]]></category>
		<category><![CDATA[parameter]]></category>
		<category><![CDATA[parameters]]></category>
		<category><![CDATA[predecessors]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[PROC]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[query sql]]></category>
		<category><![CDATA[query1]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[quotes]]></category>
		<category><![CDATA[RawQuery]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[Ryan]]></category>
		<category><![CDATA[Ryan Thompson]]></category>
		<category><![CDATA[say]]></category>
		<category><![CDATA[SELECT]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[SPTST]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sql queries]]></category>
		<category><![CDATA[STATUS]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[technique]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[use]]></category>
		<category><![CDATA[WHERE]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[world]]></category>

		<guid isPermaLink="false">6719</guid>
		<description><![CDATA[<p><b>Ryan Thompson</b> works on a project where all database queries had to go through &#34;stored procedures&#34;. Now before you call me out on extraneous quotes or wonder, <em>so what's wrong with stored procedures?</em>, I'm not talking about <em>those</em> kind of stored procedures. I'm talking about &#34;stored procedures&#34; &#8212; i.e., the technique developed by Ryan's predecessors for the ease of maintenance.</p>
<p>You see, in Ryan's world, there are hundreds of different procedures, each with a unique identifier such as FNACL0023 or ADUSR0012, all which are stored in a database table named &#34;RawQuery&#34;, which, for ease of maintenance, contained the actual SQL queries to be performed. In order to call one of these queries, you'd need to call one of several <i>actual</i> stored procedures &#8212; Query0(), Query1(), Query2(), Query4(), Query12(), etc. &#8212; depending on the number of &#34;parameters&#34; needed by the query.</p>
<p>So, let's say you wanted to run a query. First, you'd look it up in the RawQuery table as follows.</p>
<blockquote>
<pre>
+-----------+------------------------------------------+
&#124; PROC_ID   &#124;  PROC_QUERY_SQL                          &#124;
+-----------+------------------------------------------+
&#124; FNACL0023 &#124; SELECT ... FROM ... WHERE ACCT_ID = %1%  &#124;
&#124;           &#124;      AND STATUS_CD = '%2%' ORDER BY %3%  &#124;
+-----------+------------------------------------------+</pre>
</blockquote>
<p>Then, all you had to do was the following:</p>
<blockquote>
<pre>
CALL Query3('FNACL0023','882','ACTIVE','ORDER_DT'); </pre>
</blockquote>
<p>It made for perfectly opaque coding, but the DBA was happy because he could easily update and add queries. Of course, the <em>real</em> problem was that queries were jealously and closely held by the DBA, and despite the &#34;ease of maintenance&#34;, it was nearly impossible to convince them to make changes or add new ones.</p>
<p>The DBA ruthlessly audited each new release, forcing the use of stored procedures on every call. Since the manager was a former DBA himself, he always sided with the DBA.</p>
<p>But one day, an enterprising developer discovered a wonderful workaround in the form of query SPTST0001. It was a test query that the DBA used regularly and took only a single parameter: a table name.</p>
<blockquote>
<pre>
+-----------+---------------------+
&#124; PROC_ID   &#124;  PROC_QUERY_SQL     &#124;
+-----------+---------------------+
&#124; SPTST0001 &#124; SELECT * FROM %1%   &#124;
+-----------+---------------------+</pre>
</blockquote>
<p>Immediately, developers changed their coding style to.</p>
<blockquote>
<pre>
CALL Query3('SPTST0001', '(SELECT a,b,c FROM x,y,z WHERE d=1 AND e='test' ORDER BY z.c)'); 
</pre>
</blockquote>
<p>All it took was an extra set of parenthesis, and a table name magically became usable as a full SQL query.</p>
<p>The DBA was aware of the workaround, but didn't seem to mind. So long as they were using the stored procedures as required, he didn't care what was actually <em>in</em> them. And besides, the developers finally stopped pestering them to add new queries.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/Y_Xr0td1I2EdHQg8HguErnwHsx8/0/da"><img src="http://feedads.g.doubleclick.net/~a/Y_Xr0td1I2EdHQg8HguErnwHsx8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Y_Xr0td1I2EdHQg8HguErnwHsx8/1/da"><img src="http://feedads.g.doubleclick.net/~a/Y_Xr0td1I2EdHQg8HguErnwHsx8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=FRcUjsHx8Uc:kbkvs_95Aiw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/FRcUjsHx8Uc" height="1" width="1"/>]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/For-the-Ease-of-Maintenance.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: The Long Week</title>
		<link>http://thedailywtf.com/Articles/The-Long-Week.aspx</link>
		<comments>http://thedailywtf.com/Articles/The-Long-Week.aspx#comments</comments>
		<pubDate>Wed, 11 Nov 2009 18:30:00 +0000</pubDate>
		<dc:creator>Alex Papadimoulis</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[case 2]]></category>
		<category><![CDATA[chance]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[consequences]]></category>
		<category><![CDATA[CRM]]></category>
		<category><![CDATA[crm system]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom functionality]]></category>
		<category><![CDATA[day]]></category>
		<category><![CDATA[DayOfTheWeek]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[FRIDAY]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functionality]]></category>
		<category><![CDATA[Gavin Watkinson]]></category>
		<category><![CDATA[hotel]]></category>
		<category><![CDATA[hotel room]]></category>
		<category><![CDATA[iDay]]></category>
		<category><![CDATA[Integer]]></category>
		<category><![CDATA[late at night]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[MONDAY]]></category>
		<category><![CDATA[night]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[off chance]]></category>
		<category><![CDATA[Public]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[Real]]></category>
		<category><![CDATA[Room]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[SATURDAY]]></category>
		<category><![CDATA[SELECT]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[SOD]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software conference]]></category>
		<category><![CDATA[str]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[SUNDAY]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[THURSDAY]]></category>
		<category><![CDATA[today]]></category>
		<category><![CDATA[TUESDAY]]></category>
		<category><![CDATA[watkinson]]></category>
		<category><![CDATA[Wednesday]]></category>
		<category><![CDATA[week]]></category>
		<category><![CDATA[Whoops]]></category>
		<category><![CDATA[WTF]]></category>

		<guid isPermaLink="false">6717</guid>
		<description><![CDATA[<p><em>Turns out that I'm The Real WTF, since the Code SOD from earlier today was already posted... last week. Whoops; consequences of posting realllly late at night in a hotel room while at The Business of Software conference I suppose. Anyway, here's one that I'm pretty sure wasn't from last week.</em></p>
<hr />
<p>&#34;We recently started using a new CRM system,&#34; <b>Gavin Watkinson</b> writes, &#34;and wanted to write some custom functionality for it.&#34;</p>
<p>&#34;While looking through the sample code, I came across this snippet. I'm assuming they put this in just on the off chance that the number of days in a week is increased.&#34;</p>
<blockquote>
<pre>
Public Function DayOfTheWeek(iDay As Integer) As String
    'Mapping of day number to day-of-the-week string.
    Select Case iDay
    Case 1
        DayOfTheWeek = STR_SUNDAY
    Case 2
        DayOfTheWeek = STR_MONDAY
    Case 3
        DayOfTheWeek = STR_TUESDAY
    Case 4
        DayOfTheWeek = STR_WEDNESDAY
    Case 5
        DayOfTheWeek = STR_THURSDAY
    Case 6
        DayOfTheWeek = STR_FRIDAY
    Case 7
        DayOfTheWeek = STR_SATURDAY
    Case 8
        DayOfTheWeek = STR_SUNDAY
    Case 9
        DayOfTheWeek = STR_MONDAY
    Case 10
        DayOfTheWeek = STR_TUESDAY
    Case 11
        DayOfTheWeek = STR_WEDNESDAY
    Case 12
        DayOfTheWeek = STR_THURSDAY
    Case 13
        DayOfTheWeek = STR_FRIDAY
    End Select
End Function</pre>
</blockquote>
<p><a href="http://feedads.g.doubleclick.net/~a/hRg6OyqHe2c5mpdmA62ZpvLepA4/0/da"><img src="http://feedads.g.doubleclick.net/~a/hRg6OyqHe2c5mpdmA62ZpvLepA4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/hRg6OyqHe2c5mpdmA62ZpvLepA4/1/da"><img src="http://feedads.g.doubleclick.net/~a/hRg6OyqHe2c5mpdmA62ZpvLepA4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=mm_zCHxEIBE:mz2kktlRUME:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/mm_zCHxEIBE" height="1" width="1"/>]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/The-Long-Week.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeSOD: Modular Process Improvement</title>
		<link>http://thedailywtf.com/Articles/Modular-Process-Improvement.aspx</link>
		<comments>http://thedailywtf.com/Articles/Modular-Process-Improvement.aspx#comments</comments>
		<pubDate>Wed, 11 Nov 2009 14:00:00 +0000</pubDate>
		<dc:creator>Alex Papadimoulis</dc:creator>
				<category><![CDATA[CodeSOD]]></category>
		<category><![CDATA[amount]]></category>
		<category><![CDATA[amount of time]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[approach]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[BYTE]]></category>
		<category><![CDATA[c developer]]></category>
		<category><![CDATA[CFile]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[couple]]></category>
		<category><![CDATA[coworker]]></category>
		<category><![CDATA[cry]]></category>
		<category><![CDATA[CString]]></category>
		<category><![CDATA[Curious]]></category>
		<category><![CDATA[departure]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[directory comparison]]></category>
		<category><![CDATA[five minutes]]></category>
		<category><![CDATA[forty]]></category>
		<category><![CDATA[forty minutes]]></category>
		<category><![CDATA[fourty]]></category>
		<category><![CDATA[genius]]></category>
		<category><![CDATA[guy]]></category>
		<category><![CDATA[hand]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[logic]]></category>
		<category><![CDATA[lunch]]></category>
		<category><![CDATA[memcopy]]></category>
		<category><![CDATA[memcpy]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[memory allocations]]></category>
		<category><![CDATA[mine]]></category>
		<category><![CDATA[modeRead]]></category>
		<category><![CDATA[month]]></category>
		<category><![CDATA[moron]]></category>
		<category><![CDATA[nBytesRead]]></category>
		<category><![CDATA[newspaper]]></category>
		<category><![CDATA[nLenResultBuffer]]></category>
		<category><![CDATA[NULL]]></category>
		<category><![CDATA[Open]]></category>
		<category><![CDATA[opportunity]]></category>
		<category><![CDATA[pBuffer]]></category>
		<category><![CDATA[pNewBuffer]]></category>
		<category><![CDATA[pResult]]></category>
		<category><![CDATA[pResultBuffer]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[Re-starting]]></category>
		<category><![CDATA[Read]]></category>
		<category><![CDATA[ReadBinaryFile]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[Rik]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[strFile]]></category>
		<category><![CDATA[surface]]></category>
		<category><![CDATA[task]]></category>
		<category><![CDATA[thirteen]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[UINT]]></category>
		<category><![CDATA[ZeroMemory]]></category>

		<guid isPermaLink="false">6715</guid>
		<description><![CDATA[<p>&#34;After nearly eight years working as a C++ developer,&#34; <b>Rik V</b> writes, &#34;a <em>certain</em> coworker of mine was finally laid off. One of his jobs was to run an application that he wrote which would compare two directories and put any files that had changed into a third. This was a semi-frequent task, and one that he needed to devote quite a bit of time to each month. On his departure, the task fell to me.&#34;</p>
<p>&#34;The first time I ran the application, I noticed that it was taking an exorbitant amount of time to complete. After five minutes, it barely scratched the surface of the directories, so I took off for lunch and returned later to see it took over forty minutes to complete. Curious as to how a directory comparison could take so long, I peeked at the code.</p>
<blockquote>
<pre>
long ReadBinaryFile(CString strFile, BYTE** pResult)
{
    BYTE* pBuffer[256];
    BYTE* pResultBuffer = NULL;
    long nLenResultBuffer = 0;

    CFile file;
      
    if(!file.Open(strFile, CFile::modeRead))
    {
        return NULL;
    }
      
    UINT nBytesRead = 256;

    while(nBytesRead)
    {
        nBytesRead = file.Read(pBuffer, 255);

        if(nBytesRead)
        {
            BYTE* pNewBuffer = new BYTE[nBytesRead + nLenResultBuffer];
            ZeroMemory(pNewBuffer, nBytesRead + nLenResultBuffer);
            memcpy(pNewBuffer, pResultBuffer, nLenResultBuffer);
            memcpy(pNewBuffer + nLenResultBuffer, pBuffer, nBytesRead);
            delete[] pResultBuffer;
            pResultBuffer = pNewBuffer;
            nLenResultBuffer += nBytesRead;
        }
    }

    *pResult = pResultBuffer;
    return nLenResultBuffer;
}</pre>
</blockquote>
<p>&#34;I was stunned,&#34; Rik continued, &#34;for a 5MB file, this would involve 20,000+ loops, 20,000+ memory allocations of gradually increasing size, and at least 40,000 memcopy operations. And that's just for one file!&#34;</p>
<p>&#34;Not knowing whether to laugh or cry, I decided to take the safe approach and just rewrite it. Re-starting the app, it finished in under twenty seconds. With a couple of logic tweaks elsewhere in the code, I got this down to thirteen seconds. <em>From fourty minutes</em>.</p>
<p>Rik adds, &#34;I'm not sure if the guy was a moron or a genius. One the one hand, the code is absolutely appalling. On the other, it gave him the opportunity to say 'sorry, the app is still running; I've got to wait for it to finish' and then go back to reading the newspaper.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/NcqjxFOsbUXJtjyxJA7gXSuWN98/0/da"><img src="http://feedads.g.doubleclick.net/~a/NcqjxFOsbUXJtjyxJA7gXSuWN98/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/NcqjxFOsbUXJtjyxJA7gXSuWN98/1/da"><img src="http://feedads.g.doubleclick.net/~a/NcqjxFOsbUXJtjyxJA7gXSuWN98/1/di" border="0"></img></a></p><div class="feedflare">
<a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=USKgWYEuy_g:kjV9ULdlUxg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/USKgWYEuy_g" height="1">]]></description>
		<wfw:commentRss>http://thedailywtf.com/Articles/Modular-Process-Improvement.aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.370 seconds -->
