Author: Fred Long, Dhruv Mohindra, Robert C. Seacord , Dean F. Sutherland, David Svoboda
Publisher: Addison-Wesley
Pages:304
ISBN: 978-0321933157
Print: 032193315X
Kindle:B00EQ8D31A
Audience: Java Programmers
Rating: 5
Reviewer: Alex Armstrong
Not another book of dos and don'ts?!
No it's is much more than a book of dos and don'ts. If you read one book on Java this year make it this one. It is enjoyable, informative and you will be a better programmer for it, or at least you will believe you are.
What makes this book different is that it isn't just a list of rules that you read and commit to memory it is a set of 75 recommendations that tell you the basic idea, show you how not to do it and then show you the correct way. If the book has a flaw then its that there are only 75 recommendations - if you read the book it will almost certainly leave you wanting more.
There are five chapters each dealing with a different aspect of coding in Java. It starts off with Chapter 1 Security and this is something of a shame because not every programmer is interested in security and many of the guidelines are very specific - prevent LDAP injection, prevent code injection and so on. It is interesting, and it is important given how we tend to ignore security or regard it as an afterthought, but it isn't quite as interesting as the following chapters.
Chapter 2 Defensive Programming is more general and has a wider application. Advice like minimize the scope of variables is something that you need to keep in mind no matter what you are programming. Some of these are old and reasonably well known but the presentation is still worth reading.
[フレーム]
Chapter 3 Reliability comes next and here we have a matter of opinion - what exactly does enhance reliability? Some of the suggestions could be moved into defensive programing or the next chapter on making programs more understandable. In the main they are reasonable and you aren't going to argue with do not shadow or obscure identifiers in sub-scopes but not so sure about do not declare more than on variable per declaration.
The material in Chapter 4 Program Understandability.really should be drummed into every programmer when first learning any language. After all, you don't write programs for computers you write them for other programmers. Again we have a mix of well known generalities and some very specific guidelines - be careful using visually misleading identifiers and do not place a semicolon immediately following an if, for or while condition.
The final section Chapter 5 Programmer Misconceptions is perhaps the most interesting of all. Who could resist the possibility that they have been misled, perhaps for years and years. Again some are fairly obvious - understand the differences between bitwise and logical operators - others less so - do not attempt to help the garbage collector by setting local references - I won't do that again.
Conclusions
It doesn't matter if you have encountered the advice that this book offers; it is the fact that it shows you an example or two of how not to follow the advice that makes it better than the average guidelines book.
Overall it is a good read as long as your Java is good, but not too good otherwise you probably know everything the book has to tell you. Recommended as a pleasant and worthwhile read when you have a few moments to spare.
To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.
Street Coder (Manning)
Author: Sedat Kapanoglu
Publisher: Manning
Date: February 2022
Pages: 272
ISBN: 978-1617298370
Print: 1617298379
Kindle: B09Q3PJQC5
Audience: General
Rating: 4
Reviewer: Ian Elliot
Street Coder - sounds sort of tough but messy at the same time.
Algorithms: Absolute Beginner's Guide
Author: Kirupa Chinnathambi
Publisher: Addison-Wesley
Date: November 2023
Pages: 416
ISBN: 978-0138222291
Print: 0138222290
Kindle: B0CCTZ37DQ
Audience: General
Rating: 4.5
Reviewer: Kay Ewbank
Subtitled 'a practical introduction to data structures and algorithms in JavaScript', this book is split into tw [ ... ]
- Learn dbatools in a Month of Lunches
- Python All-in-One, 3rd Ed (For Dummies)
- Python Crash Course, 3rd Ed (No Starch Press)
- Coding for Beginners, 2nd Ed (In Easy Steps)
- Learn Enough Python to Be Dangerous (Pearson)
- Deep Learning (No Starch Press)
- Oracle PL/SQL By Example, 6th Ed
- Software Architecture In Practice