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

At 06:47 PM 05-05-04 -0400, you wrote:
>
>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? :) 

Nothing's "wrong" with it, per se. Nothing's wrong with a cordless
screwdriver either, but if that's the only tool u could have for every job,
u might come to resent it.

>>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,

Well, less than what? I was told OO would allow software tools to be
arranged in a heirarchical library, and used for many different apps.
Except i'd been doing that for 20 years before meeting OO. I haven't seen
every possible example, but most OO code i see has the A-level code chopped
into so many small pieces, and each piece embedded between layers of
C-level stuff, that understanding it is like trying to rebuild a cow from
so many hamburgers. And everything wants constructors, destructors, and
other distractions which may be logically required by the language, but
certainly not by the application. 

>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...

I seek not to rant ;)

The cost of OO compared to, say, structured programming? First off, the
boundaries are fuzzy, because on the street, comparing OO with !OO is
typically to also compare C++ with C, and Windows with !Windows. But it's a
perfectly reasonable qn, so i'll try. But i'm really comparing OO and C++,
and to an extent Windows, with some alternative language and o/s.

One of the costs is that OO introduces a whole new category of errors,
having to do with scope, range, inheritability etc., which, taken one at a
time in a comp sci course, may make sense, but which, when dumped on the
street with a real "blue collar" programming job, become just so many more
ways to f*** up. 
  
>>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: