Best practices for things you should and should not do using Java