h1

Java Coding Standards

Aim

These standards are intended to ensure:

  • Consistency across the project in coding style (bracketing, variable naming conventions, etc) which helps maintenance.
  • Our code is as bug-free as possible (avoding common pitfalls, code review, test practices)
  • Our code provides the extra information and services that we want (javadoc, versioning)

See also http://www.martinhill.me.uk/articles/Technical/JavaCodingStyle.shtml

Development Environment

Assume JDK 1.4, as this seems quite stable, and includes a logging API. There is a component org.astrogrid.log.Log in the common CVS directory, which can be used as a general interface to whatever logging API we end up using (eg Log4J ).

IDEs are up to you. Most people are using the Support.Eclipse IDE. Some people are using unix editors, command line compilers and Ant. Personally, I use CodeGuide, which has one-click dependency-checked compiler and a lovely built in debugger.

 

Coding Standards

Coding Standards are based on the Elements of Java Style book – buy it and put it on expenses. See also:

 

Amendments

Points

  • Things like number of spaces per indent and tabs vs spaces can occupy hours of fun in pubs (I go to the wrong pubs) but please, if we all stick to the project standard 3 spaces/indent and spaces instead of tabs, all our ‘intelligent’ IDEs can align things correctly…

 

Deployment:

I (MCH) don’t know much about this, please someone who does add something useful:

 

TonyLinde – 24 Sep 2002, MartinHill – Sep 2003 — KeithNoddle – 04 Dec 2002

 


Resources

 

(AstroGrid

Leave a comment

Design a site like this with WordPress.com
Get started