Awesomest Code Ever

I found this uncommitted change to a file on one of our shared dev servers today:

<CFIF IsDefined("request.traceactive")><CFELSE><CFSET request.traceactive = "false"/></CFIF>
<CFSET request.traceactive = 'false'/>

I don't even know where to start…

10 responses to “Awesomest Code Ever”

  1. Bradley Moore

    That is pretty awesome.

  2. Dave Shuck

    Doesn't that need a CFLOOP to work properly?

  3. Dan Wilson

    Kill it before it spawns!

  4. Steve Withington

    boy, sure would look better with a CFSET request.traceactive = 'true' at the top. ; )

  5. Eric Cobb

    I was wondering where I left that! ;-)

  6. Ben Nadel

    I like that the first false has double quotes and the second one has single quotes :( Other than that, it's awesome :)

  7. jonathan

    I am going to start, from now on, putting that at the top of every file I create

  8. Adrian J. Moreno

    @Ben, yeah, it's like the first one is going

    cfset request.traceactive equal to (air quotes)false(/air quotes)

  9. Adam Ness

    Scary thing is, one of the developers in my group has core template files that he copies from that have junk like that.

  10. Ron Stewart

    I found something almost exactly like this on one of my acceptance servers one day a couple months ago — also uncommitted — but with the addition of a preceding that defaulted the variable to "false" (yes, with quotes)… I sat and scratched my head for a few minutes on that…