tag:blogger.com,1999:blog-4581187174086274804.post-73958376861857789742008-04-15T21:13:00.000-07:002008-04-15T21:23:22.822-07:00Applying "The Elements Of Java Style"I just finished my second reading of "The Elements Of Java Style" book. This time trough I made a list of items contained in the book that I know I could apply to improve my Java programming. Here is my list:<br /><br />#8: Don't use hard tabs.<br />#13: Capitalize only the first letter of acronyms when naming variables, classes, and methods.<br />#17: Use a new package name for a new version of a package that is not backward compatible with the previous version of the package.<br />#37: Use one line comments to explain implementation details.<br />#39: Document non-public members of your classes.<br />#43: Use code tags for identifiers, keywords, and constants.<br />#44: Wrap code examples in pre tags to preserve fromatting.<br />#45: Use more {@link} tags.<br />#60: When writing comments describe why something is being done, not what is being done.<br />#63: Use and establish keywords for unresolved issues.<br />#64: Label closing braces in highly nested control structures.<br />#67: Declare classes representing a fundamental data type as final.<br />#68: Build concrete types from primitive Java types or other concrete types.<br />#80: Always construct objects in a valid state.<br />#82: Use nested constructors to eliminate redundant code.<br />#85: Use return codes or special methods to indicate unexpected state changes.<br />#88: Use a finally block to release resources after a try/catch statement.<br />#91: Use assertions to catch logic errors in your code.<br />#92: Use assertions to test pre-conditions and post-conditions.<br /><br /><span style="font-weight: bold;">The Sunburned Surveyor</span>The Sunburned Surveyorhttp://www.blogger.com/profile/01527239738579515112noreply@blogger.com0