Domain: aw.com
Stories and comments across the archive that link to aw.com.
Stories · 15
-
Teach Yourself UML in 24 Hours
Wrinkled Shirt writes: "If you want to be able to work either as or with a systems analyst, you're going to have to speak the same language as everyone else in your team, and in the tech industry that language is increasingly becoming the UML. The Unified Modelling Language provides ways of modelling every sort of system that you can imagine, covering everything from the relationships of your different objects to the dynamics of the system in action to the way it'll look when you physically set it up." He's reviewed below the SAMS-published Teach Yourself UML in 24 Hours; read on below for his reactions to the book, both good and bad. Teach Yourself UML in 24 Hours, 2nd Edition author Joseph Schmuller pages 397 publisher SAMS rating 5.5 reviewer WrinkledShirt ISBN 0-672-32238-2 summary Useful enough as an introductory text, but likely needs companion texts for anyone who wants to design complex systems.
IntroductionThe UML was adopted by the OMG (Object Management Group) as their official method of visually representing an object-oriented design, and as such is particularly well-suited to working with CORBA (Common Object Request Broker Architecture). Now, the OMG believes in their acronyms the way the Irish believe in their whiskey, and if you're hoping they'll give you introductory material on how to use the UML without broadening the context to all the other standards the OMG is responsible for, well, good luck. Addison Wesley has an entire series dedicated to the UML and different aspects of it, and O'Reilly's got the requisite Nutshell book, but there's definitely a void for good low-cost beginner texts, and it is this void that Schmuller's book attempts to fill.
Does it succeed? Well, sort of.
The GoodTeach Yourself UML in 24 Hours is a very thorough introduction to the language. The first fifteen chapters alone cover practically every structural and behavioural element, all the important relationships, static diagrams and dynamic diagrams, and even a little object-oriented design theory. As far as computer books go, it's not very expensive at its full price, and is even available at some discount stores. It is also loaded with sample diagrams throughout, and has a large seven-chapter case study going through a sample project design process, terminating with a couple of chapters on miscellaneous applications of the UML.
Understanding the subjective element of design, this book tries to help the reader gain their own personal take on the UML by providing lots of sample exercises to perform, and the sum total is a book that gives the reader a good idea of the effectiveness of the UML as a modelling language. In fact, if I were a systems analyst and I needed to give my team a crash course in the UML before getting them to implement my specs, I could do a lot worse than making them all read this book first.
Unfortunately, here's where the accolades stop. A book that teaches people how to read another person's diagrams written in the UML is one thing, but as an effective reference on how to design using the UML, the book comes up short in a few ways.
The Not-So-GoodPart of the power of the UML is that even though the OMG really needed to it to get their CORBA spec to make sense visually, you can basically use the UML to describe any old sort of system you want. Unfortunately, Schmuller takes a little too much advantage of this, and a disproportionate amount of the examples and diagrams involve physical systems instead of software systems. It's as though software design is a bit of an afterthought, which is fine, but the book could have been richer had it focused more on this aspect of UML implementation rather than, for instance, how to use the UML to model a soda machine.
Another shortcoming is that the book tantalizes us with the odd example proving that part of the power of the UML comes from the flexibility to combine elements from multiple diagrams into a single diagram, and yet these examples are used so sparingly and with no substantive explanation to the methodology involved that you're left with a feeling that even though the UML can do a lot of things, you're not quite sure how to make it do all those things for you.
It's admirable that Schmuller devoted so much time to the case study, and made sure that the scope was broad enough that all of the topics explained to that point got an appearance. However, one of the pitfalls of trying to come up with a case study that outlines a fundamentally subjective process is that some of the design decisions are going to seem arbitrary to some people who don't have a psychic connection to the author. It's not something unique to this book, but this book falls victim to it. Schmuller would have done better to have used those seven chapters to describe two different systems to give a broader idea and more than one context to the process of UML design. He also took a little too much creative license with scripting the hypothetical interview process. A reference book on the UML isn't the best place to try out your best David Mamet impression.
And then there are the really minor problems. Some of the diagrams could use a little cleaning up, and sometimes the basic diagram is represented a little differently in the summary section as it is in the chapter dedicated to it. Some of the more complex diagrams are handled first and the simpler ones later. There's no real explanation that makes sense to a newbie about the difference between an aggregation and a composite. And finally, even though one could argue that learning about the UML itself should be kept as a separate and distinct process from learning about how to program off a UML design, I think such a chapter would have been far more beneficial to a neophyte than the chapter on modelling for embedded systems, which is likely to be the domain of people who are far beyond the level of UML familiarity that this book is going to give you anyway.
ConclusionNow, even though as individual criticisms these might seem minor, as a whole it adds up to a book that's going to need a couple of companion references for the reader to truly feel ready to start diagramming with the UML in a professional environment. However, as said before, it isn't too expensive and is pretty much alone in the world of introductory manuals to the UML, and even if you're hoping to become a full-fledged analyst you have to learn to crawl before you can learn to walk, and this book will help you do just that. Just don't expect to be running marathons by the end.
Table of Contents( exploded version here)
Introduction.
Hour 1. Introducing the UML.
Hour 2. Understanding Object-Orientation.
Hour 3. Working with Object-Orientation.
Hour 4. Working with Relationships.
Hour 5. Understanding Aggregations, Composites, Interfaces, and Realizations.
Hour 6. Introducing Use Cases.
Hour 7. Working with Use Case Diagrams.
Hour 8. Working with State Diagrams.
Hour 9. Working with Sequence Diagrams.
Hour 10. Working with Collaboration Diagrams.
Hour 11. Working with Activity Diagrams.
Hour 12. Working with Component Diagrams.
Hour 13. Working with Deployment Diagrams.
Hour 14. Understanding the Foundations of the UML.
Hour 15. Fitting the UML into a Development Process.
Hour 16. Introducing the Case Study.
Hour 17. Performing a Domain Analysis.
Hour 18. Gathering System Requirements.
Hour 19. Developing the Use Cases.
Hour 20. Getting into Interactions and State Changes.
Hour 21. Designing Look, Feel, and Deployment.
Hour 22. Understanding Design Patterns.
Hour 23. Modeling Embedded Systems.
Hour 24. Shaping the Future of the UML.
Appendix A. Quiz Answers.
Appendix B. Modeling Tools for the UML.
Appendix C. A Summary in Pictures.
Index.
Related Links SAMS
Object Management Group
OMG's UML Resource Page
Google Search for Case Tools
You can purchase Teach Yourself UML in 24 Hours at Fatbrain. Want to see your own review here? Read the review guidelines first, then use Slashdot's webform. -
Programming Pearls (Second Edition)
SEGV has continued his tradition of excellent reviews with an examination of Jon L. Bentley's Programming Pearls (Second Edition), recently released by Addison-Welsey. One of the classics of programming, the new version continues the first edition's heritage of excellence. Click below to read more. Programming Pearls (Second Edition) author Jon L. Bentley pages 239 publisher Addison-Wesley, 10/1999 rating 10/10 reviewer SEGV ISBN 0-201-65788-0 summary A classic revised.Choice and Precious
One definition of pearl is something "very choice or precious." Like the programming pearls it describes, Bentley's collection of essays has itself transcended the ordinary to achieve pearl status.
Originally published in Bentley's "Programming Pearls" column in Communications of the ACM, these fascinating essays were collected and revised in book form in 1986. Now revised 14 years later, this material has definitely stood the test of time. The first edition remains #2 on McConnell's Code Complete Reading List, and is listed favourably in an article on Great Books in Computer Science.
A Sense of Wonder
It was directly because of McConnell's Code Complete reading list that I, a few years ago, purchased and read Programming Pearls and its sequel, More Programming Pearls. Despite McConnell's effusive praise and corroboration from a colleague, I was not fully prepared for the experience.
I say experience, because that's what it was. It reminded me of reading Alice's Adventures in Wonderland [1] or Godel, Escher, Bach [2] (perhaps not coincidentally, also on the above list of great books in computer science). It filled me with a sense of wonder that is difficult to describe. It confirmed my love for computer science.
I believe that I am not alone in this regard.
What's New?
Twelve of the thirteen columns in the first edition have been edited substantially for this edition, and three new columns have been added. The new columns are on the topics of testing & debugging & timing, set representations, and string problems. This new edition is about 25 percent longer.
Although the first edition had been getting a little long in the tooth, the revisions once again place the essays in the modern world. Discussions of performance take into account modern hardware, caches, and instruction-level parallelism. Modern languages (C++, Java) are compared and contrasted where appropriate. Modern books (such as McConnell's Code Complete and Musser & Saini's STL Tutorial and Reference Guide [3]) are referenced and recommended.
Like Meeting an Old Friend
Re-reading this book was like meeting an old friend. Notwithstanding the major revisions, it has changed in subtle ways. Some anecdotes have been updated, some material reorganized. But it's still the same book. All of the energy and fun remains, youthful as ever.
I'm pleased to see that Bentley is still happy working at Bell Labs / AT&T / Lucent. Perhaps that's why this book is so great. There's a lot of intelligent people working there, and they put out some fine books. Bentley produces a Markov text generator in column 15, and compares it favourably to his colleagues' (Kernighan and Pike) version in the recent book The Practice of Programming [4].
Supporting Material
I must say that the supporting web site for this book (URL below) is excellent. It has all the information on why this book was updated, along with exactly what was revised. There the curious reader will find excerpts from columns, some problems and their solutions, and many other parts of the book available online.
All of the source code is available and free for use. Relevant web sites are linked and annotated. I love the Java applet that demonstrates sorting algorithms (source available!). Bentley even provides some overhead transparencies for use in teaching.
Recommendation
This is a no-brainer. I've always recommended reading this classic, and even re-reading it. The second edition is merely an excuse to purchase and (re-)read a revised copy. The time spent is well worth it. (Remember, only one column per sitting!)
I also recommend scrounging a copy of the sequel, which is out of print [5].
Purchase this book at fatbrain.
Links
Programming Pearls (Second Edition) Official Site
Programming Pearls (Second Edition) at Addison-Wesley
Programming Pearls (First Edition) at Addison-Wesley
More Programming Pearls: Confessions of a Coder at Addison-Wesley
Table of Contents
Part I: Preliminaries
1. Cracking the Oyster
2. Aha! Algorithms
3. Data Structures Programs
4. Writing Correct Programs
5. A Small Matter of Programming
Part II: Performance
6. Perspective on Performance
7. The Back of the Envelope
8. Algorithm Design Techniques
9. Code Tuning
10. Squeezing Space
Part III: The Product
11. Sorting
12. A Sample Problem
13. Searching
14. Heaps
15. Strings of Pearls
Epilog to the First Edition
Epilog to the Second Edition
Appendix 1: A Catalog of Algorithms
Appendix 2: An Estimation Quiz
Appendix 3: Cost Models for Time and Space
Appendix 4: Rules for Code Tuning
Appendix 5: C++ Classes for Searching
Hints for Selected Problems
Solutions for Selected Problems
IndexNotes
[1] Why do people (book sellers, web sites, bibliographies, etc.) insist on incorrectly calling this book Alice in Wonderland? It's not just for kids; Lewis Carroll was a mathematician, and it abounds in metaphor, puzzles, hidden treats. Read it. Accept only the John Tenniel illustrations!
[2] Godel, Escher, Bach: An Eternal Golden Braid is subtitled A Metaphorical Fugue on Minds and Machines in the Spirit of Lewis Carroll. It was reviewed on Slashdot: Godel, Escher, Bach (Review).
[3] However, use this book instead: Austern's Generic Programming and the STL.
[4] I reviewed this book for Slashdot: The Practice of Programming (Review).
[5] Why? I don't understand why some classics go out of print. I'm still trying to find copies of Artificial Life II, On Numbers and Games, Computation: Finite and Infinite Machines, and a host of others.
-
Programming Pearls (Second Edition)
SEGV has continued his tradition of excellent reviews with an examination of Jon L. Bentley's Programming Pearls (Second Edition), recently released by Addison-Welsey. One of the classics of programming, the new version continues the first edition's heritage of excellence. Click below to read more. Programming Pearls (Second Edition) author Jon L. Bentley pages 239 publisher Addison-Wesley, 10/1999 rating 10/10 reviewer SEGV ISBN 0-201-65788-0 summary A classic revised.Choice and Precious
One definition of pearl is something "very choice or precious." Like the programming pearls it describes, Bentley's collection of essays has itself transcended the ordinary to achieve pearl status.
Originally published in Bentley's "Programming Pearls" column in Communications of the ACM, these fascinating essays were collected and revised in book form in 1986. Now revised 14 years later, this material has definitely stood the test of time. The first edition remains #2 on McConnell's Code Complete Reading List, and is listed favourably in an article on Great Books in Computer Science.
A Sense of Wonder
It was directly because of McConnell's Code Complete reading list that I, a few years ago, purchased and read Programming Pearls and its sequel, More Programming Pearls. Despite McConnell's effusive praise and corroboration from a colleague, I was not fully prepared for the experience.
I say experience, because that's what it was. It reminded me of reading Alice's Adventures in Wonderland [1] or Godel, Escher, Bach [2] (perhaps not coincidentally, also on the above list of great books in computer science). It filled me with a sense of wonder that is difficult to describe. It confirmed my love for computer science.
I believe that I am not alone in this regard.
What's New?
Twelve of the thirteen columns in the first edition have been edited substantially for this edition, and three new columns have been added. The new columns are on the topics of testing & debugging & timing, set representations, and string problems. This new edition is about 25 percent longer.
Although the first edition had been getting a little long in the tooth, the revisions once again place the essays in the modern world. Discussions of performance take into account modern hardware, caches, and instruction-level parallelism. Modern languages (C++, Java) are compared and contrasted where appropriate. Modern books (such as McConnell's Code Complete and Musser & Saini's STL Tutorial and Reference Guide [3]) are referenced and recommended.
Like Meeting an Old Friend
Re-reading this book was like meeting an old friend. Notwithstanding the major revisions, it has changed in subtle ways. Some anecdotes have been updated, some material reorganized. But it's still the same book. All of the energy and fun remains, youthful as ever.
I'm pleased to see that Bentley is still happy working at Bell Labs / AT&T / Lucent. Perhaps that's why this book is so great. There's a lot of intelligent people working there, and they put out some fine books. Bentley produces a Markov text generator in column 15, and compares it favourably to his colleagues' (Kernighan and Pike) version in the recent book The Practice of Programming [4].
Supporting Material
I must say that the supporting web site for this book (URL below) is excellent. It has all the information on why this book was updated, along with exactly what was revised. There the curious reader will find excerpts from columns, some problems and their solutions, and many other parts of the book available online.
All of the source code is available and free for use. Relevant web sites are linked and annotated. I love the Java applet that demonstrates sorting algorithms (source available!). Bentley even provides some overhead transparencies for use in teaching.
Recommendation
This is a no-brainer. I've always recommended reading this classic, and even re-reading it. The second edition is merely an excuse to purchase and (re-)read a revised copy. The time spent is well worth it. (Remember, only one column per sitting!)
I also recommend scrounging a copy of the sequel, which is out of print [5].
Purchase this book at fatbrain.
Links
Programming Pearls (Second Edition) Official Site
Programming Pearls (Second Edition) at Addison-Wesley
Programming Pearls (First Edition) at Addison-Wesley
More Programming Pearls: Confessions of a Coder at Addison-Wesley
Table of Contents
Part I: Preliminaries
1. Cracking the Oyster
2. Aha! Algorithms
3. Data Structures Programs
4. Writing Correct Programs
5. A Small Matter of Programming
Part II: Performance
6. Perspective on Performance
7. The Back of the Envelope
8. Algorithm Design Techniques
9. Code Tuning
10. Squeezing Space
Part III: The Product
11. Sorting
12. A Sample Problem
13. Searching
14. Heaps
15. Strings of Pearls
Epilog to the First Edition
Epilog to the Second Edition
Appendix 1: A Catalog of Algorithms
Appendix 2: An Estimation Quiz
Appendix 3: Cost Models for Time and Space
Appendix 4: Rules for Code Tuning
Appendix 5: C++ Classes for Searching
Hints for Selected Problems
Solutions for Selected Problems
IndexNotes
[1] Why do people (book sellers, web sites, bibliographies, etc.) insist on incorrectly calling this book Alice in Wonderland? It's not just for kids; Lewis Carroll was a mathematician, and it abounds in metaphor, puzzles, hidden treats. Read it. Accept only the John Tenniel illustrations!
[2] Godel, Escher, Bach: An Eternal Golden Braid is subtitled A Metaphorical Fugue on Minds and Machines in the Spirit of Lewis Carroll. It was reviewed on Slashdot: Godel, Escher, Bach (Review).
[3] However, use this book instead: Austern's Generic Programming and the STL.
[4] I reviewed this book for Slashdot: The Practice of Programming (Review).
[5] Why? I don't understand why some classics go out of print. I'm still trying to find copies of Artificial Life II, On Numbers and Games, Computation: Finite and Infinite Machines, and a host of others.
-
Programming Pearls (Second Edition)
SEGV has continued his tradition of excellent reviews with an examination of Jon L. Bentley's Programming Pearls (Second Edition), recently released by Addison-Welsey. One of the classics of programming, the new version continues the first edition's heritage of excellence. Click below to read more. Programming Pearls (Second Edition) author Jon L. Bentley pages 239 publisher Addison-Wesley, 10/1999 rating 10/10 reviewer SEGV ISBN 0-201-65788-0 summary A classic revised.Choice and Precious
One definition of pearl is something "very choice or precious." Like the programming pearls it describes, Bentley's collection of essays has itself transcended the ordinary to achieve pearl status.
Originally published in Bentley's "Programming Pearls" column in Communications of the ACM, these fascinating essays were collected and revised in book form in 1986. Now revised 14 years later, this material has definitely stood the test of time. The first edition remains #2 on McConnell's Code Complete Reading List, and is listed favourably in an article on Great Books in Computer Science.
A Sense of Wonder
It was directly because of McConnell's Code Complete reading list that I, a few years ago, purchased and read Programming Pearls and its sequel, More Programming Pearls. Despite McConnell's effusive praise and corroboration from a colleague, I was not fully prepared for the experience.
I say experience, because that's what it was. It reminded me of reading Alice's Adventures in Wonderland [1] or Godel, Escher, Bach [2] (perhaps not coincidentally, also on the above list of great books in computer science). It filled me with a sense of wonder that is difficult to describe. It confirmed my love for computer science.
I believe that I am not alone in this regard.
What's New?
Twelve of the thirteen columns in the first edition have been edited substantially for this edition, and three new columns have been added. The new columns are on the topics of testing & debugging & timing, set representations, and string problems. This new edition is about 25 percent longer.
Although the first edition had been getting a little long in the tooth, the revisions once again place the essays in the modern world. Discussions of performance take into account modern hardware, caches, and instruction-level parallelism. Modern languages (C++, Java) are compared and contrasted where appropriate. Modern books (such as McConnell's Code Complete and Musser & Saini's STL Tutorial and Reference Guide [3]) are referenced and recommended.
Like Meeting an Old Friend
Re-reading this book was like meeting an old friend. Notwithstanding the major revisions, it has changed in subtle ways. Some anecdotes have been updated, some material reorganized. But it's still the same book. All of the energy and fun remains, youthful as ever.
I'm pleased to see that Bentley is still happy working at Bell Labs / AT&T / Lucent. Perhaps that's why this book is so great. There's a lot of intelligent people working there, and they put out some fine books. Bentley produces a Markov text generator in column 15, and compares it favourably to his colleagues' (Kernighan and Pike) version in the recent book The Practice of Programming [4].
Supporting Material
I must say that the supporting web site for this book (URL below) is excellent. It has all the information on why this book was updated, along with exactly what was revised. There the curious reader will find excerpts from columns, some problems and their solutions, and many other parts of the book available online.
All of the source code is available and free for use. Relevant web sites are linked and annotated. I love the Java applet that demonstrates sorting algorithms (source available!). Bentley even provides some overhead transparencies for use in teaching.
Recommendation
This is a no-brainer. I've always recommended reading this classic, and even re-reading it. The second edition is merely an excuse to purchase and (re-)read a revised copy. The time spent is well worth it. (Remember, only one column per sitting!)
I also recommend scrounging a copy of the sequel, which is out of print [5].
Purchase this book at fatbrain.
Links
Programming Pearls (Second Edition) Official Site
Programming Pearls (Second Edition) at Addison-Wesley
Programming Pearls (First Edition) at Addison-Wesley
More Programming Pearls: Confessions of a Coder at Addison-Wesley
Table of Contents
Part I: Preliminaries
1. Cracking the Oyster
2. Aha! Algorithms
3. Data Structures Programs
4. Writing Correct Programs
5. A Small Matter of Programming
Part II: Performance
6. Perspective on Performance
7. The Back of the Envelope
8. Algorithm Design Techniques
9. Code Tuning
10. Squeezing Space
Part III: The Product
11. Sorting
12. A Sample Problem
13. Searching
14. Heaps
15. Strings of Pearls
Epilog to the First Edition
Epilog to the Second Edition
Appendix 1: A Catalog of Algorithms
Appendix 2: An Estimation Quiz
Appendix 3: Cost Models for Time and Space
Appendix 4: Rules for Code Tuning
Appendix 5: C++ Classes for Searching
Hints for Selected Problems
Solutions for Selected Problems
IndexNotes
[1] Why do people (book sellers, web sites, bibliographies, etc.) insist on incorrectly calling this book Alice in Wonderland? It's not just for kids; Lewis Carroll was a mathematician, and it abounds in metaphor, puzzles, hidden treats. Read it. Accept only the John Tenniel illustrations!
[2] Godel, Escher, Bach: An Eternal Golden Braid is subtitled A Metaphorical Fugue on Minds and Machines in the Spirit of Lewis Carroll. It was reviewed on Slashdot: Godel, Escher, Bach (Review).
[3] However, use this book instead: Austern's Generic Programming and the STL.
[4] I reviewed this book for Slashdot: The Practice of Programming (Review).
[5] Why? I don't understand why some classics go out of print. I'm still trying to find copies of Artificial Life II, On Numbers and Games, Computation: Finite and Infinite Machines, and a host of others.
-
Programming Pearls (Second Edition)
SEGV has continued his tradition of excellent reviews with an examination of Jon L. Bentley's Programming Pearls (Second Edition), recently released by Addison-Welsey. One of the classics of programming, the new version continues the first edition's heritage of excellence. Click below to read more. Programming Pearls (Second Edition) author Jon L. Bentley pages 239 publisher Addison-Wesley, 10/1999 rating 10/10 reviewer SEGV ISBN 0-201-65788-0 summary A classic revised.Choice and Precious
One definition of pearl is something "very choice or precious." Like the programming pearls it describes, Bentley's collection of essays has itself transcended the ordinary to achieve pearl status.
Originally published in Bentley's "Programming Pearls" column in Communications of the ACM, these fascinating essays were collected and revised in book form in 1986. Now revised 14 years later, this material has definitely stood the test of time. The first edition remains #2 on McConnell's Code Complete Reading List, and is listed favourably in an article on Great Books in Computer Science.
A Sense of Wonder
It was directly because of McConnell's Code Complete reading list that I, a few years ago, purchased and read Programming Pearls and its sequel, More Programming Pearls. Despite McConnell's effusive praise and corroboration from a colleague, I was not fully prepared for the experience.
I say experience, because that's what it was. It reminded me of reading Alice's Adventures in Wonderland [1] or Godel, Escher, Bach [2] (perhaps not coincidentally, also on the above list of great books in computer science). It filled me with a sense of wonder that is difficult to describe. It confirmed my love for computer science.
I believe that I am not alone in this regard.
What's New?
Twelve of the thirteen columns in the first edition have been edited substantially for this edition, and three new columns have been added. The new columns are on the topics of testing & debugging & timing, set representations, and string problems. This new edition is about 25 percent longer.
Although the first edition had been getting a little long in the tooth, the revisions once again place the essays in the modern world. Discussions of performance take into account modern hardware, caches, and instruction-level parallelism. Modern languages (C++, Java) are compared and contrasted where appropriate. Modern books (such as McConnell's Code Complete and Musser & Saini's STL Tutorial and Reference Guide [3]) are referenced and recommended.
Like Meeting an Old Friend
Re-reading this book was like meeting an old friend. Notwithstanding the major revisions, it has changed in subtle ways. Some anecdotes have been updated, some material reorganized. But it's still the same book. All of the energy and fun remains, youthful as ever.
I'm pleased to see that Bentley is still happy working at Bell Labs / AT&T / Lucent. Perhaps that's why this book is so great. There's a lot of intelligent people working there, and they put out some fine books. Bentley produces a Markov text generator in column 15, and compares it favourably to his colleagues' (Kernighan and Pike) version in the recent book The Practice of Programming [4].
Supporting Material
I must say that the supporting web site for this book (URL below) is excellent. It has all the information on why this book was updated, along with exactly what was revised. There the curious reader will find excerpts from columns, some problems and their solutions, and many other parts of the book available online.
All of the source code is available and free for use. Relevant web sites are linked and annotated. I love the Java applet that demonstrates sorting algorithms (source available!). Bentley even provides some overhead transparencies for use in teaching.
Recommendation
This is a no-brainer. I've always recommended reading this classic, and even re-reading it. The second edition is merely an excuse to purchase and (re-)read a revised copy. The time spent is well worth it. (Remember, only one column per sitting!)
I also recommend scrounging a copy of the sequel, which is out of print [5].
Purchase this book at fatbrain.
Links
Programming Pearls (Second Edition) Official Site
Programming Pearls (Second Edition) at Addison-Wesley
Programming Pearls (First Edition) at Addison-Wesley
More Programming Pearls: Confessions of a Coder at Addison-Wesley
Table of Contents
Part I: Preliminaries
1. Cracking the Oyster
2. Aha! Algorithms
3. Data Structures Programs
4. Writing Correct Programs
5. A Small Matter of Programming
Part II: Performance
6. Perspective on Performance
7. The Back of the Envelope
8. Algorithm Design Techniques
9. Code Tuning
10. Squeezing Space
Part III: The Product
11. Sorting
12. A Sample Problem
13. Searching
14. Heaps
15. Strings of Pearls
Epilog to the First Edition
Epilog to the Second Edition
Appendix 1: A Catalog of Algorithms
Appendix 2: An Estimation Quiz
Appendix 3: Cost Models for Time and Space
Appendix 4: Rules for Code Tuning
Appendix 5: C++ Classes for Searching
Hints for Selected Problems
Solutions for Selected Problems
IndexNotes
[1] Why do people (book sellers, web sites, bibliographies, etc.) insist on incorrectly calling this book Alice in Wonderland? It's not just for kids; Lewis Carroll was a mathematician, and it abounds in metaphor, puzzles, hidden treats. Read it. Accept only the John Tenniel illustrations!
[2] Godel, Escher, Bach: An Eternal Golden Braid is subtitled A Metaphorical Fugue on Minds and Machines in the Spirit of Lewis Carroll. It was reviewed on Slashdot: Godel, Escher, Bach (Review).
[3] However, use this book instead: Austern's Generic Programming and the STL.
[4] I reviewed this book for Slashdot: The Practice of Programming (Review).
[5] Why? I don't understand why some classics go out of print. I'm still trying to find copies of Artificial Life II, On Numbers and Games, Computation: Finite and Infinite Machines, and a host of others.
-
Programming Pearls (Second Edition)
SEGV has continued his tradition of excellent reviews with an examination of Jon L. Bentley's Programming Pearls (Second Edition), recently released by Addison-Welsey. One of the classics of programming, the new version continues the first edition's heritage of excellence. Click below to read more. Programming Pearls (Second Edition) author Jon L. Bentley pages 239 publisher Addison-Wesley, 10/1999 rating 10/10 reviewer SEGV ISBN 0-201-65788-0 summary A classic revised.Choice and Precious
One definition of pearl is something "very choice or precious." Like the programming pearls it describes, Bentley's collection of essays has itself transcended the ordinary to achieve pearl status.
Originally published in Bentley's "Programming Pearls" column in Communications of the ACM, these fascinating essays were collected and revised in book form in 1986. Now revised 14 years later, this material has definitely stood the test of time. The first edition remains #2 on McConnell's Code Complete Reading List, and is listed favourably in an article on Great Books in Computer Science.
A Sense of Wonder
It was directly because of McConnell's Code Complete reading list that I, a few years ago, purchased and read Programming Pearls and its sequel, More Programming Pearls. Despite McConnell's effusive praise and corroboration from a colleague, I was not fully prepared for the experience.
I say experience, because that's what it was. It reminded me of reading Alice's Adventures in Wonderland [1] or Godel, Escher, Bach [2] (perhaps not coincidentally, also on the above list of great books in computer science). It filled me with a sense of wonder that is difficult to describe. It confirmed my love for computer science.
I believe that I am not alone in this regard.
What's New?
Twelve of the thirteen columns in the first edition have been edited substantially for this edition, and three new columns have been added. The new columns are on the topics of testing & debugging & timing, set representations, and string problems. This new edition is about 25 percent longer.
Although the first edition had been getting a little long in the tooth, the revisions once again place the essays in the modern world. Discussions of performance take into account modern hardware, caches, and instruction-level parallelism. Modern languages (C++, Java) are compared and contrasted where appropriate. Modern books (such as McConnell's Code Complete and Musser & Saini's STL Tutorial and Reference Guide [3]) are referenced and recommended.
Like Meeting an Old Friend
Re-reading this book was like meeting an old friend. Notwithstanding the major revisions, it has changed in subtle ways. Some anecdotes have been updated, some material reorganized. But it's still the same book. All of the energy and fun remains, youthful as ever.
I'm pleased to see that Bentley is still happy working at Bell Labs / AT&T / Lucent. Perhaps that's why this book is so great. There's a lot of intelligent people working there, and they put out some fine books. Bentley produces a Markov text generator in column 15, and compares it favourably to his colleagues' (Kernighan and Pike) version in the recent book The Practice of Programming [4].
Supporting Material
I must say that the supporting web site for this book (URL below) is excellent. It has all the information on why this book was updated, along with exactly what was revised. There the curious reader will find excerpts from columns, some problems and their solutions, and many other parts of the book available online.
All of the source code is available and free for use. Relevant web sites are linked and annotated. I love the Java applet that demonstrates sorting algorithms (source available!). Bentley even provides some overhead transparencies for use in teaching.
Recommendation
This is a no-brainer. I've always recommended reading this classic, and even re-reading it. The second edition is merely an excuse to purchase and (re-)read a revised copy. The time spent is well worth it. (Remember, only one column per sitting!)
I also recommend scrounging a copy of the sequel, which is out of print [5].
Purchase this book at fatbrain.
Links
Programming Pearls (Second Edition) Official Site
Programming Pearls (Second Edition) at Addison-Wesley
Programming Pearls (First Edition) at Addison-Wesley
More Programming Pearls: Confessions of a Coder at Addison-Wesley
Table of Contents
Part I: Preliminaries
1. Cracking the Oyster
2. Aha! Algorithms
3. Data Structures Programs
4. Writing Correct Programs
5. A Small Matter of Programming
Part II: Performance
6. Perspective on Performance
7. The Back of the Envelope
8. Algorithm Design Techniques
9. Code Tuning
10. Squeezing Space
Part III: The Product
11. Sorting
12. A Sample Problem
13. Searching
14. Heaps
15. Strings of Pearls
Epilog to the First Edition
Epilog to the Second Edition
Appendix 1: A Catalog of Algorithms
Appendix 2: An Estimation Quiz
Appendix 3: Cost Models for Time and Space
Appendix 4: Rules for Code Tuning
Appendix 5: C++ Classes for Searching
Hints for Selected Problems
Solutions for Selected Problems
IndexNotes
[1] Why do people (book sellers, web sites, bibliographies, etc.) insist on incorrectly calling this book Alice in Wonderland? It's not just for kids; Lewis Carroll was a mathematician, and it abounds in metaphor, puzzles, hidden treats. Read it. Accept only the John Tenniel illustrations!
[2] Godel, Escher, Bach: An Eternal Golden Braid is subtitled A Metaphorical Fugue on Minds and Machines in the Spirit of Lewis Carroll. It was reviewed on Slashdot: Godel, Escher, Bach (Review).
[3] However, use this book instead: Austern's Generic Programming and the STL.
[4] I reviewed this book for Slashdot: The Practice of Programming (Review).
[5] Why? I don't understand why some classics go out of print. I'm still trying to find copies of Artificial Life II, On Numbers and Games, Computation: Finite and Infinite Machines, and a host of others.
-
Review:Network Application Frameworks
After a bit of an absence, Arjen Laarhoven has returned with a stellar review, this time of Eric Greenberg's new book Network Application Frameworks. Click below if you are interested in the design and implementation of networks in combination with the applications that run on them. Network Application Frameworks author Eric Greenberg pages 406 publisher Addison-Wesley rating Useful i reviewer Arjen Laarhoven ISBN summary 9/10 Overview Network Application Frameworks (NAF) is about networks and the applications that utilize them. This seems like kicking in an open door. Maybe. Many people tend to forget that networks and applications are symbiotic entities that perform a wide variety of tasks to help people and companies to do their work efficiently and effectively.People who develop network-aware applications mostly take the infrastructure on which their applications run for granted. Little thought is given to the amount of traffic their applications generate, and when performance problems arise, they go complaining to the network people that network performance stinks and that they should do something about it.
NAF presents an amazing amount of information about this and many other problems that arise in today's networked world. More importantly, it also provides information about how these problems can be avoided or solved. The book is roughly divided into 3 parts:
- An introduction to the the concept of Network Application Frameworks
- The TCP/IP protocol suite
- Specific information about the technology that is in wide use today, with solutions that Microsoft, Novell and IBM provide. Also, technology that isn't very widely used but has a very big impact on the industry is discussed. A separate chapter about The Open Group's DCE (Distributed Computing Environment) is an example of this.
The most striking feature of this book is that it provides a reasonable level of detail without losing sight of the big picture. A lot of specific technologies are discussed, like TCP/IP, DCE/DFS, Java, object technology, CORBA, ODBC, COM, ActiveX, NetWare, SNA, CICS and a host of other alphabet soup. Again, all these things are discussed without losing sight of interoperability, performance, security and ease of use (for both the users and the administrators).
I thought myself to be a pretty knowledgable person about programming and the use of the network in applications. NAF made it painfully obvious that I'm not. That is to say, like many other programmers, I worked in a blissful ignorance with respect to the big picture. For example, writing a program using the UNIX sockets API is one thing, but developing an application with taking performance, security and the use of services like LDAP, NDS and the Windows NT directory services is a whole other story.
While this book is an eye-opener for the tech folks like myself, it is also very informative reading for network designers and IT managers. By reading and thinking about the information that is provided in NAF, people with different backgrounds are ``educated'' in thinking about networks and applications from a number of different perspectives. Exactly that is what is missing all too often in computer and network departments of companies today. An awareness of the big picture. I think that by reading this book, people from different backgrounds (programmers, network designers and managers) can appreciate the problems and talk to each other about the solutions to these problems.
What's in it for me? A whole lot. Depending on your background, I think you can learn a lot about networks, network topology, services, security and performance. Also, software technology like Java, CORBA, Directory Services (X.500, LDAP, NDS and the Windows NT Directory Services and Active Directory) is covered in considerable depth. A lot is said about legacy systems, with the most important example being the systems and network technologies from IBM (mainframes, SNA and CICS).All these things are covered without losing sight of the fact that these different technologies can (and have to) be put together to provide a solution that works. Integration is the buzz-word these days, and not only integration of the obvious Windows and UNIX stuff, but also time-tested solutions and technology from Novell and IBM. With every discussion about a specific platform, be it Windows NT, NetWare or IBM's SNA, a lot of information is provided on why and how to integrate these different systems into a coherent whole.
What's good? NAF is a very readable book, without avoiding technical discussions when necessary. Every chapter begins with a ``mind map'' of the topics that are discussed. Although this was new to me, I found it a very helpful thing to get a comprehensive overview of the topics and their relationships.At the end of each chapter is a summary of the things that are discussed, and a list of references is given to books and articles that go into more depth about a particular topic.
Technical discussions are clarified by a lot of illustrations. I think I saw W. Richard Stevens saying in an interview "If I can't make a picture, I don't understand it." How true. For example, the topic of security (public key cryptography and the workings of Kerberos) is not exactly a simple one. The illustrations accompanying the text add a lot to gain an understanding of the more complex ideas.
Another good thing I want to point out are Eric's considerations about proprietary technology. For example, we all know Microsoft is very good at locking customers into a MS-only solution. In discussing proprietary technologies Eric points out the risks and benefits of going with one vendor for a particular solution and forces the reader to think for himself about these issues based on the information provided. He certainly is a proponent of open technologies but without forgetting about the other solutions that are available.
The last chapter provides a condensed overview of practically all the topics that are discussed in more depth in the previous chapters. This is very helpful if you encounter an abbreviation or concept and you have forgotten what it exactly meant.
What's bad? IMHO, not much. You may not like relatively big proportion of Microsoft technology that is discussed (chapters 7, 8 and 9), but fact is that a lot of Windows stuff is in use, and that it's not going away, though how much we would like to.The references to NT5 are kinda obsolete, but it's not Eric's fault that Microsoft changed the name of that OS (the book was published in November 1999).
With the current pace of change in the computer industry, some things are bound to have changed since the book was published. For example, I don't know if all the things about Windows 2000's Active Directory are actually implemented.
Conclusion All in all, I think that NAF is a very valuable book to read. I certainly learned a lot about the integration of networks and applications.Everyone who works in the enterprise software business, be it as an adiministrator or developer, can gain a lot of insight and specific information by reading this book and thinking about it.
Table of Contents (abbreviated)- Preface
- 1. What Is a Network Application Framework?
- 2. Core Network Application Framework Technologies
- 3. The TCP/IP Protocol Suite
- 4. IP Routing
- 5. Internet Protocol Version 6 (IPv6)
- 6. The Open Group Distributed Computing Environment (DCE)
- 7. Microsoft and WOSA
- 8. The NT4 Directory Service
- 9. NT5 Active Directory Services
- 10. Novell NetWare
- 11. IBM
- 12. Design Rule Summary
- Index
- Seine Dynamics, Inc (The company of the author)
- Addison-Wesley's page on NAF
-
Review:Effective C++ CD-ROM
A name that all the book reviewers know SEGV has sent in a review of Scott Meyers' CD work Effective C++ CD. This is a stray from our normal book reviews, but figured people would appreciate seeing Scott Meyers' newest effort. Effective C++ CD author Scott Meyers pages publisher Addison Wesley rating 10 reviewer SEGV ISBN 0-201-60615-1 summary More than the sum of its hardcopy contents, this electronic resource earns a place on the programmer's bookshelf.What to Expect?
I wasn't sure exactly what to expect. Subtitled "85 Specific Ways to Improve Your Programs and Designs," I knew this CD was an electronic version of Scott Meyers' already-published books, which I had previously reviewed for Slashdot:
So I knew a priori that the content was excellent, but how would it be packaged and presented? Would it be Windows-only, forcing me to use it only at work as I run Linux at home? Would it be awkward to read onscreen? Would it be easily searchable? Could I annotate and print portions of it?
A Pleasant Surprise
I was pleasantly surprised when the package contained only a CDROM with these instructions printed on it:
To start, open INDEX.HTM
System requirements: Netscape Navigator 4.0+ (on Unix, Mac, or Win32) or Microsoft Internet Explorer 4.0+ (on Win32 only).So far so good! I had no problems using the CD with Communicator 4.5 on NT 4.0, and Communicator 4.04 on Debian GNU/Linux 2.0. Pretty much any modern browser with Java and JavaScript support should work. If you experience browser problems, the publisher provides helpful advice.
Initial Impressions
The CD has a nice look and feel to it. A navigation area is always present, acting as a control and providing a colour indication of where you are in the CD.
The text is decent to read and is true HTML, not merely raw text. It seems Meyers is conscious of the fact that an electronic version must add value to complement a printed version, otherwise it is not useful for its target audience.
Overall, I'd say this offering is a well though out and put together product, and not just a cheap knock-off.
Content
The CD (which itself has a printing number) contains the latest printings of the two books. It also boasts five magazine articles chosen by Meyers to augment the material in the books:
- "Exception Handling: A False Sense of Security" by Tom Cargill, from C++ Report Nov-Dec 1994.
- "Coping With Exceptions" by Jack W. Reeves, from C++ Report Mar 1996.
- "Exception-Safe Generic Containers" by Herb Sutter, from C++ Report Sep 1997, Nov-Dec 1997.
- "Counting Objects in C++" by Scott Meyers, from C/C++ Users Journal Apr 1998.
- "A First Look at C++ Program Analyzers" by Scott Meyers and Martin Klaus, from Dr. Dobb's Journal Feb 1997.
The first three are highly recommended for anyone dealing with exceptions. And of course, since any function may throw an exception, that means anyone writing C++! The object counting article elaborates on an idea from Effective C++ Item 14, illustrating some subtle language issues along the way. The final article outlines the state of the art in commercial static C++ analysis tools in September 1996.
Hyperlinks
The CD has links everywhere. Let me repeat: everywhere. In addition to hyperlinking existing references, Meyers added many cross references to the books and articles to further solidify the material.
Links to the internet at large are redirected through Addison Wesley Longman's online site so that they may stay current. And every single paragraph on the CD is anchored and hyperlinked, to facilitate electronic referencing and bookmarking.
Search Facilities
The CD provides two alternatives to your browser's "find in page" search facility. The first is a comprehensive merged index of the two books. The second is a search applet, modified from the Design Patterns CD search applet. It displays the resulting hits, with their enclosing paragraph for context if you select it. I found it easy to scan through hits until I found an interesting paragraph, then to jump to that document.
Although the search applet is aware of the entire CD, it appears that it can search only for one keyword. I'd really prefer more sophisticated search string options, such as multiple keywords, boolean operations, and perhaps even full regular expressions.
Configuration Facilities
For a set of web pages, the CD is impressively configurable. You can choose between five navigation area sizes, and five image sizes. You can view the books by item, by chapter, or in their entirety. And of course you can change text size in your browser.
Performance and Licensing
To implement the configurability options, there are actually five copies of each image and three copies of each book on the CD. Still, the total data size is a mere 16MB, which easily fits on a hard drive for greater performance and frees a CDROM drive for other use. This is also important because, given technology, actually altering the HTML files is really the only viable way of annotating the CD.
The CD comes with a single user license. You must contact the publisher for additional network license options. The short story is: you can make the CD available on a non-internet-accessible server to as many users as you have licenses, and you can purchase additional network licenses more cheaply the more you buy.
Summary
I've been using the CD both at work and at home for a couple of weeks, and I continue to find it a valuable resource. It easily subs in for my absent printed books, although of course I can't use it without a computer. The articles are useful, and the index and search applet allow me to quickly find what I am looking for.
Really, I have only three complaints:
- the search applet is somewhat limited
- there could be more magazine articles
- Scott's author photo is starting to look less like Eddie Van Halen and more like Gene Simmons
However, I don't think any of those detracts from the CD enough to reduce its 10/10 rating. In the worst case, since the CD is composed of text HTML files, you could apply other search utilities (eg, grep) to it.
The CD's online site has a demo, which I recommend trying if you want to get a feel for the CD before you purchase it. In addition to the general look and feel, navigation area, and search applet, it includes all of the magazine articles and a few of the books' items.
I'm happy with the CD, and recommend it as a professional resource.
To pick this up and help Slashdot, head over to Computer Literacy.
TABLE OF CONTENTS
Introduction
Effective C++ Second Edition
More Effective C++
Magazine Articles
Search the CD -
Review:Effective C++ CD-ROM
A name that all the book reviewers know SEGV has sent in a review of Scott Meyers' CD work Effective C++ CD. This is a stray from our normal book reviews, but figured people would appreciate seeing Scott Meyers' newest effort. Effective C++ CD author Scott Meyers pages publisher Addison Wesley rating 10 reviewer SEGV ISBN 0-201-60615-1 summary More than the sum of its hardcopy contents, this electronic resource earns a place on the programmer's bookshelf.What to Expect?
I wasn't sure exactly what to expect. Subtitled "85 Specific Ways to Improve Your Programs and Designs," I knew this CD was an electronic version of Scott Meyers' already-published books, which I had previously reviewed for Slashdot:
So I knew a priori that the content was excellent, but how would it be packaged and presented? Would it be Windows-only, forcing me to use it only at work as I run Linux at home? Would it be awkward to read onscreen? Would it be easily searchable? Could I annotate and print portions of it?
A Pleasant Surprise
I was pleasantly surprised when the package contained only a CDROM with these instructions printed on it:
To start, open INDEX.HTM
System requirements: Netscape Navigator 4.0+ (on Unix, Mac, or Win32) or Microsoft Internet Explorer 4.0+ (on Win32 only).So far so good! I had no problems using the CD with Communicator 4.5 on NT 4.0, and Communicator 4.04 on Debian GNU/Linux 2.0. Pretty much any modern browser with Java and JavaScript support should work. If you experience browser problems, the publisher provides helpful advice.
Initial Impressions
The CD has a nice look and feel to it. A navigation area is always present, acting as a control and providing a colour indication of where you are in the CD.
The text is decent to read and is true HTML, not merely raw text. It seems Meyers is conscious of the fact that an electronic version must add value to complement a printed version, otherwise it is not useful for its target audience.
Overall, I'd say this offering is a well though out and put together product, and not just a cheap knock-off.
Content
The CD (which itself has a printing number) contains the latest printings of the two books. It also boasts five magazine articles chosen by Meyers to augment the material in the books:
- "Exception Handling: A False Sense of Security" by Tom Cargill, from C++ Report Nov-Dec 1994.
- "Coping With Exceptions" by Jack W. Reeves, from C++ Report Mar 1996.
- "Exception-Safe Generic Containers" by Herb Sutter, from C++ Report Sep 1997, Nov-Dec 1997.
- "Counting Objects in C++" by Scott Meyers, from C/C++ Users Journal Apr 1998.
- "A First Look at C++ Program Analyzers" by Scott Meyers and Martin Klaus, from Dr. Dobb's Journal Feb 1997.
The first three are highly recommended for anyone dealing with exceptions. And of course, since any function may throw an exception, that means anyone writing C++! The object counting article elaborates on an idea from Effective C++ Item 14, illustrating some subtle language issues along the way. The final article outlines the state of the art in commercial static C++ analysis tools in September 1996.
Hyperlinks
The CD has links everywhere. Let me repeat: everywhere. In addition to hyperlinking existing references, Meyers added many cross references to the books and articles to further solidify the material.
Links to the internet at large are redirected through Addison Wesley Longman's online site so that they may stay current. And every single paragraph on the CD is anchored and hyperlinked, to facilitate electronic referencing and bookmarking.
Search Facilities
The CD provides two alternatives to your browser's "find in page" search facility. The first is a comprehensive merged index of the two books. The second is a search applet, modified from the Design Patterns CD search applet. It displays the resulting hits, with their enclosing paragraph for context if you select it. I found it easy to scan through hits until I found an interesting paragraph, then to jump to that document.
Although the search applet is aware of the entire CD, it appears that it can search only for one keyword. I'd really prefer more sophisticated search string options, such as multiple keywords, boolean operations, and perhaps even full regular expressions.
Configuration Facilities
For a set of web pages, the CD is impressively configurable. You can choose between five navigation area sizes, and five image sizes. You can view the books by item, by chapter, or in their entirety. And of course you can change text size in your browser.
Performance and Licensing
To implement the configurability options, there are actually five copies of each image and three copies of each book on the CD. Still, the total data size is a mere 16MB, which easily fits on a hard drive for greater performance and frees a CDROM drive for other use. This is also important because, given technology, actually altering the HTML files is really the only viable way of annotating the CD.
The CD comes with a single user license. You must contact the publisher for additional network license options. The short story is: you can make the CD available on a non-internet-accessible server to as many users as you have licenses, and you can purchase additional network licenses more cheaply the more you buy.
Summary
I've been using the CD both at work and at home for a couple of weeks, and I continue to find it a valuable resource. It easily subs in for my absent printed books, although of course I can't use it without a computer. The articles are useful, and the index and search applet allow me to quickly find what I am looking for.
Really, I have only three complaints:
- the search applet is somewhat limited
- there could be more magazine articles
- Scott's author photo is starting to look less like Eddie Van Halen and more like Gene Simmons
However, I don't think any of those detracts from the CD enough to reduce its 10/10 rating. In the worst case, since the CD is composed of text HTML files, you could apply other search utilities (eg, grep) to it.
The CD's online site has a demo, which I recommend trying if you want to get a feel for the CD before you purchase it. In addition to the general look and feel, navigation area, and search applet, it includes all of the magazine articles and a few of the books' items.
I'm happy with the CD, and recommend it as a professional resource.
To pick this up and help Slashdot, head over to Computer Literacy.
TABLE OF CONTENTS
Introduction
Effective C++ Second Edition
More Effective C++
Magazine Articles
Search the CD -
Review:Concurrent Programming in Java: Design Principles and Patterns
Veteran reviewer SEGV has sent in his latest literary exploit, a review of Doug Lea's book Concurrent Programming in Java: Design Principles and Patterns. Not exactly a book for the beginning, this is design for those of you who know their way around Java, and are looking to firm up your theory base. Given the recent lawsuit end, it appears that a lot more attention is being focused on Java again. Let's trya nd get some real programming done for it. Concurrent Programming in Java: Design Principles and Patterns author Doug Lea pages publisher Addison-Wesley rating 8/10 reviewer SEGV ISBN 0-201-69581-2 summary Not for beginners, this advanced book is perhaps somewhat hard to follow in places but rewarding to those who persevereConcurrent Programming in Java: Design Principles and Patterns,
by Doug Lea
[Addison-Wesley, ISBN 0-201-69581-2]
Nutshell
Review:Not for beginners, this advanced book is perhaps somewhat hard to follow in places but rewarding to those who persevere.
Rating: 8/10
A Book on Concurrent Programming
Concurrent Programming in Java is not just a book on Java threads. Rather, this 339 page book from JavaSoft's Java Series delves into the unique problems and solutions of concurrent programming. It just happens to use Java as its example language. Sure, you'll learn how to use Java constructs such as
synchronized,volatile,wait,notify, andnotifyAll. But you'll also learn how to put them together properly in an architecture that works.The book has an online site with an excellent overview and supplement (containing errata, code, applets, and more).
Impressions
This was the first book dedicated to concurrent programming that I read. I absorbed it over the course of a month while dealing with serious threading issues in a major shipping product. Since then I've read half of Butenhof's Programming with POSIX Threads (which cites Lea's book), so I have a bit of perspective.
This is definitely not a book for the casual reader. If that's what you need or want, check out the aforementioned Butenhof book. They each deal with concurrent programming in general, but Butenhof's is easier to read (even has cartoons), explains things more accessibly, and overall is a better introduction.
However, if you want a book with no holds barred content, without frivolous diagrams and overblown examples, then this is it. It's a tough read. You have to work to understand how the examples illustrate the text. But we are better off that Lea does not spoon feed us. I came away from this book with a greater understanding of concurrent programming, and to that end it succeeded.
Content
From the table of contents you can see that Lea begins with an introduction. Not only does it frame subsequent chapters, it contains an 8 page further readings section containing references on everything from threads in particular to related topics in general. Subsequent chapters also have a further readings section, though not as overwhelming as the first.
Chapters two and three cover safety and liveness issues, the Scylla and Charybdes of concurrent programming. The former ensures that your program works correctly (eg, no race conditions or deadlocks), and the latter ensures that it does so effectively (ie, not reduced to a single thread). Lea doesn't just explain the pitfalls, but demonstrates the designs and techniques to get around them.
The next chapter covers controlling a thread's action based on its state. I found the discussion of policies of how to proceed when in the wrong state particularly useful. And of course guarded suspension is pivotal in concurrent programming.
The final four chapters take us from raw building blocks to higher level constructs. Lea introduces patterns which serve to control concurrency, allow for services, organize flow, and coordinate everything. Need to solve the readers and writers problem? Want to join a few threads? Perhaps you need to use an assembly line? Or maybe you're interested in transactions? These chapters have all that, and then some.
Summary
I find this book useful, even when I'm not doing Java. The only thing that stops me from purchasing my own copy is that another is readily accessible, and I hope that a second edition will come out that I can get instead!
It's a good book on concurrent programming. I just think it is only worth tackling if you have a strong backing in computer programming, and perhaps design patterns. Then, the text will make more sense and will serve as a good reference.
If you're more of a beginner or intermediate, I'd look elsewhere for a more appropriate book. You'll be better served than by struggling through this one. But certainly come back to it when you can!
Pick this book up at Amazon.
TABLE OF CONTENTS
Preface
Introduction
Applications of Concurrency, Overview, Java Concurrency Support, Further Readings
Safety
Safe Objects, Immutable Objects, Fully Synchronized Objects, Contained Objects, Further Readings
Liveness
Liveness Failures, Instance Variable Analysis, Splitting Synchronization, Further Readings
State-Dependent Action
Policies, Representing State, Guarded Suspension, Balking, Further Readings
Concurrency Control
Subclassing, Adapters and Delegation, Acceptors, Models and Mappings, Further Readings
Services in Threads
Styles and Policies, Commands, Completion, Group Services, Coexistence, Further Readings
Flow
Applications, Flow Policies, Resource Management, Assembly Line, Further Readings
Coordinated Action
Transactions, Notification, Scheduling, Further Readings
Index -
Review:UML Distilled
SEGV has submitted a review of UML Distilled: Applying the Standard Object Modeling Language, the first book by Addison-Wesley that is UML Specific in their Object Technology Series. If you're interested in knowing more about the Uniform Modeling Language, click below. UML Distilled: Applying the Standard Object Modeling Language author Martin Fowler with Kendall Scott pages publisher Addison-Wesley rating 9/10 reviewer SEGV ISBN 0-201-32563-2 summary A short and to the point introduction to the standard object modeling language.UML Distilled: Applying the Standard Object Modeling Language,
by Martin Fowler with Kendall Scott
[Addison-Wesley, ISBN 0-201-32563-2]reviewed by SEGV
Nutshell
Review:A short and to the point introduction to the standard object modeling language.
Rating: 9/10
What is the UML?
A modeling language is a (mainly graphical) notation for expressing software designs. Over the last decade, many object-oriented analysis and design gurus developed their own modeling languages and techniques for using them. The two most successful were the Booch method and OMT (Object Modeling Technique). Over the last few years, three of the top gurus (Grady Booch, Jim Rumbaugh, and Ivar Jacobson, now known as the "three amigos") joined forces and unified their methods; hence, the Unified Modeling Language.
The result of that union was the company Rational Software, which developed UML versions 1.0 and 1.1. Now, the OMG (Object Management Group, purveyors of CORBA) is in the process of adopting the UML as standard. Be warned: the OMG adopted version 1.1 as their version 1.0, so there is a lamentable discrepancy in the version numbers.
About the Book
UML Distilled is the first UML-specific book in Addison-Wesley's Object Technology Series (the three amigos are the series editors). The book's online site contains some sample chapters and supplementary information. Martin Fowler's home page also contains useful information.
I have the sixth printing, which is updated to cover UML version 1.0 (per OMG). If you get this book, be sure to get this printing or later.
100% Distilled
UML Distilled is one of the shortest computer books I own: the chapters themselves comprise only 166 pages. It is really only an introduction and overview of the UML and its application; three forthcoming books by the three amigos will go into greater depth. However, the book's brevity is its strength: it is very easily read, and can be consumed in a good afternoon.
Applying the UML
Fowler cuts straight to the chase. In the second chapter he outlines a bare bones development process suitable for use with the UML. In subsequent chapters he covers different parts of the UML, explaining notation, semantics, tips, and techniques. The final chapter is the piece de resistance: an extended example taking the reader from a UML design to Java code.
Throughout UML Distilled, Fowler is not afraid to tell you how he uses the modeling language himself. He will tell you which parts of it he finds extremely useful, and which parts he doesn't bother with. He'll even tell you where he is inclined to bend the rules slightly and do something that strictly speaking doesn't conform to the standard. That's okay, since the desired result is to have the modeling language be of use to you.
Diagrams
As the table of contents shows, most of the chapters cover a particular type of diagram in the UML. If you've never object modeling diagrams, you should check out the book's inside covers, which give a feel for their various elements (and serve as an excellent reference).
I find the class diagrams, interaction diagrams, and activity diagrams to be of most use to me. The first kind is absolutely essential for documenting the structure of your classes. The second kind is useful for documenting how the various classes interact with each other. The third kind is useful for documenting the steps in a task. The latter two kinds even allow for concurrency! And of course, they are all meant to be used during the design phase, and not merely for documentation after the implementation phase (often a sad reality).
Software
I typically do object modeling with a stack of large sheets of blank paper, or a whiteboard. But software tools do exist, whether they are more of a drawing tool or actually generate code. Rational Rose is one of the better known and most advanced tools. However, the software is typically quite expensive. I'm not aware of any freely available alternatives.
Design Patterns
It is worth noting that Fowler is also the author of Analysis Patterns (online site), a book of design patterns for business domain modeling. If you're a patterns fan, you'll be happy to note that there are several examples of their usage in UML Distilled.
Summary
UML Distilled is suitable for all levels. It is short and to the point, and offers an excellent introduction to the field of object modeling. Fowler offers good advice where he is qualified, and points the reader elsewhere (other books or web sites) where his knowledge or experience is lacking, or where further information is available. I recommend this book, at least until the "canon" UML books are available!
TABLE OF CONTENTS
- Introduction
- An Outline Development Process
- Use Cases
- Class Diagrams: The Essentials
- Class Diagrams: Advanced Concepts
- Interaction Diagrams
- Package Diagrams
- State Diagrams
- Activity Diagrams
- Deployment Diagrams
- UML and Programming
- Techniques and Their Uses
- Changes From UML 1.0 to 1.1
- Bibliography
- Index
-
Review:UML Distilled
SEGV has submitted a review of UML Distilled: Applying the Standard Object Modeling Language, the first book by Addison-Wesley that is UML Specific in their Object Technology Series. If you're interested in knowing more about the Uniform Modeling Language, click below. UML Distilled: Applying the Standard Object Modeling Language author Martin Fowler with Kendall Scott pages publisher Addison-Wesley rating 9/10 reviewer SEGV ISBN 0-201-32563-2 summary A short and to the point introduction to the standard object modeling language.UML Distilled: Applying the Standard Object Modeling Language,
by Martin Fowler with Kendall Scott
[Addison-Wesley, ISBN 0-201-32563-2]reviewed by SEGV
Nutshell
Review:A short and to the point introduction to the standard object modeling language.
Rating: 9/10
What is the UML?
A modeling language is a (mainly graphical) notation for expressing software designs. Over the last decade, many object-oriented analysis and design gurus developed their own modeling languages and techniques for using them. The two most successful were the Booch method and OMT (Object Modeling Technique). Over the last few years, three of the top gurus (Grady Booch, Jim Rumbaugh, and Ivar Jacobson, now known as the "three amigos") joined forces and unified their methods; hence, the Unified Modeling Language.
The result of that union was the company Rational Software, which developed UML versions 1.0 and 1.1. Now, the OMG (Object Management Group, purveyors of CORBA) is in the process of adopting the UML as standard. Be warned: the OMG adopted version 1.1 as their version 1.0, so there is a lamentable discrepancy in the version numbers.
About the Book
UML Distilled is the first UML-specific book in Addison-Wesley's Object Technology Series (the three amigos are the series editors). The book's online site contains some sample chapters and supplementary information. Martin Fowler's home page also contains useful information.
I have the sixth printing, which is updated to cover UML version 1.0 (per OMG). If you get this book, be sure to get this printing or later.
100% Distilled
UML Distilled is one of the shortest computer books I own: the chapters themselves comprise only 166 pages. It is really only an introduction and overview of the UML and its application; three forthcoming books by the three amigos will go into greater depth. However, the book's brevity is its strength: it is very easily read, and can be consumed in a good afternoon.
Applying the UML
Fowler cuts straight to the chase. In the second chapter he outlines a bare bones development process suitable for use with the UML. In subsequent chapters he covers different parts of the UML, explaining notation, semantics, tips, and techniques. The final chapter is the piece de resistance: an extended example taking the reader from a UML design to Java code.
Throughout UML Distilled, Fowler is not afraid to tell you how he uses the modeling language himself. He will tell you which parts of it he finds extremely useful, and which parts he doesn't bother with. He'll even tell you where he is inclined to bend the rules slightly and do something that strictly speaking doesn't conform to the standard. That's okay, since the desired result is to have the modeling language be of use to you.
Diagrams
As the table of contents shows, most of the chapters cover a particular type of diagram in the UML. If you've never object modeling diagrams, you should check out the book's inside covers, which give a feel for their various elements (and serve as an excellent reference).
I find the class diagrams, interaction diagrams, and activity diagrams to be of most use to me. The first kind is absolutely essential for documenting the structure of your classes. The second kind is useful for documenting how the various classes interact with each other. The third kind is useful for documenting the steps in a task. The latter two kinds even allow for concurrency! And of course, they are all meant to be used during the design phase, and not merely for documentation after the implementation phase (often a sad reality).
Software
I typically do object modeling with a stack of large sheets of blank paper, or a whiteboard. But software tools do exist, whether they are more of a drawing tool or actually generate code. Rational Rose is one of the better known and most advanced tools. However, the software is typically quite expensive. I'm not aware of any freely available alternatives.
Design Patterns
It is worth noting that Fowler is also the author of Analysis Patterns (online site), a book of design patterns for business domain modeling. If you're a patterns fan, you'll be happy to note that there are several examples of their usage in UML Distilled.
Summary
UML Distilled is suitable for all levels. It is short and to the point, and offers an excellent introduction to the field of object modeling. Fowler offers good advice where he is qualified, and points the reader elsewhere (other books or web sites) where his knowledge or experience is lacking, or where further information is available. I recommend this book, at least until the "canon" UML books are available!
TABLE OF CONTENTS
- Introduction
- An Outline Development Process
- Use Cases
- Class Diagrams: The Essentials
- Class Diagrams: Advanced Concepts
- Interaction Diagrams
- Package Diagrams
- State Diagrams
- Activity Diagrams
- Deployment Diagrams
- UML and Programming
- Techniques and Their Uses
- Changes From UML 1.0 to 1.1
- Bibliography
- Index
-
Review: Effective C++
Loyal reader SEGV has written a review of Effective C++, the language we all know and love. A good book for people who have a grasp of the language and looking to deepen their knowledge. Click below to read more.This also is my first book review for Slashdot, and I also have "reused" Rick Franchuk's review layout. The text, however, is mine: warts and all.
Effective C++: Second Edition Scott Meyers (Addison Wesley Longman, Inc. ISBN: 0-201-92488-9)Nutshell Review Up to date revision of a classic book, highly applicable to real-world software development. Not a language reference or primer, but rather a series of essays on the trickier points of C++, how they can cause you grief, and how you can harness their power. Intermediate level, yet easily read.
Rating 10/10
review by SEGV
I've just finished reading the second edition of Effective C++, subtitled "50 Specific Ways to Improve Your Programs and Designs." I really should have read it a year or two ago, as was wisely recommended to me. In that time I've had to debug (others') code that illustrated several Items in this book, and it truly would have helped me then to fully understand what was going on.
What this->book Isn't, and IsThis book doesn't teach the C++ language. It isn't suitable as a reference, or as an introduction to the language. You are expected to know the basics of C and C++: what a class is, what inheritance does, and so on. Rather, this book aims to teach you how to use the language, effectively. It does so by presenting 50 Items, each of which is a simple guideline with several pages of explanatory text. [Check out Item titles in the table of contents below.]
Meyers supports each guideline with illustrative examples and lucid code. He clearly describes what is going on, where you (or others) might get tripped up, and why that is so. Practical man that he is, he even provides you with the safest way to bend the guidelines, for those rare times when you must. And he does all of this in a humourous style!
A Prayer Book for DevelopersThe Items don't state "Thou shall" or "Thou shalt not." All the same, this book can be read like a Bible. Perhaps read an item per sitting. Or skip to one that interests you (or is relevant to what you are currently coding). Submit an Item to serious study. Memorize the Items' prescriptions, philosophize over their inner meaning. And punish yourself if you sin.
Really, before a developer starts writing his own
operator newhe will want to read the Items on memory management in C++. There are a few gotchas there. In fact, read those Items before you even callnew!If you don't, you will surely end up in programmer's hell.
Standard C++This book pretty much covers Standard C++, having been recently revised. In many cases Meyers shows why the new language features are superior to the old way (either C or pre-standard C++). Still, he is careful to show alternative implementations in areas where compilers are not yet up to spec. Although he provides an overview of the standard library and encourages its use everywhere, you'll need another reference to learn it. But you knew that already.
Anecdotal EvidenceI don't fondly remember the few days I spent debugging a particular memory related crash. In the end I discovered that the author of a "smart" pointer class had failed to provide a copy constructor. As it happened, his compiler had optimized out some temporary objects, and so did two of mine. But a fourth compiler created temporaries, and without the copy constructor a reference count was off. As the object was passed back up the call chain as return values, it was
deleted out from under itself. Nasty.Meyers brings up all these issues, and explains them better than I, in Items 11, 27, and 45. Following his guidelines, a copy constructor would have been written either as a matter of course, or made unavailable to users of the class. This bug could have been prevented.
I now keep a printout of the Item titles on the wall by my desk.
Recommendation: Learn it, Love it, Live itBuy this book and take it to heart. Your co-developers will love you for it, or just not kill you, depending on their disposition. I'm assuming you are a developer, but if not, this book is suitable for any intermediate student of the C++ language. Language features are explained as they are used, just not in an exhaustive fashion. Rather, they are brought to bear when the design issue they are applicable to is being discussed.
Keep it handy, right between your introductory C++ book and Bjarne Stroustrup's The C++ Programming Language. You'll use it.
Online SupportThe publisher hosts a web page to support the book: http://www.aw.com/cseng/titles/0-201-92488-9/. It contains the full text of the TOC, Preface, and Items 10, 21, 24, and 32. It also contains updates and errata, in case you're unlucky like me and have an earlier (second) printing. [I was hoping to get into the acknowledgements when I found a genuine error, but it has been fixed in the fourth (current) printing. Doh!]
More Effective C++If you're like me and craving more, Meyers has it covered. I'm currently reading More Effective C++, subtitled "35 New Ways to Improve Your Programs and Designs." Again, the supporting web page at http://www.aw.com/cseng/titles/0-201-63371-X/ has available the full text of several Items, and also an
auto_ptrimplementation in case you're curious how a "smart" pointer works. A great candidate for another review. :-)Check this book out over at Amazon.
Table of ContentsPreface
Acknowledgements
Introduction
Shifting from C to C++
Item 1: Preferconstandinlineto#define.
Item 2: Prefer to .
Item 3: Prefernewanddeletetomallocandfree.
Item 4: Prefer C++-style comments.
Memory Management
Item 5: Use the same form in corresponding uses ofnewanddelete.
Item 6: Usedeleteon pointer members in destructors.
Item 7: Be prepared for out-of-memory conditions.
Item 8: Adhere to convention when writingoperator newandoperator delete.
Item 9: Avoid hiding the "normal" form ofnew.
Item 10: Writeoperator deleteif you writeoperator new.
Constructors, Destructors, and Assignment Operators
Item 11: Declare a copy constructor and an assignment operator for classes with dynamically allocated memory.
Item 12: Prefer initialization to assignment in constructors.
Item 13: List members in an initialization list in the order in which they are declared.
Item 14: Make destructors virtual in base classes.
Item 15: Haveoperator=return a reference to*this.
Item 16: Assign to all data members inoperator=.
Item 17: Check for assignment to self inoperator=.
Classes and Functions: Design and Declaration
Item 18: Strive for class interfaces that are complete and minimal.
Item 19: Differentiate among member functions, non-member functions, and friend functions.
Item 20: Avoid data members in the public interface.
Item 21: Useconstwhenever possible.
Item 22: Prefer pass-by-reference to pass-by-value.
Item 23: Don't try to return a reference when you must return an object.
Item 24: Choose carefully between function overloading and parameter defaulting.
Item 25: Avoid overloading on a pointer and a numerical type.
Item 26: Guard against potential ambiguity.
Item 27: Explicitly disallow use of implicitly generated member functions you don't want.
Item 28: Partition the global namespace.
Classes and Functions: Implementation
Item 29: Avoid returning "handles" to internal data.
Item 30: Avoid member functions that return non-constpointers or references to members less accessible than themselves.
Item 31: Never return a reference to a local object or to a dereferenced pointer initialized bynewwithin the function.
Item 32: Postpone variable definitions as long as possible.
Item 33: Use inlining judiciously.
Item 34: Minimize compilation dependencies between files.
Inheritance and Object-Oriented Design
Item 35: Make sure public inheritance models "isa."
Item 36: Differentiate between inheritance of interface and inheritance of implementation.
Item 37: Never redefine an inherited nonvirtual function.
Item 38: Never redefine an inherited default parameter value.
Item 39: Avoid casts down the inheritance hierarchy.
Item 40: Model "has-a" or "is-implemented-in-terms-of" through layering.
Item 41: Differentiate between inheritance and templates.
Item 42: Use private inheritance judiciously.
Item 43: Use multiple inheritance judiciously.
Item 44: Say what you mean; understand what you're saying.
Miscellany
Item 45: Know what functions C++ silently writes and calls.
Item 46: Prefer compile-time and link-time errors to runtime errors.
Item 47: Ensure that non-local static objects are initialized before they're used.
Item 48: Pay attention to compiler warnings.
Item 49: Familiarize yourself with the standard library.
Item 50: Improve your understanding of C++.
Afterward
Index
-
Review: Effective C++
Loyal reader SEGV has written a review of Effective C++, the language we all know and love. A good book for people who have a grasp of the language and looking to deepen their knowledge. Click below to read more.This also is my first book review for Slashdot, and I also have "reused" Rick Franchuk's review layout. The text, however, is mine: warts and all.
Effective C++: Second Edition Scott Meyers (Addison Wesley Longman, Inc. ISBN: 0-201-92488-9)Nutshell Review Up to date revision of a classic book, highly applicable to real-world software development. Not a language reference or primer, but rather a series of essays on the trickier points of C++, how they can cause you grief, and how you can harness their power. Intermediate level, yet easily read.
Rating 10/10
review by SEGV
I've just finished reading the second edition of Effective C++, subtitled "50 Specific Ways to Improve Your Programs and Designs." I really should have read it a year or two ago, as was wisely recommended to me. In that time I've had to debug (others') code that illustrated several Items in this book, and it truly would have helped me then to fully understand what was going on.
What this->book Isn't, and IsThis book doesn't teach the C++ language. It isn't suitable as a reference, or as an introduction to the language. You are expected to know the basics of C and C++: what a class is, what inheritance does, and so on. Rather, this book aims to teach you how to use the language, effectively. It does so by presenting 50 Items, each of which is a simple guideline with several pages of explanatory text. [Check out Item titles in the table of contents below.]
Meyers supports each guideline with illustrative examples and lucid code. He clearly describes what is going on, where you (or others) might get tripped up, and why that is so. Practical man that he is, he even provides you with the safest way to bend the guidelines, for those rare times when you must. And he does all of this in a humourous style!
A Prayer Book for DevelopersThe Items don't state "Thou shall" or "Thou shalt not." All the same, this book can be read like a Bible. Perhaps read an item per sitting. Or skip to one that interests you (or is relevant to what you are currently coding). Submit an Item to serious study. Memorize the Items' prescriptions, philosophize over their inner meaning. And punish yourself if you sin.
Really, before a developer starts writing his own
operator newhe will want to read the Items on memory management in C++. There are a few gotchas there. In fact, read those Items before you even callnew!If you don't, you will surely end up in programmer's hell.
Standard C++This book pretty much covers Standard C++, having been recently revised. In many cases Meyers shows why the new language features are superior to the old way (either C or pre-standard C++). Still, he is careful to show alternative implementations in areas where compilers are not yet up to spec. Although he provides an overview of the standard library and encourages its use everywhere, you'll need another reference to learn it. But you knew that already.
Anecdotal EvidenceI don't fondly remember the few days I spent debugging a particular memory related crash. In the end I discovered that the author of a "smart" pointer class had failed to provide a copy constructor. As it happened, his compiler had optimized out some temporary objects, and so did two of mine. But a fourth compiler created temporaries, and without the copy constructor a reference count was off. As the object was passed back up the call chain as return values, it was
deleted out from under itself. Nasty.Meyers brings up all these issues, and explains them better than I, in Items 11, 27, and 45. Following his guidelines, a copy constructor would have been written either as a matter of course, or made unavailable to users of the class. This bug could have been prevented.
I now keep a printout of the Item titles on the wall by my desk.
Recommendation: Learn it, Love it, Live itBuy this book and take it to heart. Your co-developers will love you for it, or just not kill you, depending on their disposition. I'm assuming you are a developer, but if not, this book is suitable for any intermediate student of the C++ language. Language features are explained as they are used, just not in an exhaustive fashion. Rather, they are brought to bear when the design issue they are applicable to is being discussed.
Keep it handy, right between your introductory C++ book and Bjarne Stroustrup's The C++ Programming Language. You'll use it.
Online SupportThe publisher hosts a web page to support the book: http://www.aw.com/cseng/titles/0-201-92488-9/. It contains the full text of the TOC, Preface, and Items 10, 21, 24, and 32. It also contains updates and errata, in case you're unlucky like me and have an earlier (second) printing. [I was hoping to get into the acknowledgements when I found a genuine error, but it has been fixed in the fourth (current) printing. Doh!]
More Effective C++If you're like me and craving more, Meyers has it covered. I'm currently reading More Effective C++, subtitled "35 New Ways to Improve Your Programs and Designs." Again, the supporting web page at http://www.aw.com/cseng/titles/0-201-63371-X/ has available the full text of several Items, and also an
auto_ptrimplementation in case you're curious how a "smart" pointer works. A great candidate for another review. :-)Check this book out over at Amazon.
Table of ContentsPreface
Acknowledgements
Introduction
Shifting from C to C++
Item 1: Preferconstandinlineto#define.
Item 2: Prefer to .
Item 3: Prefernewanddeletetomallocandfree.
Item 4: Prefer C++-style comments.
Memory Management
Item 5: Use the same form in corresponding uses ofnewanddelete.
Item 6: Usedeleteon pointer members in destructors.
Item 7: Be prepared for out-of-memory conditions.
Item 8: Adhere to convention when writingoperator newandoperator delete.
Item 9: Avoid hiding the "normal" form ofnew.
Item 10: Writeoperator deleteif you writeoperator new.
Constructors, Destructors, and Assignment Operators
Item 11: Declare a copy constructor and an assignment operator for classes with dynamically allocated memory.
Item 12: Prefer initialization to assignment in constructors.
Item 13: List members in an initialization list in the order in which they are declared.
Item 14: Make destructors virtual in base classes.
Item 15: Haveoperator=return a reference to*this.
Item 16: Assign to all data members inoperator=.
Item 17: Check for assignment to self inoperator=.
Classes and Functions: Design and Declaration
Item 18: Strive for class interfaces that are complete and minimal.
Item 19: Differentiate among member functions, non-member functions, and friend functions.
Item 20: Avoid data members in the public interface.
Item 21: Useconstwhenever possible.
Item 22: Prefer pass-by-reference to pass-by-value.
Item 23: Don't try to return a reference when you must return an object.
Item 24: Choose carefully between function overloading and parameter defaulting.
Item 25: Avoid overloading on a pointer and a numerical type.
Item 26: Guard against potential ambiguity.
Item 27: Explicitly disallow use of implicitly generated member functions you don't want.
Item 28: Partition the global namespace.
Classes and Functions: Implementation
Item 29: Avoid returning "handles" to internal data.
Item 30: Avoid member functions that return non-constpointers or references to members less accessible than themselves.
Item 31: Never return a reference to a local object or to a dereferenced pointer initialized bynewwithin the function.
Item 32: Postpone variable definitions as long as possible.
Item 33: Use inlining judiciously.
Item 34: Minimize compilation dependencies between files.
Inheritance and Object-Oriented Design
Item 35: Make sure public inheritance models "isa."
Item 36: Differentiate between inheritance of interface and inheritance of implementation.
Item 37: Never redefine an inherited nonvirtual function.
Item 38: Never redefine an inherited default parameter value.
Item 39: Avoid casts down the inheritance hierarchy.
Item 40: Model "has-a" or "is-implemented-in-terms-of" through layering.
Item 41: Differentiate between inheritance and templates.
Item 42: Use private inheritance judiciously.
Item 43: Use multiple inheritance judiciously.
Item 44: Say what you mean; understand what you're saying.
Miscellany
Item 45: Know what functions C++ silently writes and calls.
Item 46: Prefer compile-time and link-time errors to runtime errors.
Item 47: Ensure that non-local static objects are initialized before they're used.
Item 48: Pay attention to compiler warnings.
Item 49: Familiarize yourself with the standard library.
Item 50: Improve your understanding of C++.
Afterward
Index
-
Review: The Art of Computer Programming
Reader and veteran book reviewer Danny Yee has written a review of Donald Knuth's The Art of Computer Programming. This book is a bit different from the normal pack, getting at the heart of how most computer systems function underneath, with much exploration into the algorithims and methods. So, for a better grasp of the fundament of computing, click below. The Art of Computer Programming
1: Fundamental Algorithms
2: Seminumerical Algorithms
3: Sorting and SearchingDonald E. Knuth
Addison-Wesley 1997, 1998
AbookreviewbyDannyYee(danny@cs.usyd.edu.au),Copyright©1998
Danny's HomepageThe tale of how Knuth took a decade off from writing The Art of Computer Programming to create the TeX typesetting language is one of the great legends of computer science. The appearance of a third edition of The Art of Computer Programming - typeset in you will never guess what! - is therefore a landmark event.
For those unfamiliar with the work, it is not about computer programming in the broad sense, but about the algorithms and methods which lie at the heart of most computer systems. Fundamental Algorithms contains background information for the series. Chapter one provides mathematical preliminaries and basic programming concepts, along with an introduction to the MIX assembly language, used throughout for implementations. Chapter two covers simple information structures: lists, trees, and related data structures.
The two chapters in Seminumerical Algorithms cover pseudo-random numbers - their generation and statistical testing - and numerical computation - doing arithmetic with floating point numbers, rationals, and polynomials. Almost everyone who has ever programmed has written a bubble sort at some point, but the full complexities of sorting algorithms are another story entirely. After an introduction to the mathematics of permutations, Sorting and Searching presents and analyses an extensive array of algorithms for sorting in memory (insertion, exchange, selection, permutations, Sorting and Searching presents and analyses an extensive array of algorithms for sorting in memory (insertion, exchange, selection, merging, and distribution algorithms), sorting on secondary storage, and searching,
The Art of Computer Programming is not a work for everyone, not even for all programmers. It will be an valuable reference for those working on the implementation and optimisation of key algorithms and data structures, but the more mathematically inclined will dip into it simply for pleasure. Knuth himself clearly enjoys the subtleties of the mathematics as much as anything: he writes at one point
Even if sorting were almost useless, there would be plenty of rewarding reasons for studying it anyway! The ingenious algorithms that have been discovered show that sorting is an extremely interesting topic to explore in its own right. Many fascinating unsolved problems remain in this area, as well as quite a few solved ones. [ Sorting and Searching, page 3]
and he provides some gloriously learned historical tidbits and mathematical digressions. The mathematics is heavy going in places, but the more difficult sections are marked and the material is laid out in such a way that those seeking algorithms to implement and performance analyses can skip the proofs and derivations and the more esoteric material.Exercises are liberally provided, along with proper answers, which take up around a quarter of each volume. The exercises are carefully graded in difficulty on a scale from 0 to 50, and range from trivial tests of definitions to unsolved research problems. Reading The Art of Programming is a serious enough undertaking in itself (I have only read about a third of it so far myself), but anyone who succeeds in doing all the exercises will probably have earnt themselves several doctorates!
There is plenty of new material in this third edition, including new algorithms, examples, and exercises. The somewhat archaic MIX language has been retained, but we are promised its replacement by a modern, RISC "MMIX" in the next edition. Another incentive to purchase this edition, for those who already have the second, is the vastly improved typesetting. But the most exciting news of all is that volumes four and five are finally going to appear, followed by another revision of volumes one to three and then maybe by volumes six and seven (on the theory of languages and compilers).
Browse 400 other book reviews by Danny Yee
Top | Subjects | Titles | Authors | Keywords | Publishers | LatestThanks to Danny for graciously submitting this review. If you are interested in picking this book up, grab volume one here, volume two here and volume three here. If anyone else is interested in doing reviews, please e-mail me, hemos.