Coding convetions report - Gemore/SDP-Battleship GitHub Wiki
Coding Conventions
CamelCase
CamelCase is about abbreviating variable names and function names by having inner words capitalised. For example: "target.isHit". The words are usually sensible but written in full.
Pros:
- Easy to understand
- Sensible/comprehensible names
Cons:
- Can be lengthy
- Give no information on type
Hungarian Notation
Variable and function names instead of being named by their use are instead named by what their type is. Words are abbreviated to letters, with one full word typically following to remind its use. As an example lAccount mean long-integer number to represent an account.
Pros:
- Packed with information
- Short
Cons:
- Difficult to understand
- Only some information on purpose
Microsoft coding conventions
Microsoft have coding standards that discuss everything form naming files, to tab and white space. These are very commonly used standards which can be found here.
Conclusion
I recommend using the CamelCase for variable and function names as it is very easy to use and intuitive. Also it is easy to read. For general layout purposes I recommend using Microsoft's standards as it is common and easy.