View Single Post
  #7 (permalink)  
Old May 7th, 2007, 16:31
Donny Bahama Donny Bahama is offline
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 236
Thanks: 4
Thanked 0 Times in 0 Posts
Re: Ever get the developer's equivalent of writer's block?

Now THAT is impressive!!! I came back to read the replies and noticed that "notebook computer" (in my original post - the one I'm about to throw through a window) had become an advert link... I moused over it, and the ad was for a Panasonic Toughbook! "Tough. Durable. blah blah blah". That's some pretty amazing context-sensitive advertisement!

Thanks for the response, Ryan. My code is actually very well commented. I developed a system which serves for both commenting and debug output...
Code: Select all
$bdo=""; #Begin Debug Output
$edo="<br>"; #End Debug Ouptut
 
function foo($bar) {
   echo $bdo."   BEGIN FOO FUNCTION - PASSED PARM = ".$bar.$edo;
   if ($bar == 1) {
      echo $bdo."   BAR = 1 - DO THING 1 ".$edo;
   } elseif ($bar == 2) {
      echo $bdo."   BAR = 2 - DO THING 2 ".$edo;
   } else {
      echo $bdo."   BAR != 1 OR 2 - DO SOMETHING ELSE ".$edo; 
   }
etc.
etc.
}
When I don't want debug output, I do a global replace, setting "echo $bdo" with "#echo $bdo". Then it just serves as comment text.

All that said, it doesn't seem to be helping me that much at the moment.

Having slept on it, I think this is my next approach... I'm going to break the whole thing up into a bunch of tiny, highly specialized standalone pages, each of which works on it's own. Then I'll wite a page including all of those pages. Then I'll copy page content and replace include statements with that code.

Hope this works. I'm spending WAY too much time on this "Hello, World!" page!
Reply With Quote