Here are some of my favorite snippets from the app I work on that came from some of the other developers.
This is in the middle of a object and was put there as a joke I believe as calling it causes a fatal error (spray() doesn't exist)
Code: Select all
function check()
{
if ($poop)
{
// stink
$this->spray('freshener') ;
}
}
This is the top of every page
Code: Select all
<SCRIPT language="JavaScript">
function popup( url ){
cuteLittleWindow = window.open(url, "littleWindow", "location=0,scrollbars=1,width=450,height=300");
}
</SCRIPT>
Derek quit about a year ago. I discovered this little gem a month ago and am very tempted to comment it out just to see what happens
Code: Select all
// DO NOT REMOVE THIS STATEMENT
// ALL HELL WILL BREAK LOOSE
// Derek 02/07/05
if( $reset )
{
$this->get( $prodID ) ;
}
Here is another very informative comment
Code: Select all
/****************************************
* READ THIS!!!!
*
* NEVER MODIFY THE INVENTORY OF A PRODUCT DIRECTLY
* Call the inventoryChange() or inventoryUpdate() methods instead to track the changes
*
* If you don't I swear on my mother's grave I am going to cut you with my knife, beat
* your wife with my tire iron, sell your children into slavery, then drive over to your house and kick
* your ugly useless dog
*
*******************************/
class tblProduct extends LawnGnome {