This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:dg_code_style_guide [2017/09/13 08:53] – [Doxygen] deva | dev:dg_code_style_guide [2017/09/13 09:04] (current) – [DrumGizmo Code Styleguide] deva | ||
---|---|---|---|
Line 3: | Line 3: | ||
| **//Code is written once by one person but read many times by many people.//** | | | **//Code is written once by one person but read many times by many people.//** | | ||
- | What this essentially boils down to is; don't make syntactic short-cuts that makes it easier to write the code if it makes it harder to read the the code. | + | What this essentially boils down to is; don't make syntactic short-cuts that makes it easier to write the code if it makes it harder to read the code. |
Always write comments to logical blocks in the code that explains for example what a for loop does or how a couple of function calls interact. | Always write comments to logical blocks in the code that explains for example what a for loop does or how a couple of function calls interact. | ||
Line 15: | Line 15: | ||
=====Curly Braces===== | =====Curly Braces===== | ||
Use [[https:// | Use [[https:// | ||
- | This basically boils down to 'curly braces always on a new line' | + | This basically boils down to 'curly braces always on a new line': |
<code c++> | <code c++> | ||
namespace Foo | namespace Foo |