The Object-Oriented Thought Process (5e)
Written by Mike James   

Author: Matt Weisfeld
Publisher: Addison-Wesley
Pages: 240
ISBN: 978-0135181966
Print: 0135181968
Kindle: B07Q3SGD1S
Audience: Developers using C#, C++, Java
Rating: 3
Reviewer: Mike James

Getting inside the object-oriented thought process is a trick worth knowing. Does this book hack it?

The title of this book suggests that it is going to give you an insight into the inner workings of the mind of an object-oriented programmer. In fact, it is a fairly standard account of the fairly standard theory of object-oriented languages of the C++/Java/C# family. That is, it tells you the story of a strongly typed, class-based hierarchical language  - not that it says so in such sophisticated words. This is a down-to-earth look at object-oriented programming, but only of a very specific kind. This would be fine, but it fails to point out that it is just one possible approach, even though it happens to be the dominant one at the moment. Languages such as JavaScript, Python, Smalltalk and Ruby aren't really described by the contents of this book. 

If you haven't really caught on to the idea of objects then perhaps this book might have things to tell you, but it is difficult to see how you could avoid learning at least a little about objects if you can program. There are so few languages that aren't object-oriented you are bound to have picked up at least the idea of class and object. More likely is the situation where you know about objects, but aren't 100% clear of the theory behind it all.  The fifth edition states that it has been updated to take account of the fact most current readers would know something about objects, but it still starts from scratch.


Chapter 1 provides us with the basic idea of an object. I didn't find the approach satisfying as it tells you what an object is and what the benefits are, but it doesn't really give you any deeper idea of how the idea arises naturally as an extension of a structure. It also starts to throw in lots of other ideas, which are additional to the basic idea of an object - such as class, messages, gettters and setters, inheritance, polymorphism and so on. Some of these ideas are just one particular way of doing objects rather than part of the "way to think about objects". Even in this first chapter you can see the shadow of Java and C++.

Chapter 2 claims to be about "How to Think in Terms of Objects". It uses the term "interface" to mean the object's public methods which is unfortunate because the term often refers to something else. Basically this chapter says that an object is its public interface and this allows you to forget about implementation details. 



Chapter 3 is on advanced topics, but they are a very narrow selection from the standard object-oriented languages rather than being deep theory. It starts off with the idea of a constructor - which may be part of the popular object-oriented languages, but isn't the only way to do the job. We also have an introduction to UML, exception handling, scope, static attributes, operator overloading and references.

Chapter 4 goes deeper into class definitions, but it is basically a recap of what we have already done. The next chapter reiterates the same ideas in more general terms and throws in some style guidance. Chapter 6 continues in a vague and waffley way about design principles. It also discusses the fact that the code you write within an object should be structured - something which is enforced by modern object- oriented languages.

Chapter 7 tackles the inheritance and composition problem. It basically says that inheritance isn't as good as you might think because it breaks encapsulation. This is partly true, in that it is all too easy to build complex inheritance hierarchies that can be sensitive to small changes made at the top of the hierarchy. What would be good would be an example of this in action - but as in so many chapters the evidence isn't presented and the "if you want to know more read another book" attitude prevails. There is also no mention of the vague way that function overriding works and how it too can break a fundamental principle of OOP - the substitution principle.

Chapter 8 complicates the picture with a consideration of the Interface and the Abstract class. Chapter 9 discusses aggregation and association. Chapter 10 describes the classical design patterns, but it is far too short for a big topic. Chapter 11 is another meditation on inheritance and composition, but with coupling and dependency at the fore. The final chapter is on SOLID and has, at last, a good account of the Liskov substitution principle.

Most of the examples in the book are in Java or C# and essentially the book is talking about object-oriented programming as implemented in these two, similar, languages. Don't bother even trying to read this book if you don't program in a language of this type. This is a book aimed at beginners, but not at non-programmers. 

There are also lots of really important topics and ideas that are simply not discussed in any great detail - type hierarchy, covariance, contravariance, generics with type parameters, and so on. And why no explanation of why polymorphism is a way of avoiding conditionals? And nothing at all about the way objects evolve from data structures.

This is supposed to be about object-oriented thinking, but it doesn't get deep enough to explain how it works. At best it is a standard account of the top-level principles of class-based, object-oriented programming - encapsulation, inheritance, composition and polymorphism - as seen from the perspective of a Java-like language.

If this is what you want to know about then perhaps you will get something out of this book - but reading the standard documentation is likely to get you just as far. If you are looking for an in-depth and reflective discussion of object-oriented programming in all its forms then you need a very different book.


Python Programming and Visualization for Scientists 2nd Ed

Author: Alex DeCaria and Grant Petty
Publisher: Sundog Publishing
Pages: 372
ISBN: 978-0972903356
Print: 0972903356
Audience: Scientists wanting to use Python
Rating: 2
Reviewer: Mike James
Visualization - a difficult topic and difficult to see how to explain the ideas in a book.

Bare Metal C

Author: Steve Oualline
Publisher: No Starch Press
Date: August 2022
Pages: 304
ISBN: 978-1718501621
Print: 1718501625
Kindle: B08YJB9BCF
Audience: C programmers
Rating: 3
Reviewer: Harry Fairhead
Bare metal C sounds exciting and very basic. Time to find out how the machine really works.

More Reviews

Last Updated ( Tuesday, 24 March 2020 )