Object Oriented Programming has Failed Us
I’ve been thinking about the state of the programmers coming into our industry recently. It seems to me that many of the college students who graduate today understand the syntax, but few know how to apply true object oriented principles to the real world.
I recently had a discussion with a friend who confirmed my observations. Simply put, most people do not think in object oriented terms.
We’ve both spent time teaching other programmers, or having other programmers work for us. We’ve watched good programmers stumble over this whole concept of object oriented programming. Some leave understanding it and being able to apply it right away. Others, struggle to do the exercises we give them. Why is that?
When a high school student ask me about getting a Computer Science degree. The first question I ask him is, “Did you like Algebra or Geometry better? Specifically, did you like the proofs you did in Geometry or did you like plugging in the numbers in Algebra?” The reason I ask this question is because programming is a lot like working a proof. If you didn’t like proofs, if you wouldn’t be willing to spend the bulk of your day working a proof, you should not be a programmer.
But, with object oriented programming, there is another layer on top of this. You see, proofs are linier, one dimensional problems. Object oriented programming is at least two dimensional in nature and maybe even three dimensional.
So, now, my question needs to be modified to include the following question, “Have you ever worked on anything three dimensional. Something you had to see in your mind’s eye and then transfer to the real world?” Building with Legos, Tinker Toys, or taking a shop class would qualify.
But, you can see right away, that if I ask both questions, I’ve limited the number of people who are really able to program using object oriented principles to a very small subset.
Back in the day, we moved from C to C++. I remember that maybe 20% of the programmers were able to make the jump. Most who switched ended up writing C code using C++ syntax. I’m pretty sure that’s NOT what Borland or Microsoft had in mind when they gave us the C++ compilers.
I use to think that as we progressed, as kids came out of college, that more people would understand object oriented programming because that’s what they started with. The reality is that many of them do not. I use to think this had something to do with the education they were getting. That somehow the teachers were spending time on the syntax and not enough time on application. But, the more I ponder the problem, the more I realize that the problem is not the students. You can only do so much with the talent people have. No, the real problem is that object oriented programming as a mass solution has failed us.
In a world driven by computers. A world that already has too few programmers available. Do we really want to limit the number of programmers we have available?
Folks, we’ve been looking at the programming language issue from the wrong perspective. As we develop programming solutions in the future, we need to aim for solutions that most programmers understand. Solutions that people understand. Not solutions that mirror reality but solutions that work in the real world.
I really hate to say this, as much as I like object oriented programming but, I really think we might be better off if we went back to procedural programming for the bulk of the applications that we write and left the object oriented stuff to people who really understand it and for problems that can not be solved any other way.
Meanwhile, back at the lab, we need to come up with a programming environment that most people understand naturally. We need to do usability studies on the languages we develop just like we test applications we develop for users. Instead of trying to simplify what we are already doing, which continues to provide solutions that only programmers understand, we need to provide solutions that are no longer programmer centric.
Once we train and use up all the programming talent in the world, we will be forced to do this. We might as well start now.
Other people talking about Teaching Object Oriented Programming
- Now after watching this video I can understand the potential of the system for teaching Object oriented programming to students even of age 14. The concept where a student get to create something and show off the creation is the most … - The authors leave out unnecessary, time-consuming information to deliver the essentials you need to begin and maintain all your OOP projects. This one-of-a-kind self-teaching text offers:. An easy way to understand OOP … - Summary: mainframe COBOL programmers the concepts of object oriented programming. … apps, J2EE apps, C# apps, or Ruby apps. … My specific goal is not to teach any language specific thing (though I … - How can you expect someone to fully get OOP without learning procedural programming first? It’s an extra layer on top of those ideas. It cannot be properly learned from the top down. I’m not saying that Python is the best teaching … |
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!



















































May 13th, 2008 at 6:55 am
Right, our teacher in college didn’t really teached us well in OOP. He spend most of his time on the syntax.
May 13th, 2008 at 1:18 pm
An interesting article.
My current thinking is that there needs to be more opportunities and even requirements for mentorship and continuing education in the field.
You can learn enough about OOP to pass tests with an A, but until you have to start to apply the ideas, it never really gels.
Every time I force myself to go back and reread some of the basic material, I find ideas finally clicking into place.
Having started in procedural programming, I instinctively think that’s the wrong route to go. OOP really can result in more understandable, easier to maintain code. But in line with what I understand as your theme, it has to be well-designed OOP. Bad OOP is usually just procedures wrapped in classes.
Programming is more than just understanding syntax. I think the industry as a whole needs to find a better paradigm to realize there is a growth path — we have to expect that brand-new programmers are going to struggle and we have to learn how to provide continuing education. And I think that would be as true in a pure-procedural world. If it was that much simpler, OOP would never have taken the hold it has.
May 13th, 2008 at 1:35 pm
Stevi,
You are where I was about 3 months ago on this issue. And I agree IF we continue using OOP as THE way to program, everything you’ve said is true.
However, I don’t have much hope of the industry providing the type of support that’s need to make OOP really work.
Unless, of course, managers stop treating programmers as little robots they can talk to and out comes code and treat them as humans who need to be constantly trained, mentored, and capable of making mistakes.
The problem is systemic and needs a systemic solution. Therefore, I propose trying to find a programming language/environment that works the way we think rather than the way things operate. IOW, neither procedural nor object oriented programming are the ultimate solution. But, if I had to pick one or the other as a manager, I’d probably pick procedural even though as a programmer I believe oop is a better programing model to work with.
Actually, if my shop was big enough, I’d try to structure my project so that the new programmers were primarily doing procedural coding and the older programmers, who understood it, were doing object oriented programming, and I’d provide a growth path that would mentor the new programmers up to where they could be object oriented programmers. Unfortunately, most shops aren’t big enough to pull that off.
June 1st, 2008 at 7:51 am
OO becomes more useful as programs grow and evolve, the way they do in the real world (ref Koenig and Moo: “Ruminations on C++”). Beginners won’t appreciate its value by doing small, unconnected assignments. Some will catch up once they enter the workforce, but some won’t. OO didn’t replace procedural programming; it added to it. Programming is increasingly multi-paradigm.
The real challenge to OO is coming out of concurrency concerns w.r.t. state. Will dropping back to procedural prepare students for a map-reduce world?
June 1st, 2008 at 12:19 pm
“OO Didn’t replace the procedural programming, it added to it.”
Unfortunately, the colleges and universities didn’t get the message. OOP is being taught at the expense of Procedural by professors who barely understand OOP themselves.
The problem is that OOP mostly closely maps to the problem and procedural most closely maps to how MOST people solve problems. Again, I am ONLY proposing “dropping back” because it more closely maps to how most people solve problems with the thought that as a programmer matures, he would then be educated in OOP.
If you think about it, this is exactly what you’ve proposed when you say, “OO becomes useful as programs grow.” and “Beginners won’t appreciate it’s value by doing small, unconnected assignments.”
Instead of teaching OOP at the college level, at the expense of procedural, it would be better to wait for the student to run into the problem that OOP solves and then present it to him once he has a full understanding of modular programming generally, and code reuse specifically, as these are the main two areas that OOP addresses and the main two areas that today’s college student doesn’t get, probably can’t even understand, until he’s worked on a project large enough to need the solution.
As I’ve stated elsewhere on this blog, the programming discipline lends itself better to a mentoring style of education than it does to the typical college level education. This was less true when all we were teaching was procedural programming.
So, until something better comes along, I suggest leaving procedural programming to the colleges and universities and mentor programmers who have proven themselves into the OOP world.
June 1st, 2008 at 11:22 pm
Back in college, when I was given assignments in my OOP class, I used to think OOP was unnecessary. My first language was C, so I would think in procedural fashion, have a single JAVA class, and write the entire logic into the main() method. Now that I look back, I realize that the fault was not entirely my own. We were given small, disconnected problems to solve, OOP would seem much too trivial for using. The teachers never gave us problems that would make us realize the true potential of OOP. Giving lectures on inheritance, polymorphism and encapsulation is not enough, the coders must be given real-world problems for which OOP is the best approach to solve.
June 1st, 2008 at 11:26 pm
I think it is unrealistic to expect IT graduates to be object oriented experts. Students probably wouln’t even spend half their entire time learning to write OO software. They also have to learn basic computer architecture, operating systems, databases, networking, project management, professional skills and more.
Rather than looking for someone else to provide a silver bullet solution I’d say take Dave’s advice and concede that you must also play a role in the education of new programmers.
The only other viable option is to simply stop hiring junior programmers.
June 1st, 2008 at 11:55 pm
I was in the same stage while I was in B.Sc. CS. I was not very much clear with the concept of the polymorphism and inheritance. But In my professional career of three year I’ve started working with OOP and I like it much better than procedural approach. I don’t think unless and until you’ve touch with a live or professional project it’s hard to learn and know more about OOP but if you are comfortable with it then it’s surely a winner approach of programming.
June 2nd, 2008 at 12:40 am
I like the analogy you make to Geomtery and proofs to programming. I’ve often viewed Geometry as having prepared me for programming more than any other academic discipline. There are 2 things to consider in your position.
1. The math curriculum in the high schools has changed dramatically since I attended and took geometry. It doesn’t have the intensive focus that it had when I attend, so maybe the students today aren’t as skilled in the logical problem solving techniques.
2. I remember when I took geometry, the first couple a proofs were really tough until I got the nack. Maybe, the students today haven’t wrestled with enough problems to get the nack for object oriented programming.
Finally, maybe with some feedback and experience, the new graduates will eventually get it. Don’t give up so quick.
June 2nd, 2008 at 1:55 am
[…] read a post stating that OOP is not working. I agree with the author that OOP is not working, but I do not […]
June 2nd, 2008 at 1:57 am
OOP can help achieve better encapsulation and reduction of coupling (reduction of detailed and/or unnecessary information about the state of a system in order to use it). A programmer, after gaining experience, will begin to see the problems that stem from poor encapsulation and high coupling.
Learning the principles of OOP arm the programmer with some techniques to address these concerns, and of course OOP languages have features to facilitate such.
Information hiding and abstraction are a means to build yet higher level complexity systems. OOP has some value in that regard.
When applied to distributed software systems, though, OOP and OOP language features break down. For instance, distributed objects over a network have proven to be an unmitigated disaster for a programming approach. A services approach with async messaging have won out as superior in that particular venue.
One thing about HTML/JavaScript/DOM oriented software development is that it has had it’s own notion of a unit of encapsulation - which has been the web page. Hence simple languages such as PHP have proven effective for dealing with this manner of modularity.
However, with the advent of the web RIA application, the web page model is itself obsolete and we move back to where a classic OOP approach can have some merit again (at least in the client-tier of the web RIA app).
June 2nd, 2008 at 1:58 am
RE: As we develop programming solutions in the future, we need to aim for solutions that most programmers understand. Solutions that people understand.
It’s called Ruby on Rails
June 2nd, 2008 at 2:56 am
The OOP in C++ is crap, again in Java. These languages do not teach OO principles correctly if at all.
CLOS, smalltalk enforce such principles. (well CLOS doesn’t enforce so much as allow, but once you’ve seen it, you’ll want to use it)
June 2nd, 2008 at 4:00 am
I remember taking an OOP course in college and struggling somewhat with the concepts until I read a book called “The Tao of Objects” by Gary Entsminger. It was just what I needed at the time because rather than focusing on the things I already understood from working with procedural languages, it concentrated on delivering a more intuitive understanding of objects than I’d received through the usual in-class examples of inheritance and so on. (”Bird is a kind of Animal, Chicken is a kind of Bird, …”) The marrying of state and behavior is still a pretty difficult concept to explain to people accustomed to viewing them as separate things, but I’d always hoped that changes in curriculum over time and earlier introduction of OO concepts would do something to improve the situation.
June 2nd, 2008 at 4:48 am
I must admit that I totally agree with what you’re saying.
Before I started university my programming experience was with C and other languages of the same syntax, so learning Java just felt like learning C with a twist added to it. I had also dabbled a bit with OOP concepts in PHP, so my first steps into the world of Object-Orientation were fairly uneven ones.
I then decided to read the book “Object-Oriented Systems Analysis and Design using UML” and it provided an insight that my previous programming experience couldn’t. Whilst a lot of CS students don’t take Systems Analysis the general ideas it lays out to students make it a great book for anyone wanting to learn more about OOP. Throughout my time at university my experience falls greatly into what you’ve described, with OOP just becoming a ‘different way’ of writing procedural programs for most.
June 2nd, 2008 at 5:33 am
I don’t think OOD/OOP has failed us, there are far too many libraries and frameworks being built using object orientated principles to classify it as a failure. Perhaps its not being taught very thoroughly at college and university, but thats a different matter. Once you go past writing anything trivial, I don’t think you would want to do it in any other way.
I think once you “get” objects, and appreciate the power of encapsulation, polymorphism and inheritence, you’ll never go back.
June 2nd, 2008 at 7:07 am
I agree; our colleges have failed to teach students modern software development.
Wait, that wasn’t what you said. Or maybe it was?
I would love to take over the cis department of a university. I’d fucking shake their asses up. We’d start with the GOF and go from there. We’d stick with one language from freshman year through senior; you’d pick from the C# track (Windows) or the C++ track (*nix). Less calculating 5NF using some weird grid logic shit that nobody uses IRL and more time creating relational databases and CODING against them. There’s be a year’s worth of desktop application development, a year’s worth of web development, a year’s worth of data driven development, and a mix year full of optional studies such as graphics applications, server applications, networked apps, etc.
Not a single goddamn line of code would be accepted other than that checked into a professional source control system (either TFS or SVN). Your grade would be affected by your code coverage numbers. For most projects, you are handed a set of stories and a unit test project. Your code fails the unit tests you fail the assignment.
If anybody mentions Lisp they will be stoned. All the theoretical and obscure language courses will be relegated to an “I’m never going to work outside of academia” track where all the future grad students will go. These classes will be available to students as fillers.
Please, somebody put me in charge. I’m all about kicking ass and chewing gum, and you can’t chew gum in class…
June 2nd, 2008 at 7:36 am
Fortran 77 FTW!
June 2nd, 2008 at 7:37 am
@will — I love it. Let me know when you take over, and where. I will be your first student
I took C++ and Java in school, but I went in to web development and started using PHP. My early code was all procedural, and it sucked. Then I started reading a book on design patterns in PHP, and the OOP stuff started to click. Now I code C# desktop apps and love to analyze problems with OOD in mind.
June 2nd, 2008 at 8:41 am
Interesting article, thank you. I would add another argument: even if your senior staff do the OO work you may not get the code re-use you may have hoped for. The single hardest part of OO is designing the object model. That model probably maps to your problem today and probably not to the same problem in a year - nor to someone else’s problem. And changing the object model is real work - work only suitable for your senior staff… and it takes a long time. I concur that for most software today an ‘event driven’ (my way of saying ’services approach with async messages) model is more easily adapted to change in needed functionality.
June 2nd, 2008 at 10:06 am
The problem with procedural programming is that it pretty much ensures that you’ll have to reinvent the wheel each and every time. Giving up on OOP is dumbing down programming, and judging by the state of Web 2.0 apps, that’s happening on its own already. No need to help it along. I went from VB to Cold Fusion to Java. It’s an adjustment, no doubt about it. But unless programmers are Barbies saying “Math is HARD! OOP is HARD!” then all this says is that there are people who maybe should look to other jobs.
June 2nd, 2008 at 12:53 pm
Here’s an idea, let’s lower the bar ALL across the board for every field.
We have too few doctors….Let’s lower the bar and let sub par doctors into the field by making it easier to get by, then i’ll send all the doctors to you, let me know how that works out for you.
You’ve got to be kidding me, YES, OOP is hard, YES, programming is not for everybody, and that’s the point, you want somebody who can’t grasp OOP handling the memory management on a complex application? sorry but i’ll let those guys go your way and i’ll take the rest.
June 2nd, 2008 at 1:27 pm
I’ve let this ride for most of the day but, I’ll inject my two cents at this point since many of you are now arguing that we ought to keep programming hard.
Just because something IS hard does not mean it HAS to be.
What was the point of OOP in the first place? To make programming easier! If we say, “Dont’ give up on OOP, we don’t want to dumb things down.” Or, “let’s lower the bar across all the fields.” Why don’t we make that retro active to say, 30 years ago. Do you really want to program with the tools that were available then? Or would you rather “dumb things down” or “lower the bar” and have the tools we have today?
You are not fully thinking through the issue if you think making programming easier for the programmer is not a worthy goal simply because programming “ought to be hard.”
BTW, yes I am monitoring this discussion and I WILL delete anything that even borders on insulting. Sorry, I have to even mention it, but I’m starting to note a tend toward that direction.
June 2nd, 2008 at 9:49 pm
Legos and Object Oriented Programming…
What do Legos have in common with Object Oriented Programming? According to an article on .Net Answers, those who are at home with Legos are most likely to fully embrace Object Oriented Programming principles. There the author defines three categor…
June 3rd, 2008 at 2:51 pm
In response to dave:
Object oriented programming is a practice, whereas compilers for new languages, and the languages themselves are tools. The use of new tools to make life easier is all well and fine, although cases could be made against those ( although i’m not advocating that point of view) , but when a type of coding practice come’s in that allows for easier maintainability and is more sustainable, I don’t think we should jump ship to make it easier on other people. Also, what you’re talking about is a natural progression. Of course we don’t want to go back 30 years ago, but then again, do we wanna go back 10-15 years ago to when OO programming wasn’t around??? What you’re missing is that it HAS made programming easier for thousands of people, myself included, and I don’t see the need to lower the bar and take a step back.
June 3rd, 2008 at 3:12 pm
Aradlein,
As a programmer, I completely understand, and even slightly agree with you. As a business owner, program manager, and teacher I maintain that OOP has made things harder, in a lot of cases, than it needs to be.
Once people truely understand OOP, yes, it does in fact make life easier as a programmer.
Interesting story for you from the “teaching” side of things.
A room full of what both of us would consider senior level programmers working for some major companies in Hartford who would all claim they understand OOP were asked to explain polymorphism. What does it do? why do we need it? what problem does it solve? As is typical when he ask this question to other programmers, no one was able to explain it fully.
I’ve had similar experiences.
As a business owner, this is a problem because if you don’t fully understand polymorphism, you are just as likely to write duplicate code using OOP as you are with procedural methods.
What I’m asking for ultimately IS a progression. I really don’t think either OOP or Procedural is THE answer. Maybe declaritive? I don’t know. What I do know is that expecting peole with little or no real world experience to walk into a job and start writing good, maintainable OO code, in any language, is naive, costly, and possibly dangerous to the survival of the code base.
To go back to your doctor analogy. There is quite a bit of training that goes into making a doctor. They don’t graduate with a degree, even a doctorate, and start practicing medicine on their own right away. They have to go through internships, and are gradually allowed to do their own work. At least that’s the way it works here. I don’t think it is unreasonable to apply some similar type of practice to our field.
June 3rd, 2008 at 3:43 pm
hmmmm that is an interesting point of view, I think that perhaps your article has been taken out of context a bit and warped ( possibly myself being a guilty party hah ). Because I definetely understand what you’re saying in the teaching example…I have been a development manager, and own my own company now, and I have gone through interviews where 90% of the developers couldn’t answer questions like what polymorphism was. It in no way spoke of there development potential though, because under it all they still understood the basic concept of what OO design was. At the same time though I feel it’s a potentially disasterous scenario where everything is done procedurally, i’ve walked into company’s and seen what entirely procedural code ( but in this case they were just bad coders ) can look like..and it was a disaster in terms of maintainability. So I think we are both on the same page, perhaps procedural is the right solution in some cases, but I in no way feel that people should be allowed to run willy nilly and ignorant of OO as a good coding practice.
Perhaps you’re right thoug, in that some sort of standardized approach to moving through procedural and OO design practice is necessary, especially to bring developers up to a new level.
June 6th, 2008 at 1:48 pm
I believe OOP is not failing us. It’s purpose is not to make mediocre programmers into superior programmers. It’s a methodology FOR superior programmers to let them take their work farther. Also, our educational institutions are largely way behind. Having interviewed many, many college graduates with CS degrees I find myself very disappointed in the level of knowledge they come away with when they purchase a degree.
June 8th, 2008 at 6:40 am
I guess I was never clever enough to understand what is so damn difficult about OOP? Inheritance? Abstract classes? Virtual methods? Private vs. public? Beats me
June 8th, 2008 at 8:12 am
Regev,
I never understood what the problem was either until I started teaching it. Then it became painfully clear.
I think most people “get” private vs public, but have trouble understanding protected.
I think they basically understand Properties and Methods, but have trouble understanding why you’d use a Property instead of just a member function.
I think they have trouble understanding why and when you’d use a shared function or a shared variable (static in most OOP languages I’m familiar with)
But, the number one most difficult concept to understand in OOP is polymorphism. This is unfortunate, because polymorphism is what really makes OOP worth learning at all.
June 11th, 2008 at 9:34 am
[…] about this problem in the narrower field of computers and programming for a while now. See “Object Oriented Programming Has Failed Us” and “Do Programmers Need a Degree” for some of my more recent rants on the […]