Object Moment

Whilst at University we were introduced to ObjectOriented concepts from a procedural background. Obviously being young and inexperienced, along with having just got used to procedural programming, many found the OO concepts difficult to grasp. Then...

...along came that ObjectMoment, the point during our education when it all became clear. The concepts made sense, and you suddenly became aware of the usefulness of OO. Many of my, then, fellow students admitted to this, and it became generally known as that ObjectMoment!

Is this something everybody experiences?

This recollection came to me whilst reading PatternsDontNeedToGoBoom.

-- StuartBarker


That happened to me too. I couldn't pinpoint the day and time, but I know that before I was thinking of OOP in terms of procedural programming, and now I think of procedural programming in terms of OOP.

A similar thing happened before that, when I started to understand pointers. I wonder if the OO paradigm has some sort of higher cardinality associated with it?

-- DavidMcNicol

Ditto, pointers presented me with a similar such moment. I suppose it's the same BOOM described in my reference above. That point of understanding that leads to feelings of enlightenment! -- StuartBarker


Funny how some learning is continuous and grinding while other times learning is herky-jerky and discrete, stepwise in nature. I've heard a lot of people talk about learning OO as a step function - one day you don't get it, then in the next moment, BANG! You got it! This happened to me. Experiences like this remind me that epiphanies can be prepared for but not discovered; that is, they reveal themselves to you when you are ready, and no amount of study will get you past a certain point. With a lot of people, the sudden insight into the nature of OO comes when they've quit in frustration of trying to assault the concept frontally. Then, in a moment of unsuspecting relaxation, the cortex is rearranged, and suddenly you can't look at the world the same way as before. -- DonOlson


I don't recall ever having an "aha" experience with object oriented programming. This may just be because I was exposed to the concepts well before I ever tried to apply them in practice -- I first read about OOP in BYTE magazine when I was about 16 years old, and I remember thinking at the time about how one would implement polymorphic calls in 6502 assembly language. You don't need to know a lot of assembly language to learn all about calling subroutines indirectly, and if you understand the concept of a function pointer I think you're 90% of the way to understanding OOP.

I have had "aha" experiences when learning new things, but I just don't recall OOP having been one of them.

-- CurtisBartley

Perhaps being exposed to the concepts at an earlier age helped a lot. At 16 you would have been more open to such ideas, that's why you don't recall having that Object Moment. Would you agree?

No, I just think it was being exposed to base concepts like indirect calls and jump tables -- poor man's polymorphism if you will -- and, frankly, inheritance is not really such a radical idea. Nevertheless, I'm completely in agreement with what everyone is saying about awareness sneaking up on you and everything. I still don't understand why so many people seem to find OOP difficult to grasp, though.

I like what Don says about the frontal assault, and the awareness striking during that moment of relaxation. I believe that's the sort of thing that happened to me, or perhaps it was a case of waking from some dream or another in the middle of the night and suddenly finding that it all made sense. -- StuartBarker


Perhaps its just the way some minds work. I know that my mind tends to gestate ideas which emerge, fully grown, when they are ready. I used to get very stressed worrying about all of the internal reasoning that must be going on, but now I've learned just to let my mind get on with it.

I spend many a long Saturday morning ruminating by the window with a cup of coffee, where before I would be banging my head against the monitor screen in the spare room.

Incidentally, one of the reasons I love using Wiki is all of the little "aha"s I get. I hope I will be able to contribute my own little gems of wisdom in the future (they aren't polished just yet). -- DavidMcNicol


I can't say that I had a single ObjectMoment where OO all became clear. But there have been "aha"s along the way. As an OO newbie, I knew that extending functionality meant using inheritance. Then I learned about composition and delegation. One day that really 'clicked' with me.

Another "aha" was when I realized that the allocation of responsibilities amongst classes shouldn't mirror the allocation of responsibilities amongst real-world things. I was reminded of this "aha" years later when a colleague complained, "Real-world Employees don't determine their own bonuses!"

My own "aha" about responsibilities involved a misguided attempt to turn an external data structure (a 3270 terminal datastream buffer) into a class by adding methods to it. Methods that appended data to the buffer required a position argument and returned the next available position to the caller! Ouch!

Suddenly, a light came on and I realized that my object should manage an external data structure, but not be one. In the same flash, I knew that this distinction was irrelevant to clients of my datastream class. Just like clients of an Employee class aren't confused by the fact that an Employee object isn't an actual flesh-and-blood person. And in the same insight, I realized that I might expect something of an Employee object that I wouldn't expect of a real-world employee, but that responsibility nonetheless represented important knowledge about real-world employees.

Looking back, that's a bit of a leap, but it happened as a single realization. AhHa!

-- KielHodges


I was taught structured programming, and when (about 3-4 years later) OOP came along it was just one more new thing. The specific barrier was certain adverts that claimed high productivity - things like "Write a text editor in 1 line of code!" I could see they could do that only because they already had a full text editor in a library. Lots of language systems come with big libraries.

The first turning point for me came when I sat down and read a Smalltalk manual end-to-end. It became clear that it was not so much a better library as a better tool for building libraries.

My second "Wow" experience was reading Meyer's ObjectOrientedSoftwareConstruction (1st Ed) shortly after it first came out (1988). By then I kinda knew most of the stuff, but that book seemed to articulate it clearly. It was like when you have a pattern, but until you read someone else's description of it you don't realise you have it.

-- DaveHarris


EditText of this page (last edited May 27, 2004) or FindPage with title or text search