Archive for the ‘Book Reviews’ Category

Book Review – Object Oriented Software Construction Second Edition

Object Oriented Software Construction Second Edition by Bertrand Meyer

I discovered this book in 2007 while searching for references on the subject of object oriented programming. Although I knew the basics at the time and had been coding in OO languages for several years, I felt that I was doing it poorly and wanted to take my understanding to the next level. It did not take much time to realize that OOSC2 was generally regarded as one of the best, if not the BEST, book on the topic and so I happily spent an outrageous $78 for a new edition. That was exactly 9 years ago today and the book now sells for $120 brand new.

When it arrived I promptly read the first page, browsed through the chapters and set it aside with the sincere intention of reading it cover to cover “when I had more time.” Months passed, then years. I read many other books and continued to program in OO, but I could not seem to muster the motivation to tackle those 1200+ pages. One day I took a new job and brought this book to the office. One of the senior architects walked by and commented, “that’s one of the best books I’ve ever read.” I knew then that it was time. I cleared my schedule and over the course of many months, inched my way through it cover to cover.

Looking back, I would not recommend this book to anyone wishing to learn or improve their understanding of object oriented programming. Instead, I would recommend Head First Object-Oriented Analysis and Design. Although OOSC2 does explain all of the essential OO concepts in great detail, it reads like an academic thesis full of proofs and theorems. This is because at the time of the writing, OO was a somewhat controversial approach to software development. Meyer’s primary intention was not to make OO understandable, but to prove that OO as an end-to-end software development method was superior to all of the existing alternatives. To this end, many of the explanations and ideas are accompanied by mathematical proofs and notations which, while necessary to the progression of his arguments, only serve to frustrate those seeking to understand OO as quickly and plainly as possible.

Despite the fact that OOSC2 is not, in my opinion, the best book to learn or understand OO (although some would disagree), it is without a doubt one of the most important and influential works in the history of software engineering. As such, I recommend it highly to any person serious about software development. It is a challenging read that will add depth to your view of the craft and force you to grapple with concepts that are often taken for granted in today’s world of pervasive OO such as the superiority of single inheritance, the importance of designing by contract, the value of assertions, type checking and constrained genericity.

I thoroughly enjoyed the journey that is OOSC2 and hope you have the chance to as well!

Book Review – The Art of Unit Testing: with examples in C#

The Art of Unit Testing: with examples in C# 2nd Edition by Roy Osherove

When I was a young programmer, I remember a job interview where I expressed my belief that coding was a form of art to a potential employer. The job was for an entry level position working with the RPG language on IBM systems. I knew very little about RPG at the time, but I was confident I could learn. I did not get the job and looking back, it’s clear to me that immaturity and lack of experience where the main reasons. Even still, the exchange about art stands out in my mind and I often wonder how that affected the outcome.

Some years later, I discussed this interview with a respected associate. He explained to me that managers and especially those above them usually see software development as a complex machine with many moving parts. In order for this machine to function efficiently, each cog and gear must be predicable, measurable and reliable. There is sometimes very little appreciation for art in this point of view and in many ways I agree. Much of software development is about the pursuit of correctness and certainty, the elimination of risk and the maximization of value. Despite this, I still believe that art must play an essential role in any venture for it to be truly worthwhile when all the amounts and values are finally summed. The Art of Unit Testing delivers the best of both worlds in a way that is direct, practical and immediately applicable.

I was first introduced to Roy Osherove’s work indirectly through the MVVM design pattern. I was researching it for a WPF project when I realized that it would be a great chance to learn about unit testing. I google’d the topic and discovered After watching all of the videos, which were excellent, I gave the usual sales pitch to management and then opened up the beautiful can of worms that is legacy code. In the end, the decision to include unit tests in the project impacted the schedule significantly for the worse. I had to rewrite perhaps a third of the codebase and abandoned the idea of unit tests for the rest. The code was still buggy and when I joined another team a few months later, the existing unit tests were forgotten. Based on this, it would be easy to conclude that unit testing failed to produce value.

A year or so later, I decided to try TDD on a small project and picked up The Art of Unit Testing to give myself a jump-start. Although not specifically about TDD, this book is regarded as one of the best on the subject of unit testing in general, and having read it twice now, I have no reason to disagree. Unfortunately, I was not prepared for the system shock that exposure to the TDD worldview can produce. On one hand, the TDD code that I wrote was perhaps some of the best code I’ve ever written. On the other hand, the project went so far behind schedule as I adjusted that it was put on hold indefinitely. Based  on this, it would be easy to conclude that TDD specifically and unit testing in general failed to produce value.

Just last year, I was assigned a high risk, high profile project with a critical dependency on another sizable and legacy component. The main project required several complex changes to the legacy component and these assignments were given to developers who did not practice unit testing. The result was an extremely buggy and unreliable system and we wasted at least a month tracking down issues and troubleshooting them. Eventually, I realized that it would be better to rewrite it from the ground up and so I did–with a testable design and about 90% code coverage. I was able to do this in a reasonable time frame and the component has been rock solid ever since. No issues at all were found in QA and none have been found in production. Based on this it would be easy to conclude that unit testing successfully produced value and I would agree. It allowed us to complete the high risk, high profile project with a high degree of certainty about the correctness of the final behavior without negatively impacting the schedule. It was in fact the lack of unit tests and unknown code quality that posed the greatest risk to the project schedule.

It is important to realize that the last success would not have been possible without the first two failures. What you will gain from The Art of Unit Testing and pursuit of the discipline in general is not a magical power-up for your next project, but the skills you need to become a stronger developer in the long term. You’ll learn the basics of writing unit tests, you’ll survey the commonly used tools and you’ll be exposed to the concepts required to write readable, high quality, maintainable tests from the perspective of a veteran in the field. The transition to becoming proficient in this discipline won’t take place overnight, but The Art of Unit Testing will help make this worthwhile journey faster and less painful.

The Art of Electronics / Learning the Art of Electronics

I have recently become the proud owner of two books, Learning the Art of Electronics (3rd Edition, Hayes/Horowitz) and The Art of Electronics (3rd Edition, Horowitz/Hill) I still love a paper book for some things, and both of these are books I’d recommend that you purchase the paper version so you can lay them open beside your projects as you work on them.

Both are excellent and I have learned a lot from them, even though I’ve barely scratched the surface. They are some 2400 pages, combined, and these are textbook-size pages. Very densely packed with information, which I want to retain. So I’m taking my time!

I think it will help us all if I can create an in-depth review, as I go. For one thing, it will help me.

An exciting quote* for today from appendix G “Where Do I Go to Buy Electronic Goodies?”:

Manufacturers Direct: Many semiconductor manufacturers (Analog Devices, TI, Maxim,…) Will not only send free samples with the slightest provocation, they will also sell in small quantities via credit card; check out Many-Circuits for RF components, and Coilcraft for inductors, transformers, and RF filters.
(*My emphasis.)

Indeed, there are too many providers and tools listed for me to include them all here. A few that sound especially interesting are and You give them a part number and it searches dozens of distributors, returning (“sometimes unreliable”) information on availability and pricing.

A sneak peek of some things I intend to talk about, and some very useful shortcuts for you in the meantime!

Scan of "Learningi the Art of Electronics" pg. 14

Learning the Art of Electronics pg. 14

Scan of "Learningi the Art of Electronics" pg. 15

Learning the Art of Electronics pg. 15



Book Review – Developer’s Guide to Microsoft Prism 4

Developer's Guide to Microsoft Prism 4: Building Modular MVVM Applications with Windows Presentation Foundation and Microsoft Silverlight (Patterns & Practices)Developers Guide to Microsoft Prism 4: Building Modular MVVM Applications with Windows Presentation Foundation and Microsoft Silverlight (Patterns & Practices) by Bob Brumfield, Geoff Cox, David Hill, Brian Noyes, Michael Puleio and Karl Shifflett.

I suppose the best place to start is to say don’t buy this book like I did. Read it or on MSDN or download it from Codeplex. Both options are free. However, if you are the traditional sort and prefer to have a physical book in your hand, it is available from Amazon and other distributors. I personally opted for the Kindle version, which was very convenient, but had I known about the free PFD version at the time, I think I would have saved myself the $16 I paid for it. Unfortunately, I didn’t know anything about Prism when I first came across this book and decided to buy it as a getting started guide. Even though I could have done better cost-wise, the decision was well worth the expense. The Developers Guide to Microsoft Prism 4 is probably the best source of information available on the subject and you will find yourself refering to it again and again as you cut your teeth in Prism development.

 Generally, I don’t like books written by three or more authors and this book has six. Naturally I was sceptical from the outset. Fortunately, the authors of this book are all-stars in this arena so lack of a single voice is more than offset by the wealth of insight and content. More importantly, it is essential to understand that this book was written as both a stand-alone book and as product documentation. When you download the Prism product, you get the full book in the form of Compiled HTML Help files (.chm). The Prism download also includes two reference implementions (RI’s) and ten topic specific Quickstarts. These Visual Studio projects demonstrate the capabilities of Prism and are refered to throughout the book. So although you can benefit from referencing the book on a case by case basis or by reading it from cover to cover in isolation, you will definitely get the most benefit by reading the book while studying the relevant RI’s and Quickstarts as you progress through the chapters. This was how the material was meant to be consumed and if you ignore the RI’s and Quickstarts, you may find yourself frustrated by the apparent lack of detail or overwhelmed by the terminology. I personally tried to read the book as a stand-alone book but lost interest halfway though. I came back six months later to finish it, but discovered that I had already forgotten what I had previously read. I finished it anyway and then read most of it again to fill in the gaps. At that point I discovered the importance of the RI’s and Quickstarts and began studying them. This is when things started to click for me.
On the downside, the book is not for the novice. Prism, as a product, is a standardized implementation of several best practices that have proven to be effective solutions for common .NET architectural problems like modularity, UI composition, unit testing, navigation and multi-platform targeting. As such, understanding Prism requires the reader to have at least a basic understanding of technologies like C#, Linq, lambda expressions, MVVM, XAML, XML, design patterns, etc. Fortunately, the material is clear enough for most readers to be able to learn as they go as long as they are willing to dig into the links provided at the end of every chapter. Nevertheless, some solid WPF and/or Silverlight experience will prove invaluable when trying to take on Prism.

Artificial Intelligence: A Modern Approach (3rd Edition) by Stuart Russell and Peter Norvig

Artificial Intelligence: A Modern Approach (3rd Edition) by Stuart Russell and Peter Norvig

This is the definitive book on the current state of AI. It is used for the textbook in the Introduction to Artificial Intelligence at Stanford University. (I bought the book to take the class online.) It covers advanced topics, and is very information-dense. It is for the more technically-minded person. In addition, the paper version is over 1000 pages!

Stuart Russell is Professor of Computer Science and Smith-Zadeh Professor in Engineering, University of California, Berkeley and Adjunct Professor of Neurological Surgery, University of California, San Francisco. Read about him here.

Peter Norvig has also been a professor at University of California, Berkeley, and is currently Director of Research at Google. Read more about him here.

At the end of each section in the book, there are exercises to help give you an in-depth understanding of each topic. These do not, necessarily, require any programing, or even a computer. Obviously, using a computer would help a lot, and you probably won’t get very far in the field without one. Of course writing code will help even more and will cement your knowledge with useful foundations.

While on the subject of programming, I should mention that the book has an official web page, and the authors have graciously posted a large collection of source code in Java, C++, Prolog, LISP and Python.

Section I presents an introduction to AI to define what it is, and how it is used in the world. It introduces the concept of intelligent agents. An agent is not necessarily a robot because there are software agents, too. Software agents are used a lot in our world of 2012. Two examples that you’ve probably used are: Google uses them in their search suggestions and Amazon uses them in their product recommendations.

Section II is about problem solving. This includes solving by searching, uninformed and informed searching, heuristic functions, adversarial search, constraint satisfaction problems and much more.

It is worth pointing out that while the book does not explain all of the mathematics behind the formulas used, it does include the formulas themselves. Appendix A does explain a lot of the math. If you’re unfamiliar with the math, it will probably help you to study up on it before tackling some of the math presented here. You can easily find pages on the net to help. You may want to start with mathematical symbols and follow up with in-depth courses from Khan Academy.

The book also includes pseudo-code for all important algorithms. This, alone, is worth the price of the book.

Section III is titled “Knowledge, reasoning and planning”. This has the subsections Logical Agents, First-Order Logic, Inference in First-Order Logic, Classical Planning, Planning and Acting in the Real World and Knowledge Representation.

Section IV is “Uncertain knowledge and reasoning”. It covers how to quantify uncertainty, acting under it, probabilistic reasoning, probabilistic reasoning over time, and making simple and complex decisions.

Section V is about learning and the many ways to accomplish it. Section VI is “Communicating, perceiving and acting”. This includes chapters for natural language processing, which means dealing with languages such as English; natural language for communication, or, how can my robot speak to these biological creatures called humans (my description, not the authors’); and perception and robotics. These topics are among the most interesting to me, especially the subject of computer vision. They include major algorithms for this, which is quite a lot of information. However, it’s such a large field, it deserves another textbook of equal size. (Sebastian Thrun plans to offer an online course in the subject, so I plan to take it.)

Section VII has conclusions, including philosophical foundations; and AI: present and future. Honestly, I’ve only skimmed these chapters, but I can tell you that they’re very worthwhile. (I do plan to study them in the near future.)

The bibliography included is excellent. The citations include everything from the 14th century(!) to current time. I like the way each section ends with a historical discussion that includes references. Unlike citation sections in many other books, that are dry and boring, these discussions are intriguing, informative and often humorous. Which reminds me – there is quite a lot of humor spread throughout the book. I think that some of it may only be caught by the most technical reader, but a lot of it will appeal to everyone. Please understand, this is definitely not a comedy. It is a technical book. I just want to point out that the authors use humor in certain places, especially in defining and describing the problems, and I think it helps.

Overall, I have to give this book a very high rating. I’m glad that I bought a copy, and I think I’ll refer to it often in my projects. Again, this is a very technical book. It is also huge. I sometimes read one or more novels in a week. I have been reading this over the 10-week AI class, and (as I stated above) there are a few sections that I’ve still not finished. Of course I was watching videos for the class, studying and doing homework during that time, too; but I just point this out to let you know it will take a major commitment of time to actually read the entire book. Bottom line: you will definitely benefit from it!

I bought the Kindle version, and my only complaints are that my Kindle does not display some of the mathematical symbols used, and that the images included are not very usable, even when “zoomed in”. These are actually criticisms of the Kindle device, itself, because I can see the symbols and images much better on the (free) PC Kindle reading software. Since I’ll usually be referring to this book while working on my computer, this is an annoyance only while reading through the book for the first time. Oh, one other point – I cannot read it at all on the iPhone because it is not formatted for that device.

Artificial Intelligence: A Modern Approach (3rd Edition) sells for $117.24 for the hardback and $59.66 for the Kindle edition on

Book Review – Programming Android

Programming Android by Zigurd Mednieks, Laird Dornin, G. Blake Meike & Masumi Nakamura

Ayn Rand once said that a true work of art can never be the product of a collaborative effort and this book seems to suggest that she is right. Although fluidly written, informative, and well edited, Programming Android lacks the consistent line of thought characteristic of (good) books with a single author and leaves the reader with the feeling that something vital is missing.

To be more specific, I was impressed at the bookstore by what seemed to be a comprehensive and logically arranged table of contents, but disappointed with the superficial treatment of essential topics and the strange emphasis on advanced or inessential material. For example, the book does not seriously address application development until chapter 7 (page 167), but devotes an entire chapter to reviewing the Java language, another to highlighting Eclipse and another to Android Marketplace deployment. While all of this is valuable information (for some), I would argue that a basic Java and Eclipse tutorial do not really merit two entire chapters at the expense of displacing the main subject of the book and the topic of Marketplace deployment belongs at the end of the book rather than the beginning. For me, I would have preferred to see the Java and Eclipse chapters presented as optional Appendix material for those that would benefit from it.

Once the authors finally do get around to the topic of application development, they do so in a very round-about and haphazard manner. For example, one of the first concepts discussed is threading and asynchronous processing. While this is indeed a vital concept to understand, presenting it before the more fundamental concepts of UI design, widget configuration and the application life cycle does more harm than good. Unfortunately, UI design and widget configuration is not discussed anywhere in the book at all and the application life cycle is all but lost in the crowd of disorganized and incomplete concepts like MVC architecture, SQLite, OpenGL programming, the Fragment life cycle, event handling, and anonymous classes. It’s not until chapter 11 (page 279) that the reader is presented with a marginally coherent explanation of the Android application life cycle.

On the positive side, the book does dedicate a significant amount of material to the topic of content providers–two back to back chapters in fact. Content providers are another vital aspect of Android development and allow applications to consume, expose and manipulate persistent data using a public API.  This is a pretty advanced subject involving SQL, Cursors, interprocess messaging and MVC architecture. While all of these topics are present in the book, they are so scattered and incomplete that it is very difficult not to feel lost when trying to make sense of them. For almost every topic, the reader is forced to do what is rightfully the work of the authors–that of putting all of the relavent information together in a structured and meaningful way. Why bother reading (or buying) a book at all when you can get the same benefit in less time and for less effort from online tutorials?

The rest of the book goes on to survey a few other Android features like multimedia, location/mapping services, input gestures, social media integration, wireless communication, sensors and native development. These are all great topics, but the treatment is very cursory and does not extend beyond what is available in the official documentation. In fact, certain parts of the book are blatantly taken directly from the official documentation without proper citation. For example, the follow excerpt from chapter 16 (page 394) is ripped almost verbatim from the SensorEvent reference page.

The rotation vector, in Android 2.3 and later versions, represents the orientation of the device as a combination of an angle and an axis, in which the device has rotated through an angle θ around an axis <x, y, z>. Even though this can be calculated via the gyroscope, many developers ended up doing this often enough that Google provided the rotation vector to help simplify the user case.

The three elements of the rotation vector are <x*sin(θ/2), y*sin(θ/2), and z*sin(θ/2)>, such that the magnitude of the rotation vector is equal to sin(θ/2) and the direction of the rotation vector is equal to the direction of the axis of rotation. The three elements of the rotation vector are equal to the last three components of a unit quaternion <cos(θ/2), x*sin(θ/2), y*sin(θ/2), and z*sin(θ/2)>. Elements of the rotation vector are unitless.

Overall, this book reads like a collection of closely related magazine articles and is actually worse than just doing self-directed research on your own. The organization and quality of content do not offer anything that you can’t get from a few online tutorials supplemented by the official Android documentation. However, for those (like me) who prefer to read a physical book from cover to cover, Programming Android will get the job done if you don’t mind putting the pieces together yourself. Definitely not recommended for anyone without several years of modern development experience.

Return top


Section9 is a hackerspace based out of the Springfield Missouri area. For more information, please see the About Us page or find us on Facebook.