• Solutions
    • I Can Help
      • Define
      • Educate
      • Integrate
      • Advise
    • Consultation
      • Assessments
      • Design Reviews
      • Code Inspections
      • Ongoing Support
    • Training Classes
      • Training Schedule
      • On-Site Classes
      • Online Training
      • Customized Coaching and Mob Facilitation
    • Learning Roadmap
      • Developer Essentials Training
        • Agile Analysis and Design Patterns
        • Hands-On: Extreme Programming Practices
      • Scrum Framework Developer Essentials
      • Design Pattern Developer Essentials
      • Object-Oriented Analysis and Design Patterns
      • Scrum Software Developer Essentials
      • Agile Software Developer Essentials
      • Agile Software Developer Intensives
    • Speaking
      • Beyond the Legacy Code Crisis
      • Five Developer Practices for Agile Software
      • Writing High Quality, CLEAN Code
      • Essential Scrum Developer Practices
      • Improving Your Scrum Process
      • The Agile Development Advantage
    • Testimonials
    • Clients
  • Resources
    • Blog
    • My Book: Beyond Legacy Code
    • Bibliography
    • Referral Program
    • Associates
  • Contact
    • Contact Me
    • Schedule A Call
    • About
  • Schedule A Call

Thinking with Objects

  1. Home
  2. Blog
  3. Thinking with Objects

2025 Public Training Schedule

June 23 26, 2025 – Agile Analysis and Design Patterns – Half-Day Sessions Online

July 22 – 25, 2025 – Agile Analysis and Design Patterns – Half-Day Sessions Online

Register Now
Or schedule a private class
Course Descriptions
  • Developer Essentials Training
    • Agile Analysis and Design Patterns
    • Hands-On: Extreme Programming Practices
  • Object-Oriented Analysis and Design Patterns
  • Scrum Software Developer Essentials
  • Agile Software Developer Essentials
  • Agile Software Developer Intensives
Follow me on Twitter:

Follow @ToBeAgile

Blog Post Categories
  • Announcements {19}
  • Articles {2}
  • Bits and Pieces {74}
  • Blogosphere {1}
  • Bonuses {2}
  • Build in Small Batches {27}
  • Collaborate {38}
  • Create CLEAN Code {34}
  • Implement the Design Last {11}
  • Integrate Continuously {30}
  • Off-Topic but Interesting {3}
  • Rants {82}
  • Refactor Legacy Code {24}
  • Say What, Why, and for Whom Before How {22}
  • Seven Strategies {38}
  • Specify Behaviors with Tests {17}
  • Write the Test First {27}
Archives
  • 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • 2022
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • 2021
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • 2020
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • 2019
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • 2018
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • 2017
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • 2016
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • 2015
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • 2014
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • 2013
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • 2012
  • December 2012
  • Privacy Policy

    (c) 2025 To Be Agile

    • March 7, 2018 ( 2 comments )
    • Bits and Pieces

    It took me more than a decade of doing object-oriented programming-and then teaching it-before I really started to understand the subtle power of using objects, and how to create behavior through the interaction of objects rather than through program logic. I struggled for many years with how to explain this different way of thinking. It’s easy to teach algorithms or the keywords of the language, but to teach a new way of thinking is a challenge in any field.

    So, what is the essence of thinking with objects? It starts by having multiple perspectives is a program.

    In procedural programs, we took a single perspective, which was the instruction counter the CPU. In other words, to understand what was going on we traced through our code just like the computer did, albeit much slower. That may seem reasonable and straightforward, and it worked well in many situations, but the problem came when we wanted to make changes to a program.

    For example, let’s say you want to travel from point A to point B. There are at least a few ways that you can get guidance. You could get directions-series of steps to follow-and write them down, e.g. first go to the next light then turn left then go three lights down and turn right, etc. Alternatively, you could use a map, and while there are no instructions on how to get from where you are now to where you want to go, you can use the map to figure out how to get there.

    Now let’s say you decide that you want to take a detour on your way and stop off for some ice cream. Yum. This may be difficult to do when you have a set of instructions but if you have to map that shows where the ice cream shop is located then you can use it to see how to detour to get there and then get back on track to your final destination. This is not the perfect metaphor for the difference between procedural programming and object-oriented programming, but it does get close.

    Object-oriented programming takes many perspectives. Each object in the system represents an entity and each entity has a particular perspective in the system. By having separate entities, each with their own perspective, we can limit the amount of knowledge that each entity has, giving us the flexibility to change things without affecting everything else in the system.

    It really wasn’t until I started to study design patterns that I saw how we can create complex behavior through the interaction of objects. Some patterns really taught me the essence of what OO is about, and that’s one of the main benefits I get from studying design patterns. There are many other benefits of studying design patterns. Patterns help us communicate with higher fidelity and understand the essence of a problem quickly. You can implement design patterns in virtually any language including procedural languages, although it is much more difficult in a non-OO language.

    While the Gang of Four’s design patterns book is really revolutionary, even today, it is also a mess. There so many little mistakes throughout the text and it seems that there are no common definitions for some of the words they use. However, the big things are so amazingly groundbreaking that it makes up for some of the smaller problems. Also, there are some subtle assumption and certain presuppositions in the book that is also profound. For example, patterns often use polymorphic behavior and this implies for right objects are created prior to their use, and in fact, there’s a whole group of patterns called creational patterns that are involved simply in creating objects. This reflects one of the most fundamental yet misunderstood aspects of OO, to separate the use of objects from the construction of objects.

    The great “ah-ha” moments for me came from the realization that this separation of using objects and creating objects has a huge effect on how we design systems that are more resilient to change. More on this in future posts.

    {2 Comments }

    • Marc says:
      March 10, 2018 at 7:36 pm

      The Gang of Four book is no doubt a classic. I found Design Patterns Explained by Allan Shalloway and James Trott to be a very enjoyable and “cleaned up” version of the GoF book.

      Reply
      • David Bernstein says:
        March 12, 2018 at 6:49 pm

        Hi Marc,

        Thank you for your comment and I totally agree. I’ve read Design Patterns Explained several times (both editions) and it’s my favorite book on design patterns. Some people say that’s because Al is my good friend, but I sought him out years ago after reading his book.

        I also like Head First Design Patterns by the Freemans. I don’t recommend reading Gang of Four, it’s an amazing book full of great ideas and it did start the pattern revolution but it’s a hard read that could have used another edit pass before publication.

        Design patterns taught me what OO is really about.

        I had been an OO developer and trainer for two decades before reading Design Patterns Explained but it was really this book that showed me what OO is really about. I highly recommend it.

        David.

        Reply

    Previous Post: « Commit Frequently

    Next Post: Aggregation or Composition »

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

      Built with Kit

      Solutions

      I Can Help
      • Define
      • Educate
      • Integrate
      • Advise

      Consultation
      • Assessments
      • Design Reviews
      • Code Inspections
      • Ongoing Support

      Testimonials Clients

      Resources

      • Blog
      • My Book: Beyond Legacy Code
      • Referral Program
      • Associates


      Read my book!
      Schedule a Call

      Training

      • Training Schedule
      • Learning Roadmap
      • On-Site Classes
      • Online Training
      • Customized Coaching and Mob Facilitation

      Course Descriptions
      • Developer Essentials Training
        • Agile Analysis and Design Patterns
        • Hands-On: Extreme Programming Practices
      • Object-Oriented Analysis and Design Patterns
      • Scrum Software Developer Essentials
      • Agile Software Developer Essentials
      • Agile Software Developer Intensives

      Copyright 2025 © To Be Agile. All rights reserved. Privacy Policy.

      This website uses cookies to improve your experience. I'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
      Privacy & Cookies Policy

      Privacy Overview

      This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities...
      Necessary
      Always Enabled
      Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
      SAVE & ACCEPT