In 1989 I was in third-year university, and object-oriented programming had started to catch on. It was the latest entity that was suppose to change the way software was designed and implemented. By the 90’s most universities had an OO course of some sort, more often than not taught by some academic who was basically learning it on the fly. The thinking was that if you didn’t know OO, you were behind the curve.
I remember OO being taught in a very strict and authoritative manner. Software was entirely designed in the form of objects and classes. In fact even the problem-solving space was suppose to be thought of in this way. This was touted as “object-oriented analysis and design“. I took a class on OO in fourth-year (I actually enrolled in an additional diploma to do the course because I had used up my quota of CS courses in my degree). It was nauseating, taught by an insufferable industry individual who had drunk way too much of the Kool-Aid. I remember lasting about two weeks before I dropped the course. Ironically a year later I did my honours thesis on OO problem solving in C++… but arguably it was more about the C++ than it was about the objects. I mean at the time I didn’t realize how horrible C++ really was.
“Object-oriented programming offers a sustainable way to write spaghetti code. It lets you accrete programs as a series of patches.”
Paul Graham, The Hundred-Year Language (2003)
By the time I took an OO class in grad school a couple of years later I realized that OO had become a cult. The textbook, “Object-Oriented Modeling and Design” written by Rumbaugh and colleagues (although nobody remembers the other authors) was horrible to read (which is not unusual in academia). It’s now considered a landmark in OO literature, but in my view it contained a lot of fluff, and not much content. Of course Rumbaugh was also one of those responsible for the other OO atrocity, namely UML, short for Unified Modeling Language (UML). But OO did spurn a whole publishing genre.
“UML has become complex and clumsy. For 80% of all software only 20% of UML is needed.”
Ivar Jacobson
Around the same time “Design Patterns” appeared written by the “Gang of Four”. I never read it, but I saw the effect things like patterns did to people… it left their minds in a sort of insentient state. The other thing people liked to harp on about was re-usability. It seemed like a wonderful concept, writing code that could easily be reused in other applications. The problem here is that reuse had nothing to do with OO, it already existed in the form of libraries, things that were just language, regardless of the OO-ness of the language.
“Object-oriented programming is an exceptionally bad idea which could only have originated in California.”
Dijkstra, E.W. Quoted by Bob Crawford. TUG lines, Journal of the Turbo User Group, 32, Aug.–Sep. (1989)
I mean many people actually believed that software should not be written in any way except using OO techniques. The problem lies in seeing problems only in terms of objects – everything is an object, and that is the problem. A shed is composed of pieces of wood held together with some type of fastener, let’s say nails. A hammer is used to strike a nail into two pieces of wood to join them. While a hammer and a nail are both “objects”, nobody in their right mind conceptualizes them in that way when building a shed. Too often OO becomes mired in discussions on taxonomic metaphysical questions.
At the end of the day, OO, like many other shiny things in computing is just a tool, not a way of life.