The principled programmer understands a principle well
enough
Free the future: reuse code.
Design and abide by interfaces as though you were the user.
Declare data fields protected.
Test assertions in your code.
Maintaining consistent interfaces among
classes
Recursive structures must make progress toward a base case.
When manipulating references, draw pictures.
Every public method of an object
Symmetry is good.
Question asymmetry.
Test the boundaries of your structures and
methods.
Understand the complexity of the structures you use.
Never modify a data structure
Assume values returned by iterators are read-only.
Declare parameters of overriding methods
Avoid multiple casts of the same object
Consider your code from different points of view.
Don't let opposing references show through the interface
Use wrappers to provide a consistent interface to recursive structures.
Write methods to be as general as possible.
Avoid unnaturally extending a natural interface.
Seek structures with reduced friction.
Declare object-independent functions static.
Provide a method for hashing the objects you
implement.
Equivalent objects should return equal hash codes.
Make it public and they will use it.
Fight imperfection.
to form an opinion about it.
makes a package
useful.
should leave the object in a
consistent state.
while an associated
Enumeration is live.
with the most general types
possible.
by assigning the value to a
temporary variable.