TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   The Lounge (http://www.talkphp.com/lounge/)
-   -   This is what I have to put up with at work (http://www.talkphp.com/lounge/3188-what-i-have-put-up-work.html)

Village Idiot 07-29-2008 04:13 PM

This is what I have to put up with at work
 
At work, we are making changes to a really poorly made system. But today, my co-worker found a block of code that exceeds all others in stupidity:
Code:

If oContext.SiteID <> "" And 1=0 Then
                sSQL = "badly written query"
            Else
                sSQL = "badly written query"
            End If

And later in the script
Code:

If bPrioritizeMine And (CStr(rsTemp.Filter)=sAgentListingFilter) And (1=0) Then
I know theres being prepared for the future, but banking on civil war on the number line is a whole other thing.

Enfernikus 07-29-2008 06:27 PM

I don't usually like these images but I think it fits perfectly


delayedinsanity 07-29-2008 07:19 PM


Aaron 07-29-2008 08:32 PM

What is with everyone and that evil confusing hungarian notation...

is that Basic? If it is I would just quit on the spot.

delayedinsanity 07-29-2008 08:45 PM

They're not confusing, I actually really like using them since I read about them here because it makes your code even more readable - I can scan a page and quickly see where all of one specific variable is, as opposed to regular english variables that can blend in a lot easier.

http://www.talkphp.com/tips-tricks/1...-prefixes.html

Explains a lot of the ones used by people in this forum, though I think we all have our own minor variations (for example I went through phases where I used i, then int, then iz, and now I'm back to i... my style evolves as my knowledge does, sometimes for good reasons, other times just because I need to try things before I find what I like).
-m

Ross 07-29-2008 09:38 PM

You should submit that to the Daily WTF :)

I suppose it's a good debugging tool :P

Village Idiot 07-29-2008 09:41 PM

Quote:

Originally Posted by Aaron (Post 17455)
What is with everyone and that evil confusing hungarian notation...

is that Basic? If it is I would just quit on the spot.

VBscript, classic ASP. And I wont quit because I need the money and dont want to leave a good friend of mine in the lurch.

Quote:

Originally Posted by redSHIFT (Post 17461)
You should submit that to the Daily WTF :)

I suppose it's a good debugging tool :P

I might just do that

Village Idiot 07-30-2008 03:34 PM

Code:

Catch ex As Exception
            Return "Poopie: " & ex.ToString & vbCrLf & ex.StackTrace
        Finally
            oReader.Close()
        End Try

If you can't tell, our last programmer was an idiot.


All times are GMT. The time now is 08:51 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0