Coded Smorgasbord: The Pilot Episode

  • ammoQ 2006-09-29 13:48
    [quote user=&quot;Alex Papadimoulis&quot;]<p>Talk about customer service! <strong>Josh&#39;s</strong> company really makes sure that Customer #7742&#39;s order date is ... well ... Customer #7742&#39;s order date ... </p><blockquote><pre>If .Fields(&quot;CUST_NUM&quot;) = &quot;7742&quot; Then<br /> dtmOrderPlaced = dtmOrderPlaced<br />End If</pre></blockquote><p>&nbsp;[/quote]</p><p>This one is called &quot;poor man&#39;s conditional breakpoint&quot;.</p>
  • Anonymous 2006-09-29 13:49
    great idea - though this does take away some sidebar fodder.<br />
  • savar 2006-09-29 13:50
    <p>yayyyyy!!</p><p>code WTFs -- lots of them!<br /><br />i guess i&#39;ll have to stop complaining. what am i going to do with my time now?<br /></p><p>&nbsp;</p><p>&nbsp;</p>
  • Bradlegar the Hobbit 2006-09-29 13:53
    [quote user=&quot;Alex Papadimoulis&quot;]<blockquote><pre>private final static String twentyspaces = &quot; &quot;;</pre></blockquote><p>[/quote]</p><p>Shouldn&#39;t that be twentySomethingSpaces?</p><p>&nbsp;</p><p>captcha: awesomeness. Just like today&#39;s WTF!<br /></p>
  • Yuriy 2006-09-29 13:58
    [quote user=&quot;Anonymous&quot;][quote user=&quot;Alex Papadimoulis&quot;]<blockquote><pre>private final static String twentyspaces = &quot; &quot;;</pre></blockquote><p>[/quote]</p><p>Shouldn&#39;t that be twentySomethingSpaces?</p><p>&nbsp;</p><p>captcha: awesomeness. Just like today&#39;s WTF!<br /></p><p>[/quote]</p><p>&nbsp;</p><p>twentyFiveSpaces.&nbsp; I&#39;m guessing the requirements changed to require more spaces, but they didn&#39;t feel like changing the variable name everywhere it&#39;s used.<br /></p>
  • Volmarias 2006-09-29 13:58
    Ah, brillant. It&#39;s been a while since we&#39;ve had a delightful smorgasbord of code snippets. These are all fortunately more hillarious than horrid.<br /><br />I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays.<br />
  • Karl von L. 2006-09-29 14:00
    [quote user=&quot;Alex Papadimoulis&quot;]<blockquote><pre>If .Fields(&quot;CUST_NUM&quot;) = &quot;7742&quot; Then<br /> dtmOrderPlaced = dtmOrderPlaced<br />End If</pre></blockquote><p>[/quote]</p><p>This looks to me like the developer just needed a place to stick a breakpoint so he could start stepping through the code when it got to customer #7742, so he could figure out why it was failing for that customer. At least, that&#39;s why *I&#39;ve* written code like this.<br />&nbsp;</p>
  • BradC 2006-09-29 14:02
    [quote user=&quot;Alex Papadimoulis&quot;] <p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;</pre></blockquote><p>[/quote]</p><p>Beautiful in its simple WTF&#39;ery.</p><p>Probably this should be something like </p><p>#define DELIMITER &quot;|&quot;</p>
  • merreborn 2006-09-29 14:02
    <p>[quote user=&quot;Alex Papadimoulis&quot;]lSend = IIf(lSend = True, True, False)[/quote]</p><p>In a loosely typed language, this could actually have an effect similar to </p><p>[quote]ISend = (bool) ISend[/quote]</p><p>no? e.g., if ISend is actually (int)14, the &#39;wtf&#39; line of code would convert it to a (bool)true, correct?<br /></p><blockquote><pre>&nbsp;</pre></blockquote>
  • el jaybird 2006-09-29 14:04
    [quote user=&quot;Alex Papadimoulis&quot;] <blockquote><pre>// This instance of OPParcelObj is owned by an instance of
    // OPParcelArray that is associated with an instance of
    // OPCustThread which owns an instance of the parcel
    // processor which is the processor needed to process
    // this parcel.</pre></blockquote><p>[/quote]</p><p>&nbsp;... which is part of the house that Jack built?</p><p>(Captcha: Chocobot. Mmmm....)</p>
  • Colin McGuigan 2006-09-29 14:06
    MakeCum reminds me of one of my earlier efforts, when I had to work on a fund accrual generation system, or the FAG system, which consisted of FAG customers, FAG products, FAG rates, etc...<br />
  • Ghost Ware Wizard 2006-09-29 14:06
    <p>My Favorite:</p><p>&nbsp;if (cust = &quot;Wal-Mart&quot;)</p><p>order date := dateFromEDI</p><p>ship date := dateFromEDI - (dayof week(today)) + day of week</p><p>end if</p><p>so when you get to day 1, usually monday what happens?</p>
  • R.Flowers 2006-09-29 14:09
    [quote user=&quot;Alex Papadimoulis&quot;]
    <p><strong>F.S.</strong> noticed that Australian airline JetStar is very careful about ensuring visitors are sent to the proper page ... </p>
    <blockquote>
    <pre>if ((version==&quot;NS&quot;) || (version==&quot;IE&quot;)) <br />
    { <br />
    if (version==&quot;NS&quot;) <br />
    /* NS URL */ <br />
    window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br />
    else <br />
    /* IE URL */ <br />
    window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br />
    } <br />
    else <br />
    /* OTHER URL */ <br />
    window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; </pre></blockquote>
    <p>[/quote]</p>
    <p>Let&#39;s be kind and assume the missing comment is something like:</p>
    <p><code>&nbsp; /* I&#39;ll get back to this later - in a hurry! */</code><br />
    &nbsp; </p>
  • Anonymous 2006-09-29 14:10
    [quote user=&quot;Alex Papadimoulis&quot;]<strong>Matt Spicer</strong> was in the middle of a VB6 to C# conversion projection and stumbled across this next snippet. He decided to not bring this line of code to the new project ... <blockquote><pre>lSend = IIf(lSend = True, True, False)[/quote]</pre><pre>Now, now, that&#39;s perfectly explainable. You&#39;ve got to account for if ISend == FileNotFound when you&#39;re converting from &quot;robust&quot; Boolean to &quot;boring&quot; Boolean values.</pre></blockquote>
  • Wyatt Earp 2006-09-29 14:13
    [quote user=&quot;ammoQ&quot;][quote user=&quot;Alex Papadimoulis&quot;] <p>Talk about customer service! <strong>Josh&#39;s</strong> company really makes sure that Customer #7742&#39;s order date is ... well ... Customer #7742&#39;s order date ... </p><blockquote><pre>If .Fields(&quot;CUST_NUM&quot;) = &quot;7742&quot; Then<br /> dtmOrderPlaced = dtmOrderPlaced<br />End If</pre></blockquote><p>&nbsp;[/quote]</p><p>This one is called &quot;poor man&#39;s conditional breakpoint&quot;.</p><p>[/quote]</p><p>&nbsp;Placing a non-conditional breakpoint under the if is significantly faster than placing a conditional breakpoint in the code if this is in a loop that gets executed a bunch of times (at least this was true in VS.NET 2003).</p>
  • firedup 2006-09-29 14:16
    [quote user=&quot;Anonymous&quot;][quote user=&quot;Alex Papadimoulis&quot;]<strong>Matt Spicer</strong> was in the middle of a VB6 to C# conversion projection and stumbled across this next snippet. He decided to not bring this line of code to the new project ... <blockquote><pre>lSend = IIf(lSend = True, True, False)[/quote]</pre>Now, now, that&#39;s perfectly explainable. You&#39;ve got to account for if ISend == FileNotFound when you&#39;re converting from <strong>&quot;robust&quot; Boolean</strong> to &quot;boring&quot; Boolean values.</blockquote><p>[/quote]</p><p>Nice!</p>
  • firedup 2006-09-29 14:20
    [quote user=&quot;BradC&quot;][quote user=&quot;Alex Papadimoulis&quot;] <p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;</pre></blockquote><p>[/quote]</p><p>Beautiful in its simple WTF&#39;ery.</p><p>Probably this should be something like </p><p>#define DELIMITER &quot;|&quot;</p><p>[/quote]</p><p>A few projects back I worked with a&nbsp;girl 3 months out of school. We had some coding style rules, one of which was &#39;descriptive variable names&#39;. Instead of, as you suggest, &quot;DELIMITER&quot;, she used something like: &quot;THE_CHARACTER_THAT_SEPARATES_FIELDS_IN_THE_PARAMETER_STRING&quot;.</p>
  • anonymous 2006-09-29 14:21
    <p>Sunday is admin day is pure genius.</p><p>I can&#39;t believe I haven&#39;t seen that anywhere, before; you can bet I&#39;m going to start using it.</p>
  • Andreas 2006-09-29 14:24
    <blockquote><em>Please try to keep Coded Smorgasbord submissions small and <strong>no more than eight lines of readable code</strong>.</em></blockquote>So as long as the code is not readable, any length is ok...&nbsp;
  • pjsson 2006-09-29 14:46
    <p>[quote user=&quot;Volmarias&quot;]I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays.[/quote]<br />I guess no regular users will use the application on Sundays, so it is safe to assume that anyone using the application on a Sunday is an admin. At least until some user figures out if he changes the date of the PC clock to Sunday then you will get full admin privileges.<br /></p>
  • science_gone_bad 2006-09-29 14:47
    <p>Or even better, the system I worked on named by the Marketing Wonks:</p><p>CRP</p><p>&nbsp;Had us laughing for an hour since we definitely had the fastest CRP around<br /><br />&nbsp;</p>
  • Jan 2006-09-29 14:51
    [quote user=&quot;Alex Papadimoulis&quot;]<blockquote><pre>lSend = IIf(lSend = True, True, False)&nbsp;</pre></blockquote><p>[/quote]</p><p>Of course, this is useful. </p><p>Imagine what would happen if the value of lSend equals FileNotFound!<br />&nbsp;</p>
  • Dark 2006-09-29 14:51
    [quote user=&quot;merreborn&quot;]<p>[quote user=&quot;Alex Papadimoulis&quot;]lSend = IIf(lSend = True, True, False)[/quote]</p><p>In a loosely typed language, this could actually have an effect similar to </p><p>[quote]ISend = (bool) ISend[/quote]</p><p>no? e.g., if ISend is actually (int)14, the &#39;wtf&#39; line of code would convert it to a (bool)true, correct?[/quote]</p><p>See, this is *why* such code is wtf :)</p><p>If ISend is actually (int) 14, then that line of code would convert it to a (bool)false. Because it compares ISend = True, instead of just using ISend as a conditional. And they&#39;re not going to be equal.</p><p>&nbsp;</p>
  • marvin_rabbit 2006-09-29 14:52
    [quote user=&quot;Anonymous&quot;][quote user=&quot;Alex Papadimoulis&quot;]<blockquote><pre>private final static String twentyspaces = &quot; &quot;;</pre></blockquote><p>[/quote]</p><p>Shouldn&#39;t that be twentySomethingSpaces?</p><p>&nbsp;[/quote]</p><p>I&#39;m guessing that the extra spaces were from Alex&#39;s anonymisation.&nbsp; We wouldn&#39;t want top-secret company info leaking out.<br />&nbsp;</p>
  • rgs 2006-09-29 15:01
    [quote user=&quot;Alex Papadimoulis&quot;]<p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;&nbsp;</pre></blockquote><p>[/quote]</p><p>&nbsp;</p><p>Hmmm That&#39;s not soooo bad, I mean: </p><p>&nbsp;&nbsp; Boss: Write a module that handles .csv files (comma separated values)</p><p>&nbsp;&nbsp; Programmer:&nbsp; Ok</p><p>&nbsp;&nbsp; [A few days later]</p><p>&nbsp;&nbsp; Boss: Ok, here is a .csv file to try your module:<br /></p><p>&nbsp;&nbsp; File: data;moredata;another data; etc<br /></p><p>&nbsp;&nbsp; Programmer: .....</p><p>&nbsp;&nbsp; [More days later]</p><p>&nbsp;&nbsp; Boss: the client sent this file, almost like the ones we&#39;ll use in production<br /></p><p>&nbsp;&nbsp; Second File: data-moredata-another data- etc.</p><p>And so on...&nbsp;</p><p>The easiest solution is to #define COMMA</p><p>&nbsp;Now I dare all of you to tellme that this never ever happened to you...</p><p>&nbsp;</p><p>Captcha: captcha: captcha: captcha.............<br />&nbsp;</p>
  • Rank Amateur 2006-09-29 15:12
    [quote user=&quot;Alex Papadimoulis&quot;] <p><strong>F.S.</strong> noticed that Australian airline JetStar is very careful about ensuring visitors are sent to the proper page ... </p><blockquote><pre>if ((version==&quot;NS&quot;) || (version==&quot;IE&quot;))
    {
    if (version==&quot;NS&quot;)
    /* NS URL */
    window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;;
    else
    /* IE URL */
    window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;;
    }
    else
    /* OTHER URL */
    window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; </pre><pre>[/quote]</pre><pre><pre>I&#39;m outraged. What about Opera? You can&#39;t have Opera browsers going to </pre><pre>/skylights/cgi-bin/skylights.cgi! Clearly you have to direct them to </pre><pre>/skylights/cgi-bin/skylights.cgi! This is browser discrimination!</pre><pre>--Rank</pre></pre></blockquote>
  • Botia 2006-09-29 15:17
    How many of you counted the spaces?&nbsp;&nbsp;:)
  • cconroy 2006-09-29 15:22
    [quote user=&quot;Alex Papadimoulis&quot;]<p>For those of you with a maturity level greater than &quot;14 years old&quot;, this next snippet probably won&#39;t be for you. Thankfully, <strong>Brian Samson</strong> isn&#39;t one of those people .. </p><blockquote><pre>public class MakeCum {<br /><br /> public static void main(String[] args) {<br /> ...<br /> CLArgParser clap = new CLArgParser(clargs);<br /><br /> boolean err = clap.doStdArgs(args);<br /><br /> if (err) {<br /> System.out.println(&quot;Usage: MakeCum &quot;);<br /> System.out.println(clap.getStdArgsDescription());<br /> return;<br /> }<br />...}</pre></blockquote><p>Ah
    yes, that class has it all: MakeCum, STD Arguments, and even the Clap
    makes an appearance! And who would have thought a class that did
    nothing but &quot;convert a set of binned counts to cumulative counts&quot; could
    be so fun. </p><p>[/quote]</p><p>Can... hardly... keep... a...
    straight... face...&nbsp; (All that&#39;s missing is a &quot;catch
    (ValueTransitionException valTrEx) {}&quot; block; then I would have lost
    it.)<br />
    </p><p>I used to try to avoid the &quot;cum&quot; abbreviation whenever possible,
    but app I&#39;m currently working on has &quot;cumQty&quot; variables all over the
    place, so I&#39;ve gotten pretty desensitized to it.&nbsp; Now I have much
    more <strike>stamina</strike> tolerance for its usage.<br />
    </p>
  • anonymous 2006-09-29 15:23
    [quote user=&quot;pjsson&quot;] <p>[quote user=&quot;Volmarias&quot;]I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays.[/quote]<br />I guess no regular users will use the application on Sundays, so it is safe to assume that anyone using the application on a Sunday is an admin. At least until some user figures out if he changes the date of the PC clock to Sunday then you will get full admin privileges.<br /></p><p>[/quote]</p><p>&nbsp;I interpret it as, anyone working on Sunday must need to get work done, and doesn&#39;t have time to screw around with potential permission issues, or getting hold of an admin to grant him permissions.&nbsp; </p><p>(Our non-admin users do not have the privilege to change the clock, so,&nbsp;we don&#39;t have to worry about the problem you describe.&nbsp; We only have to worry about them coming in on Sundays.)</p>
  • Botia 2006-09-29 15:26
    Man, it&#39;s good to see some nice code WTF&#39;s! &nbsp;This is the stuff that just makes your day.
  • Reed 2006-09-29 15:33
    <p>On a really basic intellectual level, programming is about coming up with elegant ways to describe things that happen.&nbsp; Remember, always name it what it&#39;s *for*, and *why it exists* not what exactly it does! Otherwise, why bother with any kind of structured high-level programming?<br />&nbsp;</p><p>Reed&nbsp;</p><p>&nbsp;</p><p>[quote user=&quot;BradC&quot;][quote user=&quot;Alex Papadimoulis&quot;] </p><p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;</pre></blockquote><p>[/quote]</p><p>Beautiful in its simple WTF&#39;ery.</p><p>Probably this should be something like </p><p>#define DELIMITER &quot;|&quot;</p>[/quote]

    Pro
  • Rob 2006-09-29 15:34
    <p>I always wanted to create a help desk system called &quot;My Pants&quot;.&nbsp; </p><p>Support: &quot;Hmm, I&#39;ve never heard of that. Let me search my pants and see what I can find.&quot;</p><p>Support:&nbsp; &quot;I&#39;m sorry, My Pants is down, so I can&#39;t answer your question.&quot;</p><p>Support:&nbsp; &quot;I seem to recall seeing something about that in My Pants.&quot;</p><p>&nbsp;The 14 year old humor possibilities are endless!</p>
  • Jeff S 2006-09-29 15:46
    [quote user=&quot;Anonymous&quot;]<p>Sunday is admin day is pure genius.</p><p>I can&#39;t believe I haven&#39;t seen that anywhere, before; you can bet I&#39;m going to start using it.</p><p>[/quote]</p><p>Don&#39;t forget what the Bible says ... &quot;On the 7th day, the hackers shall rest.&quot;</p><p>Bravo, Alex!&nbsp; Best post in a long, long time .... thanks for giving me some good laughs on a busy Friday afternoon !&nbsp;</p><p>&nbsp;</p>
  • Jojosh_the_Pi 2006-09-29 15:56
    [quote user=&quot;Alex Papadimoulis&quot;] <blockquote><pre>int doctrackId = Convert.ToInt32(&quot;0&quot;); //wtf!!</pre></blockquote> [/quote]<br /><br /> Maybe the programmer was concerned the int would be initialized with 64 bits, so he used this to try to specify a 32 bit integer, thus conserving memory.<br /><br /> How many comments the last few months have speculated The Daily WTF was running out of material? &nbsp;Ha!<br /><br />
  • drdamour 2006-09-29 15:57
    [quote user=&quot;Anonymous&quot;][quote user=&quot;merreborn&quot;] <p>[quote user=&quot;Alex Papadimoulis&quot;]lSend = IIf(lSend = True, True, False)[/quote]</p><p>In a loosely typed language, this could actually have an effect similar to </p><p>[quote]ISend = (bool) ISend[/quote]</p><p>no? e.g., if ISend is actually (int)14, the &#39;wtf&#39; line of code would convert it to a (bool)true, correct?[/quote]</p><p>See, this is *why* such code is wtf :)</p><p>If ISend is actually (int) 14, then that line of code would convert it to a (bool)false. Because it compares ISend = True, instead of just using ISend as a conditional. And they&#39;re not going to be equal.</p><p>[/quote]</p><p>&nbsp;This is all language dependant, in VB6 some very strange things happen with implicit conversions:</p><p>&nbsp;&nbsp;&nbsp; Dim i As Integer<br />&nbsp;&nbsp;&nbsp; i = 14<br />&nbsp;&nbsp;&nbsp; Dim x1, x2, x3 As Boolean<br />&nbsp;&nbsp;&nbsp; x1 = (i = True)<br />&nbsp;&nbsp;&nbsp; x2 = (True = i)<br />&nbsp;&nbsp;&nbsp; x3 = i<br /></p><p>x1 and x2 will be false, but x3 is true?</p><p>but that really is the WTF because that iif is stil useless, could have just been</p><p>lSend = (lSend = True)</p><p>&nbsp;&nbsp;&nbsp; Dim i As Integer<br />&nbsp;&nbsp;&nbsp; i = 14<br />&nbsp;&nbsp;&nbsp; i = (i = True)<br /></p><p>i will be 0 in VB6, so it can be passed to a function taht only excepts 0 or -1, at least that&#39;s my guess to the reason</p>
  • ptomblin 2006-09-29 15:58
    &quot;Sunday is admin day&quot; reminds me of when I worked for a large Geographic Information System company.&nbsp; We had a password backdoor for the benefit of the &quot;specialists&quot; that we&#39;d send out to customer sites to help them with their setup and customization.&nbsp; Originally, the secret password was the day of the week spelt backwards (ie &quot;yadnus&quot;).&nbsp; But our specialists couldn&#39;t get that right even if they wrote the rule on their hands, so we had to change it to a single asterisk.&nbsp;&nbsp;&nbsp; The specialists actually managed to remember that.&nbsp; Unfortunately they taught it to all the customers, so in 6 years of working there I never saw a customer using a real password.<br />
  • ptomblin 2006-09-29 16:00
    [quote user=&quot;cconroy&quot;]<p>I used to try to avoid the &quot;cum&quot; abbreviation whenever possible,
    but app I&#39;m currently working on has &quot;cumQty&quot; variables all over the
    place, so I&#39;ve gotten pretty desensitized to it.&nbsp; Now I have much
    more <strike>stamina</strike> tolerance for its usage.[/quote]</p><p>&nbsp;</p><p>According to a lot of spam I get, there is help available if your cumQty isn&#39;t high enough.&nbsp;</p>
  • foobish 2006-09-29 16:04
    <p>&quot;The Pilot Episode&quot; - Is that a reference to the first ever episode of The X Files?</p><p>captcha: poprocks - The first ever candy that rocked.<br />&nbsp;</p>
  • Chaz 2006-09-29 16:09
    <p>14 year old humour - I work with a database called &quot;MasterData&quot;. Not that funny if you are Kiwi like my colleagues, as they pronounce data the American way (First syllable rhymes with bar). However, I&#39;m from the UK and for me it rhymes with day. Try saying it my way, out loud...</p>
  • ParkinT 2006-09-29 16:10
    <p>What?</p><p>No XML ?!</p><p>&lt;g&gt;</p>
  • ParkinT 2006-09-29 16:12
    [quote user=&quot;Anonymous&quot;] <p>14 year old humour - I work with a database called &quot;MasterData&quot;. Not that funny if you are Kiwi like my colleagues, as they pronounce data the American way (First syllable rhymes with bar). However, I&#39;m from the UK and for me it rhymes with day. Try saying it my way, out loud...</p><p>[/quote]</p><p>I imagine it could be worse.</p><p>Someone from New England who often adds nonexistent &quot;r&quot; to any word ending in a vowel sound (like idear for idea) !</p>
  • a.non 2006-09-29 16:14
    [quote user=&quot;drdamour&quot;][quote user=&quot;Anonymous&quot;][quote user=&quot;merreborn&quot;] <p>[quote user=&quot;Alex Papadimoulis&quot;]lSend = IIf(lSend = True, True, False)[/quote]</p><p>In a loosely typed language, this could actually have an effect similar to </p><p>[quote]ISend = (bool) ISend[/quote]</p><p>no? e.g., if ISend is actually (int)14, the &#39;wtf&#39; line of code would convert it to a (bool)true, correct?[/quote]</p><p>See, this is *why* such code is wtf :)</p><p>If ISend is actually (int) 14, then that line of code would convert it to a (bool)false. Because it compares ISend = True, instead of just using ISend as a conditional. And they&#39;re not going to be equal.</p><p>[/quote]</p><p>&nbsp;This is all language dependant, in VB6 some very strange things happen with implicit conversions:</p><p>&nbsp;&nbsp;&nbsp; Dim i As Integer<br />&nbsp;&nbsp;&nbsp; i = 14<br />&nbsp;&nbsp;&nbsp; Dim x1, x2, x3 As Boolean<br />&nbsp;&nbsp;&nbsp; x1 = (i = True)<br />&nbsp;&nbsp;&nbsp; x2 = (True = i)<br />&nbsp;&nbsp;&nbsp; x3 = i<br /></p><p>x1 and x2 will be false, but x3 is true?</p><p>but that really is the WTF because that iif is stil useless, could have just been</p><p>lSend = (lSend = True)</p><p>&nbsp;&nbsp;&nbsp; Dim i As Integer<br />&nbsp;&nbsp;&nbsp; i = 14<br />&nbsp;&nbsp;&nbsp; i = (i = True)<br /></p><p>i will be 0 in VB6, so it can be passed to a function taht only excepts 0 or -1, at least that&#39;s my guess to the reason</p><p>[/quote]</p><p>&nbsp;</p><p>lucky you assigned in he order you id, seeing as you declared 2 variants and 1 boolean:<br /> </p><p><br />&nbsp;&nbsp;&nbsp; x1 = (i = True)<br />&nbsp;&nbsp;&nbsp; x3 = (True = i)<br />&nbsp;&nbsp;&nbsp; x2 = i</p>x2 <span style="font-style: italic">would </span>have been 14<br />
  • Matt S 2006-09-29 16:19
    This was actually a boolean variable, which defaults to false in VB6.&nbsp; I think the original intent was to change it to true if it wasn&#39;t already, but lSend = True would have actually worked.
  • Oliver Klozoff 2006-09-29 16:37
    [quote user=&quot;Anonymous&quot;]<p>14 year old humour - I work with a database called &quot;MasterData&quot;. Not that funny if you are Kiwi like my colleagues, as they pronounce data the American way (First syllable rhymes with bar). However, I&#39;m from the UK and for me it rhymes with day. Try saying it my way, out loud...</p><p>[/quote]</p><p>&nbsp;What Americans are you talking about? I&#39;ve always pronounced it &quot;day tuh&quot;.&nbsp; <br />&nbsp;</p>
  • BradC 2006-09-29 16:44
    [quote user=&quot;Anonymous&quot;] <p>I always wanted to create a help desk system called &quot;My Pants&quot;.&nbsp; </p><p>Support: &quot;Hmm, I&#39;ve never heard of that. Let me search my pants and see what I can find.&quot;</p><p>Support:&nbsp; &quot;I&#39;m sorry, My Pants is down, so I can&#39;t answer your question.&quot;</p><p>Support:&nbsp; &quot;I seem to recall seeing something about that in My Pants.&quot;</p><p>&nbsp;The 14 year old humor possibilities are endless!</p><p>[/quote]</p><p>Lol, nice.</p><p>Support: &quot;Please hold.&nbsp;Sysadmin Julia currently has My Pants down for servicing.&quot;</p><p>Support: &quot;I&#39;m sorry, My Pants is a little slow today...&quot;</p><p>Support: &quot;I&#39;m sorry, I can&#39;t seem to find that in My Pants.&quot;</p><p>&nbsp;</p><p>&nbsp;</p>
  • phsiii 2006-09-29 16:49
    <p>Re the JetStar example: I don&#39;t have a problem with that -- it&#39;s expandable/updatable for the future.&nbsp; Harmless at worst; MIPS are cheap.&nbsp; Still funny, though...</p><p>Captcha: stfu<br />&nbsp;</p>
  • Solo 2006-09-29 16:52
    [quote user=&quot;Anonymous&quot;][quote user=&quot;Alex Papadimoulis&quot;]<blockquote><pre>If .Fields(&quot;CUST_NUM&quot;) = &quot;7742&quot; Then<br /> dtmOrderPlaced = dtmOrderPlaced<br />End If</pre></blockquote><p>[/quote]</p><p>This looks to me like the developer just needed a place to stick a breakpoint so he could start stepping through the code when it got to customer #7742, so he could figure out why it was failing for that customer. At least, that&#39;s why *I&#39;ve* written code like this.<br />&nbsp;</p><p>[/quote]</p><p>I do it too, but I don&#39;t let anyone know. I clean up after myself. The next thing you know, another drone is poking through the files checked in with my name on it looking for that kind of thing :)</p><p>captcha: random. As in random code generation.<br />&nbsp;</p>
  • Solo 2006-09-29 16:53
    [quote user=&quot;BradC&quot;][quote user=&quot;Alex Papadimoulis&quot;] <p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;</pre></blockquote><p>[/quote]</p><p>Beautiful in its simple WTF&#39;ery.</p><p>Probably this should be something like </p><p>#define DELIMITER &quot;|&quot;</p><p>[/quote]</p><p>#define PIPE &quot;,&quot;<br />&nbsp;</p>
  • Anonymous 2006-09-29 16:56
    <p>[quote user=&quot;BradC&quot;]Support: &quot;Please hold.&nbsp;Sysadmin Julia currently has My Pants down for servicing.&quot;[/quote]</p><p>That&#39;s almost /too/ good.&nbsp; Of course, it&#39;d be just the opposite if the following were to happen:</p><p>&quot;I&#39;m sorry, there seems to be a problem with My Pants today.&nbsp; We had to bring it down,&nbsp;we&#39;ve been having almost non-stop core dumps this moring.&quot;</p>
  • John Meikenson 2006-09-29 16:59
    That is exactly what that is. It should have been removed during a peer&nbsp;review&nbsp;(HA!),&nbsp;but&nbsp;it&#39;s definitely not a WTF.
  • Unklegwar 2006-09-29 17:06
    <p>[quote user=&quot;Volmarias&quot;]Ah, brillant. It&#39;s been a while since we&#39;ve had a delightful smorgasbord of code snippets. These are all fortunately more hillarious than horrid.<br /><br />I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays.<br />[/quote]</p><p>&nbsp;</p><p>All they need now is earlybird specials, and people will show up to work early, just to hose the system.</p><p>&nbsp;</p>
  • Balthazaar 2006-09-29 17:08
    [quote user=&quot;Oliver Klozoff&quot;][quote user=&quot;Anonymous&quot;]<p>14 year old humour - I work with a database called &quot;MasterData&quot;. Not that funny if you are Kiwi like my colleagues, as they pronounce data the American way (First syllable rhymes with bar). However, I&#39;m from the UK and for me it rhymes with day. Try saying it my way, out loud...</p><p>[/quote]</p><p>&nbsp;What Americans are you talking about? I&#39;ve always pronounced it &quot;day tuh&quot;.&nbsp; <br />&nbsp;</p><p>[/quote]</p><p>He&#39;s obviously talking about Bostonians ...</p><p>where &quot;park the car in Harvard yard&quot; is pronounced more like &quot;pawk da cah in Hawvuud yawd&quot;, &quot;water&quot; is pronounced more like &quot;watuh&quot;, &quot;Worcester&quot; is pronounced more like &quot;woostuh&quot;, and &quot;data&quot; is pronounced more like &quot;dater&quot;.<br /><br />&nbsp;</p>
  • Stoffel 2006-09-29 17:16
    <p>I&#39;m getting too old. The only one that made me LOL was the try/catch with the same exact code.&nbsp; That&#39;s awesome.&nbsp; I wish I had 14-yr-old humor again.<br /></p><p>&nbsp;</p><p>CAPTCHA: awesomeness</p><p>&nbsp;</p>
  • ammoQ 2006-09-29 17:24
    [quote user=&quot;Anonymous&quot;]<p>The only one that made me LOL was the try/catch with the same exact code.&nbsp; That&#39;s awesome.</p><p>[/quote]</p><p>I know an ERP system which requires such a stubborness: The first call to some API returns (under some circumstances) NOK (not ok), with some warning message; calling the same API again works.<br /></p>
  • mrsticks1982 2006-09-29 17:26
    [quote user=&quot;BradC&quot;][quote user=&quot;Anonymous&quot;] <p>I always wanted to create a help desk system called &quot;<strike>My Pants</strike> Your Mom&quot;.&nbsp; </p><p>Support: &quot;Hmm, I&#39;ve never heard of that. Let me search <strike>my pants</strike> Your Mom and see what I can find.&quot;</p><p>Support:&nbsp; &quot;I&#39;m sorry, <strike>My Pants</strike> Your Mom is down, so I can&#39;t answer your question.&quot;</p><p>Support:&nbsp; &quot;I seem to recall seeing something about that in <strike>My Pants</strike> Your Mom.&quot;</p><p>&nbsp;The 14 year old humor possibilities are endless!</p><p>[/quote]</p><p>Lol, nice.</p><p>Support: &quot;Please hold.&nbsp;Sysadmin Julia currently has <strike>My Pants</strike> Your Mom down for servicing.&quot;</p><p>Support: &quot;I&#39;m sorry, <strike>My Pants</strike> Your Mom is a little slow today...&quot;</p><p>Support: &quot;I&#39;m sorry, I can&#39;t seem to find that in <strike>My Pants </strike>Your Mom.&quot;</p><p>&nbsp;</p><p>&nbsp;</p><p>[/quote]</p><p>&nbsp;<br />nice, but you must be a little older than I, guess you wanted to keep it &quot;clean&quot;. I used to worked with a guy, wo was in his 20s, who thought it was funny to comeback with the &quot;Your Mom&quot; statement after everything you said. Now your into the humor of today!</p><p>&nbsp;<br />sry just had to post it!<br /></p>
  • blasterz 2006-09-29 17:29
    [quote user=&quot;Anonymous&quot;][quote user=&quot;pjsson&quot;] <p>[quote user=&quot;Volmarias&quot;]I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays.[/quote]<br />I guess no regular users will use the application on Sundays, so it is safe to assume that anyone using the application on a Sunday is an admin. At least until some user figures out if he changes the date of the PC clock to Sunday then you will get full admin privileges.<br /></p><p>[/quote]</p><p>&nbsp;I interpret it as, anyone working on Sunday must need to get work done, and doesn&#39;t have time to screw around with potential permission issues, or getting hold of an admin to grant him permissions.&nbsp; </p><p>(Our non-admin users do not have the privilege to change the clock, so,&nbsp;we don&#39;t have to worry about the problem you describe.&nbsp; We only have to worry about them coming in on Sundays.)</p><p>[/quote]</p><p>I worked in a place where they thought locking out the GUI interface for setting the clock was the same thing as taking away the privilege to change the clock...<br />&nbsp;</p>
  • Sam 2006-09-29 17:34
    [quote user=&quot;Anonymous&quot;] <p>On a really basic intellectual level, programming is about coming up with elegant ways to describe things that happen.&nbsp; Remember, always name it what it&#39;s *for*, and *why it exists* not what exactly it does! Otherwise, why bother with any kind of structured high-level programming?<br />&nbsp;</p><p>Reed&nbsp;</p><p>&nbsp;</p><p>[quote user=&quot;BradC&quot;][quote user=&quot;Alex Papadimoulis&quot;] </p><p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;</pre></blockquote><p>[/quote]</p><p>Beautiful in its simple WTF&#39;ery.</p><p>Probably this should be something like </p><p>#define DELIMITER &quot;|&quot;</p><p>[/quote] Pro[/quote]</p><p>&nbsp;</p><p>Wow, I might know where this comes from.&nbsp; I&#39;d been working with a trading systems vendor who&#39;d promised to give us post-trade date files daily so we could insert the data into our database.&nbsp; They said their standard format was csv files, and when I asked if they were actually csv&#39;s (some use &quot;csv&quot; as shorthand for &quot;delimited&quot;).&nbsp; They stared a second and said yes, of course.&nbsp; I was&nbsp;a little annoyed -- I&#39;m not a big fan of true csv&#39;s for data transmission which will include textual data.&nbsp; But we had code that would parse true csv&#39;s, so we said agreed.</p><p>&nbsp;The first sample file didn&#39;t parse correctly.&nbsp; There were different numbers of fields for each record.&nbsp; Lo and behold, there were embedded commas in the data, and no double-quoting.&nbsp; No, this isn&#39;t the wtf yet.</p><p>&nbsp;I went back and told them this, and they said they&#39;d spend a few days working on it.&nbsp; After a week or two, they came back to me with their first suggested solution:&nbsp; move the text fields (there was more than one) which might have commas in it to the end of the record layout.&nbsp; When I pointed out that we actually want that data and moving those fields to the end doesn&#39;t really help, they promised to work on it some more.&nbsp; At this point I suggested using pipes instead, but they demurred, saying csv&#39;s were their standard format.&nbsp; (I&#39;d consider this sequence, particularly their &quot;solution&quot;, wtf 1).</p><p>&nbsp;Some time&nbsp;later, they copied me on an email instructing their&nbsp;dba&#39;s to remove all commas from all data in specified columns of their database.&nbsp; I had done enough espionage to know that their request wouldn&#39;t have just affected us (as bad as that would have been), but would have affected ALL their customers.&nbsp; I was sorely tempted to agree just to witness the havoc that would ensue.&nbsp; In the end, though, I did the right thing and told them that was no good -- we wanted the commas in the data that had commas.&nbsp; They promised to work on it and give us real csv&#39;s. (I&#39;d consider this wtf 2).&nbsp; By this point, I told the salesperson who&#39;d sold us the product that there was no way any of their other customers are actually using the files, and he agreed.&nbsp; Too bad IT had no say in whether the product was used.</p><p>After I complained at a meeting about their inability to produce usable files after several weeks, they went on the offensive.&nbsp; One of their supposedly technical people sent an email claiming there was no problem with the file format, the problem was with &quot;the way you open it in Excel&quot;.&nbsp; At this point, I got pretty pissed, responding with something to the effect of, &quot;Excel has nothing to do with it; we don&#39;t process it in Excel, and you don&#39;t make it in Excel -- because if you did, it would have been RIGHT!&quot;&nbsp; Except it was a lot longer and more acerbic, and came much closer to accusing them of outright lying and/or stupidity.&nbsp; The next four people I met from that company opened their eyes very very wide when I introduced myself.&nbsp; &gt;:)</p><p>&nbsp;At that point, they agreed to send the files pipe-delimited.&nbsp; It wouldn&#39;t surprise me in the slightest if they&#39;d redefined their &quot;COMMA&quot; constant to &quot;|&quot;.</p><p>&nbsp;Needless to say, when the product went live we had tremendous issues with data quality, connectivity, application configuration/installation, etc. But, the files were at least formatted in a usable manner.</p><p>&nbsp;</p>
  • Sam 2006-09-29 17:40
    <p>[quote user=&quot;Anonymous&quot;]How many of you counted the spaces?&nbsp;&nbsp;:)[/quote]</p><p>&nbsp;H:\&gt;perl -e &quot;print length(\&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \&quot;);&quot;<br />25<br />H:\&gt;</p><p>&nbsp;</p>
  • Scurvee 2006-09-29 17:40
    lSend = (lSend = True) <p>Works fine in VBScript... probably would have worked in VB6 as well.</p><p>&nbsp;</p><p>&nbsp;Captcha: quality&nbsp; ....seriously</p>
  • Bastardo Anónimo 2006-09-29 17:45
    I worked on an intranet which had an achronym of PAM... the CEO thought it was hillarious when he said he was &quot;In Pam last night.&quot;
  • huhuhuhuhu..huhu 2006-09-29 17:49
    [quote user=&quot;savar&quot;]<p>yayyyyy!!</p><p>code WTFs -- lots of them!<br /><br />i guess i&#39;ll have to stop complaining. what am i going to do with my time now?<br /></p><p>&nbsp;</p><p>&nbsp;</p><p>[/quote]</p><p>Imagine the Battlestar Galactica chicks making out.</p><p>&nbsp;</p><p>Or am I the only one who does this? <br /><br />&nbsp;</p><p>[captcha=photogenic] Yes they are.&nbsp;</p>
  • Mkamba 2006-09-29 17:54
    No, no. They just redefined twenty as twenty-five.
  • AN 2006-09-29 18:25

    <p>You have to do all that?</p>
    <p>&nbsp;</p>
    <pre>irb(main):001:0&gt; &quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;.length<br />
    =&gt; 25</pre>
  • EvanED 2006-09-29 18:27
    [quote user=&quot;Alex Papadimoulis&quot;]<p><strong>Matt Spicer</strong> was in the middle of a VB6 to C# conversion projection and stumbled across this next snippet. He decided to not bring this line of code to the new project ... </p><blockquote><pre>lSend = IIf(lSend = True, True, False)</pre></blockquote><p>[/quote]</p><p>&nbsp;</p><p>Wow, it&#39;s like a repeat of A False Detector:</p><p>&nbsp;[quote]<br /></p><pre><font>public boolean</font> checkFalse(<font>Boolean</font> bool)<br />{<br /> <font>if</font> (bool.booleanValue() == <font>Boolean</font>.<font>FALSE</font>.booleanValue())<br /> {<br /> <font>return</font> <font>Boolean</font>.<font>FALSE</font>.booleanValue();<br /> }<br /> <font>else</font><br /> {<br /> <font>return</font> <font>Boolean</font>.<font>TRUE</font>.booleanValue();<br /> }<br />}</pre><p>&nbsp;[/quote]</p><p>&nbsp;</p><p>(This is my favorite WTF yet... I laughed for about 5 minutes almost solid. My sides were hurting when I was done.)<br /></p>
  • sjs 2006-09-29 18:57
    % ruby<div>puts &quot; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;.length</div><div>^D</div><div>25</div><div>%&nbsp;</div>
  • Anonymous 2006-09-29 19:14
    <p>I think a good contest would be to see who can come up with the most overengineered solution to count the actual number of spaces in that &quot;TwentySpaces&quot; string.</p><p>&nbsp;GO!&nbsp; I&#39;d better see some XML and web services.</p>
  • Oipoistar 2006-09-29 19:26
    <p>I love this small &quot;currently not thinking - just working&quot; things.</p><p>I still remember my first: &nbsp; if(true)&nbsp;</p>
  • Anonymous 2006-09-29 19:47
    [quote user=&quot;Anonymous&quot;]<p>I think a good contest would be to see who
    can come up with the most overengineered solution to count the actual
    number of spaces in that &quot;TwentySpaces&quot; string.</p><p>&nbsp;GO!&nbsp; I&#39;d better see some XML and web services.</p><p>[/quote]</p><p>#define ONE (1)<br />
    #define TWO (ONE + ONE)<br />
    #define THREE (TWO + ONE)<br />
    ...</p><p>enum eMyBoolean {<br />
    &nbsp;&nbsp;&nbsp; TRUE,<br />
    &nbsp;&nbsp;&nbsp; MOSTLY_TRUE,<br />
    &nbsp;&nbsp;&nbsp; COULD_BE_TRUE,<br />
    &nbsp;&nbsp;&nbsp; SOMETIMES_IT_IS_TRUE,<br />
    &nbsp;&nbsp;&nbsp; NOPE_IT_IS_FALSE,<br />
    &nbsp;&nbsp;&nbsp; I_WAS_WRONG_IT_IS_REALLY_TRUE,<br />
    &nbsp;&nbsp;&nbsp; FALSE,<br />
    &nbsp;&nbsp;&nbsp; FILE_NOT_FOUND,<br />
    &nbsp;&nbsp;&nbsp; FILE_FOUND_AND_SO_I_DELETED_IT<br />
    };</p><p>#define SUCCESS (FILE_FOUND_AND_SO_I_DELETED_IT)<br />
    #define FAILURE (SUCCESS)</p><p>#define SPACE ( )<br />
    #define QUOTE (\&quot;)&nbsp;&nbsp; // WTF? I don&#39;t know why I need a backslash here, but it&#39;s the only way to make it work. ROFLMFAO.<br />
    //#define QUOTE (|)&nbsp;&nbsp; // 1337 systems use pipes instead of quotes<br />
    </p><p>int is_this_character_mostly_a_space(void* memory_buffer) {</p><p> &nbsp;&nbsp;&nbsp; if(memory_buffer &lt; 0x00000000)<br />
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; throw STUPID_USER_EXCEPTION;</p><p>&nbsp;&nbsp;&nbsp; std::string data = &amp;(*memory_buffer)[(ONE - 1) ? 0 : ONE - 1];<br />
    &nbsp;&nbsp;&nbsp; std::string xml = &quot;&lt;parsedata data=&quot; + QUOTE + data + QUOTE + &quot;
    value=&quot; + QUOTE + &quot;getAscii.cgi(&quot; + QUOTE + SPACE + QUOTE + &quot;) /&gt;&quot;;<br />
    </p><p>&nbsp;&nbsp;&nbsp; Client.ConnectTo(&quot;http://validator.org/checkAscii.cgi?&quot; + xml);<br />
    &nbsp;&nbsp;&nbsp; return(static_cast&lt;eMyBoolean&gt;(Client.GetResponse()) == FAILURE ? SUCCESS : FAILURE);<br />
    }</p>
  • PiLLe 2006-09-29 20:02
    int return_space_count(std::string spaceString)
    {
    return 25; // hrhr
    }
  • Quincy5 2006-09-29 20:12
    <p><strong>F.S.</strong> noticed that Australian airline JetStar is very careful about ensuring visitors are sent to the proper page ... </p><blockquote><pre>if ((version==&quot;NS&quot;) || (version==&quot;IE&quot;)) <br />{ <br /> if (version==&quot;NS&quot;) <br /> /* NS URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br /> else <br /> /* IE URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br />} <br /> else <br /> /* OTHER URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; </pre></blockquote><p>&nbsp;Maybe they initially wanted to make different pages for these browsers, and this code was accidently not removed after someone decided making different pages was too complicated/time-consuming/expensive/whatever.<br /></p>
  • jrrs 2006-09-29 22:08
    [quote user=&quot;Anonymous&quot;]<p>[quote user=&quot;Anonymous&quot;]How many of you counted the spaces?&nbsp;&nbsp;:)[/quote]</p><p>&nbsp;H:\&gt;perl -e &quot;print length(\&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \&quot;);&quot;<br />25<br />H:\&gt;</p><p>[/quote]</p><p>I copied the string contents into the emacs &quot;*scratch*&quot; buffer and ran shell-command-on-buffer, &quot;wc&quot;. ;-)<br /></p>
  • JustThat 2006-09-29 22:36
    <p>[quote user=&quot;Colin McGuigan&quot;]MakeCum reminds me of one of my earlier efforts, when I had to work on a fund accrual generation system, or the FAG system, which consisted of FAG customers, FAG products, FAG rates, etc...<br />[/quote]</p><p>&nbsp;</p><p>Of course, trying to create meaningful server names can also lead to these types of problems. I remember a Microsoft Exchange server that was being built for a mailbox restoration while I was at ISS...ah, yes. It was called ISSEXREST</p><p>&nbsp;</p>
  • JustThat 2006-09-29 22:39
    [quote user=&quot;Anonymous&quot;]<p>Or even better, the system I worked on named by the Marketing Wonks:</p><p>CRP</p><p>&nbsp;Had us laughing for an hour since we definitely had the fastest CRP around<br /><br />&nbsp;</p><p>[/quote]</p><p>&nbsp;</p><p>This actually reminds me of one a former coworker told me about. He was on the Solomon support team. The queue in the support ticket system was SOL&nbsp;</p>
  • JustThat 2006-09-29 22:43
    [quote user=&quot;Anonymous&quot;]<p>I always wanted to create a help desk system called &quot;My Pants&quot;.&nbsp; </p><p>Support: &quot;Hmm, I&#39;ve never heard of that. Let me search my pants and see what I can find.&quot;</p><p>Support:&nbsp; &quot;I&#39;m sorry, My Pants is down, so I can&#39;t answer your question.&quot;</p><p>Support:&nbsp; &quot;I seem to recall seeing something about that in My Pants.&quot;</p><p>&nbsp;The 14 year old humor possibilities are endless!</p><p>[/quote]</p><p>&nbsp;</p><p>Try this one on: A group of people whose job it is to make sure business requests for IT services make sense and are possible. We would call it the Business/Information Technology Clearing House.</p><p>&nbsp;&quot;Hey, can we do that? Did the BITCH clear it?</p><p>&quot;Have you asked the BITCH if we have the money for that?&quot;</p><p>&quot;Can&#39;t go to lunch...got a 1 o&#39;clock BITCH session&quot;</p><p>&quot;I used to work in that group...now I guess I&#39;m just a son of a BITCH&quot;</p><p>&nbsp;<br />Yeah, I could go on forever.<br />&nbsp;</p>
  • Wayne Newton, IV 2006-09-29 22:57
    <p>How about a Python version while we&#39;re at it:</p>

    <p>
    &gt; python -c &quot;print len(&#39; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;)&quot; <br />
    25
    </p>

    <p>or</p>

    <p>&gt; python <br />
    &gt;&gt;&gt; len(&#39;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;)<br />
    25<br />
    </p>
  • Wayne Newton, IV 2006-09-29 23:07
    [quote user=&quot;Anonymous&quot;]<p>I think a good contest would be to see who can come up with the most overengineered solution to count the actual number of spaces in that &quot;TwentySpaces&quot; string.</p><p>&nbsp;GO!&nbsp; I&#39;d better see some XML and web services.</p><p>[/quote]</p><p>&nbsp;</p><p>OK, just a preliminary attempt at a data representation here. Maybe someone can build on this.<br /></p><p>&lt;string&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;char value=&quot; &quot;/&gt;<br />&lt;/string&gt;<br />&nbsp;</p><p>&nbsp;<br />Captcher == &quot;error&quot; -&gt; True<br /></p>
  • rob_squared 2006-09-30 00:10
    [quote user=&quot;Rank Amateur&quot;][quote user=&quot;Alex Papadimoulis&quot;] <p><strong>F.S.</strong> noticed that Australian airline JetStar is very careful about ensuring visitors are sent to the proper page ... </p><blockquote><pre>if ((version==&quot;NS&quot;) || (version==&quot;IE&quot;)) <br />{ <br /> if (version==&quot;NS&quot;) <br /> /* NS URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br /> else <br /> /* IE URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br />} <br /> else <br /> /* OTHER URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; </pre><pre>[/quote]</pre><pre><pre>I&#39;m outraged. What about Opera? You can&#39;t have Opera browsers going to </pre><pre>/skylights/cgi-bin/skylights.cgi! Clearly you have to direct them to </pre><pre>/skylights/cgi-bin/skylights.cgi! This is browser discrimination!</pre><pre>--Rank</pre></pre></blockquote><p>[/quote]</p><p>&nbsp;</p><p>Forget opera, what about lynx!&nbsp; I hope telnetting to port 80 is ok though...&nbsp;</p>
  • Tub 2006-09-30 00:37
    <p>[quote user=&quot;Anonymous&quot;]I hope telnetting to port 80 is ok though...[/quote]</p><p>oh, that&#39;d need more than just javascript.</p><p>&nbsp;</p><p>&lt;!-- if you&#39;re using telnet, please browse to /skylights/cgi-bin/skylights.cgi --&gt;<br /></p>
  • Ferdinand 2006-09-30 02:09
    <p>[quote user=&quot;JustThat&quot;]Of course, trying to create meaningful server names can also lead to these types of problems. I remember a Microsoft Exchange server that was being built for a mailbox restoration while I was at ISS...ah, yes. It was called ISSEXREST[/quote]</p><p>Or, how about the Microsoft Exchange Team Blog...</p><p><a href="http://msexchangeteam.com/">http://msexchangeteam.com/</a></p><p>(m-sex-change-team-dot-com)</p>
  • Dazed 2006-09-30 02:48
    [quote user="Anonymous"][quote user=&quot;Anonymous&quot;]This looks to me like the developer just needed a place to stick a breakpoint so he could start stepping through the code when it got to customer #7742, so he could figure out why it was failing for that customer. At least, that&#39;s why *I&#39;ve* written code like this.[/quote]I do it too, but I don&#39;t let anyone know. I clean up after myself. The next thing you know, another drone is poking through the files checked in with my name on it looking for that kind of thing :)</p>[/quote]

    Well indeed. And just in case one forgets to remove an instance, a "// debug" comment takes two seconds to enter and is simple politeness to the next developer who comes along.
  • john yaya 2006-09-30 04:18
    [quote user=&quot;Anonymous&quot;]<p>14 year old humour - I work with a database called &quot;MasterData&quot;. Not that funny if you are Kiwi like my colleagues, as they pronounce data the American way (First syllable rhymes with bar). However, I&#39;m from the UK and for me it rhymes with day. Try saying it my way, out loud...</p>[/quote]
    <div>&nbsp;</div><div>That&#39;s almost as good as a milestone I had on a project once called the MasterBeta.&nbsp;</div>
  • Monty 2006-09-30 05:40
    [quote user=&quot;firedup&quot;]<p>A few projects back I worked with a&nbsp;girl 3 months out of school. We had some coding style rules, one of which was &#39;descriptive variable names&#39;. Instead of, as you suggest, &quot;DELIMITER&quot;, she used something like: &quot;THE_CHARACTER_THAT_SEPARATES_FIELDS_IN_THE_PARAMETER_STRING&quot;.</p><p>[/quote]</p><p>&nbsp;</p><p>There&#39;s no way a girl of 3 months should be in school yet anyway. I guess that&#39;s the real WTF here.<br />&nbsp;</p>
  • qbolec 2006-09-30 06:09
    <pre>If .Fields(&quot;CUST_NUM&quot;) = &quot;7742&quot;; Then
    dtmOrderPlaced = dtmOrderPlaced
    End If

    foreach (CxNode node in nodeList) {
    object[] ndArgs = buildArgs(node);
    try {
    sb.AppendFormat(node.Output, ndArgs);
    } catch(Exception) {
    sb.AppendFormat(node.Output, ndArgs);
    }
    }
    </pre><p>These two, are in my opinion results of the same problem : inability to debug. I&#39;m forced to use the second aproach when debugging under Windows CE emulator, because after the exception is thrown you cannot recreate it by using &quot;Set Next Statement&quot;, so the only way is to repeat the call that caused exception in catch block - this time debugging step by step.</p>
  • Kim 2006-09-30 07:38
    <p>&nbsp;&lt;char value=&quot; &quot;/&gt; doesn&#39;t cut it. It&#39;s not exactly Enterprise-quality...</p><p>&nbsp;Use &lt;character encoding=&quot;ISO-8859-1&quot;&gt;&lt;codepoint source=&quot;unicode&quot;&gt;&lt;integer format=&quot;hexadecimal&quot;&gt;20&lt;/integer&gt;&lt;/codepoint&gt;&lt;/character&gt;</p><p>(Captcha: &quot;error&quot;. Something wrong with your system?)</p>
  • Cobra 2006-09-30 08:24
    Far more empowering! After all, Sunday and Saturday are the strongest days, the other five being, of course, <em>Week </em>Days... ;)<br />
  • Cobra 2006-09-30 08:26
    [quote user=&quot;Volmarias&quot;]Ah, brillant. It&#39;s been a while since we&#39;ve had a delightful smorgasbord of code snippets. These are all fortunately more hillarious than horrid.<br /><br />I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays.<br />[/quote]
    Far more empowering! After all, Sunday and Saturday are the strongest days, the other five being, of course, <em>Week </em>Days... ;)
  • Cobra 2006-09-30 08:52
    <p>[quote user=&quot;Alex Papadimoulis&quot;]</p><p>public class MakeCum {<br />
    </p><pre> public static void main(String[] args) {<br /> ...<br /> CLArgParser clap = new CLArgParser(clargs);<br /><br /> boolean err = clap.doStdArgs(args);<br /><br /> if (err) {<br /> System.out.println(&quot;Usage: MakeCum &quot;);<br /> System.out.println(clap.getStdArgsDescription());<br /> return;<br /> }<br />...}[/quote]</pre>
    <pre>Ah... reminds me of a report I had to do at a former job. </pre>
    <pre>My boss was very fond of 8.3-style names, so everything (from table names to file names) had that naming format in the company (not necessarily with only 8 characters for names, but with no spaces or special characters whatsoever). One day, he asked me to build a report that returned analytic data. </pre>
    <pre>The name of the file? <strong>AnalReport</strong>. Try keeping a straight face and hold the laughter when the client calls you (as they always do, no matter what) to say that &quot;this AnalReport stinks&quot;...</pre><pre>&nbsp;</pre><pre>Captcha: bedtime (should have been, but wasn&#39;t...)&nbsp;</pre>
  • jdoff 2006-09-30 10:53
    <pre>dev:~&gt; echo &quot; &quot; | wc -m
    25
    dev:~&gt;
    </pre>
  • WWWWolf 2006-09-30 11:10
    [quote user=&quot;Alex Papadimoulis&quot;]<p>For those of you with a maturity level greater than &quot;14 years old&quot;, this next snippet probably won&#39;t be for you. Thankfully, <strong>Brian Samson</strong> isn&#39;t one of those people .. </p><blockquote><pre>public class MakeCum {<br /><br /> public static void main(String[] args) {<br /> ...<br /> CLArgParser clap = new CLArgParser(clargs);<br /><br /> boolean err = clap.doStdArgs(args);<br /><br /> if (err) {<br /> System.out.println(&quot;Usage: MakeCum &quot;);<br /> System.out.println(clap.getStdArgsDescription());<br /> return;<br /> }<br />...}</pre></blockquote><p>[/quote]</p><p>&nbsp;</p><p>The Real WTF(tm) here, of course, is that they use System.out instead of System.err to print error message, and use return rather than System.exit() to signal a failure condition</p>
  • bbum 2006-09-30 11:44
    Nahh...&nbsp;more&nbsp;like:<div>&nbsp;</div><div>#define&nbsp;PANDABUTT&nbsp;0x7c</div>
  • ammoQ 2006-09-30 12:04
    [quote user=&quot;WWWWolf&quot;][quote user=&quot;Alex Papadimoulis&quot;]<p>For those of you with a maturity level greater than &quot;14 years old&quot;, this next snippet probably won&#39;t be for you. Thankfully, <strong>Brian Samson</strong> isn&#39;t one of those people .. </p><blockquote><pre>public class MakeCum {<br /><br /> public static void main(String[] args) {<br /> ...<br /> CLArgParser clap = new CLArgParser(clargs);<br /><br /> boolean err = clap.doStdArgs(args);<br /><br /> if (err) {<br /> System.out.println(&quot;Usage: MakeCum &quot;);<br /> System.out.println(clap.getStdArgsDescription());<br /> return;<br /> }<br />...}</pre></blockquote><p>[/quote]</p><p>&nbsp;</p><p>The Real WTF(tm) here, of course, is that they use System.out instead of System.err to print error message, and use return rather than System.exit() to signal a failure condition</p><p>[/quote]</p><p>Not completely true. The problem is that there could (should) be a command line option like &quot;-h&quot; that shows the usage info; if this option is given, output should go to System.out. Therefore we are facing the problem that the return code of CLArgParser.doStdArgs() must represent three possible values: &quot;success&quot;, &quot;failure&quot; and &quot;help requested&quot;. It should be ovious for all regular readers of this site how to solve that:</p><pre>enum Bool <br />{ <br /> True, <br /> False, <br /> HelpRequested <br />};</pre><p>&nbsp;</p><p>&nbsp;</p>
  • Loren Pechtel 2006-09-30 14:52
    [quote user=&quot;Alex Papadimoulis&quot;]Talk about customer service! <strong>Josh&#39;s</strong> company really makes sure that Customer #7742&#39;s order date is ... well ... Customer #7742&#39;s order date ... <blockquote><pre>If .Fields(&quot;CUST_NUM&quot;) = &quot;7742&quot; Then<br /> dtmOrderPlaced = dtmOrderPlaced<br />End If[/quote]</pre><pre>&nbsp;What&#39;s the big deal here? This is just a conditional breakpoint in code. When you want a breakpoint on something this complex, what else are you going to do?&nbsp;</pre></blockquote><p>[quote]<strong>F.S.</strong> noticed that Australian airline JetStar is very careful about ensuring visitors are sent to the proper page ... </p><blockquote><pre>if ((version==&quot;NS&quot;) || (version==&quot;IE&quot;)) <br />{ <br /> if (version==&quot;NS&quot;) <br /> /* NS URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br /> else <br /> /* IE URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; <br />} <br /> else <br /> /* OTHER URL */ <br /> window.location=&quot;/skylights/cgi-bin/skylights.cgi&quot;; [/quote]</pre><pre>&nbsp;</pre><pre>In other words, a standard template.&nbsp;</pre><pre>&nbsp;</pre></blockquote><p>[quote]<strong>Matt Spicer</strong> was in the middle of a VB6 to C# conversion projection and stumbled across this next snippet. He decided to not bring this line of code to the new project ... </p><blockquote><pre>lSend = IIf(lSend = True, True, False)</pre></blockquote><p>&nbsp;[/quote]</p><p>A trap for corrupt data.&nbsp;&nbsp;&nbsp;&nbsp;</p>
  • RoxChkPlusOny 2006-09-30 19:29
    I would actually use code like F.S. presented in the midst of developing. The idea would be to set that up so it&#39;s usable immediately, and then iteratively work through making NS- and IE-compatible websites. Only when they were testable would i change the URLs to point to them. However, in this particular example I would probably put the logic in the CGI code, not in the Java...<br />
  • Volmarias 2006-10-01 00:18
    [quote user=&quot;Anonymous&quot;]However, in this particular example I would probably put the logic in the CGI code, not in the Java...[/quote]<br /><br />...Script. JavaScript. Not Java.<br /><br />Honestly now.<br />
  • VeXocide 2006-10-01 07:25
    Source potpourri, what delight<br />
  • Mr I 2006-10-01 08:50
    <p>&lt;Quote&gt;</p><p>public class MakeCum {<br /><br />&nbsp; public static void main(String[] args) {<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp; CLArgParser clap = new CLArgParser(clargs);<br /><br />&nbsp;&nbsp;&nbsp; boolean err = clap.doStdArgs(args);<br /><br />&nbsp;&nbsp;&nbsp; if (err) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;Usage: MakeCum &quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(clap.getStdArgsDescription());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp; }<br />...}</p><p>&lt;/Quote&gt;</p><p>&nbsp;</p><p>Wow....at last a WTF we can masturbate to...remember - <a href="http://www.youtube.com/watch?v=6iAWst1zXkM" title="The internet is for porn song">the internet in for porn!</a>&nbsp;(song from a broadway musical...relax!)</p>
  • Timmy 2006-10-01 19:29
    Paula Bean...<em>where are you?!?</em><br />
  • xrT 2006-10-02 01:23
    [quote user=&quot;Anonymous&quot;] <p>[quote user=&quot;Anonymous&quot;]How many of you counted the spaces?&nbsp;&nbsp;:)[/quote]</p><p>&nbsp;H:\&gt;perl -e &quot;print length(\&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \&quot;);&quot;<br />25<br />H:\&gt;</p><p>&nbsp;</p><p>[/quote]<br /><font face="courier new,courier">C:\&gt; osql -E -Q &quot;select datalength(&#39;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;)&quot;<br /><br />-----------<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25</font></p><p><font face="tahoma,arial,helvetica,sans-serif"><font face="courier new,courier">(1 row affected)<br /><br />C:\&gt;<br /></font><br />I could have made an app that &quot;shelled&quot; query analyzer then just &quot;send keys&quot; these query,&nbsp;send &quot;F5&quot;, send another set of keys to highlight the result, send &quot;CTRL+C&quot;, &quot;shelled&quot; notepad.exe, send &quot;CTRL+V&quot;, send &quot;ALT, F, S, C:\result.txt, ENTER&quot;, then in the same app, read the contents of result.txt,&nbsp;&quot;val&quot;-ed it and put the final result in a messagebox. But I&#39;m a bit lazy today...<br /><br />Oh wait...<br /><br /><br /><br /></font></p>
  • drx 2006-10-02 03:41
    Yo DailyWTF, your RSS feed got bad recently. Since the ads are always changing, my feedreader reports that the items have been edited and marks them as unread. It might be worth a discussion if the feedreader is WTFed or your feed ... but i think you could change yours easily ... And my opinion is that your feed is WTFed :)
  • yoyo42 2006-10-02 04:29
    <p>&quot;The name of the file? <strong>AnalReport</strong>. Try keeping a straight face...&quot;</p><p>&nbsp;My company had an incredible time code system:&nbsp; 0.1 hour resolution (so 7h45m fridays were tricky...), a whole deep hierarchy of codes for administrivia work but only one &#39;customer project&#39; code, that sort of thing. Then they upgraded it to at least allow customer&nbsp;tasks to be broken down a little further. Except that there was only a very short text field for the description.</p><p>Is your current activity customer-related analysis work? Then just put your hours down against <strong>&#39;Anal Acts&#39;</strong>...&nbsp;</p>
  • sk 2006-10-02 04:43
    most clueless way of counting the spaces ....<br /><br /><br />&lt;?php<br /><br />$howMushSpacesIsOutThere = 0;<br />$countSpacesInThisWord = &quot; &quot;;<br /><br />while ( ($countSpacesInThisWord{$howMuchSpacesIsOutThere} != &#39;&#39; ? ++$howMuchSpacesIsOutThere : 0)) ;<br /><br />print $howMuchSpacesIsOutThere . &quot;\n&quot;;<br /><br /><br />?&gt;<br /><br />speaking of devil captcha: clueless, really!<br /><br />
  • HardCoder 2006-10-02 05:10
    [quote user=&quot;Jojosh_the_Pi&quot;][quote user=&quot;Alex Papadimoulis&quot;] <blockquote><pre>int doctrackId = Convert.ToInt32(&quot;0&quot;); //wtf!!</pre></blockquote><p> [/quote]<br /><br /> Maybe the programmer was concerned the int would be initialized with 64 bits, so he used this to try to specify a 32 bit integer, thus conserving memory.<br /><br />[/quote]</p><p>wtf!!<br /></p><p>CAPTCHA Test</p><p>&nbsp;</p>
  • piersy 2006-10-02 05:12
    I suppose it&#39;s just possible that there was som logic embedded in a trigger or something, which would be something of a wtf in itself if this was the way they went about applying said logic.
  • egilhh 2006-10-02 05:26
    [quote user=&quot;Anonymous&quot;] <p>[quote user=&quot;JustThat&quot;]Of course, trying to create meaningful server names can also lead to these types of problems. I remember a Microsoft Exchange server that was being built for a mailbox restoration while I was at ISS...ah, yes. It was called ISSEXREST[/quote]</p><p>Or, how about the Microsoft Exchange Team Blog...</p><p><a href="http://msexchangeteam.com/">http://msexchangeteam.com/</a></p><p>(m-sex-change-team-dot-com)</p><p>[/quote]</p><p>&nbsp;</p><p>You just can&#39;t beat&nbsp;</p><p><a href="http://www.expertsexchange.net/">http://www.expertsexchange.net</a></p><p>&nbsp;</p><p>~egilhh</p>
  • hpeg 2006-10-02 06:12
    <p>Guess it&#39;s better than a method called &quot;howToTellYourProgrammersAreLackingSleepAndHighOnCaffeine&quot; or placeholder constants like:</p><p>public static final String GLOBAL = &quot;Girls #18 Fujiyoushi Dead 41 to go&quot;;<br />&nbsp;</p>
  • ChrisH 2006-10-02 07:06
    <p>MakeCum is very funny.&nbsp; I can&#39;t help thinking though maybe it&#39;s accidental.&nbsp; It is possible.</p><p>&nbsp;<br />I previous incarnations I have actually issued the command line: </p><p>&gt; ROLLBACK DICK</p><p>&nbsp;<br />For the life of me I can&#39;t remember what the acronym stood for but to get the inclusion of the &quot;K&quot; was a certain fix created out of the necessity to correctly complete the phrase above.<br />&nbsp;</p>
  • nbit 2006-10-02 07:28
    <p>What does captcha mean? Is it&nbsp;more brilliant than a&nbsp;paula bean? </p><p>can someone give me a link to the wtf article about captcha?</p><p>&nbsp;</p>
  • csrster 2006-10-02 08:13
    [quote user=&quot;Anonymous&quot;]<p>I&#39;m getting too old. The only one that made me LOL was the try/catch with the same exact code.&nbsp; That&#39;s awesome.&nbsp; I wish I had 14-yr-old humor again.<br /></p><p>&nbsp;</p><p>CAPTCHA: awesomeness</p><p>&nbsp;</p><p>[/quote]</p><p>&nbsp;</p><p>Agreed, but what a shame they forgot the &quot;finally&quot; clause with the same code.&nbsp;</p>
  • The Big D 2006-10-02 08:32
    [quote user=&quot;Anonymous&quot;][quote user=&quot;Anonymous&quot;] <p>I&#39;m getting too old. The only one that made me LOL was the try/catch with the same exact code.&nbsp; That&#39;s awesome.&nbsp; I wish I had 14-yr-old humor again.<br /></p><p>&nbsp;</p><p>CAPTCHA: awesomeness</p><p>&nbsp;</p><p>[/quote]</p><p>&nbsp;</p><p>Agreed, but what a shame they forgot the &quot;finally&quot; clause with the same code.&nbsp;</p><p>[/quote]</p><p>&nbsp;</p><p>Maybe the original unobfuscated code was C++?</p>
  • David Zimmerman 2006-10-02 09:42
    [quote user=&quot;BradC&quot;][quote user=&quot;Alex Papadimoulis&quot;] <p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;</pre></blockquote><p>[/quote]</p><p>Beautiful in its simple WTF&#39;ery.</p><p>Probably this should be something like </p><p>#define DELIMITER &quot;|&quot;</p><p>[/quote]</p><p>Besides, COMMA is much esier to spell then DELIIMTRER&nbsp;</p>
  • Kevin S. 2006-10-02 14:37
    <blockquote><pre>&gt;&gt; Price = 0e-5; /* J.Palmer 1999-11-15 - I hope it&#39;s not a bug */</pre></blockquote><p>&nbsp;</p><p>Reminds me of a system I once worked on, where one of the comments that had survived months of source-code check-ins was something like:</p><p>&nbsp;/ * This doesn&#39;t work - need to fix on Monday */<br /></p>
  • John Hensley 2006-10-02 15:02
    [quote user=&quot;Alex Papadimoulis&quot;]<blockquote><pre>// This instance of OPParcelObj is owned by an instance of <br />// OPParcelArray that is associated with an instance of <br />// OPCustThread which owns an instance of the parcel <br />// processor which is the processor needed to process <br />// this parcel.</pre></blockquote><p>[/quote]</p><p>How many parcels could a processor process if a processor could process parcels?<br />&nbsp;</p>
  • IndyHarcourt 2006-10-02 15:44
    <p>Nah. It&#39;s easier this way:</p><p>string twentySpaces = &quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;;<br />int length = 0;<br />for (int i=0;i&lt;twentySpaces.Length;i++)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />{<br />&nbsp;&nbsp;&nbsp; length++;<br />}<br />Console.WriteLine(&quot;The length of twentySpaces is {0}.&quot;, length);<br /></p><p>And yes, I do&nbsp;envision the Battlestar Glactictica making out. Is there something wrong with that?</p>
  • Adam 2006-10-02 17:43
    [quote user=&quot;BradC&quot;][quote user=&quot;Anonymous&quot;] <p>I always wanted to create a help desk system called &quot;My Pants&quot;.&nbsp; </p><p>Support: &quot;Hmm, I&#39;ve never heard of that. Let me search my pants and see what I can find.&quot;</p><p>Support:&nbsp; &quot;I&#39;m sorry, My Pants is down, so I can&#39;t answer your question.&quot;</p><p>Support:&nbsp; &quot;I seem to recall seeing something about that in My Pants.&quot;</p><p>&nbsp;The 14 year old humor possibilities are endless!</p><p>[/quote]</p><p>Lol, nice.</p><p>Support: &quot;Please hold.&nbsp;Sysadmin Julia currently has My Pants down for servicing.&quot;</p><p>Support: &quot;I&#39;m sorry, My Pants is a little slow today...&quot;</p><p>Support: &quot;I&#39;m sorry, I can&#39;t seem to find that in My Pants.&quot;</p><p>&nbsp;</p><p>&nbsp;</p><p>[/quote]</p><p>You are all missing the true humor of this one:</p><p>Support: &quot;I&#39;m sorry, I don&#39;t know if I can help you with this. I&#39;ll stick it in My Pants and Julia will handle it as soon as possible.&quot;</p><p>captcha: jiggles ... I think the captcha system is getting in on the grade school humor.<br />&nbsp;</p>
  • lomaxx 2006-10-02 21:49
    i liked this wtf...&nbsp;particularly because i know the guy who&#39;s company developed the jetstar website :)
  • Marc 2006-10-03 01:22
    <p>[quote user=&quot;Alex Papadimoulis&quot;] </p><blockquote><pre>#define COMMA &quot;|&quot;&nbsp;</pre></blockquote><p>[/quote]</p><p>[quote user=&quot;Anonymous&quot;]</p><p>&lt;snip/&gt;</p><p>&nbsp;&nbsp; [A few days later]</p><p>&nbsp;&nbsp; Boss: Ok, here is a .csv file to try your module:<br /></p><p>&nbsp;&nbsp; File: data;moredata;another data; etc<br /></p><p>&nbsp;&nbsp; Programmer: .....</p><p>&nbsp;&nbsp; [More days later]</p><p>&nbsp;&nbsp; Boss: the client sent this file, almost like the ones we&#39;ll use in production<br /></p><p>&nbsp;&nbsp; Second File: data-moredata-another data- etc.</p><p>&lt;snip/&gt;</p><p>[/quote]</p><p>To illustrate; my bank offers a statement download facility; you can choose Money, Quicken, etc, or &quot;csv&quot;; and guess what the delimiter is?</p><p>Tab</p><p>Now I&#39;ll grant that many spreadshets copy/paste better with tab, but why call it csv?</p><p>Marc</p>
  • Engelbret Gunderson 2006-10-03 08:37
    <p>It must be important to do this &#39;checkpoint&#39; thing no matter what at least once a day...<br /></p><pre>while ((i=WaitForSingleObject(m_hCheckpointEvent,1&lt;&lt;20))!=WAIT_FAILED) {<br /> if (shutdownthread) break;<br /> switch (i) {<br /> case WAIT_TIMEOUT: // every 17:29 whether you like it or not<br />// break;<br /> case WAIT_OBJECT_0:<br /> pthis-&gt;PerformCheckpoint();<br /> }<br /> }<br />}</pre><p>&nbsp;</p>
  • cindypsych 2006-10-03 13:05
    No, it&#39;s data rhymes with pat-a or that-a.&nbsp; I think it&#39;s a WASP thing.
  • cindypsych 2006-10-03 13:08
    Because if it has a .csv extension Excel will open it without having to copy/paste or import.&nbsp; Just double-click the file.&nbsp; And it has to have tab delimiters because too much real data often contains real commas.
  • cindypsych 2006-10-03 13:14
    [quote user=&quot;Anonymous&quot;][quote user=&quot;Anonymous&quot;] <p>[quote user=&quot;JustThat&quot;]Of course, trying to create meaningful server names can also lead to these types of problems. I remember a Microsoft Exchange server that was being built for a mailbox restoration while I was at ISS...ah, yes. It was called ISSEXREST[/quote]</p><p>Or, how about the Microsoft Exchange Team Blog...</p><p><a href="http://msexchangeteam.com/">http://msexchangeteam.com/</a></p><p>(m-sex-change-team-dot-com)</p><p>[/quote]</p><p>&nbsp;</p><p>You just can&#39;t beat&nbsp;</p><p><a href="http://www.expertsexchange.net/">http://www.expertsexchange.net</a></p><p>&nbsp;</p><p>~egilhh</p><p>[/quote]</p><p>&nbsp;</p><p>Aw, come on.&nbsp; What about <a href="http://www.therapist.com/">www.therapist.com</a></p><p>the-rapist-dot-com</p><p>therapist-dot-com</p>
  • Anonymous 2006-10-03 15:16
    <p>Luckily, I&#39;ve never worked for &quot;this&quot; company, but one of our vendors does act like that.</p><p>&nbsp;</p><p>We ran into a serious problem involving the two different programs we use (one for data capture, one for data analysis).&nbsp; Turns out that program A wrote a bunch of data with &quot;block sizes&quot; too large for program B (I assume it&#39;s because they used a fixed-sized buffer instead of reading the block size and allocating memory dynamically, a wtf on it&#39;s own).</p><p><br /><br />We emailed company B about the problem at 4pm on Monday, and by 10am on Tuesday we had a custom-compiled version of the application ready to roll that would accept the block-size we needed.&nbsp; It was just the single .exe and not the entire installer.&nbsp; My boss was thrilled that the company had reacted to our problem so quickly.&nbsp; I just about shit a brick, since I knew that .exe couldn&#39;t have gone through any kind of QA or testing.&nbsp; Also, the &quot;About&quot; box showed exactly the same version number as the version we had previously, so there was no way to identify which version was installed on a system without simply trying to open up one of the &quot;huge block&quot; files and seeing if it segfaulted or not.</p><p>&nbsp;</p>
  • Anonymous 2006-10-03 15:16
    [quote user=&quot;Anonymous&quot;]<p>Luckily, I&#39;ve never worked for &quot;this&quot; company, but one of our vendors does act like that.</p><p>&nbsp;</p><p>[/quote]</p><p>&nbsp;</p><p>And somehow, I posted this in the wrong thread!</p><p>&nbsp;WTF.</p><p>&nbsp;</p>
  • Savaticus 2006-10-03 15:40
    <div><img height="13" src="/Themes/default/images/icon-quote.gif" width="11" /> <strong>pjsson:</strong></div><div><blockquote><div><img height="13" src="/Themes/default/images/icon-quote.gif" width="11" /> <strong>Volmarias:</strong></div><div>I particularly like how Sunday is Admin day. I suppose they decided that it would be more empowering than Casual Fridays.</div></blockquote><br />I guess no regular users will use the application on Sundays, so it is safe to assume that anyone using the application on a Sunday is an admin. At least until some user figures out if he changes the date of the PC clock to Sunday then you will get full admin privileges</div><div></div><div>The only problem with this idea is that the code was inserting a url link, which implies that this is a web app and therefore a serverside program. WHich means the user machines time settings would have no effect on the execution of this code.</div>
  • Hendrik 2006-10-04 05:22
    [quote user=&quot;Alex Papadimoulis&quot;]<p>I&#39;m sure a lot of you would have mocked <strong>Josh&#39;s</strong> collegue for having a constant named COMMA. Ha! Who&#39;s laughing now? </p><blockquote><pre>#define COMMA &quot;|&quot;</pre></blockquote><p>[/quote]</p><p>Well, at least this guy knows his history: http://en.wikipedia.org/wiki/Comma_%28punctuation%29, see under History.<br />&nbsp;</p>
  • goldenratio 2006-10-09 16:04
    Because if it has a .csv extension Excel will open it without having to copy/paste or import. Just double-click the file. And it has to have tab delimiters because too much real data often contains real commas.
    <br />this is why you use qualifiers<br /><br />ie <br /><br />&quot;some data here&quot;,&quot;an address, usa&quot;<br />
  • A P 2006-10-20 03:26
    [quote user=&quot;cconroy&quot;][quote user=&quot;Alex Papadimoulis&quot;] <p>For those of you with a maturity level greater than &quot;14 years old&quot;, this next snippet probably won&#39;t be for you. Thankfully, <strong>Brian Samson</strong> isn&#39;t one of those people .. </p><blockquote><pre>public class MakeCum {<br /><br /> public static void main(String[] args) {<br /> ...<br /> CLArgParser clap = new CLArgParser(clargs);<br /><br /> boolean err = clap.doStdArgs(args);<br /><br /> if (err) {<br /> System.out.println(&quot;Usage: MakeCum &quot;);<br /> System.out.println(clap.getStdArgsDescription());<br /> return;<br /> }<br />...}</pre></blockquote><p>Ah yes, that class has it all: MakeCum, STD Arguments, and even the Clap makes an appearance! And who would have thought a class that did nothing but &quot;convert a set of binned counts to cumulative counts&quot; could be so fun. </p><p>[/quote]</p><p>Can... hardly... keep... a... straight... face...&nbsp; (All that&#39;s missing is a &quot;catch (ValueTransitionException valTrEx) {}&quot; block; then I would have lost it.)<br /></p><p>I used to try to avoid the &quot;cum&quot; abbreviation whenever possible, but app I&#39;m currently working on has &quot;cumQty&quot; variables all over the place, so I&#39;ve gotten pretty desensitized to it.&nbsp; Now I have much more <strike>stamina</strike> tolerance for its usage.<br /></p><p>[/quote]</p><p>We had a new programmer for whom English was a second language. She defined three variables in her COBOL program for loops:</p><p>&nbsp;</p><p>01 COUNTERS.<br />&nbsp; 05&nbsp; COUNT PIC 99.<br />&nbsp; 05&nbsp; CONT PIC 99.<br />&nbsp; 05&nbsp; C...</p><p>&nbsp;I&#39;ll let you figure out what the last one was - I enjoyed watching my manager try to explain to her what the problem was, especially because she couldn&#39;t understand what he was saying. Eventually she got it and both were red-faced for hours afterwards... we were red-faced too - with laughter. </p><p>&nbsp;</p><p>captcha - shizzle</p>
  • A P 2006-10-20 03:29
    [quote user=&quot;Anonymous&quot;][quote user=&quot;Anonymous&quot;][quote user=&quot;Anonymous&quot;] <p>[quote user=&quot;JustThat&quot;]Of course, trying to create meaningful server names can also lead to these types of problems. I remember a Microsoft Exchange server that was being built for a mailbox restoration while I was at ISS...ah, yes. It was called ISSEXREST[/quote]</p><p>Or, how about the Microsoft Exchange Team Blog...</p><p><a href="http://msexchangeteam.com/">http://msexchangeteam.com/</a></p><p>(m-sex-change-team-dot-com)</p><p>[/quote]</p><p>&nbsp;</p><p>You just can&#39;t beat&nbsp;</p><p><a href="http://www.expertsexchange.net/">http://www.expertsexchange.net</a></p><p>&nbsp;</p><p>~egilhh</p><p>[/quote]</p><p>&nbsp;</p><p>Aw, come on.&nbsp; What about <a href="http://www.therapist.com/">www.therapist.com</a></p><p>the-rapist-dot-com</p><p>therapist-dot-com</p><p>[/quote]</p><p>&nbsp;</p><p>I have exactly this problem with the user name I use on a lot of sites: MrAndyPuppy (the name&#39;s a long story, used to be AndyPuppy, added the Mr when I got married, etc, etc). Some sites just convert it all to lowercase, so I&#39;m constantly being badgered for being one m-randy-puppy.</p>
  • sir_flexalot 2006-10-25 14:10
    Or, its a getting-rich man&#39;s conditional breakpoint, if you get paid per line of code!<br />
  • PDK 2007-08-31 12:29
    That last WTF was sad. Made me die a little inside.