File Size: 1589 KB
Print Length: 146 pages
Simultaneous Device Usage: Up to 4 simultaneous devices, per publisher limits
Publisher: Cambridge University Press; Reprint edition (January 28, 2000)
Publication Date: January 28, 2000
Sold by: Digital Services LLC
Language: English
ASIN: B000SEPERW
Text-to-Speech: Enabled
X-Ray: Not Enabled
Word Wise: Not Enabled
Lending: Not Enabled
Enhanced Typesetting: Not Enabled
Best Sellers Rank: #611,112 Paid in Kindle Store (See Top 100 Paid in Kindle Store) #28 in Books > Computers & Technology > Programming > Languages & Tools > Java > Reference #331 in Kindle Store > Kindle eBooks > Computers & Technology > Programming > Java #746 in Kindle Store > Kindle eBooks > Computers & Technology > Programming > Software Design > Software Development
A good coding standard should focus on advice that encourages the correct and consistent application of a language. The more widely-adopted a standard is, the more benefit. No less than the Java Language Specification acknowledges this by listing a limited set of naming and usage practices. While the JLS falls far short of establishing a complete coding standard, the naming conventions it established have alone been of great benefit to the Java community. The "Elements of Java Style" nicely fills the gap left by the JLS in other areas, although it too falls a little short in places--thus the 4 star rating instead of 5.I strongly suggest "Effective Java" by Joshua Bloch as a companion to this book. Whereas the 108 rules in this book focus on style, format and many pearls of practical advice, "Effective Java" provides an excellent set of 57 rules that go much deeper and tackle more advanced aspects of writing correct and consistent code. The two books complement each other well.Of the 108 rules, the most glaring technical error is rule #99 which promotes the use of the flawed double-check synchronization pattern. Ignore this rule.The 108 rules are divided into six chapters as follows:4 General Principles: While I would have added a few, the four here are quite sound.4 Formatting Conventions: Programmers tend to get weird about code format. After long enough you realize any reasonable and consistently adhered to standard is fine, so just use this well-considered set.23 Naming Conventions: These are of great benefit as they resolve the ambiguities left by the JLS. I especially like rule #12, "Join the vowel generation".
This book is the marriage of Rogue Wave Java coding standards with those of Scott Amber. Standards are formulated as brief rules with one or more paragraphs of explanation, illustration, and justification.The first part of the book is devoted to general principles. There are just a few of these. For example, "Do it right the first time," that is, follow standards whenever you write code, even "throw-away" code.The second part is devoted to formatting conventions. These have to do with indentation, placement of openning and closing brackets, etc. I second the prohibition against hard tabs--use spaces instead. I've seen code written in an IDE that looks bizarre when viewed in a simple text editor like vi.The third part is devoted to naming conventions. Good naming conventions make code more nearly self-documenting. An example from this part is "Capitalize only the first letter in acronyms." For example, use "loadXmlDocument()" instead of "loadXMLDocument()," where the obvious exception is constant names which should contain only capital letters.Java facilitates a deeper integration of code and documentation (via JavaDoc) than most programming languages. The fourth part is devoted to documentation conventions--both JavaDoc and internal comments. If you have ever struggled with the wording of a JavaDoc comment you will appreciate the authors' no-nonsense advice.The fifth part is devoted to programming conventions. An example from this part is "Do not synchronize an entire method if the method contains significant operations that do not need synchronization," that is, use a synchronized block for the appropriate sequence of statements rather than synchronizing the whole method.
JAVA: Quick and Easy JAVA Programming for Beginners (Java, java programming, java for dummies, java ee, java swing, java android, java mobile java apps) The Elements of Java(TM) Style (SIGS Reference Library) Style: The Lady's Guide to French Style, Fashion and Beauty- Get Dressed to Look Charm and Elegant (French Chic, Sense of Style, Style, Style Books, Style ... Dressed, Look Hot, Look Fabulous Book 1) JAVA: The Ultimate Guide to Learn Java Programming Fast (Programming, Java, Database, Java for dummies, coding books, java programming) (HTML, Javascript, ... Developers, Coding, CSS, PHP Book 1) JAVA: Easy Java Programming for Beginners, Your Step-By-Step Guide to Learning Java Programming (Java Series) Java: The Ultimate Guide to Learn Java and C++ (Programming, Java, Database, Java for dummies, coding books, C programming, c plus plus, programming for ... Developers, Coding, CSS, PHP Book 2) Developing Business Systems with CORBA with CD-ROM: The Key to Enterprise Integration (SIGS: Managing Object Technology) Javascript: Beginner to Expert with Javascript Programming (Javascript, Javascript Programming, Javascript for Beginners, Java, Java Programming, Java for Beginners,) JAVA: JAVA 100 Tests, Answers & Explanations, Pass Final Exam, Pass Job Interview Exam, Pass Engineer Certification Exam, Examination, Learn JAVA programming in easy steps: A Beginner's Guide Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET (Pocket Reference (O'Reilly)) Java Beginners Reference: Quick Reference The Encyclopedia of Crystals, Herbs, and New Age Elements: An A to Z Guide to New Age Elements and How to Use Them Programming: Computer Programming for Beginners: Learn the Basics of Java, SQL & C++ - 3. Edition (Coding, C Programming, Java Programming, SQL Programming, JavaScript, Python, PHP) SOA with Java: Realizing Service-Orientation with Java Technologies (The Prentice Hall Service Technology Series from Thomas Erl) App Development: Swift Programming : Java Programming: Learn In A Day! (Mobile Apps, App Development, Swift, Java) Programming with Java IDL: Developing Web Applications with Java and CORBA Java Internationalization (Java Series) Data Structures in Java: From Abstract Data Types to the Java Collections Framework Functional Programming in Java: Harnessing the Power Of Java 8 Lambda Expressions JAVA: A Beginner to Expert Guide to Learning the Basics of Java Programming (Computer Science Series)