Some Very Basic Code Standards

Whilst on the topic of aggravation:

/**
 * Returns the url for the link
 * @return the url for the link
 * @param oFooUtil the foo util
 * @param sSomething the something
 * @param iAge the age
 */
public String getRelationPath(FooUtil oFooUtil, String sSomething, int iAge) {
    ...
}
  1. Do not name your methods deceptively and keep the correct information in the javadoc only
  2. Do not use hungarian notation. It is extra useless in Java as it is an object oriented language which means that many, many variables will be prefixed with o.
  3. Do not comment the obvious
  • del.icio.us
  • Digg
  • description
  • Technorati
  • Reddit

2 Responses to “Some Very Basic Code Standards”

  1. Jon Tirsen Says:

    Or to sum it all up in one rule:

    Don’t be stupid.

  2. Marcus Says:

    Jon, my empiric evidence shows that detailed instructions sometimes are necessary :)

Leave a Reply