Style Guide - The-Source-Eternal/Unwritten3D GitHub Wiki
Versioning:
Examples:
https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style linux kernel
Code:
- Code should be written clearly enough to be understood without comments
- Code should be commented
- 4 spaces, no tabs
- Decide on some solid names, e.g. in js when you pass a function's event in it's parameters it should always be function(evt). If there are nested events then it would be [identifier]Evt, e.g. function(docEvt)
- An empty line at the end of every file
- Function description (above? inside?) every function
- No one letter variables
- "this" should only ever refer to the class in which it is in
- If a for loop is more than (10?) lines long, give the iterated variable a meaningful name