Click to See Complete Forum and Search --> : Best Accidental Phrases in Scripting
TJ111
09-18-2007, 03:58 PM
I was going over some code today and noticed some just kind of random phrases floating around in my code, thought it was kind of funny. Mine aren't all that good, there's got to be some better ones out there. What do you have?
ones I saw:
for ($_GET --forget
if (!reason -- if no reason
Stephen Philbin
09-19-2007, 06:50 AM
I do actually try to write a little bit like that in my own code. I tend to use quite long variable names etc. to make the code a little more self-descriptive. I tend not to do a whole lot of commenting of my code (a very bad habbit, I know). I always mean to properly comment my code, but I know I'm just hopeless so I try to compensate with the code its self.
TJ111
09-19-2007, 11:42 AM
I'm the same way. I intend to comment, but then get so divulged in it I forget entirely. I usually just go back and give a one line description over each function, or if it's a big function i'll throw a line or two in it somewhere. Found this one today (used for redirection on non-validated users trying to access a restricted page).
$_GET['go'];
Makes me want a candy bar.
nshiell
09-28-2007, 11:57 AM
I was in a mood when i wrote these comments:
<!-- GUESS WHAT: IE DOSN'T HAVE GOOD ENOUGH SUPPORT FOR THE OBJECT TAG TO REPLACE IFRAME TAGS :-(
SO WE HAVE TO USE THIS MICROSOFTY STYLE HACK TO GET IT WORKING WITH A
NON-STANDARD IFRAME, AND YES THE FRAMEBORDER IS NEEDED FOR IE7 COMPATIBILITY! -->
<!--[if IE]>
<iframe id="framePageEdit" src="../classes/pageEdit.php?siteName=fake&pageID=4" style="height:90%; width:800px" frameborder="0">
</iframe>
<![endif]-->
<!-- NOW THE CORRECT WAY OF DOING THINGS -->
<!--[if !IE]> <-->
<object id="framePageEdit"
data="../classes/pageEdit.php?siteName=fake&pageID=4"
style="height:90%; width:800px; border-style:none" type="text/html"></object>
<!--> <![endif]-->