Commenting Code, Also just coding structure

Results 1 to 2 of 2

Thread: Commenting Code, Also just coding structure

  1. #1
    Join Date
    Dec 1969

    Default Commenting Code, Also just coding structure

    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&#039;s "normal" or "most standard". I am also seperating each of the above sections into it&#039;s own "region". Is that ok to do??? <BR><BR>Well, thanks for any info you may be able to provide.

  2. #2
    Join Date
    Dec 1969

    Default _Code Complete_

    If you&#039;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&#039;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&#039;d highly suggest it for any programmer that wants to increase his/her skills.<BR><BR>Here&#039;s a link to Amazon, where it is sold for $24.50:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts