Difference between revisions of "Coding Style"

From Mineserver Wiki
Jump to navigation Jump to search
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Inline methods''': Keep them short (max 10-15 lines at most).
−
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
+
* '''Documentation''': Use doxygen-style (javadoc-style?) documentation for at least all public methods. Example:
    /**
    /**
     * The foo() method. Does some fooish stuff, yo!
     * The foo() method. Does some fooish stuff, yo!