This is the entry page of The Golden Design Rules

  1. No public method shall return null, this applies also to protected methods of non-final classes
  2. Never pass this as an argument
  3. Getters and Setters are evil
  4. A public method shall be declared by an interface (sometimes an abstract class is sufficient and more convenient)
  5. No switch / if-else if on class invariants (this includes instanceof)
  6. A class shall be either (conceptually)final or abstract
  7. No method declares a foreign exception (I am OK with some checked exceptions from the java* packages)
  8. An object that can be passed back to the API shall be immutable or a Builder
  9. Prefer delegation over inheritance (this makes 6. reasonable)
  10. The class skeleton shall fit on a single page, as do all methods (including the private methods that are used by a single method only)
  11. The number of ctors shall be much smaller than the number of instance methods
  12. All statics are in enums

Something general on this list: It is not an imperative list of things to use or to avoid. It is - as I said - a benchmark. Not even a perfect design/programm will ever score 100% over all checkpoints of a (good?) benchmark. But if you do benchmarking not only to satisfy you pride with good results, you’ll look a bit closer at the points where you scored poorly. Perhaps there is room for improvement, perhaps even in a totally different direction than the benchmark originally suggested.

I will extend this list perhaps (depends on feedback). Give me some time please to figure out if I can enable comments on it or perhaps Wikify it.