comments, declarations, statements, white space, naming conventions, •programming practices, programming principles, programming rules of thumb, •architectural best practices, etc.. •Conventions may be formalized in a documented set of rules that an entire team or company follows
• Explain Yourself in Code • Good Comments •Informative Comments •Explanation of Intent •Clarification •Warning of Consequences •TODO Comments •Javadocs in Public APIs • Bad Comments •Redundant Comments •Misleading Comments •Commented-Out Code •Javadocs in Nonpublic Code
Write Your Try-Catch-Finally Statement First • Use Unchecked Exceptions • Provide Context with Exceptions • Define Exception Classes in Terms of a Caller’s Needs • Define the Normal Flow • Don’t Return Null • Don’t Pass Null