SUN Java Coding Standards

It is increasingly popular for organizations to re-use coding standards from established works - books published by SUN, one of the "Effective" books, or published articles from the ACM or IEEE.  SUN publishes their own conventions  that (in their words)" we at SUN follow and recommend that others follow".  This history on that statement is a bit mixed but these are widely cited standards and widely supported in various tools.

A key benefit of this for of re-use is that it can be a very effective practice to cite this work and then rely upon the programmers to look-up the details (e.g. code samples) themselves.  Drawing from established works also make it easier to assimilate new developers into an organization's development work. Finally, for organizations standing up their own coding standards, referring to suggestions from this work can help develop a consensus about what standards should - or should not - be applied.

Here is a summary of the SUN standards. From this summary, it should be evident that lots of these standards are about formatting.  That isn't very impactful in my experience and a bit of an anachronism in the age of modern tools - notice the standard was last updated in 1999.  However, there are some recommendations that will help prevent logic bugs - which are good - and most of these are easily testable using automated source code analysis tools (e.g. JTest from ParaSoft).

- Brian

No comments: