Auto Livres en français boutiques-francophones Protegez vos photos et videos personnelles pinata Furniture Kindle Films selection Explore the Amazon.ca Vinyl LP Records Store Cycling Barbecue minions

Commentaires des clients

28
4,2 sur 5 étoiles
The Elements of Java(TM) Style
Format: PaperbackModifier
Prix:13,71 $+Livraison gratuite avec Amazon Prime
Votre évaluation(Effacer)Évaluez cet article


Un problème s'est produit lors du filtrage des commentaires. Veuillez réessayer plus tard.

Affichage de 1-6 sur 6 commentaires(4 étoiles)afficher tous les commentaires
le 9 novembre 2001
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".
35 Documentation Conventions: These very well-reasoned conventions will help to produce useful documentation as well as to eliminate unnecessary or excessively wordy documentation. The rules target both internal and external documentation as emphasize the different goals of each.
37 Programming Conventions: While there is a lot of good advice in this section, it also contains some of the weakest advice. Rule #74 on enumerations is flawed ("Effective Java" provides better coverage on how to use enumeration classes). The section on using assertions (4 rules) doesn't mention the important rule to only use tests with no side effects. It will also need to be modified for the assertion facility being added in J2SE 1.4. The section on threads and synchronization is the weakest (7 rules) as it contains rule #99 as well as some weak and incomplete advice in rules #97 and #98.
5 Packaging Conventions: This section contains some good advice not just on how to organize your classes into packages, but also on how to design stable packages.
Particularly on points of style and format, individuals will find aspects of any coding standard (at least any standard they didn't author) that they disagree with. Having written several coding standards in a variety of languages, I too have some rules I would have written differently. However, the benefit of a language-wide coding standard is that if everyone follows it, then everyone benefits from that shared agreement.
My company has adopted "The Elements of Java Style" as its coding standard with as few amendments as possible. You and your company should too.
0CommentaireCette évaluation a-t-elle été utile pour vous?OuiNonEnvoi du commentaire en cours...
Merci pour votre commentaire.
Malheureusement, nous n'avons pas pu enregistrer votre vote. Veuillez réessayer
Signaler un abus
le 2 mai 2001
For the most part, this book is a great style guide for Java programmers. Most Java programmers' code would benefit significantly by following the conventions listed here.
However, the book gives some bad and confusing advice. The worst advice is the double-check pattern, which is not thread-safe. Some of the other code samples in the Synchronization and Efficiency sections also look like they are not thread-safe. Another example of poor advice is rule 74: Encapsulate enumerations as classes, which doesn't point out that "null" is a valid enumeration value for all such enumerations. The code sample shown in that rule can throw NullPointerException, for example. The advice about "inner classes" is confusing, because it is obvious the advice actually applies to all nested classes, not just inner classes (non-static nested classes).
Overall, the book gives good advice to the experienced Java programmer. I can't recommend this book to the beginning Java programmer, partly because of the above reasons, but mostly because the book mentions so many aspects of the Java language it could easily overwhelm a beginner. Once you've mastered the basics of the Java language, however, this is a good book to take a look at.
0CommentaireCette évaluation a-t-elle été utile pour vous?OuiNonEnvoi du commentaire en cours...
Merci pour votre commentaire.
Malheureusement, nous n'avons pas pu enregistrer votre vote. Veuillez réessayer
Signaler un abus
le 18 juillet 2001
This book shows rules mostly for teams or advanced Java programers; however, some parts can be useful also as a reference for starters or intermediate programers.
Those rules are not organized by levels (say, from basic to intermediate, or from simple programs to team projects), but by topics: The book has conventions on formatting, naming, documentation, programming and packaging.
Not all the rules and conventions have examples, so you must know the Java language in depth (or have experience in programming) to understand some of them.
At the end of the book you'll find a summary of all the 108 rules and a glossary. The summary is convenient for quick reference or reviewing.
It will not help you to learn programming. It is a good complement for your favorite Java manual.
0CommentaireCette évaluation a-t-elle été utile pour vous?OuiNonEnvoi du commentaire en cours...
Merci pour votre commentaire.
Malheureusement, nous n'avons pas pu enregistrer votre vote. Veuillez réessayer
Signaler un abus
le 16 juillet 2001
This book does exactly what it says it will - it gives you a series of coding standards to rely upon for team coding. The book is not, however, very heavy on theory. There's is only brief discussion about why each standard was chosen, and in my opinion, several of the standards are not optimal (particularly those relating to the indentation of code). This brings up the further problem that to be useful as a reference manual, your team must adopt the standards. But this book will give you a quick and easy starting point for coming up with your own coding standards.
0CommentaireCette évaluation a-t-elle été utile pour vous?OuiNonEnvoi du commentaire en cours...
Merci pour votre commentaire.
Malheureusement, nous n'avons pas pu enregistrer votre vote. Veuillez réessayer
Signaler un abus
Provides a good resource for the intermediate to experienced JAVA programmer. Gives area of concentration to make a professional product. A copy should be available to any group of professional developers working in JAVA.
0CommentaireCette évaluation a-t-elle été utile pour vous?OuiNonEnvoi du commentaire en cours...
Merci pour votre commentaire.
Malheureusement, nous n'avons pas pu enregistrer votre vote. Veuillez réessayer
Signaler un abus
le 28 juin 2002
Great quick reference when it doubt/can't remember. Personal coding style is a myth and is also a dangerous practice!
Good section on following java doc standards with handy performance tuning tips.
Expensive...
0CommentaireCette évaluation a-t-elle été utile pour vous?OuiNonEnvoi du commentaire en cours...
Merci pour votre commentaire.
Malheureusement, nous n'avons pas pu enregistrer votre vote. Veuillez réessayer
Signaler un abus