Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Object Oriented Orientation

by sundialsvc4 (Abbot)
on Aug 03, 2011 at 15:12 UTC ( [id://918299]=note: print w/replies, xml ) Need Help??


in reply to Object Oriented Orientation

I find that “objects” have two very useful features, and two three very bad ones.

Useful:

  1. The code and the associated data that it manipulates are neatly bundled together into one “thing.”   Every bit of code has easy and immediate access to the (whatever you want to call it) $self-variable.
  2. A well-considered object system makes it much easier to write “centralized” code in one-and-only-one place, then to “manage by exception” all the rest.

Disadvantage:

  1. It can be unexpectedly difficult sometimes to deduce precisely what a piece of code will actually do at runtime.   Static analysis of the software becomes difficult.   Too much “contextual” information is needed to describe and therefore to identify a problem.
  2. Coupling.   Every descendent of a base class is more or less coupled by its ancestry.   Trouble is, sometimes companies buy other companies with altogether different business-models, and you have to find a way to make the disparate software-systems work together.   Base classes incorporate what I’ll call foundational assumptions and then derive much of their practical benefits from the resulting expressive brevity.   “Then, something changes,” and Let The Ripples Begin.   When you start making changes to one of these “elegant” systems, sometimes what you get is hideously rather disturbingly un-stable.   You feel like you’re having to perform surgery on a moving thing that is held together by springs.
  3. Religion.   Where “good software engineering practice,” which is solely concerned with how things actually are, begins to be replaced by “religious philosophy” of how things ought to be, IMHO there’s not one good thing to be had in all of that.   Because, when the dust finally settles, what all of us are doing is:   engineering.   We all must strive to create the most fanciful “castles in the air” that we can possibly devise, while remaining firmly centered upon the reality that they must float in mid-air (while we’re all heading for the pub).   Sometimes that means brilliance.   Sometimes that means “crafting a particularly elegant stone archway over the front door of a supermarket.”   (To more-or-less quote The Soul of a New Machine, “you might be justifiably proud of it, but not particularly want to admit to having been the sorry bloke who did it.”)   We love to think about the brilliant things, but the reality is that we do build a lot of supermarket archways.   (And, ahem... damn good ones, too.)

I find this to be true whether we’re talking about Perl or not.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://918299]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-03-28 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found