Jump to content

comments


Jocka

Recommended Posts

When creating an application, I catch  myself writing numberous comments for small things and nothing for large things.

Should I write comments for everything or not write comments at all? I feel that if someone is purchasing my product that they have the right to know where to look for a specific function or area of code.

Of course at the same time I don't want to take 100 lines of the php page just to have comments.
Link to comment
https://forums.phpfreaks.com/topic/28783-comments/
Share on other sites

I'm not sure what phpDocumentor is but after looking it up, it creates html chm and other files, correct?

Would it be better to just write readme files with each script to let the user know where to look and what does what? That way it doesn't actually take up space in the application..
Link to comment
https://forums.phpfreaks.com/topic/28783-comments/#findComment-131781
Share on other sites

In my experience with phpDocumentor comments, if you're creating a professional application that could feasibly get very complicated, it's well worth the four or five lines of comments per method. Of course, for simple mutator and accessor methods, you may not want to put much documentation in, as you usually know exactly what it does just by looking at the method's name.
Link to comment
https://forums.phpfreaks.com/topic/28783-comments/#findComment-131945
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.