Commenting Code, Also just coding structure

chnnvwshkld

New Member
What is a good practice for commeting code? I am writing an app that will not be sold, but used as a service (not a web service). Should I bother using the XML documentation practices? Or should I just comment with regular comments? If not XML comments which style should I use? // or /// <BR><BR>Also, should I comment everything that is used? Variables? Constructors? Methods? Properties? Everything??? <BR><BR>Also, for the coding structure part... <BR><BR>Should my code be organized with all similar parts put together? For example, variable declarations at top of class, then maybe enum declarations etc..., then property declarations, then constructors, then methods? This is how I am starting my app, so I would like some advice on what's "normal" or "most standard". I am also seperating each of the above sections into it's own "region". Is that ok to do??? <BR><BR>Well, thanks for any info you may be able to provide.If you're interested in reading a book on things like this, an excellent one is called _Code Complete_, by Steve McConnell. Just by reading this book, I feel that my programming skills skyrocketed! I don't have it with me right now, but it talks about everything involved in coding: from good variable names to commenting to code layout to building quailty modules to self-documenting code to etc, etc, etc. I'd highly suggest it for any programmer that wants to increase his/her skills.<BR><BR>Here's a link to Amazon, where it is sold for $24.50: http://www.amazon.com/exec/obidos/ASIN/1556154844/qid=1024164567/sr=2-1/ref=sr_2_1/002-8813083-3839221
 
Back
Top