||New Reviews| |Software Methodologies| |Popular Science| |AI/Machine Learning| |Programming| |Java| |Linux/Open Source| |XML| |Software Tools| |Other| |Web| |Tutorials| |All By Date| |All By Title| |Resources| |About||
Keywords: Data structures, algorithms, Java Colelctions Framework, abstract data types
Title: Data Structures With Java
Authors: John R. Hubbard and Anita Huray
Publisher: Prentice Hall
ISBN: 0130933740 (US)/0131236288 (non-US)
Level: Intermediate Java
Verdict: Interesting even if you're not a comp-sci student
Publishers, at least, clearly differentiate between computer science text books and books for developers. This one sits clearly in the comp-sci camp, it's a college text book plain and simple, and yet the contents are of more than theoretical value to working developers. Whilst it's possible to treat the standard Java collections objects - ArrayLists, HashMaps etc - as black boxes, which is what object oriented development encourages to a certain extent, it's always interesting to see what's under the hood.
Looking both at data structures and at algorithms, this book unpicks the internals of stacks, queues, arrays and the kind of objects that make up the Java Collections Framework, including the recent Java 1.4 additions. Using abstract data types (ADTs) and UML diagrams, each object is presented first in outline form, making good use of abstract classes and interfaces, before the concrete classes are implemented and drivers written. It's an approach that works well enough, allowing the reader to really understand the concepts and the algorithms used.
The chapter on Hash Tables, for example, explains the concept of hashing, looks at the different ways that collisions can be handled, loading etc. The code is clear and concise and the examples that are used are backed up with simple, intelligible diagrams.
In addition to exploring data structures the book also explores algorithms, particularly the chapters on sorting and graphs. However there is also a good deal of algorithmic play in the data structure chapters, though these tend to have a more mathematical flavour and are generally there to illustrate the use of the data structures in question.
While there is lots of good stuff here, the book does suffer from a number of problems. The main one being that the order of the material sometimes seems a bit odd, particularly in the opening chapters. For example complexity analysis seems to have been dropped into the chapter on arrays almost by accident. And the second chapter, on ADTs, includes a section on inheritance and polymorphism that would have made more sense in the opening chapter which looks at object oriented programming.
As should be clear by now, the authors assume a certain level of Java competency, though they include as an appendix a quick 'Java Review'. While this really isn't a book for the beginner, neither is it a book that assumes the reader is an expert. The authors suggest it's suitable for somebody who's taken a first college course in Java. From a developer point of view anybody able to master Sun's basic Java tutorial should have no problem here (whether you'd want to immerse yourself in stacks, queues and linked lists is another matter).
Of course, as this is primarily a text book there are exercises and revision questions (with answers), suggested projects and so on. If you're not at college then it's material to skip, on the other hand sometimes it's interesting to see what the answers to the questions are …
There is lots of interesting material on offer here, even if the ordering of it is irritating at times. Not understanding how these objects work doesn't mean you can't use them. On the other hand next time you need to decide on which data structure to use, having some idea of the differences between them and the trade-offs at work may make all the difference between a program that works and one that really flies.
One final thing - the design of the book really stands out. The code in the book is syntax-coloured, the diagrams are clear, the text organised into distinct sections within chapters.