1 If you are going to read / edit / update any of my code please take a few seconds to read
  2 my coding style.
  3
  4 If you plan to submit a change to one of my works please follow these conventions in any submitted works in
  5 order to keep it consistant and keep me from having to re-edit the work.
  6
  7 Tabbing is accurate to my coding style.
  8
  9 File Headers:
 10
 11 //ProjectName By Author
 12 //
 13 // website
 14 //
 15 // Copyright xxxx
 16 //
 17 // filename : brief description
 18 //
 19 /*
 20
 21     license
 22
 23 */
 24
 25 // in
 26 // depth
 27 // description
 28
 29 Classes:
 30
 31     Prototype Definitions:
 32
 33     /*************************************************************/
 34     /*          ClassName                                        */
 35     /*************************************************************/
 36     /*
 37         Description
 38     */
 39     class ClassName
 40     {
 41         /*************************************************************/
 42         /*          SectionName                                      */
 43         /*************************************************************/
 44         access modifier
 45         
 46             //function description
 47             function declaration
 48             
 49             ...
 50
 51             member variable declaration  //variable description
 52
 53             ...
 54     }
 55
 56     Body Definitions:
 57
 58 /*************************************************************/
 59 /*          ClassName                                        */
 60 /*************************************************************/
 61 /*
 62     Description
 63 */
 64
 65     /*************************************************************/
 66     /*          SectionName                                      */
 67     /*************************************************************/
 68
 69         //function description
 70         ClassName::function()
 71         {
 72             // code comment
 73             
 74             // long
 75             // code
 76             // comment
 77         }
 78
 79         ...
 80
 81     Other Notes:
 82
 83         - Class methods which simply return internal data or basic information may
 84           be displayed as follows:
 85
 86             //function description
 87             function() { return m_Data; }
 88
 89         - Inline / Templated member functions follow the same coding style as listed
 90           in the Body Definitions section but appear in the header file.
 91
 92 Functions:
 93
 94 /*************************************************************/
 95 /*          SectionName                                      */
 96 /*************************************************************/
 97
 98     //function description
 99     function()
100     {
101         // code comment
102         
103         // long
104         // code
105         // comment
106     }
107
108     ...
109
110 End Notes:
111
112     This is based on the C++ syntax.  I try to use the same standards in every language
113     which I program in though some may have slight variations.  For example my section
114     headers in java look like:
115
116         /*-----------------------------------------------------------*/
117         /*          SectionName                                      */
118         /*-----------------------------------------------------------*/
119
120     (Java handles /**/ a little differently.)
121
122     I may be more clumsy (or lazy if you prefer) on smaller single document programs
123     however on large scale projects I always (try) to go through and comment EVERYTHING.
124     If you find something that isn't up to standards whether it's an ill-layed-out file
125     or simply a confusing unexplained piece of code email me so I can take care of it :)
126
127     chris@sourcemagik.com
128
129     As another side note, I use Visual Studio only for the compiler and debugger; I do
130     all my code editing with VIM, however I have tried to keep my standards intellisense
131     compatible.  I am currently running VS2005 and have tested with intellisense; it
132     seems to work properly but I have not thoroughly tested on many VS versions.  Let me
133     know how it goes.