Imperfect C++: Practical Solutions for Real-Life Programming (英語) ペーパーバック – 2004/10/21
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Offers practical techniques and tools for writing code that's more robust, flexible, efficient, and maintainable. This book shows you how to tame C++'s complexity, cut through its array of paradigms, take back control over your code - and get far better results. It also helps your compiler detect more errors and work more effectively.
MATTHEW WILSON is a software development consultant and creator of the STLSoft libraries. He writes a bi-monthly C/C++ Users Journal column on integrating C and C++ with different languages and technologies, as well as an online column for C++ Experts Forum. He has over a decade's experience developing with C++. Currently based in Australia, Wilson holds a Ph.D. from Manchester University (UK).
© Copyright Pearson Education. All rights reserved.
In all fairness, this book does talk of some practical challenges that C++ programmers face, but all of that content could have been neatly rolled into a much better organized set of sections and chapters - spanning no more than 100 pages. If somebody could distill the contents of this book into that, it would form a handy companion for studying C++ as a practitioner, nothing more. If you've read Alexandrescu (Modern C++ Design), or Dewhurst (C++ Common Knowledge) and came to this book expecting similar learning and insight, I'm afraid you'd be sorely disappointed. I am a bit baffled by the current ratings - touching 5 stars!
This book was published in 2005; needless to say, it does not cover C++11. Some of the tips in this book have been rendered obsolete, by new features introduced in C++11.
I was disappointed in the quality of the printing and binding. The pages look like they have been photocopied, with small black dots here and there. The binding is such that the pages don't "turn smoothly" (if that makes sense). It's not a huge issue but it does make it a bit less comfortable to read.
Here is example on p.171
Reader hint: Anytime I refer to a solution as wonderfully elegant, you can be sure it's one that I 'think' I've invented.
Here is another one on p.383
They actually appreciated my honesty in coming clean. Lesson: always be honest; it can earn you friends in this industry where responsibility takers are few and far between.
I may be wrong here seeing as all others have great reviews, but to me this book has probably hurt more than helped me. If you want a cringe-worthy page turner, by all means go for it!
Be warned, it does take a little while to get going, and the author has a rather unusual writing style, which can best be described as an informal hybrid of Aussie and British. And admittedly the opening part of the book covers material reminiscent of the likes of 'Effective C++', albeit with a stronger emphasis on optimisation.
But once it gets going, there's a whole new world opened up, rather remote from the rarefied atmosphere of more theoretical books. Imperfect C++ has a very 'in the trenches' feel, where you need to write programs that talk to C, and on a Windows platform. None of the book is about object oriented design as such, but has a library designer's appreciation for dealing with operating system quirks.
You know how lots of books have advice along the lines of "NEVER do this" or "ALWAYS do this"? Matthew Wilson takes great delight in providing examples where you might want to do the opposite, and covers a wide variety of topics, including defining a portable boolean, a NULL value, and C#/Pascal/Python-like properties.
Purists will almost certainly dislike the fairly heavy use of macros for some of the solutions here, you'll have to get used to the appearance of code with a plethora of underscores in. And the book assumes a reasonably high level of knowledge of C++. In particular, there's little hand holding. Entire class definitions are often provided, but you won't always get example application code to see it in action. This is a little unfortunate, particularly in the chapters where the author introduces his own idioms. It requires careful concentration to work out the physical layout of some of the solutions (e.g. are these free functions or member functions? In the same namespace or a different namespace?). On the other hand, some readers will no doubt welcome the vigorous thought that is required.
Overall, this is a very different, practical book to most of the C++ books out there, with a very high signal-to-noise ratio. Add it to your C++ recommended reading list.