Java Coding Standards


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:




  • 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…



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






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: