Should Multi-line Comments Be Depreciated ?

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 16th, 2010, 8:33 am

Correct me if I'm wrong, but weren't things like multi-line comments put into widespread use before the proliferation of HTTP servers and web pages ?
It seems to me that cluttering up code files with long comments should be depreciated in favor of 2-3 line comments with a link to an actual documentation page and perhaps that documentation pages title. Whether you're using "/**/" or "//", you'ld still be using 4 characters to pop in a comment with a page title and URL. I'd argue that the single line form is even easier to type.
Strong with this one, the sudo is.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 16th, 2010, 8:33 am

  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Feb 17, 2005
  • Posts: 1585
  • Status: Offline

Post March 17th, 2010, 7:18 pm

I think multi-lined comments are more useful for saving blocks of code that you need but don't want to be parsed and want to keep in the same file. Otherwise, yeah, they shouldn't be used. However, they're also used for documentation engines already, so I can't complain really. I also hate gigantic multi-lined comments ...AND visual studios multi-lined comment correction.
There's no place like 127.0.0.1, badass part is now it's ::1
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 17th, 2010, 8:32 pm

Yep, sounds like commenting out blocks of code could be a deal breaker.
Strong with this one, the sudo is.
  • Nucleo
  • SausagePorkPie
  • Mastermind
  • User avatar
  • Joined: Aug 16, 2003
  • Posts: 2297
  • Loc: UK - England
  • Status: Offline

Post March 20th, 2010, 5:40 am

Often use multi-lined comments for an intro to a file, purpose, author,date etc. Sometimes it just helps when determining what the files does.
Codebuddies - Website Development Resource
|INCLUDE(), INCLUDE_ONCE(), REQUIRE() IN PHP | - / - |MICROSOFT CRM 4.0 ONCLICK EVENT WITHIN FORM |
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 20th, 2010, 6:16 am

I must be one of the few people who almost never reads the comments in code files. I read the short comments that say things like "It's done this way because of bug #12345". That's about it though.
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post March 20th, 2010, 9:55 pm

I like to document every line of my code to tell me what each line is doing... not because I have short term memory loss but because if I give that code to someone, I don't have to spend an hour explaining why I did something that way and it's easier to notice a logical error.

I use multiple line comments before every function telling what the function does and at the beginning of every file with my notices and other fun stuff.

You could see some of my work Here. You need to be registered and logged in to view the files there though. If you get to see those files, you would be able to see what I mean by commenting on each line of PHP code.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 161 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.