TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-29-2008, 04:13 PM   #1 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default 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.
__________________

Village Idiot is offline  
Reply With Quote
Old 07-29-2008, 06:27 PM   #2 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

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

Enfernikus is offline  
Reply With Quote
Old 07-29-2008, 07:19 PM   #3 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

delayedinsanity is offline  
Reply With Quote
Old 07-29-2008, 08:32 PM   #4 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

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

is that Basic? If it is I would just quit on the spot.
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 07-29-2008, 08:45 PM   #5 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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.

[Tip] Variable Prefixes

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
delayedinsanity is offline  
Reply With Quote
Old 07-29-2008, 09:38 PM   #6 (permalink)
The Contributor
 
Ross's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
Ross is on a distinguished road
Default

You should submit that to the Daily WTF :)

I suppose it's a good debugging tool :P
Ross is offline  
Reply With Quote
Old 07-29-2008, 09:41 PM   #7 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
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 View Post
You should submit that to the Daily WTF :)

I suppose it's a good debugging tool :P
I might just do that
__________________

Village Idiot is offline  
Reply With Quote
Old 07-30-2008, 03:34 PM   #8 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

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.
__________________

Village Idiot is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:25 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design