REVIEW - The Elements of Java Style


The Elements of Java Style






Cambridge University Press ()




Francis Glassborow


June 2000



This is a very small format book (each page is about a third of the area of a page of A4 (Overload, new format C Vu). The main text takes 93 pages. That is followed by eight pages listing the 108 style guidelines that the main text covered in more detail, and then there is a glossary and index. Almost half the entries in the index refer to the glossary.

None of the above would matter if the guidelines sparkled. However just let me take one at random.

62 Explain local variable declarations with an end-line comment. Not exactly innovative stuff. Then two guidelines on, I find:

64 Label closing braces in highly nested control structures Well if you are going to nest them deeply, I suppose it makes sense to label them. However, I think a much better guideline would be 'Avoid nesting control structures.' Any experienced programmer will tell you that nesting control structures is a recipe for buggy code.

I think that is enough. Keep your money, if this book tells you anything you do not already know then you need it to invest in learning to program.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.