<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://syndication.thedailywtf.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" version="2.0">
	<channel>
		<title>The Daily WTF</title> 
		<link>http://thedailywtf.com/</link> 
		<description>Curious Perversions in Information Technology</description> 

		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://syndication.thedailywtf.com/TheDailyWtf" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="thedailywtf" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>41.36995</geo:lat><geo:long>-81.862591</geo:long><item>
			<author>Alex Papadimoulis</author> 
			<title>CodeSOD: Accounting for Complexity</title> 
			<link>http://thedailywtf.com/Articles/Accounting-for-Complexity.aspx</link> 
			<category>CodeSOD</category>
			<pubDate>Wed, 01 Sep 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6922</guid> 
			<description>&lt;p&gt;&amp;quot;I was recently assigned to work on a team that maintains a fairly large product,&amp;quot; writes &lt;b&gt;Aaron&lt;/b&gt;, &amp;quot;at first, I was a bit overwhelmed by the complexity of the architecture. There were countless layers of abstraction, thousands and thousands of classes, and design patterns galore. Since it was such a large project &amp;ndash; and my first large project &amp;ndash; I figured that the architectural complexity was simply par for the course.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Then I started looking at the code a little more closely. If I had two words to describe it, they&amp;rsquo;d be &amp;lsquo;unnecessary complexity.&amp;rsquo; And if I had one snippet to describe it, it would be this.&amp;rdquo;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;
private void SetAccount(RequisitionData.RequisitionItem requisitionItem, 
                        AccountData.Account account, bool automation)
{
    bool allowSetAccount = false;

    if(account != null)
    {
        // if the account entry is being set by automation, ensure that 
	// the user hasn't already set a value
        if (automation)
        {
            if (!requisitionItem.IsAccountCodeNull())
            {
                if (requisitionItem.AccountCode == string.Empty)
                    allowSetAccount = true;
                else
                    allowSetAccount = true;
            }
            else
                allowSetAccount = true;
        }
        else
            allowSetAccount = true;

        if (allowSetAccount)
        {
            requisitionItem.AccountID = account.ID;
            requisitionItem.AccountCode = account.Code;
        }
    }
}&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Aaron continued, &amp;quot;the beauty of it is that the method is private within the class, and has an 'automation' boolean parameter. This parameter is always passed as true.&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fIwTyxrAYw5jvFnST2da7GeqbQc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fIwTyxrAYw5jvFnST2da7GeqbQc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fIwTyxrAYw5jvFnST2da7GeqbQc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fIwTyxrAYw5jvFnST2da7GeqbQc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=EsJ50jw_B0M:-957j03b9L4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/EsJ50jw_B0M" height="1" width="1"/&gt;</description> 
			<slash:comments>98</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Accounting-for-Complexity.aspx</comments>
		</item>
	
		<item>
			<author>Remy Porter</author> 
			<title>Fast Fix</title> 
			<link>http://thedailywtf.com/Articles/Fast-Fix.aspx</link> 
			<category>Feature Articles</category>
			<pubDate>Tue, 31 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6921</guid> 
			<description>&lt;p&gt;&lt;img style="margin: 5px; float: right" class="wtf_imgfloatright" alt="" src="http://img.thedailywtf.com/images/201008/bsod_nt.png" /&gt;&amp;quot;Do you think it's wise to have consultants running our IT department?&amp;quot; &lt;b&gt;Holger&lt;/b&gt; asked. It was an honest question, worded as diplomatically as possible. Holger's company had more consultants on hand than actual IT staff.&lt;/p&gt;
&lt;p&gt;&amp;quot;Holger, these folks are experts,&amp;quot; his manager replied. &amp;quot;It isn't cost effective to hire-on this level of expertise full time. We may pay a little more up front, but when we don't need the consultants anymore, we can hand it off to our internal people.&amp;quot;&lt;/p&gt;
&lt;p&gt;Holger left that discussion pretty sure he had just been called incompetent. &lt;em&gt;Maybe I should ask the consultants if &lt;i&gt;they're&lt;/i&gt; hiring,&lt;/em&gt; Holger wondered to himself, thinking of the big money they pulled down relative to his salary. The thought was still percolating in his head when he sat down with the two newest consultants, Zack and Jack for their status meeting.&lt;/p&gt;
&lt;p&gt;Holger hooked his laptop up to the projector and ran through a few recent changes in the configuration database, discussed the implications, and then moved onto other topics. He stopped paying attention to the computer, and it eventually dropped to its screensaver. Moments later, there was some snickering from Zack.&lt;/p&gt;
&lt;p&gt;&amp;quot;Having some computer trouble?&amp;quot; Jack asked, mockery in his tone.&lt;/p&gt;
&lt;p&gt;Holger glanced at the projection screen and saw that his screensaver was &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897558.aspx"&gt;was running merrily&lt;/a&gt;. It &lt;span title="click me!" onclick="cornify_add();return false;"&gt;merrily painted a BSOD to the screen&lt;/span&gt;&lt;script type="text/javascript" src="http://www.cornify.com/js/cornify.js"&gt;&lt;/script&gt;, with plausible driver dumps, merrily churned the disk a little, like it was saving the contents of RAM, and merrily ran through a simulated reboot sequence. After which, the process repeated itself, merrily. &amp;quot;Oh,&amp;quot; Holger said, &amp;quot;that happens sometimes. I've got it under control. No worries.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Yeah, whatever,&amp;quot; Jack said. The meeting continued.&lt;/p&gt;
&lt;p&gt;The product of the meeting, like too many other meetings with consultants, resulted in the need for another meeting. &amp;quot;Let's see what my calendar looks like,&amp;quot; Holger said. He grabbed the mouse, killed the screensaver, and called up his email client.&lt;/p&gt;
&lt;p&gt;Zack gasped. &amp;quot;How did you do that?&amp;quot; Jack marveled.&lt;/p&gt;
&lt;p&gt;&amp;quot;Oh, that?&amp;quot; Holger said. With his best deadpan, he said, &amp;quot;I got tired of waiting for the reboots to complete. I put together a tool that does an automatic fix and restart, letting me just continue right from where I left off.&amp;quot;&lt;/p&gt;
&lt;p&gt;Holger waited a beat. After a moment, he was certain that these consultants would realize he was pulling their leg.&lt;/p&gt;
&lt;p&gt;Zack was up in a flash and quietly closed the door. Jack leaned across the table towards Holger and asked, &amp;quot;Did you make that on company time? And does anyone here know if you did? Because before we go back into that hallway, I want to buy this off of you.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;You don't have that kind of cash,&amp;quot; Holger said.&lt;/p&gt;
&lt;p&gt;&amp;quot;No, but I can put it on the expense account and then pay it off when I get VC funding,&amp;quot; Jack said.&lt;/p&gt;
&lt;p&gt;Holger spent the next fifteen minutes declining their offers to buy his tool. In the process, he discovered that the consultants had creative and unethical ideas about how to quickly get funding, and that one of them had a trophy wife that would do anything for the kinds of profits they were talking about. &amp;quot;And I do mean &lt;i&gt;anything&lt;/i&gt;,&amp;quot; Zack said with a leer. &lt;!-- Submitter kindly provided a photo. NSFW link: http://bit.ly/afWIM4 --&gt;&lt;/p&gt;
&lt;p&gt;Finally, Holger &amp;quot;confessed&amp;quot;. &amp;quot;Look, you guys are generous and all, but I've already signed a contract with another company. Even if you could beat their offer, I can't break a contract.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Sure you can!&amp;quot; &lt;!-- Oh, here she is on video: http://bit.ly/sex SFW- but barely --&gt;&lt;/p&gt;
&lt;p&gt;Holger left the meeting without any interest in finding out if their company had any openings.&lt;/p&gt;
&lt;!-- Easy Reader Version: Consultants are smart! And expensive! Except that they are dumb. And expensive! --&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/owEPB9aySxcFxEPVgPTiFmgabN0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/owEPB9aySxcFxEPVgPTiFmgabN0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/owEPB9aySxcFxEPVgPTiFmgabN0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/owEPB9aySxcFxEPVgPTiFmgabN0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=U8S4Cq9MtyI:wjILJSYTCOk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/U8S4Cq9MtyI" height="1" width="1"/&gt;</description> 
			<slash:comments>109</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Fast-Fix.aspx</comments>
		</item>
	
		<item>
			<author>Alex Papadimoulis</author> 
			<title>CodeSOD: Command 696</title> 
			<link>http://thedailywtf.com/Articles/Command-696.aspx</link> 
			<category>CodeSOD</category>
			<pubDate>Mon, 30 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6927</guid> 
			<description>&lt;p&gt;Think of all those old applications you&amp;rsquo;ve had to maintain. You know the type: the ones written by long-forgotten developers in long-lost languages. The ones that, after spending days searching for that one line of code that needs to be changed, you frustratingly decree &amp;ldquo;this f%*#@ thing needs to be rewritten.&amp;rdquo; And, naturally, the ones that never are, nor never will be rewritten.&lt;/p&gt;
&lt;p&gt;Call it luck or persistence, but after dozens and dozens of maintenance requests over the years, &lt;b&gt;Israel Brewster&lt;/b&gt; finally was given the opportunity to rewrite an application. From scratch. And the right way, this time. No shoddy VB6 front-end; no horribly-designed SQL Server 2000 (only) database; and certainly no Microsoft Access-based administration tool.&lt;/p&gt;
&lt;p&gt;Though, after his third straight week of digging through form validation logic requirements &amp;ndash; many of which were quadruplicated (or more), inconsistent, and often incorrect &amp;ndash;he&amp;rsquo;s started to question if a rewrite is even possible. Consider, for example, Command 696: a method named that simply because Command1 through Command695 were already taken.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;
Private Sub Command696_Click()

  On Error GoTo Err_Command696_Click

  Dim stDocName As String
  Dim Response As Integer

  If Frame500 = 1 And pax &amp;gt; 37 Then
     MsgBox &amp;quot;CHECK PAX DASH 8 LIMIT 37 SEATS&amp;quot;, vbOKOnly
  Else
  End If
  If Frame500 = 2 And pax &amp;gt; 29 Then
     MsgBox &amp;quot;CHECK PAX DASH 8 LIMIT 29 SEATS&amp;quot;, vbOKOnly
  Else
  End If
  If totalload1 &amp;gt; 2000 Then
     MsgBox &amp;quot;OVERWEIGHT Fwd Shelf &amp;quot;, vbOKOnly
  Else
  End If
  If ttshelf &amp;gt; 1000 Then
     MsgBox &amp;quot;OVERWEIGHT Aft Shelf &amp;quot;, vbOKOnly
  Else
  End If
  If totalload1 + ttshelf &amp;gt; 2000 Then
     MsgBox &amp;quot;OVERWEIGHT Aft Compartment max 2000 lbs &amp;quot;, vbOKOnly
  Else
  End If
  If Frame500 = 1 And totalloadsecd &amp;gt; 0 Then
     MsgBox &amp;quot;DASH 8 WITHOUT SECTION D &amp;quot;, vbOKOnly
  Else
  End If
  If Frame500 = 2 And totalloadsecd &amp;gt; 2150 Then
     MsgBox &amp;quot;OVERWEIGHT SECTION D &amp;quot;, vbOKOnly
  Else
  End If
  If Remaining &amp;lt; 0 Then
    MsgBox &amp;quot;DASH 8 OVERWEIGHT REDUCE LOAD !!!!&amp;quot;, vbOKOnly
  Else
  End If
  If ttload &amp;lt;= 0 Then
    Response = MsgBox(&amp;quot;ARE YOU SURE AFT CARGO COMPARTMENT IS EMPTY!!!!&amp;quot;, vbYesNo)
  Else
   Response = 6
  End If
  If Frame500 = 1 And pax &amp;lt;= 37 And totalload1 &amp;lt;= 2000 And _
     ttshelf &amp;lt;= 1000 And totalloadsecd = 0 And _
     Remaining &amp;gt;= 0 And totalload1 + ttshelf &amp;lt;= 2000 And Response = 6 Then
    stDocName = &amp;quot;csaprintinfo37seats&amp;quot;
    DoCmd.OpenReport stDocName, acPreview
  Else
  End If
  If Frame500 = 2 And pax &amp;lt;= 29 And totalload1 &amp;lt;= 2000 And _
     ttshelf &amp;lt;= 1000 And totalloadsecd &amp;lt;= 2150 And _
     Remaining &amp;gt;= 0 And totalload1 + ttshelf &amp;lt;= 2000 And Response = 6 Then
    stDocName = &amp;quot;csaprintinfo29seats&amp;quot;
    DoCmd.OpenReport stDocName, acPreview

  Else
  End If&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iv_YTLXIPiQUztqix6XojrgT9Vk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iv_YTLXIPiQUztqix6XojrgT9Vk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iv_YTLXIPiQUztqix6XojrgT9Vk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iv_YTLXIPiQUztqix6XojrgT9Vk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=8Wy28sEcVS0:SE-tT_j0KhQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/8Wy28sEcVS0" height="1" width="1"/&gt;</description> 
			<slash:comments>136</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Command-696.aspx</comments>
		</item>
	
		<item>
			<author>Mark Bowytz</author> 
			<title>Error'd: There is No Survey Currently Running</title> 
			<link>http://thedailywtf.com/Articles/There-is-No-Survey-Currently-Running.aspx</link> 
			<category>Error'd</category>
			<pubDate>Fri, 27 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6923</guid> 
			<description>&lt;p&gt;&lt;a name="Pic1a"&gt;&lt;/a&gt;&lt;b&gt;Kristj&amp;aacute;n&lt;/b&gt; writes, &amp;quot;I agree. No, wait...&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic1a"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/mark/errord/082810/Survey.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic1"&gt;&lt;/a&gt;&amp;quot;I got this while doing my online homework for a calculus class I am taking,&amp;quot; wrote &lt;b&gt;Chase P.&lt;/b&gt;, &amp;quot;I mean, it's freaking &lt;strong&gt;42 &lt;/strong&gt;of all numbers - how could it NOT be correct??.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic1"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/mark/errord/082810/42.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic2"&gt;&lt;/a&gt;In order to take over the earth, the Brain hatched a plan where he would sieze control of the world's banking system. The plan was true genius, but like all big plans, he had to start somewhere which, in this case, was to take control of OneWest Bank's QuickPricer.&lt;/p&gt;
&lt;!--Yes, "the Brain" as in "Pinky and the Brain". --&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic2"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/mark/errord/082810/brain.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic3"&gt;&lt;/a&gt;&amp;quot;I know that folks in &lt;a href="http://thedailywtf.com/Articles/Whoa,-Batman!.aspx#PPic2"&gt;Texas&lt;/a&gt; have strong feelings about where they live,&amp;quot; wrote &lt;b&gt;Reinier&lt;/b&gt;, &amp;quot;but I had NO idea that people in South Africa did too!&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic3"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/mark/errord/082810/sharpedge_sa.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic4"&gt;&lt;/a&gt;&amp;quot;I wasn't exactly sure what to do here so,&amp;quot; writes &lt;b&gt;Johann&lt;/b&gt;, &amp;quot;I figured it safest to click on the &amp;quot;X&amp;quot; to close the window, manually restart, and pray for the best&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic4"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/mark/errord/082810/que.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="PPic1"&gt;&lt;/a&gt;&amp;quot;The text translates roughly &amp;quot;Some tray icons can't be shown. There isn't enough space to show all objects in system tray. Uninstall some programs or try to use larger display resolution.,&amp;quot; writes &lt;b&gt;Maar&lt;/b&gt;, &amp;quot;I guess that I'll be able to justify that larger monitor purchase after all!&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic1"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/mark/errord/082810/tray-icons.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="PPic2"&gt;&lt;/a&gt;&amp;quot;I think I'm going to take my chances and say 'no' the extended warranty,&amp;quot; writes &lt;b&gt;Stewart&lt;/b&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic2"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/mark/errord/082810/extendedwarranty.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/A0JTgtyzRG_-z1TYHbCD1k1IZ5E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A0JTgtyzRG_-z1TYHbCD1k1IZ5E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/A0JTgtyzRG_-z1TYHbCD1k1IZ5E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A0JTgtyzRG_-z1TYHbCD1k1IZ5E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=i0eKFqSrhIg:hV8YJ-A2Ja4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/i0eKFqSrhIg" height="1" width="1"/&gt;</description> 
			<slash:comments>66</slash:comments> 
			<comments>http://thedailywtf.com/Comments/There-is-No-Survey-Currently-Running.aspx</comments>
		</item>
	
		<item>
			<author>Mark Bowytz</author> 
			<title>Stoned!</title> 
			<link>http://thedailywtf.com/Articles/Stoned!.aspx</link> 
			<category>Feature Articles</category>
			<pubDate>Thu, 26 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6914</guid> 
			<description>&lt;p&gt;When &lt;strong&gt;Greg&lt;/strong&gt; was shopping for jobs at his college&amp;rsquo;s career fair, there was a whole lot of business as usual.&lt;/p&gt;
&lt;p&gt;The larger banks were on-hand looking to swoon the upcoming Financial grads. Several representatives from a few big name manufacturing corporations were there to interview the&amp;nbsp;Chemistry majors and a few IT firms were on the lookout for&amp;nbsp;the soon-to-be CS grads, like Greg, to add to their ranks. However, amid the ocean of pamphlets and&amp;nbsp; suits there was one aerospace corporation with one particular position that caught Greg&amp;rsquo;s attention. The position that he applied and was ultimately hired for could be summed up in one sentence:&lt;/p&gt;
&lt;p&gt;&amp;ldquo;You&amp;rsquo;ll be testing laser tag games for the military.&amp;rdquo;&lt;/p&gt;
&lt;h3 style="margin-bottom: 0px"&gt;A Dream Come True!...kind of&lt;/h3&gt;
&lt;p style="margin-top: 0px"&gt;Actually, Greg&amp;rsquo;s official title was &amp;ldquo;QA Analyst for Battlefield Training Simulation Systems&amp;rdquo; but the idea of the system being a great big laser tag game really wasn&amp;rsquo;t all that far off the mark.&lt;/p&gt;
&lt;p&gt;The way the existing setup worked was that sensors on a soldier&amp;rsquo;s body vest would detect a &amp;ldquo;hit&amp;rdquo; during the simulation, and would then set off an annoying alarm that could only be turned off with a special key. Once deactivated, the solder was &amp;lsquo;dead&amp;rsquo; for the rest of the training scenario. It all worked, but one big problem with the whole setup was that, to the displeasure of many, a few enterprising soldiers managed to get their hands on and started selling tester keys (also known as &amp;ldquo;God Keys&amp;rdquo;) that allowed soldiers to resurrect themselves and get back into the battle.&lt;/p&gt;
&lt;p&gt;After a number of years of trying to prevent soldiers from exploiting the system and a host of other technical headaches, the military was finally able to replace their system with something a little newer.&lt;/p&gt;
&lt;p&gt;New features like the addition of GPS tracking units, RF data modules reporting hits and their locations and a slew of backend upgrades meant that military trainers could execute more extensive and complex training scenarios and, over time, recoup the costs because the new system was designed to rely on &amp;ldquo;off the shelf&amp;rdquo; 3rd party solutions, but first, these solutions would need to be vetted by QA guys like Greg.&lt;/p&gt;
&lt;h3 style="margin-bottom: 0px"&gt;Getting Stoned&lt;/h3&gt;
&lt;p style="margin-top: 0px"&gt;Like any new hire, Greg was completely pumped and ready to contribute and shake things up his first week, but as time went by, Greg&amp;rsquo;s excitement dwindled when he found that doing QA analysis didn&amp;rsquo;t really involve shooting co-workers with laser guns, but instead was a lot of tedious, hard work with project managers and piled on bureaucracy for good measure.&lt;/p&gt;
&lt;p&gt;In one particular situation they received a firmware update for one of the GPS systems being used in the Player Unit modules.&lt;/p&gt;
&lt;p&gt;While trying to figure out why the latest hardware revision was failing immediately after the first test he noticed that the GPS receiver would send out a burst of garbage every few seconds.&lt;/p&gt;
&lt;p&gt;Puzzled by this he checked and re-checked the connections and tried one of the spare units only to find the same result. Everything seemed like it should fine and the supplier swore there was nothing wrong with their system.&amp;nbsp;Not able to let something like this go, Greg spent many late-night hours pouring through raw dumps of the results and along the way, he began to notice a pattern of the same Hex data repeating in the noise. As he painstakingly translated the hexadecimal into ASCII, he was genuinely surprised upon being greeted with a curious snippet of text.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Your PC is now Stoned!&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;After a&amp;nbsp;quick search on the message, &lt;a href="http://en.wikipedia.org/wiki/Stoned_(computer_virus)"&gt;it all made sense&lt;/a&gt;. Somehow, the firmware upgrade for the GPS system had become infected with a disk boot sector virus, which ran perfectly fine on the embedded processor. Since this virus couldn't write itself to a disk, as there were no floppy drives on the GPS card, it instead sent itself out through the RS-232 port once every 5 seconds in hopes of infecting another computer.&lt;/p&gt;
&lt;p&gt;Greg wrote up his analysis and forwarded it off to the vendor, who quickly (and quietly) issued another update to their firmware, identical to the last except without the virus.&lt;/p&gt;
&lt;p&gt;Upon loading of the updated firmware, Greg noticed the difference immediately and was pleased to see that the vendor's &amp;quot;fix&amp;quot; resolved the &amp;quot;data issue&amp;quot; that he'd reported, however, there was a small catch to this tiny update. You see, preliminary testing for military equipment is a long and detailed process that makes the most draconian corporate processes look positively streamlined.&amp;nbsp; Also, since the magic keyword &amp;quot;virus&amp;quot; had been uttered, QA testing couldn't just pick up where it left off, and couldn't just be for the GPS module.&amp;nbsp; In fact, Greg had to start over at step 1 with added &amp;quot;anti-virus&amp;quot; steps add in for good measure just to be sure.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Zw1OQTC-JZ5HVtPljkCwO662_nc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zw1OQTC-JZ5HVtPljkCwO662_nc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Zw1OQTC-JZ5HVtPljkCwO662_nc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zw1OQTC-JZ5HVtPljkCwO662_nc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=MgvR8ux9o74:vBPBTQyEqWo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/MgvR8ux9o74" height="1" width="1"/&gt;</description> 
			<slash:comments>85</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Stoned!.aspx</comments>
		</item>
	
		<item>
			<author>Alex Papadimoulis</author> 
			<title>CodeSOD: Masquerading as a Loop</title> 
			<link>http://thedailywtf.com/Articles/Masquerading-as-a-Loop.aspx</link> 
			<category>CodeSOD</category>
			<pubDate>Wed, 25 Aug 2010 15:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6920</guid> 
			<description>&lt;p&gt;&amp;quot;While digging through some inherited code,&amp;quot; writes &lt;b&gt;Joe &amp;quot;M2tM&amp;quot; Smith&lt;/b&gt;, &amp;quot;I encountered a conditional masquerading as a loop.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Thankfully, the fellow responsible is 'no longer with us', and I suppose this type of code stands as silent testament to why. This interesting loop is only created so the break keyword can be used as an elaborate GOTO.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;
bool bCreateModel = false;
for (;;)
{
    if (!pModel)
    {
        bCreateModel = true;
        break;
    }

    if (asModelParts.GetSize() != asModelPartsToLoad.GetSize())
    {
        bCreateModel = true;
        break;
    }

    for (UINT32 i = 0; i &amp;lt; asModelPartsToLoad.GetSize(); ++i)
    {
        if (asModelPartsToLoad[i] != asModelParts[i])
        {
            bCreateModel = true;
            break;
        }
    }

    break;
}&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VV0s97SS9L48M7YiGudPWPTKDQY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VV0s97SS9L48M7YiGudPWPTKDQY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VV0s97SS9L48M7YiGudPWPTKDQY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VV0s97SS9L48M7YiGudPWPTKDQY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=30tkBKH1w0o:af3OLn_4zBM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/30tkBKH1w0o" height="1" width="1"/&gt;</description> 
			<slash:comments>120</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Masquerading-as-a-Loop.aspx</comments>
		</item>
	
		<item>
			<author>Remy Porter</author> 
			<title>Large Blockage</title> 
			<link>http://thedailywtf.com/Articles/Large-Blockage.aspx</link> 
			<category>Feature Articles</category>
			<pubDate>Tue, 24 Aug 2010 14:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6918</guid> 
			<description>&lt;p&gt;The words &amp;quot;Enterprise Integration&amp;quot; strike fear into the most stalwart of developers. When coupled with &amp;quot;in-house developed&amp;quot; and &amp;quot;B2B&amp;quot;, one is almost guaranteed to find complex code, arcane requirements, and a thicket of poorly understood file formats. &lt;strong&gt;Dan&lt;/strong&gt; was made of sterner stuff. When the contract was explained to him, he didn't flinch. There were between 40 and 80 partners that used a web app to extract data about multimedia assets? Gigantic recordsets of them? In formats ranging from Excel to iTunes-compatible databases? No problem.&lt;/p&gt;
&lt;p&gt;Steve, the project manager, explained: &amp;quot;Our original lead developer was one of those rockstar types. &lt;!-- In my head, this rockstar is played by Jack Black, and is currently impersonating a substitute teacher working for Joan Cusak. --&gt;Real cutting edge, pushing the envelope type guy. He's since moved on to bigger and better things, so we've just muddled on the best we could. We really need you to step up and take on that rockstar role for us, because there are a few problems we'd like you to fix. And we need a real quick turn-around on this.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;What sort of problems?&amp;quot; Dan asked. &lt;!-- Don't laugh. You totally think Joan Cusak is hot. --&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;Well, these exports take hours. That's expected- it's a huge pile of data- but some of our partners are complaining that it crashes on them near the end of the job. So they have to start all over. Hours wasted. That's the big thing, but some of our other developers suggest that you try and do a little 'refactoring'?&amp;quot; Steve used air-quotes and a look of incomprehension to convey the question. &amp;quot;They said it should help make maintenance cheaper. Is that right?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;It could,&amp;quot; Dan said. &amp;quot;Let me see your documentation and the code, and I'll see what I can do.&amp;quot; &lt;!-- See, you keep trying to deny it, but you're not fooling anyone. --&gt;&lt;/p&gt;
&lt;p&gt;They only had code. Dan opened the solution up in Visual Studio and started poking around. He looked for any classes that were responsible for exporting. He expected to see a whole family of them tied together through inheritance, probably named something like &amp;quot;XMLExport&amp;quot;, &amp;quot;ITunesExport&amp;quot;, or something equally transparent.&lt;/p&gt;
&lt;p&gt;He didn't find a family of classes. In fact, he didn't find &lt;i&gt;any&lt;/i&gt; classes. The entire project was lacking in any code or code behind files- not a single &amp;quot;.cs&amp;quot; in sight. Not even a &amp;quot;.vb&amp;quot;. The only likely candidate was &amp;quot;Export.aspx&amp;quot;. &lt;!-- Are you ready to fess up yet? C'mon. I checked your computer. Joan is totally in your spank bank. Yes, even in yours, the one female TDWTF reader. --&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;Do I have the right code?&amp;quot; Dan wondered, thinking there must be some class library he was missing. Dan double-clicked on &amp;quot;Export.aspx&amp;quot; and waited for the file to open. And waited. The HDD rattled away; its noise covered up the faint sound of Visual Studio sobbing to itself. By the time Dan finished his cup of coffee, the file appeared on the screen. Dan skipped down to the postback event handler, which was wedged in-line between the opening &amp;lt;body&amp;gt; and the page heading. It took Visual Studio over a minute to repaint the screen.&lt;/p&gt;
&lt;p&gt;At four levels of indentation under the event handler, there was a &lt;code&gt;switch&lt;/code&gt; statement. This statement simply checked which button was clicked. The first case, for &amp;quot;__exportButton&amp;quot; contained a twenty-five thousand line block of if/else statements.&lt;/p&gt;
&lt;p&gt;&amp;quot;Oh, this can't be right,&amp;quot; Dan wished. &amp;quot;This must be old code. Or some obscure branch used for&amp;hellip; for&amp;hellip; for hazing the new guy.&amp;quot; He checked SVN. There was only one branch and the most recent check-in was from the day before, with the comment, &amp;quot;changed XML date format for iTunes export.&amp;quot;&lt;/p&gt;
&lt;p&gt;Dan patted Visual Studio's shoulder and tried to console it by closing every other application running, to free up some RAM. He and Visual Studio, both on the verge or crashing, struggled to read through the document together. &lt;!-- Correction: I've been informed that there are two female TDWTF readers. --&gt;&lt;/p&gt;
&lt;p&gt;At the start of the event handler was this:&lt;/p&gt;
&lt;blockquote&gt;&lt;code&gt;
&lt;pre&gt;//Server.ScriptTimeout = 3600;
//Server.ScriptTimeout = 10800;
Server.ScriptTimeout = 21600; //six hours should probably be enough. If it keeps crashing, raise this.&lt;/pre&gt;
&lt;/code&gt;&lt;/blockquote&gt;
&lt;p&gt;The code went downhill from there. The actual export logic in the twenty-five thousand line block contained batches of hard-coded SQL queries- they all varied slightly, but not much, and it was hard to spot the differences. For each SQL query executed, a new database connection was opened. The block responsible for closing them all, was near the end, and looked something like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;code&gt;
&lt;pre&gt;oldCnon.Dispose();
db1a.Dispose();
dbMain.Dispose();
db1.Dispose();
connCore.Dispose();
newConn.Dispose();&lt;/pre&gt;
&lt;/code&gt;&lt;/blockquote&gt;
&lt;p&gt;Once a connection was opened, it stayed opened until the export job completed. There were copy/pasted blocks that repeated the same code again and again, although over time, they had drifted apart so they weren't exactly the same anymore, but mostly. The web page itself handled all of the file I/O, the communication with Excel Interop libraries. One of the XML formats was generated, not by using the XmlWriter object, but by concatenating a pile of strings together. &lt;span title="click me!" onclick="cornify_add();return false;"&gt;The entire pile was topped off with a bow&lt;/span&gt;&lt;script type="text/javascript" src="http://www.cornify.com/js/cornify.js"&gt;&lt;/script&gt;- the &amp;quot;bow&amp;quot; meaning &amp;quot;only one exception handler for the entire block&amp;quot;. The single &lt;code&gt;catch(Exception ex)&lt;/code&gt; responded to any error that could possibly happen in that 25,000 line thicket. Its response was to simply print out the informative, &amp;quot;An error has occured&lt;i&gt;(sic)&lt;/i&gt;. Please correct your request and try again.&amp;quot;&lt;/p&gt;
&lt;p&gt;Dan wasn't even sure where to start. For the heck of it, he upped the script timeout from 21600 to 43200. He checked that minor change in with the comment, &amp;quot;This should fix timeouts for the foreseeable future,&amp;quot; and then started trying to get a grip on how to pry this pile of spaghetti apart and turn it into supportable code.&lt;/p&gt;
&lt;p&gt;The next day, he was elbow deep in &amp;quot;Export.aspx&amp;quot;'s entrails when Steve interrupted. &amp;quot;Hey, Dan!&amp;quot; Steve beamed. &amp;quot;Great work on fixing that bug. I saw your check-in, gave it a spin, and promoted it to production. Fantastic turn-around time on that. Look, since you're done, we've got a lot of other projects that could use some TLC- can I move you onto one of those?&amp;quot;&lt;/p&gt;
&lt;!-- Easy Reader version: See Dan open up code. The code is bad code. Steve wants Dan to fix it. Dan starts to, but Steve decides its fixed enough, and pushes the good code to production. --&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YE1x-jOHuKUAWzh3KAFa5sYu0Zs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YE1x-jOHuKUAWzh3KAFa5sYu0Zs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YE1x-jOHuKUAWzh3KAFa5sYu0Zs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YE1x-jOHuKUAWzh3KAFa5sYu0Zs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=aXsHZIOFUyE:GQcodg8mALM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/aXsHZIOFUyE" height="1" width="1"/&gt;</description> 
			<slash:comments>132</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Large-Blockage.aspx</comments>
		</item>
	
		<item>
			<author>Scott Selikoff</author> 
			<title>CodeSOD: Swallowed by the Beast</title> 
			<link>http://thedailywtf.com/Articles/Swallowed-by-the-Beast.aspx</link> 
			<category>CodeSOD</category>
			<pubDate>Mon, 23 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6919</guid> 
			<description>&lt;p&gt;&lt;strong&gt;Paul&lt;/strong&gt; was having a good morning.&amp;nbsp; It was a beautiful day outside, he managed to shave 15 minutes off his commute, and even the local coffee shop had his favorite donut in stock.&amp;nbsp; All of that changed when he got his first support call of the day.&amp;nbsp; It was from a client running &amp;quot;the beast&amp;quot; product.&amp;nbsp; &amp;quot;The beast&amp;quot;, as Paul and his coworkers nicknamed it, was a legacy version of their application developed somewhere overseas years before Paul was hired, by hundreds of poorly trained, and probably poorly paid, developers.&amp;nbsp; The company's sales team actively encouraged clients to upgrade from the legacy application, but a select few had resisted.&lt;/p&gt;
&lt;p&gt;&amp;quot;The beast&amp;quot; had a reputation for containing some of the worst code Paul had ever seen and every time he had to support it, he felt like he needed a shower afterwards.&amp;nbsp; It was during his fourth hour of debugging that Paul came across a previously unvisited function shown below.&amp;nbsp;&lt;/p&gt;
&lt;pre name="code" class="java"&gt;
public boolean isWidgetReferenced(int widgetId) {
	boolean available = false;

	try {
		String query;
		ResultSet rs = null;
		int count = 0;

		Connection connection = getConnection();
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_REGION WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}
		if (0 &amp;lt; count) return false;

		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_OFFERING WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}
		if (0 &amp;lt; count) return false;

		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_ORDERS WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_NEW WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_HISTORY WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_STATS_RECORDED WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_VIEWED WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_SETS WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_INSTALLED WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_PENDING WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;
		query = &amp;quot;SELECT COUNT(*) FROM WIDGET_JOURNAL WHERE widgetId=&amp;quot; + widgetId;
		rs = connection.createStatement().executeQuery(query);
		for (; rs.next();) {
			count = rs.getInt(1);
			break;
		}

		if (0 &amp;lt; count) return false;

		available = true;
	} catch (Exception e) {
		logger.error(&amp;quot;isWidgetAvailable&amp;quot;, e);
	}

	return available;
}&lt;/pre&gt;
&lt;p&gt;
&lt;link type="text/css" rel="stylesheet" href="http://img.thedailywtf.com/images/mark/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" /&gt; &lt;script language="javascript" src="http://img.thedailywtf.com/images/mark/dp.SyntaxHighlighter/Scripts/shCore.js"&gt;&lt;/script&gt; &lt;script language="javascript" src="http://img.thedailywtf.com/images/mark/dp.SyntaxHighlighter/Scripts/shBrushJScript.js"&gt;&lt;/script&gt; &lt;script language="javascript"&gt;
dp.SyntaxHighlighter.ClipboardSwf = 'http://img.thedailywtf.com/images/mark/dp.SyntaxHighlighter/Scripts/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Paul wasn't sure what bothered him the most: that the developer had used a strangely formed for() loop on a structure that always returned exactly one record; that the integer count could have been implemented as a boolean; or that the pattern had been repeated 10 times in this file and dozens of times in other files.&amp;nbsp; As it turns out, the root cause of the issue was unrelated to the sheer amount of repetitive code.&amp;nbsp; Had the developer taken the time to clean up this function, they might have noticed that they never closed any of the JDBC connection resources defined in the method.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xXYtAWYCOJj4Bt-rNXn-3NRDYHk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xXYtAWYCOJj4Bt-rNXn-3NRDYHk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xXYtAWYCOJj4Bt-rNXn-3NRDYHk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xXYtAWYCOJj4Bt-rNXn-3NRDYHk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=gOZVoqQ045g:sbG2GS3o9zo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/gOZVoqQ045g" height="1" width="1"/&gt;</description> 
			<slash:comments>108</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Swallowed-by-the-Beast.aspx</comments>
		</item>
	
		<item>
			<author>Alex Papadimoulis</author> 
			<title>Error'd: Logon-ing Off</title> 
			<link>http://thedailywtf.com/Articles/Logoning-Off.aspx</link> 
			<category>Error'd</category>
			<pubDate>Fri, 20 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6898</guid> 
			<description>&lt;p&gt;&lt;a name="Pic5"&gt;&lt;/a&gt;&lt;b&gt;Andrew Carpenter&lt;/b&gt; writes, &amp;quot;I guess this is like turn-oning off a switch?&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic5"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/logon%20in%20and%20off.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic1"&gt;&lt;/a&gt;&amp;quot;While trying to signup for a Windows Live account, I found myself without my best friend Neil,&amp;quot; wrote &lt;b&gt;Rob&lt;/b&gt;, &amp;quot;unfortunately, my second-best friend Ray, third-best friend Jane, and fourth-best friend Tom are also excluded.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic1"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/dwtf_windows_live_hates_neil.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic2"&gt;&lt;/a&gt;&amp;quot;I got this rather odd message when trying to install the Evo Java client,&amp;quot; wrote &lt;b&gt;Nick Edwards&lt;/b&gt;, &amp;quot;I clicked OK and it worked... even though I wasn't SURE_IT_WORKS!&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic2"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/evo.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic3"&gt;&lt;/a&gt;&amp;quot;I'm not sure why Google would omit entries and return zero results,&amp;quot; &lt;b&gt;Michael&lt;/b&gt; noted, &amp;quot;clicking on the link, I received 0 omitted results which were indeed very similar.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic3"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/GoogleMessage.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic4"&gt;&lt;/a&gt;&amp;quot;YUM!! Blank Insert bear claws,&amp;quot; wrote &lt;b&gt;Matthew Sowders&lt;/b&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic4"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/IMG_0209.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="PPic1"&gt;&lt;/a&gt;&amp;quot;This came up while configuring Neverwinter Nights on my PC,&amp;quot; &lt;b&gt;Ville Rastas&lt;/b&gt; writes, &amp;quot;I was worried the game might not support today's high resolution screens, but I guess it's quite the opposite.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic1"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/nwn_config.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="PPic2"&gt;&lt;/a&gt;&amp;quot;I knew IKEA has some funny names on it's furniture,&amp;quot; writes &lt;b&gt;Patrik&lt;/b&gt;, &amp;quot;but who knew they were into the new fashion trend of nerd chic?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic2"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/sofa%20null.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="PPic3"&gt;&lt;/a&gt;&amp;quot;&lt;a href="http://www.virgin.net/allyours/bbandphone/index.html"&gt;According to Virgin Mobile&lt;/a&gt;,&amp;quot; writes &lt;b&gt;Glenn Jones&lt;/b&gt;, &amp;quot;Unlimited is twice as big as 10G (so maybe around 20G), except for videos where Unlimited is only 1.3 times 10G.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic3"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/virginmedia.PNG" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fkXAa-00536h7BzpH0_D1aLpMno/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fkXAa-00536h7BzpH0_D1aLpMno/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fkXAa-00536h7BzpH0_D1aLpMno/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fkXAa-00536h7BzpH0_D1aLpMno/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=sJ7jkyt4bwQ:tV9mDr8bLDE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/sJ7jkyt4bwQ" height="1" width="1"/&gt;</description> 
			<slash:comments>158</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Logoning-Off.aspx</comments>
		</item>
	
		<item>
			<author>Mark Bowytz</author> 
			<title>Is Your PC Frozen?</title> 
			<link>http://thedailywtf.com/Articles/Is-Your-PC-Frozen.aspx</link> 
			<category>Feature Articles</category>
			<pubDate>Thu, 19 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6915</guid> 
			<description>&lt;p&gt;&lt;b&gt;Bob&lt;/b&gt; was in the process of shutting down a software company that he had built over the past seven years. He had found a buyer for all of the software that he'd developed, collected his &amp;quot;eff you money&amp;quot; and was now retiring.&lt;/p&gt;
&lt;p&gt;In fact, things were at the point where Bob had already closed the building and redirected the phones to his home phone with a distinctive ring so that he could tie up loose ends while the building was up for sale.&lt;/p&gt;
&lt;p&gt;Bob woke one morning at 8:00am to the phone ringing, crawled out of bed &lt;!-- in his underwear (Rereading, this is just TMI...envisioning older gent in tighty whities...mmmnothanks - MarkB) --&gt;and picked up the &amp;lsquo;Bat Phone,' as he called it, in the living room.&lt;/p&gt;
&lt;p&gt;&amp;quot;Hello?&amp;quot; Bob said, and gave the name of the company.&lt;/p&gt;
&lt;p&gt;Without preamble or introduction, Bob was informed by a woman's voice, &amp;quot;Hi this is Sally Brumbaker, my user id is smb1985. My computer's frozen.&amp;quot;&lt;/p&gt;
&lt;p&gt;Bob didn't recognize the voice and certainly not the name. Also, it was before coffee. &amp;quot;Your computer's frozen?&amp;quot; Bob affirmed.&lt;/p&gt;
&lt;p&gt;&amp;quot;Yes.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Is the side cold?&amp;quot; Bob asked matter of factly.&lt;/p&gt;
&lt;p&gt;&amp;quot;Wait a minute,&amp;quot; replied Sally, and then after a pause, &amp;quot;No not at all.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Ok, then,&amp;quot; Bob assured her. &amp;quot;Your computer's not frozen, then, it's probably just running a program. Give it a minute.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;I don't understand, what do&amp;hellip;&amp;quot; the woman began, and then, &amp;quot;Oh, ok. There is goes.&amp;quot; and that, she hung up the phone and Bob did the same, thinking about how much cream to put into his coffee.&lt;/p&gt; &lt;!-- This was a serious decision.  You see, normally, Bob used some Amaretto flavored stuff his wife bought which tasted alright but was just sweet enough that he didn't need to add sugar, which he figured was healthy-ish for coffee. He knew how much to add by the color the coffee turned after adding the creamer. (Ed. Side note - ever notice how cool it looks when creamer 'billows' up when you add it to coffee? I rarely get to see this at work where I drink most of my coffee - we only get the cheap powdered stuff. Whatev. -MB) Anyhoo, the other day they were sold out of flavored creamer and his wife picked up some half n half instead. Bob didn't mind - after all, creamer is creamer to Bob.  In the end, he went with two spoonfuls of sugar and just enough half and half to cover up the sugar.  On his second cup though, he went for a little more half and half and a little more sugar to smooth things out enough to make it taste just right.  That afternoon, Bob went to the store and bought the Amaretto stuff he was used to and never. Looked. Back. --&gt;
&lt;h3&gt;THREE MONTHS LATER&lt;/h3&gt;
&lt;p&gt; The &amp;lsquo;Bat Phone&amp;rsquo; rings. Though the company had long been put to bed, Bob was suddenly reminded of was that he&amp;rsquo;d forgotten to stop the phone service.&lt;/p&gt;
&lt;p&gt;&amp;quot;Hello?&amp;quot; Bob asked, and with a little hesitation, gave the name of his (now non-existent) company.&lt;/p&gt;
&lt;p&gt;&amp;quot;Hello,&amp;rdquo; introduced the caller in a very serious tone, &amp;ldquo;I need to speak to someone in charge of your technical support.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Well, that's pretty much me,&amp;rdquo; replied Bob, &amp;ldquo;What do you need?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Did you or someone working for you tell Sally So-And-So that she could tell if a computer was frozen by feeling the side?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;What?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Sally says she called this number three months ago, and was informed by a support tech that she could tell if a PC was frozen by feeling for the side being cold. Since then, she's been feeling the sides of people's computers, and she's completely humiliated.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Sally works in your IT department?&amp;quot; Bob asked.&lt;/p&gt;
&lt;p&gt;&amp;quot;No, Sally is the Director of our human resources department,&amp;quot; Bob was informed.&lt;/p&gt;
&lt;p&gt;&amp;quot;And this is...?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;I sit on the board for Plainston-Princeboro Teaching Hospital.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;I see. So, Sally hires doctors and nurses.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;She does - and now she's been humiliated by you or someone at your company,&amp;rdquo; huffed the voice on the phone,&amp;rdquo; What do you have to say for yourself?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Well, first,&amp;quot; Bob answered, &amp;quot;I'd like to say that, if I get seriously hurt, I'll drag myself right past YOUR hospital.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;WHAT!?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Sir,&amp;quot; Bob said, with great sincerely, &amp;quot;you have to admit, that's pretty dumb.&amp;quot;&lt;/p&gt;
&lt;p&gt;Suddenly, the man on the other end of the line was at a sudden loss for words.&lt;/p&gt;
&lt;p&gt;&amp;quot;Ok,&amp;quot; he said finally, a little deflated, &amp;quot;Sally isn't the most computer savvy person we have, but that doesn't give you the right to prey on her...&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Sir,&amp;quot; Bob said, &amp;quot;I took that call, Sally didn't identify herself, and as soon as she thought she had an answer from me, she hung up the phone before I could explain that I was kidding. I'm sorry if I humiliated her, but I have no idea how she got my number and this isn't a computer technical support company.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Oh, I see,&amp;quot; the person informed Bob. &amp;quot;We&amp;rsquo;ll, just be more careful, next time,&amp;rdquo; and with that, hung up the phone.&lt;/p&gt;
&lt;p&gt;Since then, Bob disconnected the &amp;lsquo;Bat Phone&amp;rsquo; for good, officially severing himself from his old life, but still gets a chuckle thinking of a smartly dressed executive going through the hospital, troubleshooting issues by feeling the sides of PC's and telling their users whether they were frozen of not.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VoVS8lJQpGfvoLwcNyVgLkZLat4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VoVS8lJQpGfvoLwcNyVgLkZLat4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VoVS8lJQpGfvoLwcNyVgLkZLat4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VoVS8lJQpGfvoLwcNyVgLkZLat4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=0okAaECPt5A:ECRQeuSQVFc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/0okAaECPt5A" height="1" width="1"/&gt;</description> 
			<slash:comments>203</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Is-Your-PC-Frozen.aspx</comments>
		</item>
	
		<item>
			<author>Alex Papadimoulis</author> 
			<title>CodeSOD: Avoiding Magic Constants</title> 
			<link>http://thedailywtf.com/Articles/Avoiding-Magic-Constants.aspx</link> 
			<category>CodeSOD</category>
			<pubDate>Wed, 18 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6911</guid> 
			<description>&lt;p&gt;Everyone knows that &amp;quot;Magic Numbers&amp;quot; are bad, Bad, BAD! Take, for example, dividing something into quarters. Because including the literal &amp;quot;4&amp;quot; in your code would be a Magic Number, many developers agree that it's best to define a constant named &amp;quot;FOUR&amp;quot;, and then use that constant instead. Makes sense, right?&lt;/p&gt;
&lt;p&gt;Wrong! The problem with using &amp;quot;FOUR&amp;quot; is that, like &amp;quot;4&amp;quot;, it's a &lt;em&gt;Magic Constant&lt;/em&gt;. While not nearly as bad as Magic Numbers, Magic Constants certainly aren't elegant. Fortunately, &lt;b&gt;Allen's&lt;/b&gt; colleague has provided us all with a valuable lesson the proper use of Magic and Non-Magic constants. Read it, and learn.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;
public class Constants {

    ...

    public static final int FOUR = 4;
    public static final int THREE = 3;

    public static final int INTEGER_FOUR = 4;
    public static final int INTEGER_FIVE = 5;
    public static final int INTEGER_ONE = 1;
    public static final int LENGTH_FOUR = 4;
    public static final int LENGTH_FIVE = 5;
    public static final int LENGTH_SEVEN = 7;
    public static final int LENGTH_EIGHT = 8;
    public static final int LENGTH_NINE = 9;
    public static final int LENGTH_ELEVEN = 11;
    public static final int LENGTH_TWELVE = 12;
    public static final int LENGTH_EIGHTEEN = 18;
    public static final int LENGTH_FIFTEEN = 15;
    public static final int ONE = 1;
    public static final int INTEGER_FIVE = 5;
    public static final int INTEGER_ONE = 1;
    public static final int PLUS_ONE = 1;
    public static final int INTEGER_THREE = 3;

    public static final Long LONG_VALUE_TEN = Long.valueOf(10);
    public static final Long LONG_VALUE_ZEARO = Long.valueOf(0);

    public static final BigDecimal BIGDECIMAL_ZERO = new BigDecimal(0);
    public static final BigDecimal BIGDECIMAL_ONE = new BigDecimal(1);

    public static final BigDecimal NEGATIVE_NUMBER_ONE = new BigDecimal(-1);

    public static final int COMPARE_RESULT_ZERO = 0 ;
    public static final int COMPARE_RESULT_ONE = 1 ;
    public static final int COMPARE_RESULT_NEGATIVE = -1 ;

    ...

    public static final String NINE_STRING = &amp;quot;9&amp;quot;;
    public static final String ONE_STRING = &amp;quot;9&amp;quot;;

}




&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Z00qwOxjvF1djeTG_HJ4mHAb3Js/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z00qwOxjvF1djeTG_HJ4mHAb3Js/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Z00qwOxjvF1djeTG_HJ4mHAb3Js/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z00qwOxjvF1djeTG_HJ4mHAb3Js/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=pQAx1yJHfa8:01oTjz-9By0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/pQAx1yJHfa8" height="1" width="1"/&gt;</description> 
			<slash:comments>231</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Avoiding-Magic-Constants.aspx</comments>
		</item>
	
		<item>
			<author>Remy Porter</author> 
			<title>Powerful Stupidity</title> 
			<link>http://thedailywtf.com/Articles/Powerful-Stupidity.aspx</link> 
			<category>Feature Articles</category>
			<pubDate>Tue, 17 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6913</guid> 
			<description>&lt;p&gt;Everything went dark and a chill wind went up &lt;b&gt;Simon&lt;/b&gt;'s back. A deep rumble rattled his brain in his skull. He glanced behind him to see Noel looming over him. &amp;quot;Simon, can you ping the Exchange server?&amp;quot;&lt;/p&gt;
&lt;p&gt;When the trained bear that doubles as your IT manager asks that question, it's a bad thing. Simon tried to ping Exchange and failed. He then tried to ping an app server. And a database. And the outside world. All dead. &lt;!-- Yes! Dead! Everyone you know and love, DEAD. Even yourself- the outside world was DEAD! Wait… no… that's a Cory Doctorow short story. --&gt;&lt;/p&gt;
&lt;p&gt;About a thousand users were about to discover that the only IT asset they could access were their desktop computers. Shortly thereafter, the phone next to them was going to ring. The person at the other end would likely scream. And then it would ring again. The ringing and screaming would continue until the network was back up.&lt;/p&gt;
&lt;p&gt;They hustled to the server room, with Noel's bulk clearing a path through the corridor. It was hectic, and he may have trampled an intern. In one corner of the server room, a jump-suited man with a tool-belt bobbed his head to the music in his earphones. The server room was so quiet that the two could actually hear his music from across the room.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;i&gt;What have you done?&lt;/i&gt;&amp;quot; Noel rumbled. The ominous wave of fury failed to penetrate the shield of Lady Gaga songs the electrician had surrounded himself with. Noel closed on him and repeated the question, with more volume and a heavy hand on the shoulder.&lt;/p&gt;
&lt;p&gt;Once he had the electrician's attention, he didn't wait for an answer. &amp;quot;I will tell you what you have done,&amp;quot; Noel said, &amp;quot;since you obviously do not understand. You are drilling away into a little metal box that is labeled &lt;span title="click me!" onclick="cornify_add();return false;"&gt;'Uninterruptible Power Supply'&lt;/span&gt;&lt;script type="text/javascript" src="http://www.cornify.com/js/cornify.js"&gt;&lt;/script&gt;, rendering it quite interruptible and cutting power to the room.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;I&amp;hellip; I'll fix it&amp;hellip;&amp;quot; the electrician managed to croak out.&lt;/p&gt;
&lt;p&gt;He set to work. Noel set to work as well by providing a profanity laden commentary on the level of failure the electrician had just wreaked, how many tens of thousands of dollars of equipment the electrician had probably damaged, how many users were useless at the moment.&lt;/p&gt;
&lt;p&gt;The electrician worked through the tirade, which says good things about his saving throw versus intimidation, even if his saving throw against stupidity left something to be desired. With a sigh of relief, he flipped the circuit breaker. Green blinking lights and the sounds of whirring disks filled the room.&lt;/p&gt;
&lt;p&gt;Then the breaker clunked back into position. The servers rattled back to silence. An expensive sounding clunk came from a hard drive somewhere in the room.&lt;/p&gt;
&lt;p&gt;&amp;quot;I'll fix it!&amp;quot; the electrician squeaked. After a frantic adjustment, he flipped the breaker again. The show repeated itself, although the encore added some sparks in the UPS. The third time the electrician reached for the breaker, Noel nearly broke his hand off.&lt;/p&gt;
&lt;p&gt;&amp;quot;I think that's enough of that for the day,&amp;quot; Noel warned.&lt;/p&gt;
&lt;p&gt;&amp;quot;The&amp;hellip; the breaker can't handle the load?&amp;quot;&lt;/p&gt;
&lt;p&gt;Noel ignored the electrician and turned to Simon. &amp;quot;Do you think I can heave him up to the ceiling?&amp;quot; Simon looked up, and fifteen feet away, he saw the spare &lt;a href="http://en.wikipedia.org/wiki/File:Mated-16A-Plug-And-Socket.jpg"&gt;pin-and-sleeve-plugs&lt;/a&gt; that had been installed to power future expansion.&lt;/p&gt;
&lt;p&gt;Since the electrician didn't have a ladder&amp;nbsp;-- and since Noel's throwing arm wasn't up to the task --&amp;nbsp;Simon clambered on his back. One egregious violation of the health-and-safety policy later, the server room was on a different circuit. A round of cajoling, screaming and cursing brought the servers back online, although a few HDDs were trashed. Noel's blood-pressure receded to something slightly less than the water pressure in the Challenger Deep, and Simon drafted a thoroughly plausible explanation as to why there were shoe prints above head level.&lt;/p&gt;
&lt;p&gt;The root-cause for the debacle was traced back to Building Facilities. The server room, normally accessible only to sever admins and the facilities manager, contained an emergency power-off switch. Despite the fact that all of those people were quite clear about the purpose of the switch, and that it was clearly marked, someone with pointy-hair had deemed it an &amp;quot;unacceptable&amp;quot; risk, and decided to do an end-run past change-control to &amp;quot;fix&amp;quot; it. After all, if left unfixed, someone might cut off power to the server room and damage the equipment.&lt;/p&gt;
&lt;!-- Easy Reader Version: See Noel and Simon in the dark. Noel and Simon change a plug, and they are not in the dark. --&gt;&lt;!-- For reference, here is "Simon"'s original submission, uneditted and modified:
The Big Red Button
“Simon, can you ping the exchange server?”
I wrestled myself away from thedailywtf.com to open a command prompt and perform the necessary.
“No Noel, I can’t” I said, growing concerned. Exchange servers work at their finest when they are contactable.
“Simon, can you ping the file server?”
I tapped. Request timed out. “No Noel, I can’t.” I checked an app server. Same result.
“Noel – “ I turned to my left to discuss possible root causes and best strategies. I found an overturned wheelie chair and a heavyset yet determined man travelling towards the server room at a not inconsiderable pace.  I quickly considered my options. Soon, close to two hundred of our dear users would discover that the internet was no longer accessible. Shortly thereafter they’d discover that work was impossible. To be the sole sysadmin at base camp in such a situation is unwise. I ran to the secure server room and sealed the door behind me.
Inside I found the stream of language I’d hoped to avoid outside. Noel was shouting at a wall in a manner that was likely to cause spontaneous animation, followed shortly by the first building-led workplace harassment claim. This was growing odd and I was still relatively new to the organisation. I edged closer.
Noel’s bulk was concealing an electrician. A terrified electrician, the colour of a monthlong South African vacation recently drained from his face. He cowered, clutching a drill with a grip implying he no longer knew how to release the hand.
“What in the name of sanity had you drilling into a metal box with uninterruptible power supply clearly labelled on it? You cut power to the whole room!”
Noel ran out of swear words for just long enough to accidentally update me on the root cause. He then tapped into a previously unused reserve of profanity and continued with renewed vigour.
Time passed.
Parentage was questioned.
An anatomically impossible suggestion was made involving the drill.
I tried the power switch on a nearby backup drive. No joy.
“Noel, still no juice!” I said, wary while interrupting him midstream. I’ll spare the gentle reader Noel’s exact phrasing, suffice it to say he did not welcome the news.
Our electrician may have been motivated by a sense of professionalism. I feel it more likely he was spurred on by fear of Noel. Whatever the cause he made a sudden and unexpected dart for the circuit breaker, flipping a switch and causing a crescendo of flashing lights and churning disks. Noel stopped.
“Right Simon, this is gonna be messy. Odds are not all of them will come up and the sales guys are probably shouting by now. We’ll have to...”
Noel stopped, listening. It was quiet. A little too quiet. The noise that failed to envelop us was noted as entirely unlike what one would expect spinning discs to make. The loose change in our electrician’s pocket jangled as he shook. He flipped the circuit breaker again. Same result. His hand reached for the third attempt but was stayed by Noel. Servers don’t especially enjoy unexpected powerdowns and it was Noel’s opinion that one every few minutes would increase his workload unduly.
“It can’t handle the load” was the reasoned root cause as identified by our electrician. Noel looked to the ceiling. Some fifteen feet above us ran the twist in plugs feeding power to the organisation’s IT infrastructure. A large man, in his kinder moments he referred to me as a skinny runt who probably had worms. Without saying anything I realised I would be the one to rise to the challenge in a rather literal sense. He still objected when I stood on his shoulder, but seemed much relieved when we restored power, one bay at a time.
So what was the root cause? The facilities department had learned of the existence of a large red emergency power stop button by the server room main entrance. True, the room was accessible to only seven and we were fully briefed as to its presence and function, but this was deemed an unacceptable risk. They decided a cover was required, and required urgently. So urgently in fact that they broke change control and sent in an electrician to work on a live power box at 3pm on a Thursday afternoon. Since then the electrician moved on, facilities were barred from entering unescorted, Noel’s blood pressure declined and I drafted a thoroughly plausible explanation as to why my shoeprints could be found above the two metre level.
--&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/j9vR4pyC4oXl52AmX6l2RZvq0Y4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j9vR4pyC4oXl52AmX6l2RZvq0Y4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/j9vR4pyC4oXl52AmX6l2RZvq0Y4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j9vR4pyC4oXl52AmX6l2RZvq0Y4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=0XkvSvtU9EY:cAHGTzQmYE8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/0XkvSvtU9EY" height="1" width="1"/&gt;</description> 
			<slash:comments>211</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Powerful-Stupidity.aspx</comments>
		</item>
	
		<item>
			<author>Alex Papadimoulis</author> 
			<title>CodeSOD: Role-based Canary</title> 
			<link>http://thedailywtf.com/Articles/Rolebased-Canary.aspx</link> 
			<category>CodeSOD</category>
			<pubDate>Mon, 16 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6910</guid> 
			<description>&lt;p&gt;Role-based security requires, at a minimum, two key elements: users and roles. Roles (such as Administrator, Clerk, and ViewOnlyUser) are defined by the application code and then assigned to users to restrict which functions of the application they may use. It's a pretty simple concept that involves all of two database tables, or one if the user names come from some external source like Active Directory.&lt;/p&gt;
&lt;p&gt;In &lt;b&gt;Adam's&lt;/b&gt; case, the Role-based security feature served as a coalmine canary in the application he was tasked with reviewing. Although it passed all of the test cases &amp;mdash; employees could only do certain things, customers could do other things, etc. &amp;mdash; there was one fundamental flaw with the system. See if you can spot it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;
public bool IsInRole(string roleName)
{
   return UserName.StartsWith(roleName.Substring(0, 3));
}&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;The &lt;code&gt;roleName&lt;/code&gt; parameter is a string (&amp;quot;Employee&amp;quot;) that's is passed in from a method to check security, and UserName is just that: it's the user's name. So, users with a name that started with &amp;quot;Emp&amp;quot; would be granted access to Employee functions, while no one else would. And why &amp;quot;Emp&amp;quot;? As it turned out, the user names created for testing were &amp;quot;Employee1&amp;quot;, &amp;quot;Employee2&amp;quot;, &amp;quot;Employee3&amp;quot;, and so on.&lt;/p&gt;
&lt;p&gt;As for the rest of the system, it's development was similar: it passed the test cases and little more.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jKojzb4a6AITT1wKa6_hL4RPURU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jKojzb4a6AITT1wKa6_hL4RPURU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jKojzb4a6AITT1wKa6_hL4RPURU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jKojzb4a6AITT1wKa6_hL4RPURU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=tFGCorZbB5s:KIiPNBASE2M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/tFGCorZbB5s" height="1" width="1"/&gt;</description> 
			<slash:comments>159</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Rolebased-Canary.aspx</comments>
		</item>
	
		<item>
			<author>Alex Papadimoulis</author> 
			<title>Error'd: Existential Philosophy</title> 
			<link>http://thedailywtf.com/Articles/Existential-Philosophy.aspx</link> 
			<category>Error'd</category>
			<pubDate>Fri, 13 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6917</guid> 
			<description>&lt;p&gt;&lt;a name="PPic3"&gt;&lt;/a&gt;&amp;quot;I got this elegant statement of existential philosophy from Microsoft's Process Monitor utility,&amp;quot; &lt;b&gt;Matthew&lt;/b&gt; wrote, &amp;quot;It died while trying to start up, so yes indeed, for a few shining moments, the application was.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic3"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/The%20application%20was.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic1"&gt;&lt;/a&gt;&amp;quot;I saw this on a Freeview channel in the UK,&amp;quot; writes &lt;b&gt;Chris Emerson&lt;/b&gt;, &amp;quot;taken out of context, it's really one to mess with your head!&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic1"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/07042010244.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic2"&gt;&lt;/a&gt;&amp;quot;I got this receipt after I exchanged a shirt at Beverly Street,&amp;quot; writes &lt;b&gt;Sameera&lt;/b&gt;, &amp;quot;I wonder whether the person at the counter misunderstood what I wanted them to do.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic2"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/beverlystr.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic3"&gt;&lt;/a&gt;&lt;b&gt;Kevin Fricke&lt;/b&gt; found this unusual error on his company's iPrism server.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic3"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/error.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic4"&gt;&lt;/a&gt;&amp;quot;This came through the door a little while back,&amp;quot; writes &lt;b&gt;Tom Wright&lt;/b&gt;, &amp;quot;I'm not sure what's worse; that they didn't understand about social media or that it wasn't checked before printing and delivering.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic4"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/labour.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="Pic5"&gt;&lt;/a&gt;&amp;quot;I saw this reboot loop at the Wynn in Vegas,&amp;quot; &lt;b&gt;Haig&lt;/b&gt; noted, &amp;quot;of course, the people playing didn't seem to mind.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#Pic5"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/photo.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="PPic1"&gt;&lt;/a&gt;&amp;quot;Every time I turn on my Mac Mini, I have to re-pair my Rocketfish Bluetooth keyboard,&amp;quot; &lt;b&gt;Mike Enns&lt;/b&gt; wrote, &amp;quot;and every time, the system tells me there is no keyboard connected and that at the same time pairing was successful.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic1"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/Picture%201.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name="PPic2"&gt;&lt;/a&gt;&amp;quot;Gee, thanks Windows 7,&amp;quot; &lt;b&gt;Warrick&lt;/b&gt; wrote, &amp;quot;I didn't know my problem was most likely caused by my problem.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="#PPic2"&gt;&lt;img border="0" alt="" src="http://img.thedailywtf.com/images/201008/errord/solution_not_downloaded.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3TGAlKuscYRM1s184xTujIWtvyg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3TGAlKuscYRM1s184xTujIWtvyg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3TGAlKuscYRM1s184xTujIWtvyg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3TGAlKuscYRM1s184xTujIWtvyg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=DcvcVQJYjFA:ZMpi9A1mkyI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/DcvcVQJYjFA" height="1" width="1"/&gt;</description> 
			<slash:comments>214</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Existential-Philosophy.aspx</comments>
		</item>
	
		<item>
			<author>Remy Porter</author> 
			<title>Production Promote</title> 
			<link>http://thedailywtf.com/Articles/Production-Promote.aspx</link> 
			<category>Feature Articles</category>
			<pubDate>Thu, 12 Aug 2010 13:00:00 GMT</pubDate> 
			<guid isPermaLink="false">6896</guid> 
			<description>&lt;p&gt;&amp;quot;&lt;b&gt;John&lt;/b&gt;, it's about time I showed you how to do a production install,&amp;quot; Dave said.&lt;/p&gt;
&lt;p&gt;John had only been at the job for a few weeks, and was still learning the ins-and-outs of their shop. It was a small team, with the stereotypical alpha-geek at the top, people like Dave in the middle, and John at the bottom. They lived to support a complex pile of applications that all existed to extend or manage their flagship application.&lt;/p&gt;
&lt;p&gt;Said flagship was a .NET web app with hundreds of external corporate customers that considered it &amp;quot;mission critical&amp;quot;. It was still in .NET 1.1, but the upgrade was coming soon. It was still running on SQL Server 2000, but again, the upgrade was coming soon. That the flagship was a little rickety didn't matter; the application was a &amp;quot;big deal&amp;quot;, and that was what the business cared about.&lt;/p&gt;
&lt;p&gt;&amp;quot;So, you know the Enterprise Manager,&amp;quot; Dave said as he pulled the application up and logged into the test database. &amp;quot;I'm going to export a CREATE script for all of the stored procedures off the test DB.&amp;quot; With that done, he explained the next steps as he executed them: log onto production, navigate down the tree to where the stored procedures were, delete that entire branch of objects without mercy, and run the script to recreate them.&lt;/p&gt;
&lt;p&gt;While they waited for the delete step to complete, John asked, &amp;quot;Does it usually take this long?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;No, not usually,&amp;quot; Dave admitted. He frowned and the screen and waited a few minutes longer before adding, &amp;quot;I hope it isn't hung&amp;hellip; I always worry about just killing something like this. I'm afraid I'll lose data in the database.&amp;quot; &lt;!-- IRONY WARNING --&gt;The task finally completed, and Dave ran the script to create the procedures.&lt;/p&gt;
&lt;p&gt;&lt;!-- Babylon 5 was our last, best hope for peace. --&gt;It failed. &lt;!--  But in the year of the Shadow War, it became something greater: our last, best hope for victory. --&gt;The procedures, it seemed, already existed. Dave expanded the branch and confirmed that they were still there. &amp;quot;Then what did I delete?&amp;quot; he wondered.&lt;/p&gt;
&lt;p&gt;A frantic call from the user support reps answered that question: the tables. Dave had selected the wrong branch and &lt;span title="click me!" onclick="cornify_add();return false;"&gt;deleted gigabytes of customer generated data&lt;/span&gt;&lt;script type="text/javascript" src="http://www.cornify.com/js/cornify.js"&gt;&lt;/script&gt;. Stunned by the immensity of his screw up, Dave stared at the screen, like it was the oncoming headlamps of a semi. &amp;quot;Should&amp;hellip; should we start restoring from backup?&amp;quot; John asked. &lt;!-- Dave whipped around in the chair so quickly that he sliced his arm off on the edge of a server rack. He screamed as blood pumped from the stump; John screamed. Suddenly, Dave stopped screaming, the fake blood stopped pumping, he grabbed John by the collar, and said, "And *that's why you have a robust install process for production!*" --&gt;&lt;img style="margin: 10px; float: right" alt="" title="It's a pun, get it? It's the Enterprise Manager, so I use a picture of Kirk- who was an Enterpri- oh, never mind." src="http://jetpackshark.com/images/data.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;Backup?&amp;quot; Dave said the word, but it held no immediate meaning. &amp;quot;Backup? Backup!&amp;quot; The semi sailed by, and Dave relaxed. The day was saved! They could restore from backup! Dave started hunting down the most recent backup so that they could get the restore underway ASAP.&lt;/p&gt;
&lt;p&gt;Unfortunately for Dave, the most recent backup was months old. The backup maintenance task, also Dave's responsibility, had fallen out of the scheduler, and no one had ever confirmed that it was running. The next day, John helped Dave's replacement, Phil, reverse engineer as much data as they could off of other servers and databases. It took weeks to complete. The company lost hundreds of thousands of dollars from the downtime alone, breached several contracts, lost several major customers, and a significant chunk of their reputation.&lt;/p&gt;
&lt;p&gt;It wasn't all a loss. John learned a valuable lesson about how &lt;i&gt;not&lt;/i&gt; to do a production install. &lt;!-- And that's why you don't teach people lessons! Sorry for the pop-culture extravaganza. Okay, not really. --&gt;&lt;!-- Easy Reader Version: See Dave. See Dave perform without a net. See Dave break his neck. See Phil get a promotion. --&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JK5Y938_90jHkMGhKO-pRflUrWs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JK5Y938_90jHkMGhKO-pRflUrWs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JK5Y938_90jHkMGhKO-pRflUrWs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JK5Y938_90jHkMGhKO-pRflUrWs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://syndication.thedailywtf.com/~ff/TheDailyWtf?a=Nw9MffCYrHQ:SqRR0_9YPXo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheDailyWtf?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDailyWtf/~4/Nw9MffCYrHQ" height="1" width="1"/&gt;</description> 
			<slash:comments>236</slash:comments> 
			<comments>http://thedailywtf.com/Comments/Production-Promote.aspx</comments>
		</item>
		
	</channel>
</rss>
