Ever get the developer's equivalent of writer's block?

This is a discussion on "Ever get the developer's equivalent of writer's block?" within the PHP Forum section. This forum, and the thread "Ever get the developer's equivalent of writer's block? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 7th, 2007, 03:58
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 233
Thanks: 4
Thanked 0 Times in 0 Posts
Ever get the developer's equivalent of writer's block?

I'm stuck.

I've been working on the same effin' page(s) for nearly a week now. I've scrapped it and started from scratch more than once. I've run into all kinds of weirdness and learned an awful lot (my php skills are on the low side of intermediate - but climbing rapidly!) but I'm no closer to being done and I'm about ready to scrap it all and start over one more time.

Anyone else ever dealt with this? Any general advice for me (before I have to replace an $800 picture window and a $1200 notebook computer?)
Reply With Quote

  #2 (permalink)  
Old May 7th, 2007, 05:54
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Ever get the developer's equivalent of writer's block?

Yeah, happens to me. Commenting your code thoroughly helps me, though. I'm working on something I haven't looked at in 2 months right now, and if I hadn't of commented every block of code, I would've had to start over.
Reply With Quote
  #3 (permalink)  
Old May 7th, 2007, 07:12
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,639
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Ever get the developer's equivalent of writer's block?

Ryan, i know this is a but of a stupid question...lol....but how do you comment out in XHTML??? ive tried "//" and "/*blah*/" but it does not work!
Reply With Quote
  #4 (permalink)  
Old May 7th, 2007, 09:16
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,639
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Ever get the developer's equivalent of writer's block?

Dont worry, ive got it lol..... <!-- --> i knew it was somting like that but i was doing <-- -->
Reply With Quote
  #5 (permalink)  
Old May 7th, 2007, 09:25
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Ever get the developer's equivalent of writer's block?

XHTML should never need commenting. It's content, not a program. It's bad for your code to content ratio anyway (e.g. it could hurt your search engine rankings)
Reply With Quote
  #6 (permalink)  
Old May 7th, 2007, 11:27
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,639
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Ever get the developer's equivalent of writer's block?

nah, not that i am going to use it... but its good if people that dont know XHTML they can look at the comment then underneath there will be the code... that would be easier for them to find what's what.
Reply With Quote
  #7 (permalink)  
Old May 7th, 2007, 16:31
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 233
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
  #8 (permalink)  
Old May 7th, 2007, 16:32
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 233
Thanks: 4
Thanked 0 Times in 0 Posts
Re: Ever get the developer's equivalent of writer's block?

Quote:
Originally Posted by Ryan Fait View Post
It's bad for your code to content ratio anyway (e.g. it could hurt your search engine rankings)
Only if you publish your code without stripping the comments first!
Reply With Quote
  #9 (permalink)  
Old May 8th, 2007, 12:24
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Ever get the developer's equivalent of writer's block?

One thing I do sometimes is to pull out major code chunks and save them in a separate text file to isolate a specific functionality, then mix them back in. A tabbed text editor is a big help here.
Reply With Quote
Reply

Tags
coding practices, general, php

Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Block PHP Tag Jack Franklin PHP Forum 5 Feb 13th, 2008 23:12
New Kid on the Block:) carib Introduce Yourself 8 Apr 25th, 2007 00:54
formmail equivalent simonneaves Classic ASP 5 Sep 21st, 2005 11:58
Equivalent of Select Case in Php ? Andy K PHP Forum 1 Aug 19th, 2005 08:21
New Man on the Block phillyphreak Introduce Yourself 6 Jul 1st, 2005 16:55


All times are GMT. The time now is 21:15.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43