Hi all,

Could we consolidate the discussion of coding standards in this thread?
Shouldn't take too long, and it would be nice for people to know what's
what from the outset. It would be great to be able to document it, and
provide formatters to help with contributions (as I think Emmanuel
suggested previously). 

For discussion below then are comments from the other thread, and a few
other things.

- The base standard is defined by the "Code Conventions for Java"
document[1].

- Layout
Tabs: Use spaces, not tabs.
Tab Width: 4
Column Width: 120

- General
Variables should be final where possible.
Parameters should be final.

- Comments / Annotations
Types: All types should have reasonable Javadoc.
Methods: All methods should have reasonable Javadoc, with the exception
of accessors which retrieve and set only.
@author: should not be used.

- Testing
New code requires reasonable tests; modified code must have reasonable
tests where not previously created.

- Deviation
Deviation from the standards is permitted where it enhances
readability/maintainability. Roger gave a specific example; perhaps we
can reference this later.

Thanks!
Johnathan


[1] http://www.oracle.com/technetwork/java/codeconvtoc-136057.html


Reply via email to