Object-Oriented Computation in C++ and Java, by Conrad Weisert.
Dorset House Publishing, May 2007. $33.95
ISBN: 978-0-932633-63-7. Available from Dorset House Publishing's website.
It’s all about the numbers. Or is it? Most of the
programming books I’ve read tend to gloss over the numbers. Sure, you know that
the numbers exist and that you can perform basic math with them, but you never really see how to do it. After a few
minutes in the limelight, the numbers disappear and the author replaces them
with the more exciting machinations of the user interface (not that there’s
anything wrong with the user interface; applications need a user interface too).
Many books simply don’t include much about the numbers, especially the math
behind the numbers. If you’ve found yourself wondering how to make the math
work, this is a great book to get. Instead of giving you a couple simple math
examples that don’t reflect the real world, you’ll find yourself working with
code that fully demonstrates practical math techniques.
What is it all about?
The book starts out simply enough with a discussion of
numeric data taxonomy, but quickly moves into some relatively complex math
examples that will leave the uninitiated gasping for breath. The author does
warn you that this book is intended for experienced programmers and I must
admit that he challenged some of my programming skills later in the book. In
other words, if you don’t work with C++ or Java regularly, then you’re probably
going to get lost. This has nothing to do with the author’s prose. The book is
well organized and relatively easy to read, but the author also doesn’t candy-coat
the complexity of the topic. You’ll find that you learn quite a lot in the
scant 194 pages that this book provides.
You won’t have to look far for evidence of the author’s
teaching credentials. The first chapter alone contains eight problems or
exercises. Unlike many other books, these problems and exercises force you to
think outside the book. Yes, they relate to the topic at hand, but the author
uses them to force you to think about the topics in new ways. Consequently,
when you read about data representation in Chapter 1, you’ll see an exercise
that asks you to describe how the Year 2000 (Y2K) problems arose and why some
organizations avoided them. Even though the author says not one word about Y2K
in the text, the problem presents an opportunity to express the author’s
material in a real world scenario. This example helps you understand the
material outside the normal theoretical realm and in a way that you can apply
to real world problems of your own.
If the book has any failing, it’s a lack of simple answers
to a few of the problems and exercises. Normally, you can sneak a peak at the
answers to the exercises and problems in the back. I was disappointed to see
that you must go to other chapters to discover the answers for some problems
and exercises; the author tells you which chapter contains the answer, but a
simple answer in the back of the book would have been helpful.
The author is right in saying that you must know how to
program in the supported languages to use this book, but he does cover some material
that at first seems quite simple. For example, Chapter 2 describes how to
create classes with Java or C++. It’s not until you get into the meat of the
chapter that you begin to understand that this isn’t any basic coverage of a
simple topic. Rather, the material focuses on working with numbers, so it takes
a completely different look at class creation from any other book I’ve read. In
addition, the author takes time to show how to repurpose some existing
facilities within the programming languages, such as using C++ macros to
overcome certain deficiencies in the language support many vendors provide. He
even points out the differences between good and bad macros.
By Chapter 3, the author is discussing pure numeric data
types and shows how to define them correctly. Every chapter emphasizes the
difference between real world and the abstractions of math. You begin seeing a
few terms that you may not have seen since college, such as how to work with
imaginary numbers and the creation of a complex class. The author soon immerses
you in working with polar coordinates and rational numbers. By the way, those
exercises and problems I mentioned earlier keep coming: Chapter 3 contains a
whopping 34 of them.
Chapter 4 begins the discussion of modeling real world
numbers. In this case, the author spends considerable time discussing monetary
values, but the information provided is also useful for other kinds of real
world modeling. The important issues is that Chapter 3 demonstrates numeric
representations that have no unit of measure, Chapter 4 describes numeric
representations that reflect that additive pattern, and Chapter 5 describes
numeric representations that reflect the point-extant pattern, so you obtain a
full view of numeric representations in this book.
The book ends with a look at polymorphism and inheritance in
Chapter 7. Chapter 8 looks at how to work with vectors and matrices. By the
time you reach the end of this book, you should have a good idea of how to
model any real world data.
Is this a good book?
I often felt that this book is intended for classroom use rather
than individual reading as I worked through the chapters. The author is quite
terse and there isn’t any hand holding. Be prepared to spend more than a little
time thinking about how to solve the individual problems and exercises if you
go it alone with this book (don’t skip them though, because otherwise you’ll
miss out on a major value of this book). That said, I felt the coverage was
complete and that you’d be hard pressed to find the material in this form
anywhere else. The book did make me think and renew some rusty skills that I’ll
be able to use in the future. Overall, I think this is a good book for the advanced/expert
developer who already knows how to program and simply needs to think about new
ways of modeling numbers properly in either C++ or Java.
BIO
John Mueller is a freelance author and technical editor. He
has writing in his blood, having produced 79 books and over 300 articles to
date. The topics range from networking to artificial intelligence and from
database management to heads down programming. His most recent book is “Microsoft
IIS 7 Implementation and Administration” (Sybex, ISBN: 978-0-470-17893-5). His
technical editing skills have helped over 56 authors refine the content of
their manuscripts. You can reach John on the Internet at JMueller@mwt.net and
his Web site at: http://www.mwt.net/~jmueller/.
 |