About Me

Name: Andrews
Location: Riva, MD
Biography
Loading...

Create Your Own Blog Find Other Townhall Blogs

Comments

Examples From Another Field

I was reading a site critical of Object Oriented Programming, when I ran across a very interesting block of text:

Inheritance is probably the best example of this. If the future grows along your inheritance tree, then you are fat and happy. However, if the future grows in a nonhierarchical way, or in a way that does not match your particular hierarchy very well, then you end up with a bigger mess than if you had picked a flatter or graph-like approach to begin with.

OOP fans tend to focus on the ideal, and in hindsight often imagine what would happen if they picked the right horse after things go wrong. This makes OOP seem like the correct path if "one just knows how to plan properly." It is a scaled-down version of gambling addiction: "If I just had done it a little different, I would be rich." It is the continuing feeling that you are just one little step away from the jackpot.

It is in essence a psychological addiction to idealism. OO does not necessarily reach this idealism, it just magnifies the rewards and punishments of playing with idealism.

The reality is that planning for and predicting the future is tough; and that in reality one will be wrong more often than one hopes.

What this brought to mind is the usual argument for government interference in the market. And more significantly, how that argument tends to survive repeated failures.

As described above, the argument against the free market usually takes the form of finding fault with this or that aspect. For example, maybe the free market does not use all resources optimally. Or maybe the number of false starts when new businesses open and then close. Or perhaps the expenses of advertising and marketing which "produce no value" will be brought up. Or, especially in the case of medicine, the argument will be made that a lack of standardization increase costs.

As a remedy, government intervention will be proposed. And, inevitably, "scientific" management of this or that aspect will fall short of even the results of the free market. However, that will not result in a restoration of the free market. Instead it will be blamed on this or that failure, and a promise will be made that if this change is made, or a little more power is granted, or another part of the economy is regulated, then everything will become perfect.

The argument above, and my personal experience, has taught me that OOP is sold in the same way. The shortcomings of procedural programming are demonstrated, and the "academically perfect" OOP model is proposed as a panacea. When it fails to deliver, when it doesn't produce the gains proposed, it is not scrapped, but another change is proposed and another, and another. In the end, a functional, if imperfect, system has been replaced by a bloated mass of code which still produces worse results, and which changes every month in an effort to reach perfection.

Then again, I don't know why I even bother with this argument. One creaky old aphorism covers it all "The perfect is the enemy of the good." The free market is good, idealistic government schemes are its enemy. Enough said.

POSTSCRIPT

It is not relevant to this post, but I feel I should mention that I am personally not a big fan of OOP. It is partly because I am too familiar with processor internals and tend to think in terms of jumps and procedural blocks (I even think the hatred of GOTO is overstated.) It may also be because I am more familiar with older C++ compilers that did a very inefficient job of translating into assembly code. And it may be because OOP has been so oversold, the benefits so overstated, that I just cannot stand it. (Apple suffers the same way, as their claims of an "intuitive interface" annoy me whenever I can't figure out how an Apple product works. Also, those of us with twitchy hands have problems with their "how long you hold it" single-button model. Just a little heads up to future Apple employees.) Or maybe it was from an old job where my performance benchmark tests for C, C++, Perl and Java showed just how badly Java performed under any sort of load. Or maybe it is the massive code bloat which Java, and many other OOP languages, force upon a user. (Why must I catch an error code from closing a file handle right before I exit?) Or any of a dozen other complaints I have.

Just for completeness, I tend to program in C for most things. When scripting I use Perl, or Bourne shell if I don't have to handle much text. I like forth (I even wrote my own minimal footprint, reduced command set version called "Po"), and love assembly, though being platform specific it obviously is inappropriate for many projects. And that's about it as far as languages I really enjoy using.

But that is probably more detail than anyone needs. Just thought I should mention that as I started off endorsing an anti-OOP site.


Email ItEmail It | Print ItPrint It | CommentsComments (1) | TrackbacksTrackbacks (0) | Flag as offensiveFlag as Offensive