The T&D forum is not for newbiesonion2k wrote:The biggest problem I can see with this discussion, especially the SitePoint thread, is that a newbie coming to it may think "My script is slow, I'll delete all my comments!".
To comment or not to comment? (not even a question...)
Moderator: General Moderators
Ok, I think you just need to lock this topic since it's not going in the route I wanted it to go at all - just lock this topic.

- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I often comment that the variations in conventions are actually very trivial. The truth is that small percentage of programmers are what might be kindly called the biggest control freaks in the universe. I think that percentage is around 90%.feyd wrote:Unfortunately everyone has their own conventions. Great for some, bane for others.
Last edited by Christopher on Tue Apr 03, 2007 12:15 am, edited 1 time in total.
(#10850)
90% or more maybearborint wrote:I often comment that the variations in conventions are actually very trivial. The truth is that small percentage of programmers are what might be kindly called the biggest control freaks in the universe. I think that percentage is around 90%.feyd wrote:Unfortunately everyone has their own conventions. Great for some, bane for others.
-
fastfingertips
- Forum Contributor
- Posts: 242
- Joined: Sun Dec 28, 2003 1:40 am
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Comments are a necessary part of the code unless you plan to maintain it daily yourself. Have you ever gone into an app, even your own, and see something in there that had no comments, that, even though the logic screamed out to you, it still did not quite look like it should but you didn't know why?
I thought that thread was about shortening code by not assigning variables?!?!?!
:?::?
I thought that thread was about shortening code by not assigning variables?!?!?!
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
I find it interesting watching the evolution of comments.
When programming assembler it is absolutely nessecary as the machine code mnuemonics are nothing in terms of explaining what is going to be done. Commetning each line, step by step was essential...
Years later, we have almost self documenting code (at the comment level anyways) in that using a strict, logical convention is almost as good as comments. I still use comments, mostly for API documentation (phpDocumentor) and I leave little caveat notes, but I can't stand when people comment for the sake of commenting...
Still in PHP I see
// Initialize variables
Likely guilty of this myself...but honestly thats about the most worthless comment on the planet. I'm trying to get into the habit of making proper comments, but instead of every second line or so, every logical section of code. That helps in keeping code clean from comments...
There is truely an art to commenting I believe, but as an art it's subjective, so I guess were all free to form our own opinions...
PHP is high level enough you could probably get away without commenting much, you almost have to step through the code first anyways...
When programming assembler it is absolutely nessecary as the machine code mnuemonics are nothing in terms of explaining what is going to be done. Commetning each line, step by step was essential...
Years later, we have almost self documenting code (at the comment level anyways) in that using a strict, logical convention is almost as good as comments. I still use comments, mostly for API documentation (phpDocumentor) and I leave little caveat notes, but I can't stand when people comment for the sake of commenting...
Still in PHP I see
// Initialize variables
Likely guilty of this myself...but honestly thats about the most worthless comment on the planet. I'm trying to get into the habit of making proper comments, but instead of every second line or so, every logical section of code. That helps in keeping code clean from comments...
There is truely an art to commenting I believe, but as an art it's subjective, so I guess were all free to form our own opinions...
PHP is high level enough you could probably get away without commenting much, you almost have to step through the code first anyways...