Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
design:coding_standards [2015/01/22 15:13] – jeff | design:coding_standards [2020/11/19 14:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Tasks ====== | ||
+ | ===== determining schedule ===== | ||
+ | |||
+ | * Short - Less than a week ( a day or 2) | ||
+ | * Medium - 1 week | ||
+ | * Long - +2 weeks | ||
+ | * Suxly - Unknown. | ||
+ | |||
+ | ===== Logging effort ===== | ||
+ | |||
+ | * use the comment you put in svn to comment the work you did for a given task. | ||
+ | * 95% complete means that you are done and the task needs to be reviewed | ||
+ | * 90% complete means that the task has some rework that needs done | ||
+ | * 100% complete means that the task is done but this can only be set by the manager. | ||
+ | |||
+ | ====== Coding Standards ====== | ||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ===== Version Control ===== | ||
+ | |||
+ | Always supply a comment when committing code to the repository. | ||
+ | |||
+ | Commit code on a daily basis unless people are conducting tests. | ||
+ | |||
+ | ==== SVN ==== | ||
+ | Help on how svn works behind a proxy: | ||
+ | |||
+ | Eclipse: http:// | ||
+ | |||
+ | You will need svn for command line which is availible through collabnet. | ||
+ | < | ||
+ | | ||
+ | </ | ||
+ | There are two files config and servers. | ||
+ | |||
+ | Files that are not allowed: | ||
+ | < | ||
+ | *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store *.ncb *.suo Debug* Release* *.user bin obj build out | ||
+ | </ | ||
+ | |||
+ | ==== GitLab ==== | ||
+ | |||
+ | May want to switch to GitLab. | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Versioning ===== | ||
+ | |||
+ | This outlines how version numbers work. | ||
+ | < | ||
+ | x.x[letter] Alpha/Beta | ||
+ | </ | ||
+ | The first x represents an official release of the product. | ||
+ | |||
+ | The second x represents an incremental test build of the product. | ||
+ | |||
+ | The letter represents a released patch. | ||
+ | |||
+ | Alpha will denote that the product is ready to release pending offical approval. | ||
+ | |||
+ | Beta is that the product is released but still considered unstable. | ||
+ | |||
+ | ===== Comment Format ===== | ||
+ | Use the document method of the language you are developing in. Comment Files, Classes, Functions, and variables using the standard format below. | ||
+ | |||
+ | For Java use [[http:// | ||
+ | |||
+ | For C# use [[http:// | ||
+ | |||
+ | Alt For C# use [[http:// | ||
+ | |||
+ | For PHP use | ||
+ | |||
+ | For ActionScript similar to Java | ||
+ | |||
+ | For HTML use | ||
+ | |||
+ | For JavaScript use | ||
+ | |||
+ | -------- | ||
+ | Standard comment blocks: | ||
+ | |||
+ | < | ||
+ | ///////////////////////////////////////////////////////// | ||
+ | /// File: name | ||
+ | /// | ||
+ | /// < | ||
+ | /// | ||
+ | /// < | ||
+ | /// | ||
+ | /// < | ||
+ | ///////////////////////////////////////////////////////// | ||
+ | |||
+ | ///////////////////////////////////////////////////////// | ||
+ | /// Class: name | ||
+ | /// | ||
+ | /// < | ||
+ | /// | ||
+ | /// < | ||
+ | /// | ||
+ | /// < | ||
+ | ///////////////////////////////////////////////////////// | ||
+ | |||
+ | ///////////////////////////////////////////////////////// | ||
+ | /// Function: name | ||
+ | /// | ||
+ | /// < | ||
+ | /// | ||
+ | /// < | ||
+ | /// | ||
+ | /// < | ||
+ | /// value will be in the error lookup table: < | ||
+ | /// </ | ||
+ | ///////////////////////////////////////////////////////// | ||
+ | |||
+ | ///////////////////////////////////////////////////////// | ||
+ | /// Variable: name | ||
+ | /// | ||
+ | /// < | ||
+ | ///////////////////////////////////////////////////////// | ||
+ | </ | ||
+ | |||
+ | For status comments, Add a descriptive comment for what needs to be done: | ||
+ | |||
+ | for code that needs to be created. | ||
+ | < | ||
+ | for code that is broke or doesn' | ||
+ | < | ||
+ | other optional status tags are as follows: | ||
+ | < | ||
+ | // HACK : | ||
+ | // DEBUG : | ||
+ | </ | ||
+ | |||
+ | These TODO and FIX comments should stay but just remove the tag once the code has been written or fixed. | ||
+ | |||
+ | ===== Code Format ===== | ||
+ | Spacing will be 4 spaces for tabs. If your editor supports it, which most do, change your tabs to spaces and make sure it is 4. For a single file of code always put variables first, then helper functions then execution functions. | ||
+ | |||
+ | Sample | ||
+ | < | ||
+ | class ClassName | ||
+ | { | ||
+ | // Constant Variable declerations | ||
+ | static int VAR_WITH_SPACES; | ||
+ | |||
+ | // Public Variable declerations | ||
+ | int m_VarNoSpaces; | ||
+ | |||
+ | // Protected Variable declerations | ||
+ | int m_VarNoSpaces; | ||
+ | |||
+ | // Private Variable declerations | ||
+ | int m_VarNoSpaces; | ||
+ | |||
+ | // Constructors & Destructors | ||
+ | function( | ||
+ | param1, | ||
+ | param2 | ||
+ | ) | ||
+ | { | ||
+ | functionCall( | ||
+ | param1, | ||
+ | param2 | ||
+ | ); | ||
+ | code; | ||
+ | } | ||
+ | |||
+ | // Public Member Functions | ||
+ | |||
+ | // Protected Member Functions | ||
+ | |||
+ | // Private Member Functions | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Naming Conventions ===== | ||
+ | The names of any part of code should be descriptive. | ||
+ | |||
+ | Example | ||
+ | CONSTANT_VAR // constant var | ||
+ | m_Var // class var | ||
+ | var // local var | ||
+ | ptr_Var // local pointer | ||
+ | jtf_NameOfUser // Gui var in this case it's "java text field" | ||
+ | |||
+ | ===== Tools ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * mosquito - MQTT | ||
+ | * [[https:// | ||
+ | * [[|User Accessibility]] | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * ESLint | ||
+ | * Puma | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * Visual Studio - [[https:// |