[gameprogrammer] Re: "Mission Efficiency" - Blue Collar coding

Ok, I was taught OO from the start, so this topic is of particular interest
to me. Perhaps I missed a thread, but what exactly is wrong with OOP.
Perhaps you consider it to be more like POOP? :) 

From what I've been told, both C++ and JAVA are OO, or at least are capable
of OO, and I really like C++, but when I look at JAVA it drives me
absolutely mad. I currently program in a language built off C and LISP. So,
everything works recursively, and everything is an object, like
atoms/elements. I recently wrote a XML/XSD parser/translator which works
pretty well, and before I started writing it, I wanted it to handle
everything. So, I made everything as generic as can be. Same code will
handle any valid XSD/XML file, and correct me if I'm wrong, but could I
really have done it without OO? I'm guessing not, could be that XML/XSD is
discrete, but Id like to hear your thoughts. 

>Hey, i don't have anything against OO as an optional programming technique.
>I _strongly_ protest it as a religion, especially as an _obligatory_
>religion. What no one seems to be asking is, for any given app, are the
>benefits of OO worth the cost? 

        I have been taught that OO allows for generality, and less coding,
my little xml project has taken about a month to finish, though most of it
was the custom coding for the translation to between two disparate systems.
Doesn't sound like a huge amount of time to me, especially since the company
I work for can now use that tool for every simulation they want to port to
this other system. Though I'm relatively new to the field, seems to me that
the benefits SHOULD outweigh the costs. (BTW my salary absolutely is crap so
for me the cost shouldn't even be a factor, I could sell sodas and make more
$$ ... seriously) 

                >> for any given app

                Right, I wouldn't say you'd use OO for any specialized
system.
Especially if you don't talk to any other system than your own, especially
if you're programming for specific hardware that isn't interoperable with
other hardware, especially if it's special :) (I've never done games, so
they may be an exception too - don't know I'm no expert)Point is, I believe
if you want compatibility, OO can make things simpler if done right, which
can mean less manual coding, also less stressed coders. 

>It is my sordid, heretical little secret (Bob already knows - others, cover
>your eyes!) that IMO OO, as implemented in any of the popular Windows dev
>envs, is by and large counterproductive. By that i mean, its cost is not
>often larger than its benefits.
>

What's the cost? I seek to understand...
  
>And before everyone crawls all over me on this, 

        I can't help myself, you've scratched my goat

>>have a good hard look at
>what you've been told the "benefits" of OO are. There's not many of them
>that i haven't enjoyed as a matter of programming style for the last 35
>years, and i never touched an OO environment until, oh, '97. But, i 
>digress...

Ah, so when I program generically using objects whose functions/methods are
all inherited it's a style? Not OO? Well POOOP! (Principles of object
oriented programming) hehehehe :)

> >What should be worrying you is the line "joe display" should it be
> >before or after 'joe print "Hello World"'? Should it be there at all?
>
>My vote is it shouldn't be there at all, because if i say something as
>basic as "print", it's pretty safe assumption i want it to hit the screen.
>Of course i also want a way to build a frame and flip to it when it's
>ready, but that should be handled by a different output protocol.

        I agree on the Joe part, sounds like JAVA to me, with the getters
and setters, DAMN IT ALL!!!! And again it drives me ape S$#^ when I look at
it. Though perhaps I just haven't seen any good code in JAVA, I try to stay
away from it if I can help it.

> >> Because, boys'n'gals, _everything_ that's not part of the module's 
>mission,
> >> is a distraction and a dilution of the programmer's effort.

I agree!

>how
> >> much is spent dicking around dealing with things that have little or no
> >> relationship to it?

50% maybe 60% if you include the head scratching and eyebrow curling...

>> I actually agree with you, one of the things I don't understand, why when

>>one Object fails the whole program fails? Why not limit it to the object
>>
>>(since it's independent of everything else) Why does a tree fall when a
>>leaf 
>>does?

Can't speak for everyone, but I make a habit of doing error checking, hell
to me it's a necessity, and by doing so it gives you total control over said
objects. Makes sure the water is coming in clean, and if someone pissed in
it, well you can smell it if you want, and you can do whatever you want with
it when your done.

IMHO OO IS a style, and from what I've seen, there are a lot of baaaaaad
programmers TRYING to apply OOP to their programming and it's coming out
more like POOP. I think the problem is that good ideas come about and get
slammed because they were not used wisely. Anyway, those are my thoughts,
would like to know why anyone would hate OO.... 

------------------------------------
Richard Hawley
Software Engineer II Modelling Design and Analysis
------------------------------------


Other related posts: