Slashdot Mirror


The Object Oriented Hype

bedel231 sent us a fairly lengthy and detailed article discussing the hype surrounding Object Oriented Programming and tries to claim that a lot of things taken for granted are mythical. Personally, I've never been a huge fan of OOP, so I tend to agree on a lot of these points. Regardless of your stance on the issue, it's worth a read.

730 comments

  1. Re:New Myth: OO would have prevented Y2K by cmeans · · Score: 1
    I guess you should add:

    "OO gives people something else to complain about"


    ---- Sigs are bad for your health ----

  2. I didn't say that by Tablizer · · Score: 1
    The author of the article seems to enjoy passing lots and lots of attributes around instead of just passing an object. Stick to that, and i bet your interfaces are going to change veeery quickly...

    I did not really say that if you read it more carefully (and follow the links). Basically, I assigned a "sin level" to the kinds of things passed around. Of course, the sin-level may be subjective.

  3. Re:common misconception by Graspee_Leemoor · · Score: 1

    Although I agree with you, your counter argument is specious: You're probably referring to the person (or one of them, since it's written in "The C++ Language" too) who said that all the examples of code in K&R are valid C++. That does not mean that they're OO, just that well-written C code is also valid C++ code.

  4. Re:common misconception by brsett · · Score: 1

    Nah, you've been poisoned by popular languages. Lisp is an object oriented language that does not make this requirement or this sytax. From what I understand, Dylan is an even more potent language. The most popular OO languages are not a very good example of OO theory. Not even those noisy small talkers.

  5. Re:Myth... by Wraithlyn · · Score: 2
    No kidding... it's been my experience that code is almost ALWAYS rewritten to jive better with the specific program environment.

    The problem is that people tend to only code methods which are needed for their particular use of the object in question. And why shouldn't they? It makes for leaner code. It also makes for horrible reusability, because later when you try to the use the same object for a different application, you generally have to get under the hood and rip away at the guts to refashion it for YOUR use. This of course completely sidesteps the whole point of encapsulation and data hiding in the first place.

    --
    "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
  6. Re:The King of Argument By Authority (Addison) by pjrc · · Score: 2
    BlackStar, very impressive post.

    Of course, you only gave two solid examples, admittedly from two of the best known and most respected men in the field, but still only two.

    Even with a third, I'm sure Bryce wouldn't back down.

  7. Re:People think in objects by Yunzil · · Score: 1
    One of the basic assumptions is that the human brain is built to think about the world in terms of things that have properties and behaviour. We can think in terms of procedures and execution flow as well, but we're not nearly as good at it.

    I disagree, but maybe I just have a weird brain. :) When I sit down to code, I think about what I have to start with, what I want the result to be, and how I am going to get there. In other words, I think about things in terms of procedures and execution flow. I don't think about objects or properties or any of the other stuff OO is noted for.

    Don't get me wrong, I *can* write OO code if I have to, but I have to think a lot harder. I know this was one of the intentions: OOP makes you plan out things before you start. But I don't naturally think that way. Maybe it's because I started with BASIC on my C64 and moved to C; I dunno. If I had started with C++ maybe I would agreee with you. :)

  8. Re:Tell us something we don't already know... by Woko · · Score: 1

    Will somebody save me from the hell that is maintaining an self-taught c programmer's perl code?

    Does omitting all white space, save indentation, really speed it up that much?

    Is enforced scope really too much to ask?

    and wtf is $m, $m2, and $mt2?

    ---

    --
    ---
    Silence is consent.
  9. Pitfalls of Object-Oriented Development by bfwebster · · Score: 1
    I published the above book in 1995 (M&T Books, ISBN 1-55851-379-3), which addressed a few of the same points (plus many, many not covered in the article--over 80 pitfalls in all). On the other hand, based on a cursory scan of the article, I question (a) how much the author really understands about OOD and (b) whether he's ever been on a well-run OOD project.

    Note that I was and remain a proponent of OOD, but I treat it neither as a silver bullet nor a strawman. The author's tone and approach does little to lend credibility to his argument.

    Incidentally, Pitfalls of Object-Oriented Development is out of print. I have the rights back and am working on a revised edition, which I am posting on-line (http://thinkwyde.org/pitfalls/) as I go along. Feedback is welcome; significant contributions will be attributed. ..bruce..

    --
    Bruce F. Webster (brucefwebster.com)
  10. But compiler support helps a lot. by Ungrounded+Lightning · · Score: 2

    one common misconception is that one can not do object oriented design in C, or any language that isn't approved by the OOP zealots...

    one can create objects in C by...


    Yes. But by doing that you're sacrificing the compiler support.

    And IMHO it's the wroing parts of OOP that get the hype. Encapsulation and strong type checking rate higher for me than code re-use or some aspects of inheritance (though polymorphism is right up there).

    One big thing about languages like C++ is that they give you a way to express your intent regarding encapsulation and data hiding to the compiler and related tools, which then check them for you. (I'd say "enforce", but C++ also has ways to express your intent to deliberately violate the normal boundaries.)

    It's really instructive to look at the "things to check for in a walkthrough" section of Miller's book on software quality. There are four pages of essentially one-liners describing the easy errors to make in languages like Fortran or Cobol. And with C++ they're vitrually all impossible to generate without producing, at a minimum, a compiler warning.

    --
    Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
  11. Flamebait by RedWizzard · · Score: 1

    What, is Slashdot not getting enough page views or something, CmdrTaco?
    I'd love to moderate this story -1, Flamebait. What next: "Microsoft were good all along"?

  12. Re:A longer viewpoint... by Lozzer · · Score: 1

    Shit, I got told I was configuration manager for a project thats been going on for three month today, teach me to know more CVS than anyone else on the project has owned up to. (Damn that auditor, why did we mention configuration management in our proposal when we meant source control)

    --
    Special Relativity: The person in the other queue thinks yours is moving faster.
  13. Re:New Myth: OO would have prevented Y2K by Sir+Robin · · Score: 1
    [quote] If that's true then why did I get all that Y2K work back in '98 and '99 fixing 5 to 10 year old programs? [end quote]

    I discussed Y2K OO claims in the "Meyer" section.

    I guess I should add "OO would solve Y2K problems" to my myths.
    He was responding to this claim in your article:
    I guestimate custom software systems last about 3 years on the average.
    That is, if custom software only lasts three years, why was he getting work (of any kind, OOP/Y2K/whatever) in 1998 & '99 fixing "5 to 10 year old programs"?

    He was not trying to add another myth.

    I, myself, would also dispute your claim (that "custom software lasts three years on average"). There are boatloads of systems in the telecomm industry that last decades.
    --
    My /. ID is only 5,210 away from Bruce Perens's.
  14. Nope. This "troll" is different by Tablizer · · Score: 1

    [quote] Face it, dude, you are a troll. You're just after attention, and you've got it. We've all seen this behavior before. [end quote]

    I will admit that I enjoy the attention. However, enjoying attention and being wrong are not necessarily related. I am having my cake and eating it tOO.

    OO's hype-to-proof ratio is almost infinity. I picked the easy stance.

    Now, get to work and prove OO is better or be forever sentenced to seeing a troll-who-is-right pop up over and over to rub it in.

  15. Re:Poor criticism by NathanL · · Score: 1
    I too noticed that the article made some assertions that were not cited or given factual backup. This reminds me of a supposed "interview" with Bjarne Stroustrup someone in an IRC channel was pointing people to. The story was that it was an interview that was swept under the carpet by the editors that this particular reporter worked for. It went on to have Stroustrup saying things like, "C++ was made to give software engineers job security." and "It was intentionally made difficult to make people who understand it more valuable."

    This just struck me as someone someone probably whipped up to show their managers a reason why not to go OO. OO is great for a lot of things but it is definately no silver bullet. I find that mediocre programmers tend to be anti-OO because, well, it hurts to think about those long words like polymorphism and inheritance.

  16. Re:there is something to be learned! by madmaxx · · Score: 1

    except that he presents it from a completely closed point of view. he misses the point that there are many useful ways to represent data and function in programming languages ... all of which are useful somewhere, sometime. oo is one useful paradigm with many tools with which it can implemented. procedural, functional, event-based, locical, are other useful paradigms (there are more, and many combinations). the key is to see the possibilities in all of them. close your mind, stop the learning ... open your mind, learn more, there are infinite possibilities!

    --
    mx
  17. Re:My view by Alioth · · Score: 1
    Hmmm. I forgot about the good 'ol indirection operators (!, ? and $ IIRC). They were actually very useful and not at all nasty in my estimation!

  18. Re:Bryce has been doing this forever. by wjodon · · Score: 1

    Bryce's Xbase Fan Club page at http://www.geocities.com/tablizer/xbasefan.htm gets to the core of his mentality. He states "Many allege that I like XBase simply out of familiarity and habit." Well..., duh! Later in this article he blames OOP for the demise of Xbase. I once programmed in Clipper, a compiler that offered the most sophisticated extension of the xbase "language". What Bryce doesn't tell you is that from the early nineties on there was a very excellent Clipper library called Class(y) that allowed you to code in OBJECT ORIENTED XBASE. It offered such nice features as multiple inheritance and delegation. Though it goes against all of Bryce's tortuous logic, OO xbase actually enabled me to reuse components and increase my productivity! It also helped me prepare to move to c++, objective c (OpenStep) and Java when the xbase market fell flat in '94. The most annoying thing about Bryce is that he's never bothered to learn in depth any of the things he criticizes. Rather than putting his energy into the investigation of new languages and paradigms, he wastes his time and ours with this weak and paranoid rant that blames a Communist OO conspiracy for the fruits of his own laziness. He should grieve the death of xbase and move on.

  19. Now engaging write-only mode... by TheKodiak · · Score: 2

    I think, far and away, the best part of this article, is the part where he takes vague numbers from studies of large (2+ year before initial shipment) development efforts and tries to apply them to products that can go through 10 whole number versions and get abandoned by the roadside in 2 years. The slowdown he talks about in the beginning of an OO dev cycle is partially proportional to the length of the dev cycle overall - NOBODY spends 3 years developing objects for a 3 month project, no matter how fanatical their devotion to OO.

    --
    -=Best Viewed Using [INLINE]=-
    1. Re:Now engaging write-only mode... by TheKodiak · · Score: 2

      Oops - I was wrong. I forgot about the one part of the article that's more insightful than any comment about programming ever: "In addition, the OOP community is strongly divided on whether the "component" model or the "inheritance" model is the way to go. Microsoft seams to favor the component model. The jury is still out on this one. Without getting into the details of this battle, let's just say OOP still has some growing up to do." Holy fuck! There might be more than one right way to do things! ABANDON FUCKING SHIP!

      --
      -=Best Viewed Using [INLINE]=-
  20. Re:agreed--fighting anecdote with anecdote. by dimator · · Score: 1

    Developing generic libraries is a much slower process than developing application specific code to do the deed.

    This might be true if you're developing one thing, and then quitting. But taking to the time to generalize, and put functionality that you might user in other products into libs is clearly advantageous. It might take more time but it pays off if you have other projects to worry about.

    You are right though, that it's all about the discipline. For me, I just find it easier to be a disciplined developer in OO languages.


    --

    --
    python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
  21. Re:New Myth: OO would have prevented Y2K by Tablizer · · Score: 1
    That is, if custom software only lasts three years, why was he getting work

    You did see the word "average" I hope. News: exceptions happen.

  22. Thats because you're a troll, moron by FatHogByTheAss · · Score: 1
    Of course thats not how you remember it. You are a troll, and have no foothold in reality.

    I'm quite sure you don't remember your paper getting a point by point dissection from people like Tom Christiansen, Randall Schwartz, Tad McClellan, and Uri (God Love Him). Of course, those are folks who generaly Know What They Are Talking About.

    You, on the other hand, are someone who Doesn't Know What They Are Talking About, as you continue to prove over and over again. You should go back to the accounting department, where you can impress all your payroll clerk friends with your *vast* techincal knowledge.

    The rest of us are just laughing at you. Again.

    --

    --

    --
    You sure got a purty mouth...

  23. Re:New Myth: OO would have prevented Y2K by Tablizer · · Score: 1

    Which "way-more damning" criticisms are you talking about?

    Also, relating apostrophe usage to general intelligence is a
    little bit of a stretch. Why are some people so distracted
    by such things? You remind me of my wife: you find "messes"
    that nobody would otherwise notice.

    I guess everybody is pedantic in different ways.

  24. Re:Huh? by Graspee_Leemoor · · Score: 1

    Modify this post up to 99- ROTFL level humorous. When I read it, I spat coffee out all over my girlfriend, (or at least the space where my girlfriend would be if there wasn't an SGI monitor there).

  25. These procedural guys by bucketman · · Score: 1
    Man, I'll eat my freaking paycheck if the procedural paradigm is still in vogue in 15 years. Type-checking - pah, that's for children! Assembler was good enough for my grand-pappy and by gum it's good enough for me.

    PS I only said that because my grand-pappy was in the room - just give me a keyboard with a one and a zero and I'll do it myself! That's the way real men write crappy code!

  26. OOP invented PolyMorphism?! by LionKimbro · · Score: 2
    Sounds like you've done mostly encapsulation, maybe a bit of inheritance is natural too. Probably not polymorphism though.

    ...As if the world owes the concept of interface to OOP.

    The concept of a wall socket is very old. It's so old, it's even present in UNIX. Look in your /dev/, and the interface that your devices are programmed to. The author of the web page is right; OOP is claiming a lot of inventions that are not it's own...

    It's too bad. I wish more computer scientists look at computer science history, rather than the "Learn SQL, C++, and make a bunch of money" book shelf.

    1. Re:OOP invented PolyMorphism?! by BeanThere · · Score: 2

      I think you've misunderstood me, I most certainly was NOT claiming that OOP "invented" polymorphism, or anything of that sort. I was merely saying that polymorphism is one of the three main things that "OO" encompasses (and typically support at a language level). Nowhere does that even vaguely imply "invention". In fact I even rather explicitly stated that encapsulation is quite a natural concept in pretty much any paradigm - so how exactly did you arrive at the conclusion that I (or anyone else for that matter) was claiming that OOP *invented* those things? If you've seen that, its in your own mind, not in my post.

  27. Re:Myth... by angel'o'sphere · · Score: 1

    Myth: Implementation changes significantly more often than interfaces

    Regardless wether you design/program using OO paradigms or other paradigms, its ALWAYS a challenge to design/define stable interfaces.

    This is not only a question of programming experiance but also of domain experiance and further more of anticipating future uses of the work you are currently doing.

    If you make a domain analysis and a robustness analyis and even a product line analysis (all those terms stem from modern ooa/d) then you have chances to find stable interfaces for your certain business needs.

    And this is a ART for its own like program performance hacking is, or like memory allocation/ deallocation hacking is.

    If you are only a VB and "how to get it from the DB to the WEB" maniac you will never get stable interfaces.

    E.G. look at linux or any other unix kernels, most kernel calls are FIX since countless years.

    Regards,
    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  28. Re:"You won't need it" by HarpMan · · Score: 1

    Good post. I have to disagree with one thing:

    "Specific is good, generic is bad. Building generic stuff takes longer and makes for unreadable code - don't do it unless you need it."

    Really??? I think that generic programming is the missing key to effective code reuse. If I find myself sorting things over and over again, shouldn't I abstract that out into a generic sort algorithm, instead of having similar (but not identical) code littered all over the place? The latter would be a maintenence nightmare. If there's a bug in you're approach to sorting, you have to change it everywhere. It violates the OnceAndOnlyOnce rule.

    Admittedly, coming up with something generic right up front is hard, and shouldn't be attempted. But refactoring similar code into generic functions or classes is a good thing.

    Generic programming is orthogonal to OO programming. In OO, you try to capture business (and other) entities as objects -- Customer, Order, Item, etc. Generic programming lets you capture the abstractions that tend to occur at right angles to your business classes. For example, sorting customers, sorting orders, sorting items -- why not capture sorting as its own abtraction, rather than reimplementing CustomersList.sort(), OrdersList.sort(), ItemsList.sort(), etc? Wouldn't having one generic sort function that can do 'sort(CustomersList)', 'sort(OrdersList)', etc., be better? Aside from the code sharing issue, it's just cleaner to have one 'sort' abtraction.

    Oh, and polymorphism over types is actually an instance of generic programming -- many different types have the same interface, so you can write a another method that takes the base type, and it operates on all the sub-types. It's generic.

    --
    Stephen Molitor steve_molitor@yahoo.com
  29. The macho paradigm? by Tablizer · · Score: 1
    Falling back to procedural programming is really no option for anything but the most simple stuff.

    But combined with a good table (RDBMS) system, procedural is a wonderful tool. Partitioning by "tasks" is much more natural and less artificial than OO approaches, which often get skizophrenic because of the simplistic dispatching and single associations encouraged between nouns and verbs. IOW, it does not scale in association complexity.

    The article points out that you don't need an OO language to do things like components among others. That is true, but it is so much more convenient with a language that supports the concepts you are working with.

    OO Components are not at the top of my hit-list, but still, procedural approaches are often just as simple, if not more so because they don't need the extra syntactical baggage of OOP.

    Another disturbing statement: "OOP eliminates the complexity of "case" or "switch" statements". Read Martin Fowlers book on refactoring, it describes how to convert a switch statement into an inheritance based solution (the state pattern).

    Often things that have such textbook convertability fall apart in the real world. The real world does not give a rats behind about fat-type trees. It will change any way it feels like.

    A graph-oriented approach like relational modeling and HAS-A relationships model this aspect of the real world better.

    BTW, case statements are probably one of the most heavily debated sub-topics I encounter on usenet.

    1. Re:The macho paradigm? by Graspee_Leemoor · · Score: 1

      >>which often get skizophrenic because of the simplistic dispatching ...

      Erm. Schizophrenia has nothing to do with multiple personalities, so you can't use the adjective as a way of describing something with two different ways of behaving. The confusion over the word arises because schizophrenia refers to the splitting-up of personality- but into a mess of shattered pieces- not lots of separate personalities.

      Also, you should get off your relational database trip- the only reason we still use relational databases today is for performance reasons- for lots of complex DBs it is much more natural to express things in an OO way than in a relational way-

      Just compare getting the address of the client's parent with:

      theclient.parent.address

      vs doing the same thing with:

      select address from people p
      inner join people p2
      on p2.idparent=p.id
      and p2.id=theclient

      (Ok, so it's nearly 4am so my SQL is probably well fucked-up, but you get the idea).

      Many people implement OO designs in relational dbs now with this "have a globally-unique identifier for every row" technique- and postgresql actually inserts the GUIDs for you

      So, there you go. Actually, it must be the 4am effect because I am starting to regret all the nasty things I wrote to/about you in my other posts, and pity you because you are obviously attention-seeking because of some deep psychological problem. Call it the 4am sentimentality effect. Actually that last part is pretty hurtful. Oh what the hell, slashdot's seen worse, and no doubt so have you.

      In the end, no-one needs to prove anything about any language, db type or method of working since everyone will just go ahead and use what works best for them. Debate is only useful when it causes people to re-evaluate what they currently believe, even if they reach the same conclusions.

      "Why can't we all just get along?" the flower people sang.
      "Because we're all a bunch of cunts" I sagely replied.

      Graspee

    2. Re:The macho paradigm? by jilles · · Score: 2

      RDBMS systems are certainly usefull, nobody said they weren't. However, OO databases do partition things more naturally, at the cost of performance. Often RDBMS systems are wrapped by a middle ware layer to hide the complexity and emulate OO behavior while retaining the performance and scalability associated with RDBMS systems.

      Comparing OO Components to procedures is just plain silly. They are different concepts. Read Szyperski's book on components (and yes, non OO components do exist).

      "The real world does not give a rats behind about fat-type trees. It will change any way it feels like."

      The real world is also full of fools who make the same mistakes over and over because they think they are experts while in fact they are not.

      "A graph-oriented approach like relational modeling and HAS-A relationships model this aspect of the real world better."

      You should take a look at adaptive programming and aspect oriented programming. (use google to find the relevant material). Both approaches extend the OO paradigm to support what you want.

      --

      Jilles
  30. Re:common misconception by SpinyNorman · · Score: 1

    The above example is also an example of polymorhism, and doesn't need a language such as C++ that explicity supports it. In C the Draw() member would just be a function pointer.

    Uh, I guess you didn't read the above comment all the way at the bottom of my post! ;-)

  31. My .02 dollars by panda · · Score: 2

    As someone who has done the exact same kind of programming that the author of the article talks about: small to medium software packages for business, mostly in-house, custom stuff to get the job done. I can sympathize.

    However, I don't think his real issue is with OOP, but with general programming practice in that sector. None of the developers with whom I worked took the time to actually design anything. They jumped in with their first idea and hammered at it until it "worked." They didn't care if there was a "better" design or a better way to do something, they just wanted it to work and for the customer (i.e. some other division of the company) to be happy with the software. If it came back for bug fixes later, oh well, that's what keeps us employed.

    The real problem is not with OOP itself, but with the kinds of OOP tools (often linked to some RAD package) that are heavily used in this area and with the fact that so few of the programmers have the time to actual do design or code review. The managers were constantly telling us to review each other's code and to design everything, but no one ever did, and what passed for a group code review was a joke. No one actually looked at code. The lead programmer, often the only programmer, for the project stood up and gave a "best case" (i.e. outright lie) description of how the code works. Later, when some poor schmuck (i.e. you) has to maintain that very same code (which you were not involved in designing or coding in the first place) you find out just what a mess the code really is. The software more often than not did not even begin to approach the design discussed at the "code review."

    Nah, the problem isn't with OOP, 'cause I have personally seen massive improvements in my coding since I've started using an OOP style with thorough documentation and formal notation. The problem is that in the very sector the author is complaining about, the vast majority of programmers are mediocre, and the managers (who don't do the work, but pick the tools and "methodology") are even worse. The problem is with buzzword programming where you pick tools because they are compliant with all the latest buzzwords, not because they are right for the job at hand, nor because your programmers know how to use them, which the majority don't.

    Some folks need to go back to school!

    --
    Just be sure to wear the gold uniform when you beam down -- you know what happens when you wear the red one.
  32. Re:Wrong by Mr.+Slippery · · Score: 1
    Pray tell, how do instantiate a file at runtime?
    Pray tell, how does run-time instantiation have anything to do with either encapsulation or abstraction?

    Tom Swiss | the infamous tms | http://www.infamous.net/

    --
    Tom Swiss | the infamous tms | my blog
    You cannot wash away blood with blood
  33. OOP == Capitalism, COBOL == Communism by JohnQPublic · · Score: 1

    Loony as a toon! Everyone knows that OOP is Capitalism, not Communism! Objects frequently rip each other off, stealing behaviors and data (calling it "inheritance", just like Napsterites "sharing" other people's songs). This is a classic Capitalist growth model. Capitalizing on another's work is such a predatory practice that even the Guiding Lights Of The Free World felt compelled to create the US Patent Office to allow inventors some period of time when others were not allowed to steal their hard-earned ideas from them.

    COBOL, on the other hand, is Communism. Ever try to write anything in that language? The declarative sections are longer than War and Peace and read worse than Marx and Hegel, and it actually does accept "ADD A TO B GIVING C."! Hell, the books even encouraged it some years back!

  34. Re:Issue over Code Reuse by Lozzer · · Score: 1

    How do you think Microsoft made Office so rapidly?

    I'll bite, they bought bits, stole^W borrowed bits, chucked resources at it and released it before it was ready (and it been around for circa 10 years anyway, at least some of its constitituents)

    --
    Special Relativity: The person in the other queue thinks yours is moving faster.
  35. Re:Good objects are a lot of work by Tablizer · · Score: 1
    And there are problem domains for which objects simply aren't the natural description.

    The business domain appears to be such a place.

    I would have liked to see a better description of TOP, perhaps a few pointers to tutorials.

    I have plenty of examples hyperlinked around the site. (One of these days I will prepare an index, but I have NO budget.)

    The guy's own descriptions are pretty useless for quickly grokking his point.

    I am not sure T.O.P. is easily grokkable, at least for some. (Niether is OO according to many practitioners.)

    Thanks for the feedback, though.

  36. Re:stop dwelling on the headlines only by dimator · · Score: 1

    The burden of proving that OO is better is on you, not me.

    You've said this a bunch of times in other posts so far. I don't see how this is true at all. YOU are the one who wrote the paper, and you want the reader to go disprove YOUR points?

    That's like me saying:
    Oh, by the way, I think non-OO programming sucks. Go prove me wrong, and give me 3 examples! Otherwise, I'm right.


    --

    --
    python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
  37. Science 101 by Tablizer · · Score: 1

    [quote] In point of fact, your web page is the one that didn't cite hard data. If you're going to claim that OOP isn't effective, you need to back that up , just as the people who claim OOP is effective do. [end quote]

    Group A says it is great, group B says it is of slight help, and group C thinks it is crap.

    So, then how do we settle this?

    1. Establish agreed-upon metrics
    2. Test each against these metrics
    3. Look for patterns and form hypothesis
    4. Test new hypothesis (goto 1)

    IOW, good, old-fashioned SCIENCE.

    Right now all we have is opinion. Prove first, THEN innundate the instrustry with the winner. NOT the other way around.

  38. Re:My view by Graspee_Leemoor · · Score: 1

    >>I just think gtk should have been C++, since it essentially is

    Yeah, but as the authors point out, there are some systems for which there isn't a C++ compiler; by writing it in C you get ultra portability.

    And, yeah, I love GTK too. It's really well designed, IMHO.

  39. Correct me if I'm wrong... by antiher0 · · Score: 1

    Is is just me, or does the author seem to trample his own argument?

    One point the author makes throughout his article is that OOP pundits claim that if used properly, OOP is TGSSB (The Greatest Thing Since Sliced Bread(TM)).

    After the market place realizes the shortcomings of these technologies, the die-hard supporters always say the same thing: "They WOULD work if people simply used them properly." We are already hearing this from OOP apologists.

    However, he also says

    I am beginning to get the feeling that many people are forgetting how to do good procedural programming and blaming the paradigm for their shrinking knowledge. The above claim about memory recovery is just one example.
    I just heard someone say that they found an old procedural program of theirs that used too many global variables and too many parameters. Rather than blame his bad programming or lack of knowledge about procedural/relational organization techniques, he blamed the paradigm and used it as a sorry excuse to proceed with OOP.

    Intellectual elitism? Stubbornness? Perhaps a mere oversight? I actually prefer procedural programming myself. However, I can't stand to see someone make a bad argument in my favor.

  40. Re:reusability... by Anonymous Coward · · Score: 1

    First of all I agree with you, Mike.

    This "Tablizer" person seems to not realize that business applications revolve around the concept of "business rules" which tend to be procedural in nature (no wonder he had such trouble writing OOP code for the business rules!).

    The most commonly changing part of a business app are it's "business rules", other parts are usually stable in concept therefore a good OOP design should be able to handle the application objects.

    Personally I like OOP because, if I wanted to, I can create a monolithic business application into "client" OOP code and "server" OOP code and since the client code uses polymorphism to call into the server code... if the design changes all I have to do is recompile and relink the server code; of course the "business rules" are usually embedded within the server code, which makes for changing the application logic simple.

    Of course if we look at 3 tier business applications we have the frontend, the business logic, then the backend (business logic==business rules). the frontend, since it is graphical in nature tends to be OOP. The business rules are usually _very_ simple objects, which of course talk to the backend. The reason they are simple objects is because they are coded with simple interfaces so that the frontend can manipulate them easily. But if you take a look at the actual business logic underneath, youd be impressed with it's complexity. The _only_ reason for the 3 tier system is that it provides for stability, redundancy, and most of all flexibility and reuse. I can't _even_ imagine someone being foolish enough to write a 3 tier business application using no OOP; would this person realize how much of a pain it would be if a major component in the frontend changed or if a major business rule changed!?

    I think this kid, like most amateur programmers, just has no clue when it comes to OOP programming, especially with C++.

  41. Re:The real benefits by SpinyNorman · · Score: 1

    o The self-containedness of objects does make code reuse simpler and less bug prone.

    I don't buy that one. A well-designed C module is just as easy to maintain and reuse. Basically classes (without inheritance) are just structs with syntactic sugar (i.e. the first parameter, "this" in C++, is written in front of the function name).


    I disagree. With the C++ class the initialization and cleanup are done automatically for you, whereas with the C module the programmer can easily forget to initialize or to cleanup under some particular failure case. With enforced (via private:) opaque data interfaces, the C++ class protects the integrity of the data, whereas with exposed data structures the tempation is there to modify something directly, particularly if you're under time pressure.

    I'm not saying that a well-designed C module can't be easily maintained or re-used, but rather that a well designed C++ class can outright remove the possibility of certain types of bugs. Using class-based code, I've sometimes surpised myself at the complexity of programs (e.g. multithreaded, shared complex data structures, communications code) that have worked first time. I consider myself an expert level programmer, but we all create bugs, and anything that can eliminate that possibility is a good thing!

  42. Re:My view by Graspee_Leemoor · · Score: 1

    Dude, if you can understand LISP you should have no trouble understanding ANYTHING.

    (And I say that, me the big LISP fan).

  43. Re:Reuse is overrated, structuring is underrated by brsett · · Score: 1

    I disagree. Essentially this point of view leads to implementation focus instead of interface focus. For the most part, I don't care how a module works, only that it does. I do care how I get that module to work for me. Structure turns out to have nothing to do with public interface design (and very little to do with private interface design, other than making functions). It is unfortunate that slashdot posted this stupid article. You can watch the author rant on news: comp.object. He goes by topmind there. His name is the least obnoxious part of him. His understanding of OO is not very deep. But comp.object is pretty smalltalk biased, so the objections you get usually aren't very interesting either.

  44. common misconception by jon_c · · Score: 3

    one common misconception is that one can not do object oriented design in C, or any language that isn't approved by the OOP zealots. this is just not true, while it may be more natural to write a good object oriented design in C++, Java or Smalltalk. it can also be done in C or BASIC.

    one can create objects in C by creating a structure, then passing that structure to every method that performs on that structure. a common use could be something like this.

    struct window_t win;
    window_init(&win)
    window_draw(&win);
    window_destroy(&win);

    it is also possible to perform polymorphism and inheritance with function pointers and other techniques.

    -Jon

    --
    this is my sig.
    1. Re:common misconception by SpinyNorman · · Score: 1

      Lisp an OO language? Hmm.. last time I checked it was functional!

    2. Re:common misconception by David+Gould · · Score: 2


      I did, just maybe not carefully enough; I guess you did say that, after all. You gave the classic "Draw() method for abstract class Shape with concrete subclasses Circle and Square" example, and claimed at the top that it was something that "With the structure+procedure approach, [...] would have to be [a switch statement]" Following that, the last sentence seemed to be claiming polymorphism as a virtue of OOP over C. Rereading it, though, I see that it sounds more like you are acknowledging that polymorphism can be done without explicit language support, which was also my point. If that's right, then sorry.

      Mainly, I was looking for a good context in which to make the point of my last two paragraphs, namely that OOP is a bigger concept than a feature set of any language. In fact, I still have trouble with your initial argument that:

      According to your definition there's no difference between procedural programming with good practices such as data encapsulation, and OOP. But there IS a difference... an object is self-contained.

      We've already covered methods (explicit and otherwise), including polymorphism, and you specifically mention "good practices such as data encapsulation", so what else does "self-contained" mean? Will it still be anything that a good C programmer doesn't (or couldn't) already do anyway?

      What I'm trying to say is that programming in an OO frame of mind does not necessarily require any particular language, language construct, or even programming technique (see my claim that even the version with the switch statement is in a sense OO).

      David Gould

      --
      David Gould
      main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
    3. Re:common misconception by matthia · · Score: 1

      he did say
      The above example is also an example of polymorhism, and doesn't need a language such as C++ that explicity supports it. In C the Draw() member would just be a function pointer.

    4. Re:common misconception by OwnedByTwoCats · · Score: 1
      Not particularly informative, but my mod points went away.

      OOP exists to make it easier to build exactly these constructs. The earliest C++ compilers produced C code as output, and this is how they did it. Yes, the two constructs are equivalent. But the C code example is more error prone.

    5. Re:common misconception by SpinyNorman · · Score: 1

      We've already covered methods (explicit and otherwise), including polymorphism, and you specifically mention "good practices such as data encapsulation", so what else does "self-contained" mean? Will it still be anything that a good C programmer doesn't (or couldn't) already do anyway?

      I'd agree with you that OOP can be done in any language (indeed the first C++ compilers just translated to C), but some languages certainly make it MUCH MUCH easier!

      Imagine coding objects in C where you want the functionality of C++ constructors/destructors... there's simply no easy/foolproof way to do it - you'd simply have to bite the bullet and explicitly call the constructors (easy) and destructors (not so easy, since they need to be called at *every* possible exit from their scope). If something is so much a nuisance you're more likely to do without, but if it's totally free (and indeed unavoidable), then you're likely to happily take advantage of it. Same goes for inheritance, polymorphism, etc - all of course entirely possible in C, but with a cost of implementation that's likely to limit their use rather than encourage it.

    6. Re:common misconception by scrytch · · Score: 3

      It's also true that you can do good object oriened design with a Turing Machine, implemented in the Game of Life, composed of a million midgets wearing reversible parkas, which is directed from above by an Elvis impersonator in a hot air ballon shaped like a guitar.

      You signed an NDA on that design. Expect a call from our lawyers.

      --

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    7. Re:common misconception by kjots · · Score: 1

      The functions are linked conceptually, and if the coder is any good there will be logic inside the functions to ensure that only the correct objects are allowed in.

      The only difference between a full-blown object oriented language and C is that with C you have to do all the hard work yourself. More importantly, you have to define an operational model and stick to it (And that's really hard).

      Besides, it's all just ones and zeros in the end.

    8. Re:common misconception by evocate · · Score: 1

      Now you know where it came from.

    9. Re:common misconception by David+Gould · · Score: 2


      A good solution in C isn't quite as simple as you described. Specifically, your circle is described by parameters top, left, bottom, & right. Not only is that an inefficient way to describe a circle, it is ambiguous for other simple shapes (e.g., two different ellipses can have those 4 parmeters be identical). So, to do it "right" in C, you'd have to do something like having your shape structure hold a pointer to another structure that holds the shape parameters.

      First, let me mention that I had originally included a line "//..." after the "members" and "methods" declaration lines in the struct, to indicate that more would go there, but Taco's so-called "lameness filter" once again demonstrated its own lameness by tagging them as "junk characters", so I had to take them out to post it.

      I don't disagree with you much, but my example still deserves some defense. It may not be a good (efficient or even sufficient) way to describe geometric shapes for mathematical purposes, but it is good for objects that correspond directly to stuff that is to be drawn to some output device. Most 2D graphic toolkits I've seen have a DrawOval() function with exactly the same interface as DrawRectangle(), i.e., they take a Rectangle (struct or individual coordinates), and disambiguate the ellipse by using the one with vertical and horizontal radii. Even if the rectangle coordinates have nothing to do with the specific shape, they are needed because the code that manages the shapes together generically will need to know each one's bounding rectangle, so this information is universal to all shapes. In OOP terms, it would be in the abstract base class; in non-OOP syntax, it would be in the struct as I have it, along with (as you say) a pointer to another struct with any additional (you didn't say that) shape-specific information, which would have gone in the place of my lamented "//...".

      Note the phrases "In OOP terms" and "in non-OOP syntax" -- this gets back to my main point about OOP as a way of coding vs. OOP as a way of thinking. It's not just (as we all seem to agree) that you can do OOP without the syntax by using some (admittedly, increasingly awkward) techniques. I'm also claiming that there's not (necessarily) anything special about "OOPy" code at any level. In some sense at least (I just seem to keep adding that disclaimer everywhere) OOP is in how you think about it, no matter how you implement it, or even whether or nor you implement equivalent techniques at all. Even if you don't use the tricks we have been discussing with structs and function pointers as substitutes for OOP syntax, your code could still be called "object-oriented" as long as it is structured around entities or things with behaviors and interactions that model stuff, which will probably happen to some degree whether you think about it in those terms or not.

      David Gould

      --
      David Gould
      main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
    10. Re:common misconception by sumengen · · Score: 1

      In C, structures can have methods (functions).

      Just define your functions inside the structure as function pointers.
      Sure the syntax won't look as clean as C++ but who cares.

    11. Re:common misconception by slim · · Score: 2

      That's not a misconception at all. I think you need to look at the definition of an "Object Oriented" language. You'll see that to be OO a language must support certain things like inheritance, polymorphism, run time binding (dynamic binding) and many other fun things that you can't do in procedural languages. C doesn't support any of those.

      Since g++ (the GNU C++ compiler) is written in C, C and C++ are equivalent. In fact, all programming languages are equivalent. You could write OO code in a big pile of NAND gates if you really put your mind to it... or on a Turing machine... or on a Neural Net... etc. Basic language theory, that.

      Just because a language doesn't provide the syntactic niceties of (say) Eiffel, doesn't mean you can't create objects with methods and inheritance, and ask them to run said methods.
      --

    12. Re:common misconception by aardvarkjoe · · Score: 2
      Unfortunately, a large contingent of programmers claim that OO is the only way to program, and universally is easier to write/easier to read/faster to code/faster running/etc/etc/etc. You see it in the 'language wars', where you often see "Java is better than C, because the OOP support is better." Please. You should base your style of programming on the task at hand, not try to twist it into the techniques of the current fad.

      There are problems where OOP is good, and problems where it's not such a good idea. If you insist on using one or the other, pick those problems that it's suited for. I admit that I have some real problems with object-oriented programming's approach to things, but I don't want to convince people to give it up. Just don't make me do it. (That's the main reason why I chose not to do CS in school.)

      --

      How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
    13. Re:common misconception by fitzimac · · Score: 1

      But what you described isn't OOP. An object is defined by member variables and functions. Those functions are not members of the "object" window_t.

    14. Re:common misconception by Black+Parrot · · Score: 2

      > I think you need to look at the definition of an "Object Oriented" language. You'll see that to be OO a language must support certain things like inheritance, polymorphism, run time binding (dynamic binding) and many other fun things that you can't do in procedural languages.

      I've seen a number of different definitions of what it takes to qualify as an OO language, and as far as I can tell the various definitions exist for the sole purpose of letting people say "My language is; your language ain't."

      Not to defend C; I avoid it whenever I can. But we should concern ourselves with the essence of what OO means.

      So far as I can tell, the GTK+ people have caught the essence of OOness in GTK+, even though it's implemented in C.

      --

      --
      Sheesh, evil *and* a jerk. -- Jade
    15. Re:common misconception by BinxBolling · · Score: 3
      If you add the methods to manipulate the structure (via function pointers if you're using C), then you have an object.

      What do you think the "window_init", "window_draw", and "window_destroy" functions were? Just because these functions weren't formally defined as methods of the window_t object doesn't mean that they aren't methods. In the programmer's mind, they're methods, and that's what matters, in the end.

    16. Re:common misconception by tssm0n0 · · Score: 1

      Since g++ (the GNU C++ compiler) is written in C, C and C++ are equivalent

      I think you need to check your logic there. Yes, g++ is written in C, but its also set up to efficiently generate code for the important features of an OO language.

      Ok, everyone seems to be saying over and over that the code generated for an OO program and the code generated for some other type of language will all end up as machine code eventually, and this is of course true. The reason that we have high level languages is to make things easier on the programmer. I tend to do a lot of OO programming and I don't have the time to go and rig together a big old piece of ugly code to try to emulate one of the many useful features that an OO language would provide for me. Its as simple as that.

      You could write OO code in a big pile of NAND gates

      Now, that would be a very stupid thing to do. By your way of thinking I guess we should get rid of all programming lanugages and just do everything in the most complex way we can find.

    17. Re:common misconception by ADRA · · Score: 1

      I think he meant a data structure with the option of function pointers. I mean, even objects don't really NEED methods, although unless it is a primitive in a purely OO language, you probably want them for decent OO.

      --
      Bye!
    18. Re:common misconception by evocate · · Score: 1

      0xdeadbeef was cool, but my favorite was the init used by NeXT: 0xcafebabe, in honor of the Barrones hotties in Menlo Park.

    19. Re:common misconception by SpinyNorman · · Score: 1

      You'll see that to be OO a language must support certain things like inheritance, polymorphism, run time binding (dynamic binding) and many other fun things that you can't do in procedural languages. C doesn't support any of those.

      Huh?

      All the early C++ compilers just translated it into C. Evidently C supports C++ features just fine.

    20. Re:common misconception by VirtualAdept · · Score: 1

      I think that could be considered OO programming, actually. The set of his example is both data and several operations that operate on data, which is the core definition of a class.

      --John

    21. Re:common misconception by Paradise_Pete · · Score: 1
      There are problems where OOP is good, and problems where it's not such a good idea. If you insist on using one or the other, pick those problems that it's suited for.

      I'm curious. Would you mind giving a few examples of problems you think are well-suited for OOP, and a few that are not?

    22. Re:common misconception by sumengen · · Score: 1

      Of course you have a point but that is not totally true. Here is what I meant. Java Native interface (JNI) has both C and C++ interfaces. Same code:
      in C++:
      env->ReleaseStringUTFChars(jMsg, msg);
      in C:
      (*env)->ReleaseStringUTFChars(env, jMsg, msg);

    23. Re:common misconception by SpinyNorman · · Score: 2

      According to your definition there's no difference between procedural programming with good practices such as data encapsulation, and OOP. But there IS a difference... an object is self-contained.

      One classic example is a program that draws a bunch of different shapes. With the structure+procedure approach, the code would have to be:

      switch (shape.type) {
      case Circle: DrawCircle(shape); break;
      case Square: DrawSquare(shape); break;
      }

      With an OOP approach, the object "knows how to draw itself", and the code becomes:

      shape.Draw();

      See the difference? -- Procedural vs OOP.

      What happens to both these code fragments when you want to add support for triangles?

      That is the essence of OOP - to keep things self contained.

      The above example is also an example of polymorhism, and doesn't need a language such as C++ that explicity supports it. In C the Draw() member would just be a function pointer.

    24. Re:common misconception by gfxguy · · Score: 2
      So far as I can tell, the GTK+ people have caught the essence of OOness in GTK+, even though it's implemented in C.
      Funny, that's what I've always said about the X Windows System.

      To throw in my $0.02, I've always felt I could do what I do in C++ in C, but I've also always seen how much easier some things are in C++. OOD applies to a lot of problems, but I don't recall any OO programmers claiming it applies to everything, and everything should be forced to somehow comply with OO structure.

      I didn't get through the whole article, but it sounds like a bitter programmer with a chip on his shoulder. I mean, what's the big deal? If you don't like object oriented programming, don't use it. Just sounds like another whiney geek with too much time on his hands.
      ----------

      --
      Stupid sexy Flanders.
    25. Re:common misconception by baka_boy · · Score: 2
      Right now, OOP is often over-hyped in business situations where there the management is making key technological decisions, rather than letting the people who are actually in a position to know what would be a good design paradigm (basically, the programmers) choose. If some executive gets a really nice, flashy demo from Rational, Microsoft, or ATG, they're probably going to believe a lot more of the buzzword/technobabble that the salespeople throw out there than an experienced developer would.

      However, it's pretty impossible to argue with the productivity that something like COM or JavaBeans allows for non-mission-critical systems (or with EJBs, even for some more advanced systems, so long as you follow the 'rules'). Visual Basic, Java, et. al., can do a very good job of allowing programmers of many different skill levels to produce working code, and that, guys and gals, is often all that matters.

      The programmers who claim that OOP is the only way to go are often the ones who really don't care to understand any other design paradigms; I've known quite a few developers who were basically only in it for the paycheck, and since OOP and component systems were hot in the business world, they did everything they could to play along. Hell, I work almost exclusively in Java at the office, 'cause that's what the (business) people want. At home, it's Perl, Python, and ML, but I can only afford the time and hardware to play with those languages because of my day job.

      Like it or not, business programming is becoming more and more one of the new "blue-collar" occupations. Most people doing it are there because they like the wages and the predictable work, not because they're hardcore geeks.

    26. Re:common misconception by VonKruel · · Score: 1

      Quite true.

      The Linux kernel uses many abstractions. For example, the "file" abstraction is a great one. A file descriptor is just an integer that allows the kernel to figure out which code to call to do reads/writes/etc. Polymorphism!

      Generally though, if you're going to use OO concepts and you can use a real OO language, it makes sense to do so. Why fight with C when you can use C++?

    27. Re:common misconception by SpinyNorman · · Score: 3

      Sure OOP is a design technique not an attribute of a language (although some make it easier than others), but your example is bogus.

      A data structure is a structure, not an object.

      If you add the methods to manipulate the structure (via function pointers if you're using C), then you have an object.

    28. Re:common misconception by segmond · · Score: 2

      good point, but it is hard and not natural! just like you can say that, it is like saying one can write strucuted and object oriented code in basic, ask any basic programmer, they will agree, but what use is basic if you can't use your goto etc?

      --
      ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
    29. Re:common misconception by spRed · · Score: 1

      cfront was the first C++ compiler,
      it was actually just a precompiler that took C++ code, made straight C out of it, and then passed it on to the C compiler.

      --
      .sig Karma out the wazoo, better to spend points elsewhere if this is above 2 or below 0
    30. Re:common misconception by SpinyNorman · · Score: 1

      If you just have a data structure and a bunch of procedures that operate on it, then that's just good old-fashioned procedural programming.

      How would you implement polymorphism this way? It's impossible, since the caller would have to know which "methods" to call! You HAVE to have the methods as part of the structure in order for it to be a self contained "object".

    31. Re:common misconception by RevAaron · · Score: 2

      Binx is right. If those functions could be called (generically, without specific reference to the "class") purely in context of the struct/object, without knowing the special names of the "methods," (window_init, &c) and simply with init(), then it would be approaching it.

      But who cares? You can write OO assembly as well. Neither OO-C or asm accomodate it to the point where it's very useful.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    32. Re:common misconception by Phillip2 · · Score: 1
      "one can create objects in C by creating a structure, then passing that structure to every method that performs on that structure. a common use could be something like this. "

      C, like most languages is Turing complete. You can do pretty much anything you want in it, and follow any programming paradigm. Its possible to write object orientated code in C, functional code in perl, and procedural code in lisp.

      But why would you want to? Some languages do somethings better than others. You pick the language appropriate for the project. C, (or perl for that matter) are not good for writing OO code. If you have to write in C for other reasons, thats different, but generally I can no reason to put yourself through the ringer in this way.

      Phil

    33. Re:common misconception by 0xdeadbeef · · Score: 5

      It's also true that you can do good object oriened design with a Turing Machine, implemented in the Game of Life, composed of a million midgets wearing reversible parkas, which is directed from above by an Elvis impersonator in a hot air ballon shaped like a guitar.

      That isn't saying it's a good a idea.
      --
      Bush's assertion: there ought to be limits to freedom

    34. Re:common misconception by Anonymous Coward · · Score: 4

      I agree.

      OO is just a handy way of structuring large systems for maintainability. It is extremely useful for what it does, but isn't magic.

      People who dismiss OO out of hand are making the same mistake as zealots who insist that it must be used for everything by rejecting a useful tool.

      Structured programming, functional programming, OO etc are all extremely useful given the right problem domain. The skill is being able to look at a problem and pick the correct tool for the job. Rejecting, or choosing, something automatically can be a very good way to shoot yourself in the foot.

    35. Re:common misconception by volsung · · Score: 1

      The only two languages I've used that absolutely require the use of GOTO's (or the equivalent construct) are assembly language and FORTRAN. Maybe FORTRAN 90 fixed the problem, but I went nuts trying to figure out what the syntax for a WHILE loop was in FORTRAN 77 before I just decided to fake it with GOTO's and IF statements.

    36. Re:common misconception by freddevice · · Score: 1

      Inforamative???

      The comment is basically not right; if you add the function calls to your structure ( which you can do in C) then you are there.

      Objects wrap up the data and the functions to deal with the data; then is the core idea.

    37. Re:common misconception by pod · · Score: 1
      Speaking of common misconceptions...

      I'm assuming you were trying to be funny or sarcastic there... perfectly good working applications can be written without using GOTO in VB, there's no good reason to use it, and I haven't used it in any VB code I touched since my GW-BASIC days. The only exception is, uhm, exception/errror handling for which purpose the GOTO keyword has been co-opted (as in ON ERROR GOTO xxx). Bashing VB because it has GOTO is just as bad as bashing C because it has a long jump. I've seen more C code with gotos than VB code, and let me tell you, unlike with VB to this day I haven't figured out what the C program was doing.

      Languages don't write bad code, people write bad code.

      --
      "Hot lesbian witches! It's fucking genius!"
    38. Re:common misconception by BinxBolling · · Score: 2
      One classic example is a program that draws a bunch of different shapes.

      I'm familiar with this example: I've implemented it myself, although the "shapes" were actually 3D objects being raytraced, not drawn. I was using C++, and that language's features made it possible to very cleanly and elegantly express what I wanted. Since I got comfortable with C++, I won't touch C with a 10 foot pole, unless I absolutely must.

      But for the sake of discussion, let's modify your code slightly: Take the case statement and wrap it in a procedure named DrawShape, which will be used consistently throughout the rest of your code. Having done this, it's really a matter of

      shape.Draw()
      vs.
      DrawShape(shape);
      Now, the second version still has certain disadvantages. Most significantly, you have to manually maintain the DrawShape function yourself, increasing the possibility of bugs (since you might forget to update it, whereas the compiler would never forget to generate vtable entries for a new subclass of some abstract base). This will get even worse when you have multiple programmers creating shape types and needing to maintain a single shared DrawShape function.

      Still, this scheme means that all changes to how the shape "type hierarchy" works are isolated from the rest of the program. The rest of your code doesn't have to worry about the specific 'subtype' of shape that it's trying to draw at any given time, and if you want to add a Triangle shape type, you merely have to write DrawTriangle (which you have to do, anyways) and add an entry for it to the DrawShape function.

      Again: I think that OO is ultimately an approach to constructing programs that is more-or-less independant of the languages we choose for implementation. Some languages may make it more natural, but few make it impossible.

    39. Re:common misconception by EatAtJoes · · Score: 1
      Yes, but realize you are using a very OO-biased example that gets used constantly (and is explicitly addressed by the author).

      I do lots of OO programming and generally enjoy it's features, but it's easy to poke holes in your example.

      For instance, what if EVERY shape needs a similar change in how it's drawn? You'll have to go modify a bunch of files. Whereas in a switch statement, it's all in one place: much easier.

    40. Re:common misconception by joto · · Score: 1

      Why fight with C++ when you can use Common Lisp, Ocaml, SmallTalk, Eiffel, Ruby, or some of the so many other OO languages out there.

    41. Re:common misconception by aardvarkjoe · · Score: 3
      (Go figure; that post just gave me my bonus back. Time to lose it again :)

      Well, OOP should be used for things where the data structures resemble (in some way) real-world objects. For instance, games and other things that simulate physics can benefit from object-oriented design. Databases with dissimilar chunks of data might be easier to deal with using OOP. It may be helpful to represent other computers or programs as objects, in applications that require large amounts of intercommunication and response.

      OOP essentially downplays procedural programming, but (at least I) tend to find many things procedural, which would have to be twisted up to fit into the OO paradigm. Anything that does an easily-definable process, such as most system utilities and so forth, is probably not suited for OOP. Back to games, I recently wrote a 'roguelike' game: although the code dealing with monsters and items was somewhat object-oriented, the game logic itself was procedural. Programs that primarily deal with large amounts of raw data should probably deal with it in a procedural rather than OO manner.

      --

      How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
    42. Re:common misconception by BinxBolling · · Score: 1

      If you just have a data structure and a bunch of procedures that operate on it, then that's just good old-fashioned procedural programming.

      What is an object if not a data structure with a bunch of procedures (which are called methods, in this context) that operate on it?

      How would you implement polymorphism this way?

      I don't see polymorphism as a fundamental property of OOP, but rather a (very useful) tool that is enabled by language-level support for OOP.

      I agree that language support for OO is quite helpful, but as I see it, the fundamental characteristic of OOP is that the explicit and formal (though perhaps not language-supported) definition of the data entities in the system and of the legal operations on those entities.

    43. Re:common misconception by dlkf · · Score: 1

      true, but IIRC there have been studies that suggest that a programmer will produce the same amount of code per day (measured in LOC) regardless of the language. this was one of the reasons to stop programming in assembly. by having a high level language, the programmer didnt have to go through all the hassle of moving register contents onto the stack, etc. every time they wanted to call a function. by using an oo language that provides the syntactic niceties of oo techniques, the programmer doesnt have to recreate them when they want to use them. in the end, the programmer still produces the same amount(lines) of code, but the code they produce is capable of doing more because the instructions do more.

    44. Re:common misconception by angel'o'sphere · · Score: 1

      Since g++ (the GNU C++ compiler) is written in C, C and C++ are equivalent. In fact, all programming languages are equivalent. You could write OO code in a big pile of NAND gates if you really put your mind to it... or on a Turing machine... or on a Neural Net... etc. Basic language theory, that.

      The basic theory only says: you can write equivalent programms. Nothing more.

      This means for a given input on each machine(in each language) you can write a program which calculates the expected output. Nothing more.

      Definitly is there a difference between a Object Oriented Programming Language, which e.g. supports polymorphism on the language level AND Object Oriented Analysis and Design, which is only a A/D Method/Process.

      Of course you can everything which you designed with oo, implement in a non oo language if you take care to implement it right.

      Implementing polymorphism on a turing machine seemes quite challenging to me :-)

      he he, now I go and read the article, I doubt that the writer had any clue of oo, anyway.

      Regards,
      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    45. Re:common misconception by SpinyNorman · · Score: 1

      Yes, but adding triangle support would require modifying not only DrawShape(), but all the other shape "methods" (ShapeArea(), ShapeVertices(), ShapeFoo(), etc). If I were maintaining that code, I'd much prefer if all the changes were confined to class Triangle in triangle.cpp!

      Still, if the C coder had at least been consistent in the way you said, and had given some thought to maintainability, it'd be better than 90% of the code out there! :-(

    46. Re:common misconception by still_nfi · · Score: 1

      I think that the misconception is in the term OOP.

      There is OO design and there is programming to a specification. Anyone can do OO design and most people will think this way naturally. Some people are even good at it but mostly this just takes experience and/or learning design patterns.

      There are even some languages that make it easier to program to a specification....of course that depends on how the specification has been designed.

      Also, OO design is about identifying objects (aka data structures) and the messages that are passed between them. Methods, polymorphism, inheritence, blah, blah, blah are just concepts to express the mechanisms for implementing the design.

      Languages that are object oriented, really just provide explicit support for these mechanisms and attempt to make writing code to an OO spec easier, faster, maintainable, extensible, readable, etc. Everyone has their own perverse reason for liking one language over another, implementing to an OO spec can be done in (almost) any language.

      --
      "I have been around the world and found that only stupid people are breeding" -- Harvey Danger
    47. Re:common misconception by tssm0n0 · · Score: 1

      one common misconception is that one can not do object oriented design in C

      That's not a misconception at all. I think you need to look at the definition of an "Object Oriented" language. You'll see that to be OO a language must support certain things like inheritance, polymorphism, run time binding (dynamic binding) and many other fun things that you can't do in procedural languages. C doesn't support any of those. You can't do things derive a new type of struct from another type of struct.
      These few requirements created by the "approved by the OOP zealots" make OO programming into OO programming... you can write code in a non OO language that looks a little like OO code, but its not gonna behave the same way.


      Ok, the spelling may suck, but the message is there...

    48. Re:common misconception by Malc · · Score: 1

      I call that object-based programming, not object-oriented.

    49. Re:common misconception by pod · · Score: 1
      It's not just a bitter programmer talking there. Read the rest of the website (I admit to not having finished the linked article, I jumped to the main page right away). The author makes very reasoned, valid arguments against the myth of OOP in a particular niche, in his case it's business software. The basic argument is that OO features are not needed there, they're misused or not used at all and can be better done with a structured approach, and buying wholly into OOD works _against_ the business processes and models the software is supposed to support.

      The article is not against OO, it's just against using OOP where it's not applicable just because it's 'buzzwordy' and maintains an appearance of quality. OOP is hard. That is to say real OOP is hard. It takes many years to master C++ (for example)to be able to use it to write proper OO applications. Just like you can sit any monkey in front of a keyboard and have it whip out crappy VB code by the megabyte, it's just as easy to have an inexperienced programmer generate crappy OO code.

      --
      "Hot lesbian witches! It's fucking genius!"
    50. Re:common misconception by lscoughlin · · Score: 1

      I love the "the object is self contained" argument. Mostly because it's rather moot most of the time.

      The only place it makes any difference is with dynamic objects in a component model, where component structures can be shared across processes/namespaces/languages....

      And when you do that, you are suddenly doing something that very closely resembles... procedural programming... where the object itself is a convienent way to bundle foriegn data and code, and import it.

      Don't get me wrong... It's the best thing in the world... as a windows programmer: because the only decent implementation for any purpose is COM/DCOM.

      --
      Old truckers never die, they just get a new peterbilt
    51. Re:common misconception by Eccles · · Score: 1

      People who dismiss OO out of hand are making the same mistake as zealots who insist that it must be used for everything by rejecting a useful tool.

      I think the issue, really, is one of control. A large part of OO is the compiler taking care of details for you, such as C++ destructors. But to C "purists", this is horrible. They want complete control over all these details, over what happens and when it happens.

      Now, if you're a good coder with the time to do this, you can get code that's more heavily optimized in size and/or performance than an OO-er will ever manage. But you pay a price in development time having to manage all those details, relative to a good OO coder. Personally, I'd rather not have to hassle with all those details, unlike, say, Alan Cox.

      --
      Ooh, a sarcasm detector. Oh, that's a real useful invention.
    52. Re:common misconception by David+Gould · · Score: 2


      With the structure+procedure approach, the code would have to be...
      [sample switch statement which really isn't that bad, either]

      Oh, yeah?

      typedef struct Shape {
      //"data members" (scare-quoted because it's not really a class)
      int top, left, bottom, right;

      //"methods" (scare-quoted because it's not really a class)
      void (*Draw)(struct Shape *s);
      } Shape;

      void DrawCircle(Shape *s);
      void DrawSquare(Shape *s);

      int main(int argc, char **argv) {
      Shape s1, s2;
      s1.Draw = DrawCircle; //s1 is a Circle
      s2.Draw = DrawSquare; //s2 is a Square
      //set other fields

      s1.Draw(&s1);
      s2.Draw(&s2);
      }

      See the difference? The function pointer makes the struct just as polymorphous as a class would have been. Sure, the extra argument is not as nice aesthetically, but you can't think it makes that much difference. Yeah, yeah, OOP has more powerful features, like inheritance (make the second struct have an instance of the first as a member and refer to its fields explicitly) and mulitple inheritance (being forced to refer to inherited fields explicitly might actually make things clearer to someone trying to figure out what function -- sorry, method -- is being called), but for many purposes, you can do what you really need without it. OO languages provide syntactic sugar to make OOP more convenient, but those constructs are not essential to the idea of OOP; applying OOP concepts without them is just more tedious.

      Even this misses the point, though, if you ask me (not that you did, but let's pretend): I would contend that even your switch statement example is object-oriented "in spirit", even though the code is not, because it is still designed around program entities representing things: there is an abstract concept of something called a "Shape", that concept is extended into concrete things called "Circle"s and "Square"s, and there is an action "Draw" associated with Shapes. OOP syntax has only a little bit to do with OOP design. If your program is designed around entities (whether they are implemented as plain structs, fancy structs with implicit function tables [i.e., classes], data-driven tables, or whatever else you can imagine) that represent the concepts and/or things that the program is intended to deal with, then the design is, at least in some sense, object-oriented. You can call it "structure-oriented" or "thing-oriented" if you want, but really, what's the difference?

      I tend not to think of OOP as necessarily a language feature (though it can be, and in some cases is very useful as such), or even a design methodology (though it can be, and in some cases is very useful as such), so much as a way of thinking about code and how it relates to and reflects the real world. In that sense, almost anything you could possibly do (with some exceptions) will share some of these concepts, even without being directly "object-oriented".

      David Gould

      --
      David Gould
      main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
    53. Re:common misconception by Graspee_Leemoor · · Score: 1

      Ever hear of a thing called CLOS?

    54. Re:common misconception by SpinyNorman · · Score: 1

      Well, hopefully with the switch case you'd still have procedures to do the drawing rather than in-line code(!), so you'd still have multiple places to change. With the object approach, there's at least the possibility that the change might be implementable in the base class, if the programmer had structured the code to allow this.

      Anyway, the example was only intended to illustrate the self-contained nature of an object. Certainly there are different design techniques that are appropriate/beneficial in different circumstances. Having said that, though, I will say that ALL my code nowadays is based on C++ classes. I don't use OOD, and very rarely inheritence other than to extend a class or implement a virtual base class, but the convenience of objects is nonetheless there.

    55. Re:common misconception by cyber-vandal · · Score: 2

      That's because most programmer tasks are mind-numbing fire-fighting, due to the poor design of the original system. I enjoy coding when I get the chance to do it, but I only think of the money when I have to unravel some piece of spaghetti that was badly-specified and changed dozens of times. I much prefer to write my own code, but there's plenty of shit code around that companies are quite happy to pay outrageous wages to have maintained.

    56. Re:common misconception by Graspee_Leemoor · · Score: 1

      It *is* a misconception that you can't do OO _DESIGN_ in C. You talk about requirements for an OO language. Yes, OK, we admit C isn't an OO language, but that doesn't mean you can't do OO things in it with workarounds. B. Meyer points this out very well in his otherwise god-awful Eiffel Advocacy book. Early versions of C++ were just preprocessors which generated C, and even today lots of OO languages compile down to C. >>You can't do things (like) derive a new type of struct from another type of struct. If you're talking about C++ style inheritance then maybe you should check out how C++ stores derived classes internally before posting such nonsense. >>you can write code in a non OO language that looks a little like OO code, but its not gonna behave the same way. See point above about early C++ "compilers" and modern OO langs that compile down to C. (It all ends up as assembly after being compiled you know).

  45. Best OOP language I've encountered by Steeltoe · · Score: 1
    If you're interested in a language that simply is the best I've found out there, check out Ruby. Here's some nifty features cut'n pasted from the website:

    Ruby has simple syntax, partially inspired by Eiffel and Ada.

    Ruby has exception handling features, like Java or Python, to make it easy to handle errors.

    Ruby's operators are syntax sugar for the methods. You can redefine them easily.

    Ruby is a complete, full, pure object oriented language: OOL. This means all data in Ruby is an object, not in the sense of Python or Perl, but in the sense of Smalltalk: no exceptions. Example: In Ruby, the number 1 is an instance of class Fixnum.

    Ruby's OO is carefully designed to be both complete and open for improvements. Example: Ruby has the ability to add methods to a class, or even to an instance during runtime. So, if needed, an instance of one class *can* behave differently from other instances of the same class.

    Ruby features single inheritance only, *on purpose*. But Ruby knows the concept of modules (called Categories in Objective-C). Modules are collections of methods. Every class can import a module and so gets all its methods for free. Some of us think that this is a much clearer way than multiple inheritance, which is complex, and not used very often compared with single inheritance (don't count C++ here, as it has often no other choice due to strong type checking!).

    Ruby features true closures. Not just unnamed function, but with present variable bindings.

    Ruby features blocks in its syntax (code surrounded by '{' ... '}' or 'do' ... 'end'). These blocks can be passed to methods, or converted into closures.

    Ruby features a true mark-and-sweep garbage collector. It works with all Ruby objects. You don't have to care about maintaining reference counts in extension libraries. This is better for your health. ;-)

    Writing C extensions in Ruby is easier than in Perl or Python, due partly to the garbage collector, and partly to the fine extension API. SWIG interface is also available.

    Integers in Ruby can (and should) be used without counting their internal representation. There *are* small integers (instances of class Fixnum) and large integers (Bignum), but you need not worry over which one is used currently. If a value is small enough, an integer is a Fixnum, otherwise it is a Bignum. Conversion occurs automatically.

    Ruby needs no variable declarations. It uses simple naming conventions to denote the scope of variables. Examples: simple 'var' = local variable, '@var' = instance variable, '$var' = global variable. So it is also not necessary to use a tiresome 'self.' prepended to every instance member.

    Ruby can load extension libraries dynamically if an OS allows.

    Ruby features OS independent threading. Thus, for all platforms on which Ruby runs, you also have multithreading, regardless of if the OS supports it or not, even on MS-DOS! ;-)

    Ruby is highly portable: it is developed mostly on Linux, but works on many types of UNIX, DOS, Windows 95/98/NT, Mac, BeOS, OS/2, etc.

    All in all, a language that IMHO should replace Python and Perl.

    - Steeltoe

  46. WOW by Bob+Costas · · Score: 1

    The guy who wrote this article just trolled the shit out of all of you. I bow to him. Goodnight.
    ---
    "You just stranded one of the world's greatest leaders in San Dimas!"

    --
    Bob Fucking Costas. Does anyone else hate that motherfucker?
    1. Re:WOW by Graspee_Leemoor · · Score: 1

      >>The guy who wrote this article just trolled the shit out of all of you. I bow to him. Goodnight.

      I know, I know, it's so true.

      My only defense is that I couldn't help but take the bait, and I suspect neither could anyone else who posted.

      The problem is that if an argument is sound then you can properly discuss it rationally, while if it is really really absurd then you don't feel inclined to refute it.

      Where the argument is only slightly absurd, however, cloaked in a false sense of sensibleness then you feel strongly inclined to argue.

      This is why the best trolls (intentional or otherwise) are in just the right place between sensible and absurd. Too absurd, and the troll is given away to everyone and no-one bothers- give it just that shade of reality (Just a whiff, nothing more), and you attract posts like a dead weasel attracts bizarre similies.

      Graspee

  47. Re:reusability... by marcovje · · Score: 1


    I think that you confuse OOP with modularisation here.

    You can do that in a procedural language too, it isn't an OOP feature.

    You have to think in modularisation that you can do with OOP, but not (in the same magnitude of difficulaty) with procedural langauges.

    IOW direct benefits from the polymorphism and inhertance, not purely from writing modularised.

  48. Re:Wrong by scrytch · · Score: 2

    > Pray tell, how does run-time instantiation have anything to do with either encapsulation or abstraction?

    Simple. You can do abstraction in anything, even turing machines. Encapsulation is done in objects, otherwise you don't have encapsulation so much as namespaces. Not much encapsulation going on if you only have one capsule, neh?

    --

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  49. Reply to your claims by Tablizer · · Score: 1

    [quote] It is a clean module packaging mechanism that encourages cleaner interfaces between modules [end quote]

    Modules are available in some procedural languages also. (Don't bring up state. It was already mentioned.)

    [quote] It encourages opaque data interfaces (method access vs public access) which results in less bugs [end quote]

    Real-world business example?

    If anything, this tends to create set/get bloat--One of the silliest structures that is just crying out for some sort of cleaner factoring. Also, they can often be replaced by good data dictionaries.

    [quote] It makes use of self-initialization/cleanup (constructors/deconstructirs) that avoid a whole slew of programmer errors. [end quote]

    I just got chewed out by readers who claimed that defending my garbage-collection myth was a strawman because nobody believed except a few dummies.

    In short, you are comparing C to C++. C is NOT the pennacle of procedural/relational programming.

    [quote] The self-containedness of objects does make code reuse simpler and less bug prone. [not quote]

    Specific example?

    Again, these all sound great on paper, but when specifics are looked at by the non-indocrinated, the ugly grey of OO thinking starts to ooze out. People are trained by rote to think of the standard OO benefits, but often don't notice the side-effects. (Extreme example: if your hand itches, then chopping off your hand will stop the itching. However, the salesmen forgot to tell me about the itchy stump, among other things.)

    1. Re:Reply to your claims by ftobin · · Score: 1

      [quote] The self-containedness of objects does make code reuse simpler and less bug prone. [not quote]

      For the love of humanity, will you please learn to write HTML? Your comments and article are full of impossibly bad code. It certainly doesn't reflect well on you.

    2. Re:Reply to your claims by SpinyNorman · · Score: 2

      [quote] It is a clean module packaging mechanism that encourages cleaner interfaces between modules [end quote]

      Modules are available in some procedural languages also. (Don't bring up state. It was already mentioned.)


      I was specifically referring to the benefits of C++ over C, and in the real world many programmers don't even have the discipline to structure C into module definition (.h) and implementation (.c) files, or even to use #ifnedf/#define protected headers. I programmed in Modula-2 for many years, and it's a great language, but hardly an option for most projects today, and certainly lookigng rather dated in terms of features.

      [quote] It encourages opaque data interfaces (method access vs public access) which results in less bugs [end quote]

      Real-world business example?


      How can you feel qualified to write an opinion piece on design technique (OOP) if you can't understand this without an example???

      Let me spell it out for you:

      If you make a C++ data structure member private, and *only* accessible via methods, then you remove the possibility of people using your class accessing or modifying the data structure in incorrect ways. One source of bugs made IMPOSSIBLE.

      BTW, who said anything about business programming?

      If anything, this tends to create set/get bloat--One of the silliest structures that is just crying out for some sort of cleaner factoring. Also, they can often be replaced by good data dictionaries.

      Usually the data structures involved would be something more complicated than a variable that can be "set or get"!!!

      With your comment on data dictionaries, you again seem to want to limit the discussion to business, and specifically database related, programming! Odd.

      [quote] It makes use of self-initialization/cleanup (constructors/deconstructirs) that avoid a whole slew of programmer errors. [end quote]

      I just got chewed out by readers who claimed that defending my garbage-collection myth was a strawman because nobody believed except a few dummies.


      I'm talking about C++ constructors and destructors period. Who said anything about garbage collection??

      In short, you are comparing C to C++. C is NOT the pennacle of procedural/relational programming.

      Is this meant to be a practical discussion or not. In the real world there are very few widely used languages. Outside of the modern scripting languages like Perl/Python/etc, and leaving aside specialty anguages like VB, you've basically got C, C++, FORTRAN, COBOL, Java, and Ada if you work in the defense industry. Where's your pennacle [sic] of procedural languages? Ada?

      [quote] The self-containedness of objects does make code reuse simpler and less bug prone. [not quote]

      Specific example?


      Huh? Are you challenging that statement???

      Perhaps you think it's easier to resuse code when there's MORE to think about and get right, rather then LESS?

      Again, these all sound great on paper, but when specifics are looked at by the non-indocrinated, the ugly grey of OO thinking starts to ooze out.

      I'm neither talking about on paper, nor am OO "indoctrinated". I've been programming for over 20 years in languages including 6502/Z80/68000/16032/x86 assembler, BASIC, FORTRAN, COBOL, Algol-W, LISP, Pascal, Modula-2, C and C++. IMO C++ is simply the best general purpose language available today for utilizing the sound prgramming techniques I've learned over the years, and OO is to a large degree just a modern name for design techniques that have been around for years, but are now better supported.

  50. subroutines and internal re-use by Tablizer · · Score: 1

    Wikiwiki link about code re-use:

    http://c2.com/cgi/wiki?OoIsNotAboutReuse

    Quotes from it:

    "Anyway, OO's (hypothetical) re-use benefits were pitched so agressively that people seemed to confuse the two. In reality, OO and re-use have turned out to be really orthogonal things."

    "Software reuse is a management problem, not a technical problem. Always has been, always will be."

    What specifically is it about OO that allegedly makes for better code reuse anyhow that subroutines and modules cannot provide?

    (Hint: if your answer is based on inheritance and/or hierarchical taxonomies, tred carefully.)

    1. Re:subroutines and internal re-use by mangino · · Score: 1

      In my opinion, OO does nothing for reuse. Proper design of code/interfaces does everything for reuse.
      --
      Mike Mangino
      Sr. Software Engineer, SubmitOrder.com

      --
      Mike Mangino
      mmangino@acm.org
  51. Hammers, nails, screws... by David+Gould · · Score: 2


    I've always liked that saying (in various wordings):
    "If you give someone a hammer, problems will all start to look like nails to him."

    To really drive the point home, I like to add:
    "...and what would he do if given a screw?"

    There's also a response that I came up with once when a friend and I were talking about the coolness and power of some particularly cool and powerful Lisp-related thing (lest my previous post and/or my sig make me seem like just an old-fashioned C hacker):
    "A sufficiently powerful hammer can turn any problem into a nail."

    David Gould

    --
    David Gould
    main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
  52. Re:OOP sucks! by Graspee_Leemoor · · Score: 1

    I was chanting along with you, but you stopped...

    Did you run out of stack space?

  53. Re:That is a shop-specific convention, not OOP by maroberts · · Score: 1

    Well, often the differences do not fall neatly into sub-type taxonomies. Real world things don't chop up nicely into taxonomies for the most part I find (at least not lasting ones). See the Employee example.

    As I said, it's very rare that you find two OO designs for the same project that do agree where the boundaries are. However this is not a problem, if you took any two OO designers and gave each the design or code of the other designer, each would be able to rapidly understand the design of the other without too much difficulty; something that seems to be extremely difficult to manage using other methodologies. I regard the PRIMARY purpose of a design as the ability to communicate the ideas of that design to others so that they can understand and implement it, and in that regard OO works with the minimum of hassle.

    You appear to object to OO because at some points there are not hard and fast rules about how a class/function should be implemented in all cases; I say that it doesn't matter if there is some arbitrary choice and freedom provided the design ideas can be communicated simply and easily to others.

    I agree with you that real world examples do not often split neatly into sub-type taxonomies. It is at those points where I have to make some design decisions and hope they work out. I often find that in the event I do screw up and have made a bad decision, that OO has set some boundaries that limit the effect my bad decision has had on the rest of the design and make it easier to reengineer the bad components.

    You are talking about shop-specific conventions (method per file), not paradigm differences.

    Yes, but OOD seems a method which encourages, without using brute force and thousands of pages of "standards" (which do make me hurl), those shop conventions which do make for good maintainability.

    --

    Donte Alistair Anderson Roberts - hi son!
    Karma: Chameleon

  54. what a cry-baby... by xlurker · · Score: 1

    ohhh, poor guy...

    I've been programming for some years now in all possible languages, and OOP *did* make the overview and management of the data-structures very much easier. (developement speed and costs of course profitted from this)

    If this guy only has to *script* twiddly-diddly less-than-10,000-lines programs, then DUH! He's simply never really experienced how practical a tool OOP can be...
    virtual interfaces, encapsulation of data & methods and inheritance are as natural as functional programming, namespaces and dynamic memory. If he fails to see that then he's simply never written a respectable application.

    If you only do calculations in the single digits then you're gonna question why everybody thinks calculators are so grand...

    this guy is problably the local loser (compared to his OOP-luvin colegues) in the his company and is playing the contrarian...

    --
    ______________________________________________
    sigamajig...
  55. Re:The biggest problem with OOP by Linux2Mars · · Score: 1

    You think you proved your point? There is just 1 Class in your example...

    --

    AC is AC
  56. inheritance is the real evil by rpeppe · · Score: 1
    i have no problem with OO programming when it's about encapsulation of data behind a well-specified interface. that's the part that makes sense, allowing independent components to be reimplemented independently.

    inheritance breaks all that. in particular the fact that you can (and probably will) inherit inappropriate superclass methods means that objects can often be broken by calling those methods.

    instead of a "one interface, one purpose" scenario, you get "large numbers of slightly different interfaces, obscure numbers of purposes"! look at a diagram of the Java class hierarchy sometime to see what i mean.

    i have found that the best code reuse is to be found by choosing well-designed, tight, and simple object APIs, using no inheritance at all. this approach avoids the constant fretting familiar in OO circles "how can i mutate that interface into the one i'm after?" a.k.a. "what should i inherit this object from?".

  57. Re:GUI's vs GUIs by Graspee_Leemoor · · Score: 1

    >>Your style book isn't the be-all and end-all of correct English. What counts is how everyone writes. Officially correct style is determined by common usage. Some rules, like those relating to "its" and "it's", are so dumb and commonly violated that we can only hope that style-book-writing pedants will eventually accept that common "mistakes" are correct.

    I'm not talking about MY style book but the actual real rules of English grammar. The "it's"/"its" rule is not "dumb", no-one feels inclined to write "hi's" or "he'r" instead of "his" and "her"- it's only because *coincidentally* "its" is the same as "it" with an "s" on the end; If the word for "his" was "hims" then people would probably want to put an apostrophe in there too.

    Officially correct style is NOT "determined by common usage"; The language can and does evolve over time, and this process is affected by common usage, BUT it hasn't evolved yet, so the examples given are still wrong.

    Do you call your C compiler a "style-book-writing pedant" when it complains about a missing semi-colon? We have these rules in the English language for a reason- they help to resolve ambiguities. Unfortunately it seems as though English is going to "evolve" into a piece of crap without any of the subtle nuances we have today.

    And don't tell me "It's only grammar"; It was you who started this by incorrectlty "correcting" someone else's grammar post.

    Graspee

  58. Re:Tell us something we don't already know... by Omnifarious · · Score: 2

    I gave up and decided to write in Python. It's still kinda complicated, but at least that's just because the code is doing something complicated.

  59. dealing with change by Tablizer · · Score: 1
    Regardless wether you design/program using OO paradigms or other paradigms, its ALWAYS a challenge to design/define stable interfaces.

    I think the issue is that OO mostly seems to shine in places where the interfaces are fairly stable. Some domains are like this I hear. But certainly not mine.

    OO seems to have more overhead when interfaces change because it is based on the assumption of stable interfaces. For example, you may have more get/set wrappers to change than you would in a typical procedural approach, where you are more likely to only change the places that need the changes.

    OO is overly obsessed with the concept of isolating implementation changes, at the expense of other app/code management issues.

    1. Re:dealing with change by angel'o'sphere · · Score: 1

      Sorry I do not get that.
      In changes of interfaces oo or procedural approaches have no difference, or what do you define as an interface?
      A method call or a function call is just the same, you change one single line in one single soure file and all the places where this line is called. Well, in C++ you would choose a suitable default argument and most clients would not be affected.
      a'o's

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    2. Re:dealing with change by Tablizer · · Score: 1

      >> A method call or a function call is just the same, <<

      But often in procedural you are more likely to directly access a field in a table, for example. You don't have to alter get/set lists, for one.

      The DB is considered an interface itself. Set/get's just seem like an interface on top of an interface. IOW, redundant double work. It might be acceptable if these interfaces were not likely to change, but they are.

    3. Re:dealing with change by angel'o'sphere · · Score: 1

      Could you give an example for that?
      I do not get what you mean.
      I do not have a get/set method where I do not need one, and all set/get methods are auto generated from the IDE anyway.

      And how is this related to a DB access? OO and DB are two different beasts. If you do not like set/get methods so jsut skip tehm and access teh datafields. So you only break encapsulation, this is not oo but a concern of oo, you should use get/set functions in non oo code as you use get/set methods in oo code. (The only thing you then change is THE get/set function, and thats the reason why you use them, all who call it GET the change, all who access direct the field have to be changed if the field is changed)

      Regards,
      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  60. thats not how I remember it by Tablizer · · Score: 1

    [quote] He is a well known troll on comp.lang.perl.misc. When he showed up there the first time, he was pissed that Perl wasn't Visual Basic, then he went away for a while. When he showed up again, he was pissed that Perl wasn't COBOL (seriously). [end quote]

    It is already circulating well that Perl encourages write-only programming. I asked for code proof that one NEEDS perl's cryptic stuff, and nobody could do it.

    You were afraid of scrutiny.

    [quote] and fancies himself an expert on whatever topic he read about last.[end quote]

    Well, since everybody else votes themselves experts-without-proof, why should I be exempt?

    1. Re:thats not how I remember it by Graspee_Leemoor · · Score: 1

      >>I asked for code proof that one NEEDS perl's cryptic stuff, and nobody could do it.

      The most cryptic part of perl is the regexp syntax which is:

      a) borrowed from other places anyway
      b) an entirely necessary part of perl
      c) impossible to make less cryptic while keeping the power it has

      I find it interesting you quoted the cobol advocacy part of the comment and din't comment on it. If you can find ANYTHING to like about cobol you are obviously in serious need of a wetware upgrade...

      Graspee

  61. Re:What are you talking about? by Graspee_Leemoor · · Score: 1

    You seem to have failed to grasp the point of my post. I *can't* prove that OO is better- not because it isn't, but because it's impossible to prove that one programming paradigm is inherently superior to another.

    It's as if I said- "How can I prove that my cheese is faster than your cheese? Cheese doesn't have a speed!", and you said:

    "If you are unable to prove that your cheese is faster, that is NOT my problem. Stop making excuses."

    Graspee

  62. The author's actually pretty much on track. by JohnQPublic · · Score: 1

    My major gripe with his article is that it seems to be one big rant against OO with very little in the way of decent alternatives.

    Foul! Only at the dinner table (and then only when Mom is presiding) is it fair to tell someone that "If you don't have something positive to contribute, don't interrupt." Negativism is a perfectly good debating position - it worked for Martin Luther!

    Even when he talks about C, he is critical; so my question is, what techniques/languages does he suggest we use?

    PL/I would be a good start. Algol (but not '68) would have been too. What's that you say? PL/who? Right, these languages were the darlings of the Structured Programming fanatics in the late 1960s and early 1970s. You don't find them in too many places any more, although Algol has survived somewhat as Pascal.

    VB? Pascal?

    Edgser Dijkstra (please don't say "who?") said (way back in the early 1980s),

    "FORTRAN --'the infantile disorder'--, by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use. PL/I --'the fatal disease'-- belongs more to the problem set than to the solution set. It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.
    (emphasis mine)
  63. re: Burden of Proof by Tablizer · · Score: 1

    [quote] "The burden of proving that OO is better is on you, not me." You've said this a bunch of times in other posts so far. I don't see how this is true at all. YOU are the one who wrote the paper, and you want the reader to go disprove YOUR points? [end quote]

    The orthogal taxonomy issue and the method boundary issue are specific things that bother
    me about OO.

    We can focus on these for days.

    However, I have never seen OO code that was better for a biz app. I can't fight what does not seem to exist.

    IOW, you claim your car is faster, but you won't race it. If you won't race it, how can I compare? All I can do is concluded that you are probably full of it. This is where the situation stands right now.

  64. Re:New Myth: OO would have prevented Y2K by Graspee_Leemoor · · Score: 1

    If you're really the author of that dreadful article, I'd like to ask you why you decided not to respond to all the other way-more damning criticisms of your arguments.

    Also of course I'd like to point out that in your article you can't use an apostrophe to save your life, so why the hell should we believe you are qualified to address semantics of languages when you haven't even grasped the syntax?

    Graspee

  65. Re:Wrong by Mr.+Slippery · · Score: 2
    Think about it a minute. What does a C++ compiler do? It translates the (high-level) C++ code to (low-level) assembly code.

    Actually, it's worth noting that the original C++ implementation was a precompiler - it translated C++ to C. (I believe that this would be very difficult or impossible to do with today's C++.)

    Can you do object-oriented stuff in C? Yes. It's often hideous, though. Motif was one such attempt. The horror...the horror....

    The key attributes to a well-structured program (OO or not) are encapsulation and abstraction.

    Can you get these in C? Yes! File scoping is the most underappreciated feature of C; it's often negelected because of poor revision control systems that end up encouraging a one function, one file paradigm. When you use it properly, though, you can put code and data members in a package with well-defined interfaces and the option of private data members. It rocks.

    Can you screw things up by inappropriate use of OO strategies? Sure. Object-obfuscated designs with spaghetti inheritance are common, and are usually caused by becoming infatuated with inheritance and polymorphism at the expense of encapsulation and abstraction.

    Tom Swiss | the infamous tms | http://www.infamous.net/

    --
    Tom Swiss | the infamous tms | my blog
    You cannot wash away blood with blood
  66. Re:"Object-oriented" languages (oops) by Richy_T · · Score: 2
    Operator overloading is a C++ feature, not an OO feature.

    But it's not the global shift operator that's been overloaded, it's the shift operator associated with cout. Although it's not an oo feature as such, it is dependent on it. I.e. you're effectively doing cout.print("hello world").print(endl);

    Rich

  67. Re:"Object-oriented" languages by crgrace · · Score: 2
    For example, I claim that the following program is legal C++ code:

    cout However, I wouldn't dream of claiming that the program is "object-oriented" simply because C++ is perceived to be an "object-oriented" language.

    You know what? cout is an object oriented function! You can send it strings, characters, integers, and floating point variables without having to indicate to the complier what you are sending, as you do when using printf() in C. Try a better example. In fact, since C++ is a superset of C, I would submit that THIS is a truly non-OOPed C++ program:

    int main() {
    printf("%s\n","hello world!");
    }

    Now, THAT would compile with g++ and doesn't use anything OOP.

  68. Re:agreed--fighting anecdote with anecdote. by lscoughlin · · Score: 1

    I'm definitely not arguing against the use and creation of libraries. The problem is... most of the time, that _is_ developing one thing, and then quitting.

    When it's not... the cycle usually runs something like. I develope on program. I develop another that does something similiar, i get the project assignment for a third that does something similiar, then i abstract a library, write the third, and back port the two during the next review.

    As a blue collar business programmer though, i usually find myself moving on before i get to that third program. Additionally, justifying that time i spent on the library to management is often painfull. Then taking into account my deadlines, and often i'm just stuck writing three programs that have alot of very similiar code.

    If some of the abstracted libraries are interesting enough, i might work overtime, or in my own time on them if they're sufficiently interesting, or if i know unequivcably ahead of time that the next two projects are coming down the pipe, and that i'm getting them.

    These circumstances don't happen too often however, and more often than not they aren't of much use outside the relatively small context of those three apps. They can't be GPL'd, or BSD'd or, personally, Artistically liscensed and released because they belong to the company and most managers look at you like you're a moron, either out of ignorance or intolerance, and dismiss it out of hand.

    Not that they'd be particually useful if released anyway, because they're usually aimed at biz niches.

    I'm a mixed paradigm programmer myself, and intend to stay that way. I've walked in to far to many maintenence projects cold to believe any hype about any methodology, as they are all equally capable of producing crap. The proof is in the code, not the theory.

    --
    Old truckers never die, they just get a new peterbilt
  69. Perl speed comparison by nwetters · · Score: 1

    Obviously, performance is rarely the prime objetive in a software project, compared to, say, completing on schedule and within budget. However, here's what a skilled OO Perl developer has to say...

    From Damian Conway's excellent Object Oriented Perl:

    A single method call is about 30 percent slower than a regular call to the same subroutine ... In general, it's fair to say that an OO implementation of a system in Perl will almost never be faster than the equivalent non-OO implementation, and will usually be somewhere between 20 and 50 percent slower.

    I guess [anyone got any figures?] that the same might be true when trying to use any procedural language in an object-oriented fashion.

  70. Re:OOP is Worth It by nwetters · · Score: 1
    Even the C and Perl programmers know this, even if they won't admit it.

    err... many Perl programmers will admit it.

  71. Re:"You won't need it" by Julian+Morrison · · Score: 1

    "...don't do it unless you need it."

    When there's actual common behavior - your sorting example is good - then generic stuff saves code. But a classic beginner mistake is to build it before you need it. If you only have one thing to sort, or everything you work with gets sorted very differently, then writing a generic function and a "sortable" interface just makes your code more verbose, harder to read, and often less optimized.

  72. Strawman from by Martin+Spamer · · Score: 1

    This IS a strawman argument (despite his claims otherwise) by somebody who clearly has little idea of what OO is about. I guess he is frightened and fearful for his prospects because he is unable to make the paradigm shift. The clearest evidence of this are the Myths; an OO authority would never proclaim many of these, some just don't make sense, some are 'clearly' miss-quotes or misrepresentations of what OO advocates do claim. That these are myths is only claimed with his opinion, not proven with evidence.

    Myth: OOP is a proven general-purpose technique
    Where is the evidence that it is not? His own pet hate about the massive growth of OO over the last decade directly contradicts this claim. I've used an OO approach successfully to produce many types of systems including, databases, real time, calculations, GUI's & parsers, print engines, utilities.

    Myth: OOP models the real world better
    Better than what ? OO readily models Physics, the most fundamental 'real world' model in existence.

    Myth: OOP makes programming more visual Stawman

    Myth: OOP makes programming easier and faster
    This claim should be qualified as over the full life cycle of a system; the design may be longer than a traditionally 'hacked' project. However the iterative nature of an OO development more than make up for it during elaboration & maintenance phases, the most important phases in bespoke systems development.

    Myth: OOP eliminates the complexity of "case" or "switch" statements Stawman
    This is an algorithmic issue; the Command pattern is one OO approach to achieve this, there are non OO approaches that could also do the same (function pointers in C) if it is warranted. It was with Win SDK message crackers for instance.

    Myth: OOP reduces the number of places that require changing Stawman
    OOP aids a reduction in coupling. Reduced coupling improves a system in a number of ways, including maintenance.

    Myth: Inheritance increases reuse Stawman
    There is a lot more to reuse in OO than inheritance. Encapsulation, polymorphism, aggregation/ composition.

    Myth: Most things fit nicely into hierarchical taxonomies. Stawman
    As I just said there is a lot more to OO than inheritance.

    Myth: Self-handling nouns are more important than self-handling verbs ?!?!
    This miss-represents a rule of thumb used to aid the learning of OO; 'more important', this does not make proper sense.

    Myth: Only OOP has automatic garbage collection Stawman
    Garbage collection and OO are not synonymous, not all OO languages include [automatic] garbage collection, procedural & functional languages do include automatic garbage collection. it's probably only really essential in functional languages.

    Myth: Components can only be built with OOP

    Myth: Only OO databases can store large, multimedia data Stawman

    Myth: OODBMS are overall faster than RDBMS Stawman

    Myth: C is the best procedural can get Stawman

    Myth: OOP would have prevented Y2K problems Stawman
    No, just made it easier to fix.

    Myth: Implementation changes significantly more often than interfaces Stawman

    Myth: Procedural/Relational ties field types and sizes to the code more Stawman

    Myth: Procedural/Relational programs cannot "factor" as well Stawman

    Regarding the unanswered challenge, the old philosophy of science adage, that the absence of evidence is not evidence of absence, says more than I ever could.

    The posting history of this identity, demonstrates a single narrow minded obsession with ignoring the evidence, that it's pointless trying to convince him otherwise. His ego prevent him progressing. I would guess that he's a self taught amateur who know a few [non OO] languages, rather than a trained professional with a range of tools [including OO] in his arsenal.

  73. Re:New Myth: OO would have prevented Y2K by Graspee_Leemoor · · Score: 1

    >>relating apostrophe usage to general intelligence is a
    little bit of a stretch. Why are some people so distracted
    by such things?

    Because if you could grasp the syntax of the English language I might have more time to listen to your rants on language semantics. I didn't relate apostrophe usage to general intelligence anyway, even though someone of moderate to high intelligence would probably be curious enough to go and look the rules of grammar up rather than just blindly guess when posting.

    >>You remind me of my wife: you find "messes"
    that nobody would otherwise notice

    Look, if everyone else is too polite to tell you that you shat under the coffee table again, then that's not my problem. More power to your wife for pointing it out to you.

    Graspee

    P.S. just tell me if I go too far- I'll mark you done as "flunked because could dish it out but not take it"

  74. Axually..... by addison · · Score: 1

    There's a long history here with "Tabilizer" and myself, and many others.

    As for syntax.. well, you should have seen some of his earlier missives on semicolons on IWE. (nevermind when people _explained_ why they were used, etc... he didn't like them, so they were stupid"

    The reason he doesn't respond to the good criticisms is.. its his MO. he'll wait and attack some tangential position, divert the argument, then declare victory.

    I'll recommend you to the link I've posted several times... Its as good as any other, the arguments always go the exact. same. way.

    Prove him wrong, pin him in a corner, and its a technicallity/silly/not important. More often, he'll just ignore them, and worry on the tangents, and get things so mixed up that nobody can be sure where he started.

    (For example, he demands that people who say that OO is better "prove it objectively". A study was produced that did exactly that. (measuring Lines of Code/Function Point) He then went on a rant "demanding the code they used". When pointed out that the methodology was available, and he could measure it himself, he said he didn't have the time, but since the "code wasn't open" the study didn't meet his prior demands for a scientific study.

    Lather, rinse, repeat.

    Addison

  75. Perl is easy so lots of non-pro's use it by Morgaine · · Score: 2

    There is some truth in this, in the general case. When something is easy to use, you don't need to be a professional to use it. And when you're not a professional you will in general make a less-than-professional job of it, even if it looks OK to you --- you just don't have the background to judge good from bad.

    --
    "The question of whether machines can think is no more interesting than [] whether submarines can swim" - Dijkstra
  76. Re:Type checking != OO by bucketman · · Score: 1
    Smalltalk has no compile-time type-checking, yet is considered THE most OO language by many. IOW, type-checking and OO are perhaps orthogonal concepts.

    I was talking about the distinction between procedural languages and assembly. I wasn't referring to OO languages at all. My essential point is that assembly guys could make similar arguments against procedural constraints that you are regarding OO.

  77. Wrong by Tablizer · · Score: 1
    Basically, the author concludes that OOP isn't any good because some developers and managers aren't applying it correctly.

    Wrongo! In a nutshell, I am saying that its hype-to-proof ratio is way too high.

    I really wish the author had the confidence in the claims to actually site some hard facts and not some made up claims.

    There are no "hard facts" either way. That *is* one of the very problems I am fussing about.

    What specificly is "made up"? I agree it is missing some citations, but not on key points.

    The author mentions all of these failed business apps and blaims OOP for their problems. I guess IBM, Oracle, NASA, and some of the other big software shops are a bunch of idiots for doing any OOP.

    I am not sure which reference you are talking about. Anyhow, there is no proof that OO is better for all domains. Comparing NASA's needs to WalMarts is perhaps a bad idea, BTW.

    Most the data I have seen shows that OO is wash in system or engineering domains: no clear benefits. (The biz domain data is harder to find.) But, if its all the same, why not use procedural/relational? It is easier and more natural (IMO). It also has a lot of areas that can now be improved because of more CPU power. We don't have to be stuck in the 80's for ever WRT procedural/relational.

    BTW, it *is* dumb in my opinion to jump into something without more proof. Then again, IBM and NASA have may other mundo bloopers that prove they are only human.

    1. Re:Wrong by Mr.+Slippery · · Score: 1
      Encapsulation is done in objects, otherwise you don't have encapsulation so much as namespaces.

      Appartently you are using a strange defintion of "encapsulation" which I have never encountered before. Do we not mean by "encapsulation" the design principle of providing a module (a C++ class, a C file, any group of functions/procedures and data considered as a whole) with a set of interfaces which serve to hide implementation details? You seem to be implying that encapsulation only exists in OOP languages; I vigorously disagree.

      "Encapsulation is the process of compartmentalizing the elements of an abstraction that constitute its structure and behavior; encapsulation serves to separate the contractual interface of an abstraction and its implementation." -- Booch

      Tom Swiss | the infamous tms | http://www.infamous.net/

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    2. Re:Wrong by Malc · · Score: 1

      The MSFT IDL compiler spits out both C++ and C. It's quite interesting what the C looks like. Although possibly, and machine generated code is always bad, I would hate to try and do full OO programming in C.

    3. Re:Wrong by plastik55 · · Score: 2
      Unfortunately some people have strange hangups about language. For example RMS, for whatever reason, urges GNU programmers to write ANSI C and *only* ANSI C. So you get things like GNOME and GTK, which, though thoroughly object-oriented in design, have to be written is the object-oriented C idiom.

      Looking through the sources of GNOME and GTK is quite a trip--it *seems* well-organized, and probably is. But the language idioms used are frightening--it's C, and legal C at that, but at what cost? No one offers training in this dialect--universities use object-friendly languages when teaching object-oriented design, and businesses use object-friendly languages when they need object-oriented design.

      The clearest book on C++ I've read comes in near 1000 pages. If I want to contribute to most GNU projects, I have to generate the knowledge of their equally complicated pidgin OOP-C for myself by staring at reams of barely-commented source code. If written in C++, the code would be identically fast and have 25% the footprint, and probably fewer bugs too. But RMS says no, so they don't do it that way.

      --

      I have a positive modifier on Troll. When I mod someone Troll their karma should go UP!

    4. Re:Wrong by scrytch · · Score: 2

      Can you get these in C? Yes! File scoping is the most underappreciated feature of C

      Pray tell, how do instantiate a file at runtime?

      --

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    5. Re:Wrong by TulioSerpio · · Score: 1
      You are saying that every language/compiler that runs in a chip/VM is the same thing.

      so functional, OO, Imperative programing are all the same. Guau!

      --

      I'm from Argentina: Tango, Asado, Mate, Gaucho, Maradona, YPF

    6. Re:Wrong by TulioSerpio · · Score: 2
      I understand you now.

      but I insist. What's the point o programing in Objects in a Lenguge that doesn't support them?

      I think you must choise the Methodology AND the lenguage in response of a problem.

      In the end all code became assembler. but I won't program a SO in Java, for instance. Or Object in VB, as I see somewhere.

      --

      I'm from Argentina: Tango, Asado, Mate, Gaucho, Maradona, YPF

    7. Re:Wrong by Plisken · · Score: 1

      Some assemblers actually have Object-Oriented support. I believe later versions of TASM had some OO support.

    8. Re:Wrong by cje · · Score: 2

      You are saying that every language/compiler that runs in a chip/VM is the same thing.

      so functional, OO, Imperative programing are all the same. Guau!


      No, I'm saying that code that is based on the concepts of inheritance and polymorphism in one language is still based on the concepts of inheritance and polymorphism if it is translated into another language.

      --
      We're going down, in a spiral to the ground
    9. Re:Wrong by BlaisePascal · · Score: 1
      I think he's saying there is a difference between programming and the language.


      Functional, OO, imperative, structured, declarative, etc, programming aredesign methodologies. All of them can be used to design solutions to any computable problem and for any turing-machine compatable programming language.


      The difference between doing OO programming in C versus C++/Java/Eiffel/Smalltalk/Objective-C is not that it is impossible in C, it's that the OOPLs provide support to make it easier.


      Inheritance, for instance, takes lots of bookkeeping to keep straight. In C, you have to do it yourself -- keeping track of inherited data elements, managing vtables, writing helper functions, remembering to do "c->method(&c,args...)" instead of "method(&c,args)", etc. C++ makes it easier: the bookkeeping happens behind the scenes, the helper functions are hidden, and method invocation becomes "c.method(args...)". Easier? Yes. Impossible without? No.

    10. Re:Wrong by elflord · · Score: 2
      Of course it "supports" them. It's just not as easy as it is in other languages. As has been pointed out before, creative use of function pointers in C can be used to implement polymorphism and "dynamic binding."

      If you want to look at it that way, I suppose assembly language is "object oriented". It's important to distinguish between language features to support a concept, and the existence of idioms to do the same. The more complex the idioms, the more desirable it becomes to use a language that provides the functionality in the semantics of the language. That's why not many people write OO code in assembly.

      Surely the output C code was no less "object-oriented" than the C++ code it was generated from.

      I bet you wouldn't even want to write it or maintain it though.

    11. Re:Wrong by pod · · Score: 1

      Exactly. The earliest C++ compilers were nothing more than wrappers translating C++ to C and handing off the C code to a compiler. All of this eventually boils bown to assembly code; in fact a friend of mine wrote a mini-os in assembly for a university assignment that actually did simple inheritance. Despite what it seems it's not rocket science, and if you think about it for a minute you'll relize it isn't. A creative application of function pointers simulates very well what C++ does with objects and inheritance, it just doesn't look as pretty and polished.

      --
      "Hot lesbian witches! It's fucking genius!"
    12. Re:Wrong by cje · · Score: 1

      What you're ignoring is that doing OO programming in non-OO languages means you're using a home-brew OO system which surely hasn't been designed with as much thought as true OO languages ..

      I dunno about this. Have you seen the design of some "true" OO languages? :-)

      and is also non-standard, so that anyone looking at your code or joining your project will not understand what the hell is going on.

      Unless something in the industry has changed drastically, being able to readily understand "what the hell is going on" is not a required property of the object-oriented paradigm. Some key ideas and principles, such as the already-mentioned tools of information hiding, abstraction, polymorphism, and inheritance, are what OO is about.

      Now, I'm not claiming that it's wiser to implement a large, complex OO system in C than it is to implement it in C++. All that I'm saying is that it certainly can be done, and it is no less of an object-oriented solution than its C++ counterpart is.

      --
      We're going down, in a spiral to the ground
  78. Re:Another reason ... by Devil's+Avocado · · Score: 1

    a sub routine call is always going to be a sub routine call, which has always slowed down CPUs.

    Unless it's inlined. Really clever C++ compilers (www.kai.com) can optimize away whole classes.

    Not that any of this matters a damn. The future belongs to dynamic, very high level languages like Python. Real programmers worry about complexity, not performance.

    -DA

  79. dood asm, man by chompz · · Score: 1

    Try programming in ASM sometime, you might realize the usefulness of abstraction... Actually, why don't you read The Mythical Man Month by Fred Brooks, it'll probally be educational to anyone trying to say OOP is not a good thing in most cases. For a small program, it isn't very practical, but as the code base grows, the time required to maintain a list of a thousand functions grows, and it gets increasingly difficult to actually improve the software, too much time is spend debugging and causing more bugs. OOP may not be the most efficient thing in the world, but c++ compilers are improving greatly which results in better machine code, which means better speed. Don't get down on Objectifying software projects just because OLD compilers do not handle it well. People need readable code, and OOP concepts help keep the human side of programming managable.

    --
    Spring is here. Don't believe me, look outside!
  80. I am NOT against abstraction by Tablizer · · Score: 1

    [quote] Plus, OOP is one way to make having multiple programmers work on the project more likely to be productive. When programs can be broken down into clean interfaced modules then different programmers can work on them with much less coordination than in pure structured programming. In my experience writing BIG BUSINESS in house apps (as opposed to the author's small and medium business) the procedural COBOL work is in some ways organized in an intuitive parallel to OOP. [end quote]

    Modules are not OOP-only constructs. You seem to be talking about the benefits of modules, and not OOP.

    I notice that OO tends to break things into noun-centric modules while procedural tends to break things into verb-centric modules. I feel more comfortable with verb-centricity (code-wise) in many cases because verbs are more stable a base than variation-based OO nouns. (The criteria for the variations is often too dynamic.)

    IOW, a task will always remain a task, but a noun taxonomy is subject to violent changes. Plus, many operations involve multiple nouns. If you notice, sentences tend to have only one verb, but many nouns. Thus, you often face the problem of which noun to associate a verb with. (See the "aspects" webpage.)

    [quote] I wonder how the next programmer to maintain the author's code will feel about his objection to abstraction and separating the project into self-contained pieces. [end quote]

    I am NOT against abstraction, just OO's brand of it. I think tables make a very nice abstraction tool because they are not tied to single-listic relationships the way that OO tends to be.

  81. Re:The biggest problem with OOP by enneff · · Score: 1

    Only if you're absolutely retarded will this happen.

  82. Re:"You won't need it" by HarpMan · · Score: 1

    OK, I totally agree with that. As long as you follow the OnceAndOnlyOnce rule rigorously, everything's kosher.

    On a side note:
    One legitimate criticism of 'classic' OO is that it places too much emphasis inheritence hierarchies. Some kinds of behavior, however, occurs at 'right angles' to the inheritence hierarchy. Common algorithms like sorting, or policy things like error logging, transactions, etc. These things tend to occurr all over the place, but don't always have a clear place in the inheritence hierarchy. Generic programming (templates) and aspect-oriented programming are two attempts to mitigate this problem; I think they hold a lot of promise.

    --
    Stephen Molitor steve_molitor@yahoo.com
  83. correction by Tablizer · · Score: 1

    "IBM and NASA have may other mundo bloopers"

    Should be:

    "IBM and NASA have made other mundo bloopers"

    "Other" as in not directly related to OO.

  84. This stuff is outdated! by _bernie · · Score: 1

    It's already 5 years that OOP design has lost its hype.

    Get some recent books on C++ or general design
    topics and you'll see that the focus has already moved away from classic OOP. Today's hype is mostly for generic programming (which I second) and design patterns (which I don't like that much). There are *lots* of books suggesting *NOT* to abuse inheritance and other OOP techniques of the past. Yes, even simple
    inheritance is bad if it leads to a deep hierarchy.

    //BernardoInnocenti

    --
    Bernie Innocenti - http://codewiz.org/
  85. Re:Article Only Proves Low Education Level by ftobin · · Score: 2

    On the other hand, Perl powers Slashdot, so I guess this is the place for the procedural approach to have its message heard. In fact, Slashdot totally vindicates the article: its non-OOP approach is fast, effective, efficient, and easy-to-understand. Highly scalable and expandable as well. I especially like Slash.pm (aka THE BEAST) and the my_conf{shit} variable. I'm sure the non-OOP approach will really take off once everyone switches over from C++/Java to Perl.

    I wouldn't put down those who write in Perl that much as being anti-OOP. There are many, many of us who write and like OOP in Perl (it's especially useful to read Damian Conway's "Object Oriented Perl" to see the beauty of Perl's OOP.)

    OOP in Perl, actually, is much more fun than other languages because of it's flexibility. For instance, Class::MethodMaker is capable of creating accessor methods for various types of data members of objects at compile-time; this is a beautiful thing. Perl's flexibility has a whole lot of other things that allow fantastic OOP, and "Object Oriented Perl" expounds on much of this.

  86. it was a typo by Tablizer · · Score: 1

    it was meant to be "end quote"

    I think the double-angle style is nice for text, but slashdot does not like the right side. Bummer.

    There are too many messages for me to use direct HTML, thus I need a nice text shortcut. Any ideas?

  87. Nah. by addison · · Score: 1
    Bryce was lecturing Tom Christenson on PERL, and how it was designed, and what the programmers were thinking.

    (The Deja.com archives are down, else I'd try and link to that).

    He's also IIRC called Turing, Meyer and Dyjstra idiots....

    No, Bryce is the only expert, we've established that well.

    http://pub1.ezboard.com/fobjectorienteddevelopment languagewars.showMessage?topicID=175.topic&index=2 2

    That forum has lots of good posts...

    But no.. no amount of real world examples will make him back down - he's unable to consider the ability to back down. The German WWII high command retreated more than Bryce. :)

    Addison

  88. Free of the Tree, socket and rocket in your pocket by Tablizer · · Score: 1

    This is outside of my target domain, but it kind of reminds me of issues in collection access interfaces.

    What I have decided is that a taxonomy of "types" of collections, or pipes/streams in your case, is an insufficient model.

    Perhaps you could model them as a bag of *indepedent* features rather than try to filter them through a hierarchical taxonomy.

    That way you can get new combinations without making a new node on a tree. The number of combinations you can get this way is astronomically greater than a tree will give you. You can get dogcats and horsebirds and boatcars, etc. (Some combinations may not make sense, but such spots may not fit a hierarchy anyhow.)

    You are then freed of the artificial restraints of tree-based taxonomies.

    I apply a similar philoshopies to business applications. My bank and publications example illustrates this concept.

    Think about it. Could it work for sockets/streams?

  89. Re:GIGO by Maurice · · Score: 1

    That's because you sir, are an idiot.

    Thank you.

  90. what is wrong with handles? by Tablizer · · Score: 1
    For a better idea of how non-OOP burdens programmers, try writing an application for Windows, without using any frameworks.

    Any paradigm would suck for GUI's without a framework. Besides, writing GUI's is outside of the domain of most of my criticism. Even if OO was good for writing GUI frameworks, that does NOT mean it is also good for writing everything else.

    Whenever you talk to the OS, you're always having to pass a handle as the first parameter! This just screams: this should be OOP.

    Why is that? What is wrong with handles?

  91. Only about 11 yrs in mainstream by Tablizer · · Score: 1
    it's been around (and used successfully) for over fifteen years?

    It has only been mainstream for about 11. The fat-client fad has/had been around for about the same, and is now fading.

    I agree that OO has it's place, but that place is not everywhere.

  92. Re:Can someone verify this? by JWhitlock · · Score: 1

    Sorry, never really look at the UIDs. I point out that he stated he was "posting anonymously to preserve my precious karma". Since he did NOT post anonymously, it seemed a bit like reverse psycology, daring the moderators to mod it up.

    My only regret is that I responded not to the poster but to the comment - in the future, I'll try to address my comments to the poster rather than the SlashDot community at large.

  93. The Defense is Self Evident by Skip666Kent · · Score: 2

    You're soaking in it, and probably have been for years!

    The chief objective of computer programming is too create useful things. Elegance is tremendously valuable but secondary. NO OTHER interactive message board has come close to Slashdot in terms of useability, readability and even whiz-bang features.

    --
    **>>BELCH
  94. Re:Article Only Proves Low Education Level by Shotgun · · Score: 2

    How small is a small business app?

    Didn't the author say that this is a question that needs study?

    We have both enterprise-scale and small-business scale versions, but neither would survive long as a procedural app.

    And your still a software house building apps for other businesses. The software you produce is your product, so you expect to extend and improve upon it. You don't expect to throw it away at the end of the quarter/project/fiscal year. It wouldn't last long as a procedural app, but the authors point was that most of the software he has been commissioned to produce doesn't last long...period.

    Moreover, the enterprise "niche" is the greater part of the software market.

    Your point being...?

    There's no reason to object-orient the shitty little linux apps that you use, since they are usually 1-2 wannabe code monkeys writing bad C++.

    OK. A personal attack. So if someone disagrees with you then their applications are shitty and they are code monkeys. Or is it that when someone buys the hype and uses the it-applies-to-everything sledge hammer to build a picture frame and ends up with a mess, then they are wannabe carpenters. Oh, and by the way, Chevy's suck.

    Any multi-employee project requires the kind of abstraction that only OOP provides.

    So you're saying that there are no large projects except those using OOP techniques?

    I read as much of the article as I could stomach before his baseless graphs and lack of data made me stop, but I saw enough to know an Epsilon Minus Semi-Moron trying to sound academic.

    You couldn't stomach what he had to say because it challenged your close minded view of the world. The author didn't present data, because (as he repeatedly pointed out) there is no data to present. OOP is hyped as the next big thing, but no one has studied the parameters of when, why, and where it is successful in any meaningful way. He stessed at the start of the article that he was presenting his view of the world and where he was oriented in order to have that view. His article was a data point and asked questions. Scientist and academics don't just present data, they also gather, analyze and question data and assumptions. Assholes and idiots, on the other hand, resort to name calling and flaming when their ideas of their own superiority is called into question.

    It was a pathetic article, and anyone with a college degree and a smidgen of programming experience would tell you the same thing. It certainly provided a lot of laughs in my office.

    There are a lot of people with college degrees and lots of programming experience who would say that it is a quite well thought out article. Many with the same credentials would say that the article is mediocre flaimbait. Either way, if this is what produces laughs in your office, then you need counseling.

    Overall, the author tried to point out that no language is appropriate for all projects and tried to set parameters where one language/style of programming would be better than others. Of course, some people who only know OOP, believe that OOP solves everything and get upset when someone suggest differently.

    --
    Aah, change is good. -- Rafiki
    Yeah, but it ain't easy. -- Simba
  95. Re:New Myth: OO would have prevented Y2K by RoninM · · Score: 1

    I saw it, and I'm still disputing your estimation. Saying "average" doesn't make it more truthful. If there are more exceptions to your rule than there are "average" cases, you have an ill-computed average. The vast majority of software I see in commercial settings is several years old, generally more than 3, almost without exception 2. Businesses, especially small ones, are reluctant to put money into upgrades if the current system is working fine. The amount of work available during the Y2K scare is also representative. Some people might have been writing programs that weren't Y2K compliant as last as 1998 and 1999, but it doesn't strike me as too terribly likely. Y2K might be the only reason your figure holds true, since a lot of antiquated systems were updated or replaced in the past two years. However, I still have my doubts, here. Even video stores and pizza parlors are using software 4 or more years old.

    --
    If a corporation is a personhood, is owning stock slavery?
  96. C++ is Middle Ground by Nepre · · Score: 1

    I prefer procedural programming, but I still use C++. It's not a contradiction.

    C++ supports *both*.

    In my opinion, that's one of the reasons the language has been so successful. It allows a programmer to use the programming model that best solves the problem.

  97. If popularity == Good, then hug NT by Tablizer · · Score: 1

    (* ... *) = quotings

    (* That these are myths is only claimed with his opinion, not proven with evidence. *)

    I have rarely seen a "common myths" list in literature that gave references for all the myths.

    Why do you hold me to a higher standard?

    (* His own pet hate about the massive growth of OO over the last decade directly contradicts this claim. *)

    If popularity == Good, then hug NT

    (* [re: case statements]
    This is an algorithmic issue; the Command pattern is one OO approach to achieve this, there are non OO approaches that could also do the same (function pointers in C) *)

    That is NOT ridding the complexity, only changing the nature of them. It simply exchanges one type of "list repetition" for another.

    (* The posting history of this identity, demonstrates a single narrow minded obsession with ignoring the evidence *)

    What evidence? Your anecdotes? Anecdotes are nearly useless as proof unless you place them in a statistical context.

  98. Re:GUI's vs GUIs by Graspee_Leemoor · · Score: 1

    No, bub, you're completely wrong. That's why the 's' is smaller, to separate it from the main word. (The only "excuse" for the apostrophe was to separate things out so it was clearer that you were referring for example, to CDs == more than one CD, instead of CDS == some acronym for something.

    >>An apostrophe is commonly used to denote plural for acronyms and such, hence it is perfectly correct

    Ever heard of logic, bub? MS Frontpage is "commonly used" to write web pages, but it doesn't mean it's correct (or even sane). The word "it's" meaning "belonging to it" is "commonly" written with an apostrophe, despite its (haha) being completely INcorrect.

    Check "Fowler's Modern English Usage" if you doubt me.

    Not only that, but the author of the article writes things like:

    "...just as messy and more confusing than it's competitors"

    (There are loads of incorrect "it's" in the document).

    "1980's languages"

    (Nuh Nerrrrrr. Wrong again!)

    "Even OOP's goal's are not clear"

    (How anyone can even *start* to justify the above is beyond me. It's a simple fucking plural you great fat illiterate fucking god-damn lobster-dating fuckwit, sponge-for-brains!)

    As I said in an earlier post, (regarding the author of the original article): How can we take seriously a person's views on language semantics when he can't even use the syntax of the language he's trying to convey those ideas in? And don't give me that "maybe English isn't his native language" nonsense, because if he's German he could have written the article in German and I'd point out grammatical mistakes in that... (Except that it's mostly English Language lusers who can't use their own language).

    And don't moderate this down, because I'm damn-well right. I can let all sorts of bad grammar pass in ordinary posts, but when some fool tries to "inform" slashdot readers of grammatical rules and is wrong, I WILL NOT LET IT PASS.

    Thus the great lemur spoke, and lo! the people beheld his words and were in awe!

    Graspee

    So, as we can see, he obviously has no clue, just like 90% of Slashdot readers

  99. self-fulfilling prophecy by Tablizer · · Score: 1

    Again, I would have to look at your specific case in detail.

    Perhaps your previous procedural approach was crap. Often when I examine such claims, I find bad procedural/relational programming techniques. It is not taught/updated anymore because it fell out of style.

    Self-fulfilling prophecy

    Also, see the links on my webpage about code resuse.

    Generally I find anything that cannot make use of deep inheritance hierarchies to have just as much re-use potential as OO would. Thus rule of thumb has never proven me wrong yet.

  100. This Goes Back to one thing by jjr · · Score: 2

    How people like just get it instead of getting gone right. If you start your project does not matter which language you use or the programing method as long as you choose the right right for the job. At school people are always asking way I use c instead of c++ I simply say I do not need c++ right now therefore I do not use it.

  101. Re:Some zealottery is good by BeanThere · · Score: 2

    But what evidence do you have that these concepts lead to good design

    Holy cow, did you even read the part of my post you are quoting? I said it DOESNT lead to good design. Good design has nothing to do with the paradigm you're using. You must have been in a seperate universe or something when you read my post, you've missed the whole point.

  102. Re:OOP can be good by Srin+Tuar · · Score: 1
    Well I would say that you really have to understand what type of code you are going to be generating.

    If you have a good foundation in C and C++, you can imagine how all the C++ code will be "translated" into C code, and then from there into assembly. (C++ code is not really translated into C) This allows you to create efficient code, because you can tell when using an object poorly will result in inefficiency.

    For example, using a call such as

    cout << "hello" << 59 << 10.2;

    uses 3 function calls, whereas

    printf( "hello%d%f", 59, 10.2 );

    uses only 1, and is more efficient overall.

    The other aspect, designing good object abstractions is much more subtle. Some people seem to come at it naturally, others never do. I suspect the answer is simple: If you like creating object heirarchies, and are flexible in changing them when you realize that they are flawed, you should do well. The only way to get good at that is to practice it. You will feel the point when your designs are more often helpful than harmful.

  103. granularity of differences by Tablizer · · Score: 1
    The guy who wrote the article missed one of the most important aspects of OO, and that's _interface_ inheritance. Interface inheritance is _NOT_ subtyping, and is vastly more flexible and usable than subtyping, which seemed to be one of his big gripes. If you want to know more about interface inheritance, look at my page at

    http://members.wri.com/johnnyb/comppapers/factorin ginheritance.html

    The link appears to be down right now.

    Anyhow, it is still the same problem of trying to squeeze differences into mutually-exclusive subtypes. The differences in "things" often need a finer granularity than what is offered by subclassing.

    Interface inheritance is little more than inheritance without teeth IMO.

  104. 4- interesting?!?!?!?!? by Graspee_Leemoor · · Score: 1

    So admitting to being the author of the original article and then restating things in that article gets you a "4- interesting" these days? WTF is the world coming to?

    Graspee

  105. I'm still waiting...... by addison · · Score: 1

    For the proof that its not.

    You've been served with objective proof against your point before - that you've ignored. I don't have the original link - but you do, don't you? Post it for everybody to see.. then we can post the links that you had in rebuttal..... :)

    You're making a statement. Its your job to back it up.

    If all you do is "jump up and rub it in" without any backing.. then... you're a troll.

    Addison

  106. Re:insults != wrong by Graspee_Leemoor · · Score: 1

    >>I might have a big mouth, but that does NOT
    make me wrong.

    Well, yeah, but the fact that both are true can't be mere coincidence...

    Graspee

    P.S. OK, so I'm not actually *advancing the argument* here, but since he put "Ah, poor widdle kid. " he deserved to be given a slap. All those in agreement, say "Aye!"

  107. Re:GUI's vs GUIs by FunkyChild · · Score: 2

    I think you'd better have a look at this, pal.

    http://www.angryflower.com/bobsqu.gif

    Apostrophes are certainly NOT used for plaurals in any way, shape or form! I think I know who needs a slap in the face...

  108. The article wasn't worth reading anyways by ChessProzac · · Score: 1

    Totally not worth reading. It was just some happy-to-spout-out-idiotic-nonsense that probably wrote part of the Linux kernel. OOP is what builds nice software. It makes things nice and neat. That guy just didn't get the idea. Scott Lloyd

    --
    Long live Microsoft!
  109. Re:Vote Self Authority != Proof by Graspee_Leemoor · · Score: 1

    You don't even have the "smarts" to be able to use apostrophes correctly so I suggest you cease and desist...

    Nobody will ever come up with 3 "biz app/model proofs" that satisfy you because even if they were damn good you would just nitpick.

    You just don't sem to realize that there are some things which cannot be "proven" in a scientific way.

    Asking someone to "proove" that OO is superior is like asking someone to proove that John Donne's poetry is more sophisticated than Shakespeare's, because:

    a) whether it *actually is* is partially a matter of personal preference

    b) The reasons why it is are abstract and not quantifiable.

    You can't go round counting lines of code or timing how long projects take to write. What are you some Dilbertian nightmare IT manager?

    Graspee

  110. ALL LINUX USERS ARE IDIOTS TOO by ChessProzac · · Score: 1

    You forgot about them being idiots as well as criminals. Scott

    --
    Long live Microsoft!
  111. If Anyone Wants to Continue OOP Debate by Tablizer · · Score: 1

    you can find me at:

    http://pub1.ezboard.com/bobjectorienteddevelopme nt

    It is a good place to get into nitty gritty details (although the message ordering is a little weird there).

  112. Re:does size matter? by timcuth · · Score: 1

    Well, I was in a very large corporation (I'll tell - it was BellSouth). We started our project at a departmental level, using Visual Works Smalltalk on Windows and HP-UX.

    We brought in several teams of tutors/mentors to get us going with OOP and OOD. We "got it" and things were going very well. Within a few months, we had a highly functional demo of what our end result could look like and do.

    Then, the big corporation management saw that we were having some success and decided to fold us in to a corporate-wide project. We were told that Smalltalk would no longer be used and that the project would shift to C++. We were retrained.

    Even though we had our experience with Smalltalk and OOD, HUGE teams of consultants were brought in and we were told to do everything differently. They bought tons of equipment. We were forced to work in other cities for weeks at a stretch. Because of the largeness of the project, NOTHING was ever finalized.

    After about a year of this, all of the old, departmental Smalltalk team begged to be released from that project and found new jobs within BellSouth (some dis quit and go elsewhere). A couple of years later, I ran into someone in the corporate project and I found out that the original Smalltalk demo we had produced was still the only real output. Even better, the management of the big project still used it to show off what "they" were able to accomplish!

    He did mention some things along these lines in the article. (It has been several days since I read it, so I don't remember the specifics). I am generally talking about the parts where he was emphasizing that everyone on the project has to buy in to the same methodology and have excellent team-wide cooperation. IMHO, the larger the team, the lower the liklihood of this occurring.

  113. Re:Goodwin Oriented Programming by JWhitlock · · Score: 1

    Hmmm. I have to admit, there may be biz applications where other techniques are more effective, faster, etc than OOP. But I find, as complexity increases, it is important to start thinking in terms of seperate, smaller units communicating through interfaces, or atomic peices being acted on by functions or procedures. I've worked with procedural code, some of it quite complex, and written by several people. The best procedural code, the code that was easiest to modify and had the least errors, worked under a small component model. On the other hand, the stream-of-consciouness code, where the structure of the data and code was not thought out, was the most error prone, the hardest to debug, and the most difficult to change.

    If I had a OOP language like C++ availible on the machine (which only had Fortran), the "good" procedural stuff would have very easily translated into OOP, while the "bad" stuff would take quite a bit of work, requiring some reverse-engineering and redesigning. There were some parts, however, that appeared to work best in procedural code (possibly the scedulers), which we may have left alone.

    This has been my (limited) experience, that as complexity increases, thinking in an object-oriented fashion makes code cleaner and easier to maintain. This is the problem, though - you have to demonstrate a complex system, that would neccessarily be harder to understand, to prove this point. It's not enough to show a "Hello, World!" program. Mininum requirements would be a program large enough to seperate into many modules, with at least 3 non-trivial components (for instance, text processing, a GUI interface, and file management), and, once a working program is completed, try to make a modificiation. Oh, and you'd have to do it once in an OOP language/style, and once in a procedural language/style.

    It's too much to show in a quick example, and businesses don't have the resources to do both, just to prove it to themselves. It's a little like the Windows/Linux debate - neither arguement is convincing unless you try both, but who has the time in a business environment to experiment with operating systems/languages, in a fair and balanced way? If that's the case, then your business is probably in trouble, because you don't have enough work to do!

  114. Bertrand Meyer is a "strawman"? by Tablizer · · Score: 1

    (* I read numerous IT journals and periodicals and I have not encountered anyone uttering these alleged myths. *)

    Well I *have*.

    (* "Myth: OOP is a proven general-purpose technique "
    Again, this a broad sweeping statement that I have not heard anyone assert. *)

    I just got done responding to a poster (OO fan) who AGREED with it. Go argue with him instead. QED.

    (* The idea is that polymorhism -- implemented correctly -- will eliminate the need for 'mainline' case statements that need to be amended to add new options. This is pretty straightforward. *)

    No, it is NOT straightforward. It often exchanges one type of duplication for another. See my Shapes webpage.

    (* Myth: Only OO databases can store large, multimedia data
    Not even OO vendors say such a thing. Another straw man. *)

    From Meyer's OOSC2:

    Page 1051, "[relational DB] types are drawn from a small group of predefined possibilities (integers, strings, dates...), each with fixed space requirements."

    I have also read similar implications in trade rags.

    (* Myth: C is the best procedural can get.
    Did you make this assertion up ? *)

    Examples comparing C to C++ and indirectly implying the differences are paradigm differences are very common.

    (* The salient facts are the sizes of the applications and their data oriented nature. *)

    OO proponents disagree widely about whether OO only shines (signif) for larger projects.

    (* OO has been around since the late '60s (Simula) and C++ (the most popular OO language in industry) is more than 20 years old. *)

    I was talking about entering mainstream, not its birth. The fat client fad also lasted about 11 years before showing a decline.

    (* VB for the interface, C++ for the actual application logic. This was the case even before VB4 when some OO support was introduced. *)

    C++ for business logic? Yuk! That is not what C++ is meant for IMO. VB, Java, and even COBOL are probably a better fit than C++.

    (* Have you actually had any experience with a business system that has several hundred "entities" (in the relational modelling sense of the word). I can tell you -- as can many case studies that you obviously don't nother to read -- that OO greatly aids in the management of the complexity that several hundred interrelated entries presents.*)

    Bullsh*t!

    OO only makes a difference if there are useful hierarchies in the model. If not, then the relationships in both paradigms will be very similar.

    You called me a million names, but STILL gave no inspectable proof that OO is better.

    Typical. All talk, no walk.

    BTW, there are other issues besides the "myths" that would make more interesting technical debates (like method boundaries). However, you would rather dwell on social aspects and resume bragging it seems.

  115. Further Brycism by BePatient · · Score: 1

    Show me your proof! This is yelled incessantly at all who disagree. However, Bryce is not capable of proving his points because he has been shown time and time again to not know anything about object oriented programming. If I spout enough nonsense about a certain subject...one or 2 points may actually sound resonable...even if I don't know what the hell I'm saying.

  116. too many things to pass around? by Tablizer · · Score: 1

    (* GUIs are OOP? *)

    I don't remember claiming that.

    (* Where I find OOP useful is in constructing frameworks. The standard Python libraries are a fantastic mix of procedural and object oriented. For example, take file-like objects. Where some task involves stream-oriented actions, file-like objects are provided. They can then be used by other code that expects file objects. *)

    That is a systems programming domain, which is outside of my complaint scope. Being good in domain X does not necessarily translate into being good for domain Y.

    Anyhow, I talked about sockets and streams a little bit in another message around here somewhere.

    (* There are just too many things to pass around and remember [in procedural]. *)

    Huh? Example? What are you passing around? Perhaps I can give you some procedural/relational tips.

  117. attack ideas, not people by Tablizer · · Score: 1
    Bryce was lecturing Tom Christenson on PERL, and how it was designed, and what the programmers were thinking.

    An exaggeration. Anyhow, Perl is KNOWN to have problems WRT readability. People tend to find languages and paradigms that fit their own way of thinking and organizing. A lot of programmers have trouble reading their OWN Perl a year after they wrote it. As it goes/went mainstream, how non-diehards react to it *is* important. That was my main point.

    He's also IIRC called Turing, Meyer and Dyjstra idiots....

    Now where did I call Turing and idiot? You are WRONG. Your memory has failed you before. Why should one believe you now?

    But no.. no amount of real world examples will make him back down

    How do you know? So far you have only tried ZERO. How can you extrapolate zero into many?

    Addison, you are an unscientific jerk.

    BTW, learn to attack ideas, not the person. What do perl debates have to do with this? A point I make about OO should stand because it stands, not because of something else the author said. It is evidence of Addison's club mentality.

  118. Orbix? Yuck! by Malc · · Score: 2

    Orbix. Bwwhahahaha! We ditched that for TAO (a free open source, standards complient ORB). Even if Orbix were the fastest, the cost you pay in bugs, non-standard implementation and dreadful customer more than outweighs any benefits.

    It's 2 years since I used it. Back then it felt like a bad port from UNIX to Win32. We couldn't have any COM DLLs talking to our CORBA services. Why? Orbix spawned some threads and provided no way of deleting them. This caused crashes when the COM DLL unloaded, or it caused a crash on exit as the process shut down. Unusable.

  119. object / functional programing by node3667 · · Score: 1
    I think we can do good code both in object and functional programing.

    However, the object orientation, well used, tends to produce a more readable code, a more reusable code. The reusability of a code is very important. Doing a perl module and submiting it, is better than doing a quick and dirty script to do the job. Plus, I think this is a good exercice to the programer, as the usual approach is functional. It helps structuring code.

    Of course, it takes more time.

    The benefice for the community is an objective to keep in mind.

    xavier.

  120. Re:Article Only Proves Low Education Level by sohp · · Score: 1
    Many others have done a fine job pointing out the problems with this rant and its author. I'd like to ask this question: Why did CmdrTaco post something so ill-considered? Could it be that he's realized that he can't blithely bash Java because a good chunk of his constituency will call him on it? Does he think that taking a step back and bashing all of OOP will garner more adulation?

    It's clear that the slashdot community includes a healthy portion of experienced professional programmers who know their craft and aren't afraid to call flamebait flamebait.

    Yes, I've poked through slashcode, I know a bit out Taco's mad skillz. I also know that every single programming shop I've been in for the past 5 years has used object-oriented programming to a greater or lesser degree. I've even worked in multiple shops doing object-oriented (gasp) Perl.

    Let me leave you with this. There really is a paradigm shift in going from procedural to object-oriented thinking. Those that get, by hook or by crook, to that Aha! find a whole new world, like Columbus, but this one has been charted and mapped -- somewhat -- by thousands of those their predecessors who, like myself, are more than happy to guide them through the scenic areas. Those that don't cross that ocean are like the critics of Copernicus, zealously insisting that the Earth is the center of the universe, while it blithely turns in its orbit, oblivious to their holy war.

  121. Re:What are you talking about? by Malcontent · · Score: 1

    Man you know by now he is unable to grasp concepts like this. This guy is an idiot and he just rolled slashdot, he has a huge notch in his belt you think he actually cares about the truth?

    --

    War is necrophilia.

  122. I said *good* objective proof by Tablizer · · Score: 1
    You've been served with objective proof against your point before - that you've ignored.

    If you are talking about Capers Jones LOC study, it is not a good one as I already described on my website.

    Just because you can measure a number does not mean it is a meaningful number. At the turn of the century they used to measure intelligence via head circumference. Now, that *is* indeed "objective" because 2 different measurers will get the same result. However, that is not the same as being a good metric for intelligence. This is essentially the problem with the Jones study. Besides, LOC is only one metric. There are several other key metrics missing.

    I don't know why Addison is bringing up messy areas from past debates. He is just pissed because he cannot produce 3 examples of superior biz OO code. (Not even one so far).

    1. Re:I said *good* objective proof by BePatient · · Score: 1

      Oh..so he hasn't provided any examples of superior OO code...much the same as you never having produced ANY examples of the mythical ITOP code, eh? Same crap for you...now you've just brought this stupid debate to a much wider audience.

  123. Dark Ages of Computer Science by Tablizer · · Score: 1

    >> I'm quite sure you don't remember your paper getting a point by point dissection from people like Tom Christiansen, Randall Schwartz, Tad McClellan, and Uri (God Love Him). Of course, those are folks who generaly Know What They Are Talking About. <<

    It is mostly subjective anyhow. There is no agreed-upon standard algorithm that you can dump a language definition into and out pops a "goodness" score.

    Computer Science is in the dark ages WRT measuring the merits of languages and paradigms.

    Kingdoms simply fight over doctrine and territory.

    To pretend like it is a science and quote "experts" is deceiving yourself. It is a turf war and a religious war.

    Science, where for art thou?

  124. Re:change mind to fit paradigm, or visa verse? by Tablizer · · Score: 1

    (* What is clear, is that when looking at a system most programmers I encounter start to think about the functions that it should carry out. *)

    IMO, this models the business world well because things or features are often assigned as tasks. "Make the computer do X" is a common request format. Even in business projects you bring people and teams together to get a certain something done. The OO approach tends to scatter the task-oriented info all over the place.

    IOW, it over-emphasizes WHO does something instead of WHAT needs to be done it feels to me. This bothers me about OO thinking. "Who" is less important than "what" in a good many cases.

    (* That was the crux of my point. OO might be the theoretical correct way to do things, but actually there are two ways to thin[k] about the architecture of a solution (functional decomposition or entity decomposition) and the thought processes right at the start need to follow the second approach. *)

    Why the second?

    Often it seems like an orthogonal tug-of-war. The "noun" aspect and the "verb" (task) aspect are indeed both important. However, one is not clearly more important than the other. It is sort of a ying-yang thing: both are needed, but one should never have full control.

    Neither paradigm brings both together in a hormonious way. One is simply forced to choose one to dominate over the other. (Given a choice, I usually prefer task-orientation for the code and noun-orientation for the tables.)

    Note that this is how discussions *should* flow IMO. Mutual respect for people's opinions and a desire to understand the other side. "Why does X bother you?" is less rattling than "Who of importance says such? Where is your citation?"

    Thanks

  125. re: IEEE and ACM studies by Tablizer · · Score: 1
    Also if you plan on making such bold statements you really should back youself up with references.

    There are no reference because there is NO PROOF. Simple.

    IEEE and ACM have many good articles on OOD/OOP/OO Metrics.

    IIRC, these either were for comparing one OOP language to another OOP language, or they were only comparing engineering applications, a single domain. Most of them also focused on C (yuk). C is optimized for productive machines, not productive programmers IMO.

  126. Re:OOP...in BASIC? by Chester+K · · Score: 2

    A company named Thoroughbred has an Object-Oriented programming environment built around Basic called OpenWorkshop. The company I work for has a several million lines of code written in it.

    Now, I'll be the first to admit, their idea of "objects" strains the definition a bit, but with a very loose interpretation of what OOP is, this fits the bill.

    --

    NO CARRIER
  127. Re:more empty claims by smack.addict · · Score: 2
    Well, I will pit well-designed procedural/relational apps against well-designed OO apps any day.

    I would claim that any well-designed procedural app looks a hell of a lot like an OO app. Relational and object are technologies that can go together, they are not mutually exclusive concepts.

    I see nothing inherant in OO that really improves maintenance in the business domain. Inheritance does not model business things well, and OO's version of HAS-A is messier than procedural IMO because you have to have an object reference attached to lots of stuff and find a class to stick every method into, even if it should be self-standing.

    Inheritance != OO. Inheritance is a necessary property of an OO language, but that does not mean one should use inheritance every chance you get. Properly used inheritance is like a good spice--use it sparingly. A sign of a bad OO system is one with deep and/or complex inheritance hierarchies.

    The advantage OO has is that it is a discipline that describes how you write well-designed components. Procedural is not analagous to OO, as it does not prescribe in any way how you properly design your code.

  128. Does Design Patterns better also by Tablizer · · Score: 1

    The procedural/relational versions of relevant OOP GOF patterns are simpler to manage, view, and construct IMO.

    ( http://www.geocities.com/tablizer/prpats.htm )

    OO Visitor scared me right back into the friendly arms of procedural/relational. Viva Tables!

    OOVisitor makes GOTO's look friendly.

  129. Re:Find what you look for by Graspee_Leemoor · · Score: 1

    >>This "Real programmers don't use " is getting tired.

    ...unless you finish with one of the following words:

    a) cobol
    b) decaff
    c) soap
    d) sleep

    ...in which case it is hilarious and should get modded up +3 at least.

  130. wonderful things may happen when mindfit by Tablizer · · Score: 1
    I was talking about the distinction between procedural languages and assembly. I wasn't referring to OO languages at all. My essential point is that assembly guys could make similar arguments against procedural constraints that you are regarding OO.

    If they are more productive under assembler and can easily read each other's code, I have no problem with that. I do not wish to dictate how to make programmers productive, because most know what kinds of tools and languages they work best under.

    However, the trick is sometimes finding like-minded members for teams. Languages do this to some extent by attracting certain types of people to them. For example, Eiffel fans are going to approach things very different from say Smalltalk fans. Both have very different, but valid ways to reduce bugs and test.

    (I am still not sure about Perl. Can most heavy-Perl fans easily read and fix each other's code? The "more than one way to do things" philosophy means that their may be whole different levels of sub-cultures within Perl thinking. Almost a "build your own language". I don't get it. It still seems to emphasize writing over reading IMO.)

  131. Read more carefully, please by MegaFur · · Score: 1

    Hey you commenter, people...

    Yes, the article is overzelous.
    Yes, the article is light on raw data...

    However, buried in with all the noise are a few actual valid points and interesting concepts.

    First, there's the point that OOP isn't necessarily the right way to solve every problem. Second, there's the point that if you want to argue that OOP is unconditionally better than procedural, you *shouldn't* use C as an example of procedural, b/c C isn't very representative of its group. Third, there's the interesting possibility of using some paradigm other than procedural or OOP. OOP isn't necessarilly the only way to support info-hiding and such like.

    --
    Furry cows moo and decompress.
  132. Re:word games by AME · · Score: 3
    Many OO debaters often stretch the meanings of the the big three (poly, inher, encap) to mean whatever they want them to mean. ... "Encapsulation" is such a vague, watered-down word that it can mean just about anything you want it to.

    Just because many people don't understand the definition does not mean that the definition is vague or watered-down.

    Anything that is "not at the right spot when you need it" can be blamed on "lack of encapsulation".

    I would more likely blame lack of coherent design. But lack of encapsulation can result from the programmer hacking his way around the encapsulation to solve the problem.

    Note that many of the goals of OO can be achieved in ways that are not necessarily OOP.

    Agreed.

    --

    --
    "I have a good idea why it's hard to verify programs. They're usually wrong." --Manuel Blum, FOCS 94
  133. Type checking != OO by Tablizer · · Score: 1
    Type-checking - pah, that's for children!

    Smalltalk has no compile-time type-checking, yet is considered THE most OO language by many.

    IOW, type-checking and OO are perhaps orthogonal concepts.

  134. Freud Oriented Programming by Tablizer · · Score: 1
    One of the basic assumptions is that the human brain is built to think about the world in terms of things that have properties and behaviour.

    Everybody thinks different. That is why flamewars break out.

    IMO, software engineering would do nice to have more psychologists in it rather than be dominated by math whizzes.

    (I will be posting a webpage one of these days about how *I* model the world in appliations.)

  135. more empty claims by Tablizer · · Score: 1
    OOP does not offer quicker time to market. It offers easier maintainability, and maintenance is where most corporate money is spent. But it only offers that maintainability if the programmers in question actually follow good OO practices--in other words, they have to be disciplined.

    Well, I will pit well-designed procedural/relational apps against well-designed OO apps any day.

    I see nothing inherant in OO that really improves maintenance in the business domain. Inheritance does not model business things well, and OO's version of HAS-A is messier than procedural IMO because you have to have an object reference attached to lots of stuff and find a class to stick every method into, even if it should be self-standing.

    Thus, what is left?

  136. Re:Not a pain? What about massive inbred inheritan by voncheesebiscuit · · Score: 1

    No language is bozo-proof. Don't blame the language, blame the bozo.

  137. Damn long article by kazzuya · · Score: 1

    Who is going to read that roll of paper ? Forget it !
    OOP debunking seems like a great waste of time itself. Better write your stories in C and publish them to GCC.

  138. Black Art? by Tablizer · · Score: 1
    whether it *actually is* is partially a matter of personal preference

    I never disagreed with this. If it is subjective, then my fav paradigm deserves tools/research/respect just as well.

    The reasons why it is are abstract and not quantifiable. You can't go round counting lines of code or timing how long projects take to write. What are you some Dilbertian nightmare IT manager?

    Those are the guys who usually pick the paradigms, for good or bad. If you can't justify OO in some quantifiable way, then it will be tossed or fade.

    Thus, metricize it, or risk kissing it goodbye.

    Welcome to business reality, dude.

  139. Re:stop dwelling on the headlines only by Graspee_Leemoor · · Score: 1

    >>Bertrand Meyer hinted this in OOSC2. (See OOSC2 critique section). Many trade rags also imply similar things. Is Berty silly then?

    Yes. Bertrand Meyer is a freak. Just look at the bondage-and-discipline language that is Eiffel and you will know it for yourself.

    Graspee

  140. Re:My view by scrytch · · Score: 2

    > To use a language (any language) you have to grok it

    I don't know why, but I just can't stop chuckling after reading that

    --

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  141. Give me objective proof and I will go away by Tablizer · · Score: 1
    Man you know by now he is unable to grasp concepts like this. This guy is an idiot and he just rolled slashdot, he has a huge notch in his belt you think he actually cares about the truth?

    Show me clear, objective proof, and I will shut up and go home.

    I don't want:

    • Zen or home-brew-Freud theories
    • Anecdote contests
    • Intra-fan votes

    I want clean, clear metrics. Examples would include lines of code, change points given a dozen typical change scenarios, etc.

    That is such a simple, basic request, but you guys simply cannot do it.

    You don't want to race your car, yet yell at me for complaining about lack of evidence that it is faster. That is what it all boils down to. If you make the claim that your car is faster, then you must agree to race it or shut up.

  142. Funny vision: Bertrand and S&M by Tablizer · · Score: 1
    Yes. Bertrand Meyer is a freak. Just look at the bondage-and-discipline language that is Eiffel and you will know it for yourself.

    I just had a vision of an S&M girl whipping Berty's behind as he crawls around reciting Eiffel philosophy.

    Somebody ought to make a little simulated movie of that. Developers would get a good laugh. (At least the non-Eiffel fans.)

  143. Devil is in the Details by Tablizer · · Score: 1
    I was specifically referring to the benefits of C++ over C

    Well, I don't have much argument there. It is not hard to beat C (depending on who ranks the metrics. What bothers person A may not bother B).

    How can you feel qualified to write an opinion piece on design technique (OOP) if you can't understand this without an example???

    Quoting OO scripture itself is not sufficient. One has to look at real-world situations. For example, RDBMS can provide data protection via triggers, referential intregity, etc. Thus, it is not an all-or-nothing thing. Protection also can create red-tape for developers. It is a delicate balancing act.

    BTW, who said anything about business programming?

    It is the main domain of the very source of this discussion.

    Where's your pennacle [sic] of procedural languages? Ada?

    I think OO hype killed progress in procedural languages. Vendors stopped tuning the procedural side and instead focused on OO-itizing them all. Thus, I am not very happy with existing procedural languages.

    1. Re:Devil is in the Details by SpinyNorman · · Score: 1

      BTW, who said anything about business programming?

      It is the main domain of the very source of this discussion.


      Of your discussion, that it.

      The VAST majority of people posting on /. are doing technical programming of one kind or another, not business programming. C++/OO is absolutely mainstream nowadays, and technical domains such as complex data structures (incl. the C++ STL), communications (sockets, etc) libraries, as well as most GUI libraries are all a very natural fit for C++ classes and an OO approach.

      A well designed business app. however is going to use the classical three-tiered model, of which only the GUI is likely to be OO. Even if the business logic layer were to use an OO design (which I'm not sure makes sense), it's hardly a rich enough domain to make use of inheritance, etc.

      If you're trying to force OO design to parts of a business app. where it's not well suited, and are further entirely limiting your discussion to that tiny corner of the C++ universe, then I'm not surprised you've concluded OO is of limited use.

      If you wanted to talk about business programming, I can't even understand why you would consider /. a relevant forum!

    2. Re:Devil is in the Details by Tablizer · · Score: 1

      >> Even if the business logic layer were to use an OO design (which I'm not sure makes sense), it's hardly a rich enough domain to make use of inheritance, etc. <<

      Rich enough? It is a very complicated environment, depending on how you measure "complicated". It is more or less trying to model the whims of the current managers in power. ("The King's head in silicone".) It is a huge graph of constantly changing dependencies.

      >> If you wanted to talk about business programming, I can't even understand why you would consider /. a relevant forum! <<

      I didn't submit it here. (I don't mind it here, but I didn't submit it.)

  144. not logical by Tablizer · · Score: 1
    Show me your proof! This is yelled incessantly at all who disagree. However, Bryce is not capable of proving his points because he has been shown time and time again to not know anything about object oriented programming.

    This does not make sense. It is YOU who needs to provide the proof, not me. I never claimed that X was objectively better.

    You can complain AFTER you present the proof. Until then, stop speculating about my future behavior.

  145. re: OO Xbase by Tablizer · · Score: 1
    OO xbase actually enabled me to reuse components and increase my productivity!

    But nobody can describe exactly HOW. How does it increase re-use over a procedural version? How are you measuring the increase? A warm feeling inside?

    The few times that people actually present something inspectible, I find that their procedural approach is not up to snuff. They were poor proceduralists (at least with what they give me to compare). They indeed do work better with OOP because their mind does not work with procedural code well it seems. They just think in objects. I don't.

    I can match it 99 percent of the time. Unlike you guys, I am not afraid to put my code where my mouth is.

    All you guys want to do is talk. Code instead. Show me code. I am NOT afraid. I can compete with your OO code "proof". I don't need government quotas to protect me.

  146. Interface focus doesn't equal reuse! by Aapje · · Score: 1

    I didn't say the interface isn't important, it is. What I meant to say is that a lot of companies are aiming at reuse, while they should be aiming at reducing maintenance costs.

    This comment says it all:
    >I don't care how a module works, only that it does.
    You want software that works. Only structured code can be debugged properly. Of course the interface should be good, so code gets used properly. But this has little do with the 'blind' aim for reuse. Companies should push their programmers to write solid code, not to reuse as much as possible.

    Reuse should be based on a commitment at the beginning of a project. A reuseable piece of code should be identified and written as such (i.e. in a general, multi-purpose way). It then should be refined and used in multiple projects. Code reuse should not be based on just ripping code out of projects. Remember the ariane-missile? It failed because of improper reuse. The code was not designed for a launch with any missile, but only with a specific one. It worked with the first missile, but not with another.

    --

    The Drowned and the Saved - Primo Levi
    1. Re:Interface focus doesn't equal reuse! by brsett · · Score: 1

      I don't disagree with anything you say in this post -- and I don't think you disagree with anything I said. But I do think it is important to note that for code to be reused, it must first be used. Code is used thru its interface only. Thus for use (much less reuse) to occur, the interface must be useful. Structuring may be important in making a piece of code work correctly without spending lots of money, but it doesn't matter if the interface is poor. I am simply wary of people who place implementation above interface. Fixing implementation is relatively easy (low impact, assuming the interface was correctly specified), changing a broken interface can bring a system to its knees (imagine if the interface to the str* function family was changed).

    2. Re:Interface focus doesn't equal reuse! by Tablizer · · Score: 1

      >> Code is used thru its interface only. Thus for use (much less reuse) to occur, the interface must be useful. <<

      I disagree. You can re-use code by making a copy and changing the design and even the interface to suit new needs. (This is actually easier than reference reuse because you don't have worry about backward compat. issues.)

      BTW, building a good, generic interface is often harder than implementation. Good, flexible, future-proof genericy is expensive to obtain.

  147. Amen Brotha! by Tablizer · · Score: 1

    I had to do a double-take to make sure I did not write that myself.

    (I swear to God, Buddha, and Darwin that I did not write that message.)

    The world is a big graph (network). Changes change in graph-like ways, not tree-wise. Trees don't hack it in this environment.

    Of course the typical OO fan response is that you "don't have to use trees with OO". But without trees, OO is like a Paul McCartny without music. It does not do or have anything really special or different about it. Modules provide similar grouping of functions (methods) and RDBMS provide the state. IOW, nothing that procedural/relational does not already easily provide.

  148. Re:Tell us something we don't already know... by pb · · Score: 1

    I'll help you to understand.

    Omitting white space really does speed it up; that's because the first thing the Perl interpreter has to do is read in the file, and if the file is shorter, it has to read less. If you *must* use some spaces, then pad it at the end and align it to a 4096 byte boundary (or at least 512 bytes). Also, when the code is tokenized, you don't have to ignore as much whitespace, or allocate as much memory as a buffer. All of these are improvements.

    Enforced scope is fine, if you only need a variable in that scope; that's what my is for. But why always deallocate and allocate off the stack when you can have a few permanent, reusable memory locations? This is especially true for replacing extra loop counters, or getting rid of variable allocation in tight loops or small subroutines. Why be so wasteful?

    Also, $m is a variable, and probably a mnemonic as well. $m2 is another $m distinct from the first. $mt2 is probably a temp variable, maybe for $m2. See the simple yet concise variable naming scheme at work?

    So I suppose this self-taught programmer also considered comments and documentation to be a waste of disk space? I'm sorry, I've done that before. Managed to delete a lot of silly code, too...
    ---
    pb Reply or e-mail; don't vaguely moderate.

    --
    pb Reply or e-mail; don't vaguely moderate.
  149. Re:Design in the Open Source world by Tablizer · · Score: 1
    GUI are much easier to code in OOP than procedurally

    Although a proof-of-concept has never really been tried, I disagree with this without proof. Sure, some of the early procedural GUI frameworks sucked, but that is because they were pioneers.

    I hate it when people make such statements without proof.

  150. Switch statements by p3d0 · · Score: 1

    They put switch statements at each call site. If you know you have three subclasses (A, B, and C) then you produce code like this:
    switch(type_id){
    case A: /* inline A's code here */
    case B: /* inline B's code here */
    case C: /* inline C's code here */
    default: /* Normal jump table thingy here */
    }

    --
    Patrick Doyle

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  151. (correction) by Tablizer · · Score: 1

    I meant "proof of concept" of a table-oriented GUI system, not a procedural one.

  152. Re:Vague Feeling Oriented Programming by angel'o'sphere · · Score: 1

    The benefit is time to market.
    If I have the chioce I use OO and C++, so I'm faster than in pascal.
    And if I have the scale of the project (+5 years running time for enhancement development) I can try to build a framework or several framelets.
    In the long run a oo development environment beats a procedural one by a 50% to 100% productivity increase, so what do you argue?

    Take a mentor and go for it, if you would know what you are talking about, you probably could indeed do somthing constructive and give advice what to do better but currently you only talk crap.

    a'o's

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  153. Re:Free of the Tree, socket and rocket in your poc by slamb · · Score: 1

    Perhaps you could model them as a bag of *indepedent* features rather than try to filter them through a hierarchical taxonomy.

    I'm not exactly sure how something like that would work.

    I suppose one way would be to have base classes like Readable, Writable, Seekable, and Selectable. Then each class, like FileStream would be derived from just the ones it implements. But that doesn't really make the problem of things appearing to do more than they can go away, because what a FileStream can do depends on what you open. Ie, you can select() on /dev/tty but not /etc/passwd. You can lseek() on /etc/passwd but not /dev/tty. And besides, it makes everything considerably more complicated to have lots of multiple inheritance involved.

    Another solution might be to make each of these -- Readable, Writable, Seekable, and Selectable -- something you get from the Stream. Ie, you have a stream and call getReadable() on it. If it returns null, you can't do that. It would give a complete picture of what the object could do, even if it changes at runtime...but it would also make it slightly more complicated to do basic operations. I don't really like that.

    My solution to this problem is to put most of these things -- read, write, seek -- all the way in the base class. I also have canRead(), canWrite(), and canSeek() members to tell me if these options are available. (If you try to use read(), write(), seek(), or tell() when they are not, a CallerLogicError is thrown.) Since the answer can change at runtime, this seems to be the only real option to me. Plus, this way makes the interface very simple and easy to understand, a big goal for my project. It doesn't perfectly model everything, but it's better than having a different set of functions for dealing with each type of stream...a complete pain to use.

    StreamSocket, on the other hand, is a dogcat. I gave an abbreviated version of my inheritance. More completely ...

    OSStream : public Stream, public virtual Descriptor
    Socket : public virtual Descriptor
    StreamSocket : public OSStream, public Socket

    ... so StreamSocket combines the attributes of a stream and the attributes of a socket. It can be closed, created, connecting, connected, or listening. (bound is not listed, it seems to be optional when either connecting or listening.) Most socket options are available in any state. Most stream options are available only when connected. I had to design the Stream interface a bit carefully so this wouldn't violate it. In particular, its isClosed() and isOpened() checks may both return false, if the StreamSocket is in one of these other states. So far, this choice works well. StreamSocket gives much of the functionality of the basic UNIX system calls already, and I see no reason it can't eventually do it all. All while being fairly easy to use.

    Anyway, thanks for the suggestion.

  154. OO is all about components??? by Tablizer · · Score: 1
    I would claim that any well-designed procedural app looks a hell of a lot like an OO app.

    How? You just got through saying that most of the time inheritance is used sparingly in good OOP?

    What is left? Encapsulation? That is a loaded issue because what aspect to "encapsulate" by is not cut and dry.

    The advantage OO has is that it is a discipline that describes how you write well-designed components.

    So OO is all about component design? That does not sound like a majority OO fan stance to me. Besides, the making of components themselves are not what most custom application programmers do. Does that mean that OO is nearly useless for them?

    Procedural is not analagous to OO, as it does not prescribe in any way how you properly design your code.

    I disagree. Procedural tends to emphasize grouping (encapsulation) by actions, while OO tends to emphasize grouping by nouns. This is perhaps an over-generalization, but seems to hold true time after time.

    1. Re:OO is all about components??? by smack.addict · · Score: 2
      You just got through saying that most of the time inheritance is used sparingly in good OOP?

      Sparingly is not the same as not at all.

      What is left? Encapsulation? That is a loaded issue because what aspect to "encapsulate" by is not cut and dry.

      Encapsulation, polymorphism, and abstraction. And encapsulation is the big piece. In OO parlance, it means to capture the data behind a concept along with its behaviors--and not expose that behavior and data willy-nilly to the public.

      So OO is all about component design?

      Not entirely, but it is the most critical element. An OO language is simply a language that maps well to OO component designs.

      But there is also OO analysis.

      That does not sound like a majority OO fan stance to me.

      It is probably not what you hear from the inexperienced Java and C++ programmers who think they know OO because they are using an OO language. However, most OO experts will tell you the language and the technology only have a secondary importance to the OO-ness of a system. It is the design.

      Besides, the making of components themselves are not what most custom application programmers do. Does that mean that OO is nearly useless for them?

      What are you talking about? Custom does not imply not componentized. A custom application can be built from existing components. Similarly, just because you are writing something for the first time does not mean it is not a component.

      Procedural tends to emphasize grouping (encapsulation) by actions, while OO tends to emphasize grouping by nouns. This is perhaps an over-generalization, but seems to hold true time after time.

      This is a crude description that serves only to help someone who has no understanding at all of the difference between OO and procedural so they can get an initial grasp of the concept. OO is about modeling a system, not programming. It looks at the processes to be modeled, aka use cases. Note, OO starts with actions! The system then looks at the things involved in these actions and the ways in which they interact. Then classes are built to model the things and their interactions. OO is things and their actions, procedural is nothing more than actions. And that is why procedural applications are poor models of the processes they are supposed to be modeling.

  155. Re:why give reply a zero? I punched holes in a 4 by scotteparte · · Score: 1
    It appears the mob has spoken, Troll Boy.

    Welcome to the world of OOP.

  156. Amen! by Tablizer · · Score: 1

    "OOP is hyped as the next big thing, but no one has studied the parameters of when, why, and where it is successful in any meaningful way."

    I get answers all over the spectrum when I ask when, where, why, and how big about OO's strengths and weaknesses.

    I don't have all the answers, but niether does anybody else.

  157. bad code == secret language == job security by Tablizer · · Score: 1
    However, I don't think his real issue is with OOP, but with general programming practice in that sector.

    I agree that there is a strong lack of organized planning. That is actually a more important issue than which paradigm to choose. However, it is not something that switching paradigms can't fix. There are no real rewards for planning in most organizations. Bad code often is job security. Bad code is like a cypher that only the author knows.

    I have personally seen massive improvements in my coding since I've started using an OOP style with thorough documentation and formal notation.

    If it is truely "massive improvements" then it should be easy to demonstrate exactly how this comes about. I here jillions of anecodotes, but rarely anything real. (And the few real ones turn out to be language-specific or comparisons to bad procedural/relational practices.)

    1. Re:bad code == secret language == job security by panda · · Score: 2

      Yeah, exactly.

      So, maybe I exaggerated with the "massive improvements" bit, but I'll tell you that it's certainly more fun to code using some kind of plan/design. In my case, usually OO, and usually in C, C++ or Perl. Nothing better than reuseable objects if you ask me.

      At my previous place of employment, there was an attempt made to do that very thing: build a reuseable framework of objects for the business software. There were problems galore with making this work because one of those drag and click types of commercial "programming" tools was chosen, where you create graphical objects on screen and then add code inside the objects, code that's tied to that graphical representation and to that object. In other words, the code was not factored at all, and if you needed a different widget, or even no widget, that implemented the same business rules in code, then you had to rewrite the functionality from scratch. Very poor planning, and just shows that the problems with OO are not really problems with OO but with OO that is misapplied by developers who don't really understand the paradigm.

      --
      Just be sure to wear the gold uniform when you beam down -- you know what happens when you wear the red one.
  158. Re: GOTO in FORTRAN (was Re:common misconception) by Bush+Pig · · Score: 1

    The reason you went nuts trying to figure out the syntax for WHILE is because the only way to do WHILE loops in FORTRAN77 is with GOTO and IF. FORTRAN 5 had WHILE, but it wasn't widely implemented.

    --
    What a long, strange trip it's been.
  159. You are wrong. by Tablizer · · Score: 1
    The most important one he blunders about is "OOP is a proven general-purpose technique." This is absolutely true. If the author bothered to peer out of his own situation he would notice that it has been used for 10+ years and is widely accepted by most everyone that is somewhat informed.

    So if they reject it, they are probably "not well informed" in your eyes. AKA Circular logic.

    especially the Y2K one, where did he hear this [myth]?

    Bertrand Meyer. Ever here of him?

    This is absolutely true, but the pay-offs are more than worth the time expended. One only needs to look at the explosion in the component marketplace which had risen to over $600 million in 1999. Components don't only increase re-use, but are good financially for developers on the buying and selling side.

    1. I was most talking about custom applications, not wide-market components.

    2. Components != OO

    he points out OOP's inadequacies at this. Nothing is perfect, but are the alternatives any better?

    Yes! Procedural/relational modeling generally does not depend on the real world matching trees, for one.

    His code sample shows that he doesn't even bother following encapsulation.

    Which one? There are about 50 on the whole site. What? You didn't read them? Surprise surprise.

    I would suggest to this author to read "Design Patterns."

    Procedural/relational does most of them better, as already discussed. (Or, at least equal.)

    NEXT!

  160. OO only shines on LARGE projects? Make up mind pls by Tablizer · · Score: 1
    I think, far and away, the best part of this article, is the part where he takes vague numbers from studies of large (2+ year before initial shipment) development efforts and tries to apply them to products that can go through 10 whole number versions and get abandoned by the roadside in 2 years.

    You seem to be in the "OO best for large projects" camp. I get wide ranges of opinions on this when I ask OO fans. Some say that it *is* only meant for large projects, some say it helps for their small and medium projects also.

    If it is the first (large only), then more OO books and training/PHB-intro materials should point this out. If it is the second (all sizes), then you appear to be wrong.

  161. a bit hypocritical by Tablizer · · Score: 1
    "In addition, the OOP community is strongly divided on whether the "component" model or the "inheritance" model is the way to go. Microsoft seams to favor the component model. The jury is still out on this one. Without getting into the details of this battle, let's just say OOP still has some growing up to do." Holy fuck! There might be more than one right way to do things!

    But they don't agree on WHERE one is better suited. IOW, a philosophical overlap.

    Your last sentence seems a bit ironic, since it just may be that there is more than one right paradigm.

    (I just love to pull the pins out of the grenades and toss them right back.)

    1. Re:a bit hypocritical by TheKodiak · · Score: 1

      Uh... I must have failed to make myself clear. The guy's point was that because there were two competing theories, that OO was basically worthless until someone got back to him on which of the two was better. My contention is that the existence of two models does not imply that one or both models must therefore be inferior.

      Please direct me to the school of design that consistently outperforms OO where it is always clear how to apply the design model.

      --
      -=Best Viewed Using [INLINE]=-
    2. Re:a bit hypocritical by Tablizer · · Score: 1

      >> The guy's point was that because there were two competing theories, that OO was basically worthless until someone got back to him on which of the two was better. My contention is that the existence of two models does not imply that one or both models must therefore be inferior. <<

      That is not my claim. Both are unknown or equal in value until proven otherwise. "Otherwise" has not happened yet.

      You could argue that as individuals use it and see personal benefits, they will switch, and that this is what is happening.

      However, many OO fans say that most shops are still using mostly procedural designs that are jammed into classes. Classes are mapped 1-to-1 to RDBMS tables via set/gets (trading a table handle for an object, which is very similar conceptually), and an OOP GUI framework is used. Beyond these 2 half-OO attempts, most code is very procedural in nature.

  162. Vague Feeling Oriented Programming by Tablizer · · Score: 1
    Actual Software Sciense is allready far beyond OO

    Good. This is all moot then. Hear that Berty Meyer? You are now Legacy Man.

    currently we are working on Subject Oriented and Aspect Oriented programming.

    Oh, I see. A Buzzword Lab. Hey, I always wanted to see Hallucination Oriented Programming, where applications make managers imagine benefits.

    That everybody and his dog can programm with Visual Basic does not mean that those are programmers.

    Yeah, they have to be certified by you first of course.

    I KNOW for my own that OO is the better concept.

    But like most other OO proponents, you couldn't articulate the reasons for the specific benefits if the KGB tortured you for 20 years. OOP kills tungues.

    1. Re:Vague Feeling Oriented Programming by Tablizer · · Score: 1

      >> The benefit is time to market.
      If I have the chioce I use OO and C++, so I'm faster than in pascal. <<

      Give me my favorite procedural tools (NOT Pascal) and I bet I could beat your ass to market (for a small or mid-sized biz app).

      >> I can try to build a framework or several framelets. In the long run a oo development environment beats a procedural one by a 50% to 100% productivity increase, so what do you argue? <<

      And frameworks and re-usable code CANNOT be made in procedural/relational programming? BULL! I do it all the time. I *hate* reinventing the wheel.

  163. What's this article about? by evocate · · Score: 1

    In the most long-winded way imaginable, the author has said "OOP doesn't live up to its hype" and "OOP wasn't a silver bullet that quickly and easily improved the quality of his work."

    Duh.

    Before the web came along, OOP was the most hyped thing in technology. A lot of people made their livings selling snake oil in the form of books, seminars, methodologies, training courses, tools, libraries, etc. These leaches are just out there. Always have been, always will be. And they aren't just in tech. Pick up an investment rag and look at the ads. They're ridiculous. They're the culmination of almost a century of hucksterism.

    Professionals have the responsibility to see through this and find the kernel of useful genius that made the topic so cool in the beginning. Believing the hype always leads to bitterness and regret. Creating the hype leads to a painful demise (I hope).

    OOP tools are a big improvement. I like a lot of them, but none substitute for good techniques. How something (anything) is constructed has more significance in its final value than what material or which tool is used (except for things made from rare metals or minerals). I spent some time around IBM as a kid, and the acronym seen everwhere was TINSTAAFL - There is no such thing as a free lunch.

    Don't believe the hype, and don't waste time being pissed off if you did. That's just more time wasted. You're young, your smart, go build something!

  164. Re: maintainability by Tablizer · · Score: 1

    >> He didn't mention maintainability much in his rant. Perhaps because it would be a major counter point to his assertion. The only place where I can remember it even being mentioned was in an idiotic metaphor with automobile mechanics. <<

    I usually use the word "change", not "maintainability" (Too hard to spell :-)

    It is discussed often WRT to "change points". For example, issues about case statements and how many places need changing per change request. I talk about it also in the "goals" section.

  165. Re:Objects don't interact with everything by Tablizer · · Score: 1

    I was simply addressing the "real world" issue, since that was the heading it was under ("encapsulation" remember? :-) Whether a class can be modified or not and the protection value/problems this solves/creates is another issue that is brought up other places.

    For example, the "set/get bloat" complaints debate.

  166. re: procedural components by Tablizer · · Score: 1

    >> For instance, when you go to design a GUI, it's much nicer to create a button instance and pass that to a form, than to call a function that puts a button on the screen, and continually have to keep track of all the details. <<

    That is *not* how I would design a procedural/relational GUI interface/API. There are several other p/r techniques for this kind of thing.

    >> IMHO, the strengths of OO programming only arise when you are writing a code base for *other* people to use, simply because it encapsulates everything and provides an abstracted interface. <<

    This can be done in procedural/relational also. It is just not a buzz-concept and nobody bothers educating people how to create procedural frameworks anymore. (Nor researching.)

    >> but since most people don't believe this, I don't think it qualifies as a myth. <<

    What percent have to believe it to qualify as a myth? (My rule of thumb is hearing something from 2+ different OO fans.)

  167. seen the same thing in Fortran66 by Tablizer · · Score: 1

    >> want an object to populate itself from the database? Call it's GetData method. <<

    How is this different from:

    handle = openDB(query)

    >> We've also standardized that each object tells IT'S children to populate/save THEMSELVES <<

    Children? What are these children? Remember, I am skeptical of hierarchical business modeling. Details?

    >> Can you do this in a procedural language? Of course you can, but it's easier in an OOPL. <<

    How do you measure "easier"? Less code? Prove it! Less change points? prove it! It makes you feel warm and fuzzy inside? Well, I will leave that one to your boyfriend to check.

  168. I am NOT for "freeflow" programming by Tablizer · · Score: 1

    >> The author does allow that he is not informed on enterprise level needs/development, but from my sandbox, OOD is the best thing since slice(bread). When coding for a paycheck, freeflow art usually doesn't last/can't be maintained/extended/scaled. <<

    Where did I say I was for "freeflow"?

    Regarding enterprise-level, I think relational tables are better for managing large amounts of stuff because you can view/query them by multiple aspects. OO's "everything in one class and only one class" thinking is small-time.

  169. name for me, not public by Tablizer · · Score: 1

    I picked "oopbad.htm" to help *me* remember it. "oopislessthanperfect.htm" takes up too much typing and I only had 8.3 (DOS-based) backup systems at the time. Now there are too many path references to change it now.

    Next time I will use an ID number ;-)

  170. Maybe you should stop throwing... by malraux · · Score: 1

    ... the pins back, 'cause your house is full of holes from all the live grenades you left lying around...


    Regards,
    -scott

    --


    Regards,
    -scott
    1. Re:Maybe you should stop throwing... by Tablizer · · Score: 1

      No, those are the holes in your head you are seeing.

      Beware, the holes may allow your brain to come back in.

  171. Y2K and ER by Tablizer · · Score: 1

    >> No, you appear not to understand OO encapsulation at all. The aspects you speak of are nothing more than views of the object, and it has nothing to do with encapsulation. <<

    Encapsulation often refers to 2 things: 1. protection, 2. physical closeness.

    #2 is purely a view-issue. What block/method/thingy appears next to what should be purely a *view* issue. Think abstract. OO *hardwires* everything into a narrow view (one class per method). That is inflexible IMO.

    Regarding protection, that is something we should take somewhere else because it is quite involved.

    >> OO encapsulation actually works very well in the real world. Consider, for example, the use of a Date object instead of a char array or even a long. With the Date object, you have one place to fix your Y2K problem if you made the mistake of storing the date internally in the Date object as a char array with the year in 2 digits. If you make the same mistake in the procedural world, you end up with a big ass bug that costs a hell of a lot of money to fix. <<

    For my view on Y2k, see:

    http://www.geocities.com/tablizer/meyer1.htm#y2k

    >> If you think it is a mess, then you do not understand the pattern. The Visitor Pattern helps eliminate the mess the same code would otherwise have in either OO or procedural realms. <<

    Prove it with code. Show the world.

    (I admit I don't fully understand OOVisitor, but I don't understand it because it is messy and has too many parts and cross-references. That is not a good thing. Software should be easy unless there is no other choice.)

    >> ER data models are nothing more than collections of DATA and ways of relating the DATA. <<

    That is only *one* approach to modeling that should be used in *conjunction* with other approaches. ER allows you to deal with "what" without having to worry about "how" at the moment. That helps the thinking process. It breaks planning into managable chunks.

  172. You snagged tongue while hopping the fence by Tablizer · · Score: 1
    I fought it for many years, and finally gave in.

    Good! Then you of all people should be able to explain and/or demo in detail why it is "better".

    I am tired of vague Zen explanations. Let's get back to science and rational deduction, people.

    the examples given in this article are terrible

    Oop! Vague metric. I guess you are one of THEM afterall.

  173. You and me baby aint nOOthing but mammals by Tablizer · · Score: 1
    Which can work, b/c procedural coding is immediately gratifying, whereas intelligent OO requires much more foreplay, er, planning.

    Damned right it is. That is because it is easier, corresponds to the way many people think, and doesn't require fragile taxonomies or fragile type-dichotomies to make it work like the animal and shape examples of the textbooks.

  174. Measuring: easy or hopeless? by Tablizer · · Score: 1

    >> worked under a small component model. <<

    Do you mean OO components or procedural components? Components can be made procedural. with the better p/r langs, they even highly resemble OO components (or should I say OO highly resembles a certain kinds of prcdrl components?)

    What did your components do?

    >> It's a little like the Windows/Linux debate - neither arguement is convincing unless you try both, <<

    Even if you try both, you get different opinions. They both shine in different ways. The differences can even be identified in ways that OO (alleged) benifs have not. You can say that Linux is more reliable, while Windows has more GUI management features. (You can count up-time and you can count the percentage of operations that have GUI equivs.)

    This kind of info is not avialable for the paradigms. Try to think of the patterns of OO being (allegedly) better and why. Then see if you can create a little exaggerated skeleton example to show them.

    Somebody somewhere has GOT to be able to articulate the benifits with examples. It cannot be that hard, is it? Wierd weird wierd weird.

  175. Assembly language is procedural by yerricde · · Score: 1

    You HAVE to have the methods as part of the structure in order for it to be a self contained "object".

    What are they compiled into? A vtable, or a pointer to an array of method pointers (one array per class). I've seen similar polymorphism in the Allegro library's BITMAP structure.


    Like Tetris? Like drugs? Ever try combining them?
    --
    Will I retire or break 10K?
  176. "Sucks" is not a very refined metric by Tablizer · · Score: 1

    Then again, OO fans would not know a refined metric even if they inherited one.

    Chart of OO fan metrics:

    1. Sucks
    2. OK
    3. Good
    4. Very Good
    5. Very Very Good
    6. Very Very Very Good
    7. Very Very Very Very Good

    Know how the measure? Vote on comp.object or at Booch birthday parties.

  177. Cult Oriented Programming == Success? Hmmm by Tablizer · · Score: 1

    >> I am generally talking about the parts where he was emphasizing that everyone on the project has to buy in to the same methodology and have excellent team-wide cooperation. IMHO, the larger the team, the lower the liklihood of this occurring. <<

    So you think that a harmonly of like-mindedness allows the team to communicate and cooperate easier? But on a larger team, this is less likely to happen because it will be harder to find such a large quantity of same-minded people?

    Now that I think about it, a book called something like "Rebirth of the American Programmer" had actual statistics that showed or hinted this for Smalltalk projects. When the Zealots are allowed to do their stuff together, they are very productive.

    I think I tend to agree. When you give people their favorite tools/langs/paradigms, they seem happier and more efficient.
    I am that way also.

    That premise would make an excellent University research project IMO.

    Thanks.

  178. Excluded middle by yerricde · · Score: 1

    Lisp (aka Lithp) and its cousin Scheme are both OO and functional. There's no reason a language can't be both; the article shows that procedural languages can also be OO.
    Like Tetris? Like drugs? Ever try combining them?

    --
    Will I retire or break 10K?
  179. change mind to fit paradigm, or visa verse? by Tablizer · · Score: 1
    Even today, I still feel architectually the OO is right and works the way I happen to think - but I have to be honest and realise most programmers don't seem to have the same mindset and that kills the benefits that can be had.

    Do you think that it is because your mind is better tuned or something, or that it is simply a matter of matching the paradigm to the person?

    IOW, should the human change their way of thinking to fit the paradigm, or the other way around?

    I can understand *small* mental adaptations, but not a complete overhaul unless it was proven to have significant benefits.

    This whole paradigm-mind-fit thing is a fascinating topic. When the flaming dies down, perhaps we can discuss it and speculate in more detail somewhere quieter. Things are a lot less combative if all members tentatively agree that paradigms may be subjective, because "better" is "very local".

    Any takers?

    1. Re:change mind to fit paradigm, or visa verse? by akc · · Score: 1
      Do you think that it is because your mind is better tuned or something, or that it is simply a matter of matching the paradigm to the person?

      I would not characterise my approach as better just different. What is clear, is that when looking at a system most programmers I encounter start to think about the functions that it should carry out. An initial breakdown then starts to split the system into functional silo's. This is of course wrong for an OO approach.

      I, on the other hand, had always (and I started working on these things in the late '60s before OO had been characterised) had always seen things in terms on intercommunicating actors, with functionality shared between these according to an "architecture". I can vivedly remember having arguments with people about how we should structure systems - but my problem was that whilst I always had an instinctive feel about the way to do things that was always different from the rest of my collegues, I couldn't persuade them that I was right. When OO came along, and I realised that the basic concept of an entitiy, with functionality clustered around it was the paradigm I had some formality to hand what had been instinct.

      That was the crux of my point. OO might be the theoretical correct way to do things, but actually there are two ways to thing about the architecture of a solution (functional decomposition or entity decomposition) and the thought processes right at the start need to follow the second approach.

      I think that an approach to OO can be taught - the anecdotal evidence that is discussed in my organisation is that it takes the average person about 6 months to make the mind switch. This is the real reason why short term costs may be higher - but there is an expected longer term benefit (I say expected because I have no evidence only my own prejudiced view that this is so).

  180. blowing chunks - the Ludite thing again? by Tablizer · · Score: 1
    I think the usefulness - or lack thereof - of OOP depends a lot on one's personal learning/working style. Sort of like some people are perfectly fine with abstract mathematics, while others need to relate math to the physical world in order to understand what's going on.

    You have no argument from me there. However, some OO fans imply a kind intellectual hierarchy whereby the smart ones "get it" and the dull (or Ludite) ones don't. It is these kind of innuendoes that fuel my flame.

    It not only makes what I'm creating more 'real', but it divides the application into nice self-contained chunks that can be dealt with separately.

    What is wrong with subroutines, modules, and tables for chunk-ification? Also, how are these "less real"?

  181. Zero Sum by Tablizer · · Score: 1
    Seriously, the way the guy goes on, you'd think OOP was the cause of all world hunger and disease.

    It is if all the procedural programmers can't get jobs :-)

    I can't remember ever hearing a single one of his supposed "Myth"'s. Where did he get those?

    Not this again. There is plenty of material on the site to ponder if you are personally bothered by the myth list. Move on. Enough complaints about the fscking myths.

    Some software designs really *do* fit better onto a hierarchical inheritance structure.

    I agree, but why is everybody pushing Java et al for those that *don't*? Please explain that one to me.

    For goodness sake, OOP isn't trying to "compete" with your (insert your favourite paradigm here.)

    Bullsh*t! It sucks away attention and resources from alternative tools, progress, training, etc.

  182. God's Hierarchies by Tablizer · · Score: 1
    Thus, most systems programming is not suited to OOP languages. But most applications programming is.

    Applications programming? NO FRICKEN WAY! Even OO fans posting here agreed that hierarchies are often not the best way to model most business systems.

    I think where OO may shine is "natural fields" such as chemistry, physics, geometry, etc. God does not change those hierarchies very often.

    Procedural is good for some things, functional for others. And there are plenty of projects where OO is a natural fit.

    Well, but nobody can agree on what, where, when, or why. That is a sign that it is poorly understood.

    1. Re:God's Hierarchies by Arandir · · Score: 2

      Who said anything about hierarchies? OO doesn't have to be hierarchical at all. Few OOLs require all objects to be derived from some base class. C++ certainly doesn't.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
  183. Re:The real benefits by Eric+E.+Coe · · Score: 1
    Yes, but the usual C idiom is to arrange to interpret 0 and NULL as the proper initial state of a structure - and therefore memset() (or bzero() for you BSD hackers) is the universal constructor.

    And 9 time out of 10 that's what you end up doing in C++ anyway, just more slowly.
    --

    --
    An esoteric scratched itch:
    Homeworld Map Maker Tool
  184. Only if we write a Tax interface for Siamese twins by Tablizer · · Score: 1
    // BAD, COMPLICATED OO APPROACH

    You ALTERED it from the original. Not very nice form.

    Regarding the latter, the OO code could look like this, using the Person constructor:

    You did not read it very carefully. I was illustrating a *tendency* of OO to have heavy protocol coupling. A quote from that same page:

    "It is true that one does not have to tie classes together in OOP, but I find this practice fairly common, and the result is no longer very 'OO' without it."

    (I agree that I should probably move this notice up higher.)

    As proof it is common: Sun's Java API's. Very intense protocol coupling.

    Well, the procedural approach requires you to understand the parameters to the calcTax() function, and to remember the proper order for the parameters. And, the parameters you pass to the calcTax() function are in essence the attributes of a person necessary to calculate the tax -- so conceptually, you have to know just as much about people and taxes in either approach.

    1. A few parameters are easier to grok than the meaning of a protocol name or object instance.

    2. Ordered parameters are NOT the only procedural way to pass parameters. You are the second person to make that error.

    3. The quantity of attributes needed to calculation tax could be significantly less than that needed to set up a Person.

    4. I often pass table handles instead of parameters in real applications. ("Structure coupling")

    In the procedural approach, the calcTaxes function would have to change.

    The OO approach may *also* have to change depending on how it gets Person information. Besides, it is best to use a system-based identifier rather than external info like SSN anyhow *up front* in relational design. Thus, it should never change, barring something really different, like alien taxes or Siamese twins.

    But this guy seems to be advocating a return to traditional procedural (not functional) programming, which be a big step backwards.

    Oh, I get it, New == Good.

    FYI, relational theory is NEWER than OO.

    But, the guy should read "Design Patterns" regarding why aggregation is often a better tool than inheritence. Saying the OO people think that the whole world can be represented in an inheritence hierarchy is attacking a straw man. Contemporary OO gurus don't think that way.

    Like I said in the "Paul McCartny" message, OO is nothing special (different) without trees. I won't repeat the details here. If you are not going to use sub-typing, then you might as well use procedural/relational

    Oh, and inheritence is not primarily a code reuse mechanism -- it's a typing mechanism.

    I guess that means that Smalltalk is not up to snuff for reuse?

  185. GUIs are OOP? by JacobO · · Score: 1
    Win32 for example is plain C. Sure MFC was created on top of it, but the windowing system works just fine without it -- not to mention a whole lot faster.


    As for disadvantages of OOP, I don't see any. I don't see why object orientation and structured programming are mutually exclusive. I often use both in a single program, and really, they share some of the same goals and benefits.

    Where I find OOP useful is in constructing frameworks. The standard Python libraries are a fantastic mix of procedural and object oriented. For example, take file-like objects. Where some task involves stream-oriented actions, file-like objects are provided. They can then be used by other code that expects file objects.

    It doesn't take much extra effort (for me at least) to consider future extensibility. If I can write two classes instead of one (same amount of code, different organisation) and have it so that I can plug in future extensions then I get some benefit for little (or no) extra effort.

    There is no downside to using them both, together. Although, I have to say that I find that whenever I start off in a structured way, I find that I miss some of the power of the object oriented way and end up converting. There are just too many things to pass around and remember.


    I'm afraid I just can't agree with someone who seems so emotionally involved in their argument.

  186. Re:OO only shines on LARGE projects? Make up mind by TheKodiak · · Score: 1

    Heh. Again, I have not made myself clear to this troll.

    My point is that you cannot say, "This project, which took 5 years to develop, did not actually write a line of code for the first 2 years of development. Therefore, no project which will last less than 2 years should use OO, because they will not write a single line of code."

    You are, apparently, trying way too hard to see the forest, here, buddy, and forgetting that you need to back up each individual tree. Maybe if you started writing down some of these references when you make them up############come across them...

    --
    -=Best Viewed Using [INLINE]=-
  187. The Kangaroo Story by Tablizer · · Score: 1
    Now, I am not an OOP programmer by any means. But wouldn't you do some form of inheritance of the base class Tax, forming a class Person_Tax (which might have specifics to people, but inherits other Tax items), then create an object method in Person based on this class?

    Person_Tax class? I think even most OO fans will winch at that. Division lines in procedural/relational are so much easier to "figure out". The tables are the main nouns, and major tasks/verbs are modules. This works about 85 percent of the time. Simple simple simple! Viva p/r man!

    I would be willing to bet that modules and tables would be very similar between good p/r programmers, but classes would be wildly different between different good OO programmers.

    The power from this comes when you change, say, the Tax class - everything trickles down, and updates all other uses of the class and objects created from the class - so you don't have to change things in a billion different areas in your code, like you may have to in a procedural language ....

    You sound just like those OO "brochure" books. Sounds wonderful on paper, but is full of holes in the real world. Sometimes you don't want some things to "trickle down" and the pattern of exceptions is NOT hierarchical. The real world and it's changes are NOT HIERARCHICAL. It does not care about trees. What force of nature makes business things follow/change along tree branches? I see none.

    There is an allegedly true military story of an OO combat simulator. They took a copy down to Australia for a demo down there. To add some local interest, the modelers decided to add kangaroos to the scenery. Rather than make the kangaroos from scratch, they decided to inherit from the Soldier class, and then override the methods that were different. During one of the sessions, the kangaroos took up arms and started shooting at the users. It seems they forgot to override/disable the combat behavior method(s). The point is that absorbing behavior via "trickle-down" has to be done with care. Automatic can be too blunt. (I have more examples on my "buzzwords" page.)

    (I would probably have modeled battle entities with a feature list. One then checks off or selects the feature strategies needed for any new battle entities. It would be a big, flat panel of selections. That way you can get more combinations than trees would allow. However, the military would still probably click the wrong checkboxes and still end up with mutant roos.)

    and this could be extended for various types

    You are assuming that taxing can be nicely split into "types". I question this. The only time things come close is if the "types" are so different that sharing is minimal. For example, calculating taxes for corporations and calculating taxes for individuals are *so different* that the shared stuff would be very minimal (and probably best modeled via financial "roles" instead of hierarchies because most of the shared stuff is financial, and involves more than just employees and clients).

    BTW, I just yanked the original tax example from my webpage. It introduces too many side-issues and tradeoffs to be on the front page. This just causes confusion and flames. The later "black box" example covers the same concepts anyhow.

  188. On Bureaucracies by Tablizer · · Score: 1
    He sees it as beaurocratic to have a series of steps before calling a final proceedure. To me this looks orderly and increases the odds that my superclasses or logic wrappers can catch sequence errors.

    But the confusion and workarounds to the bureaucracy might even introduce errors in itself. Bureaucracies are usually full of rules intended to protect and keep-in-check. Try getting a business license in India for example. You may have to visit dozens of agencies to make sure you are not polluting, disturbing, hampering, etc. with anything and anyone with any political or legal protections. Indian politicians would love Eiffel (the language).

    The athor actually makes a few good arguments, but it takes some effort to get past laughable comparisons like OOP and Communism.

    Bertrand Meyer made a few silly political analogies in his book, but nobody seems to be complaining or calling him a "troll". DiscrOOmination!

  189. Re:OOP is Soylent Green! by scotteparte · · Score: 1
    No, you ignored my more important points for the sake of poking holes in minor issues. Moreover, "bullshit!" is not a valid comeback. By the way, even though this thread is basically finished, I thought of another problem with procedural languages: memory management. When you deal with even medium-sized software solutions, you'll probably be using a lot of variables. When they are locked up in objects, freeing the object frees the memory. If you don't encapsulate, you might confuse the compiler and make it keep too many memory addresses open at once. That would be muy mal (very bad :) )

    Anyway, don't sweat it - in another few years, some new programming abstraction will sweep procedural and OO right off the map, and we'll all bitch and moan about how much our old ways beat the newfangled Neural Network-optimized Stack Developement Abstraction Model, or something.

    BTW, my comment is a fiiiiiiiiiiivvve, not a fooooouuuuuuuuuur.

  190. PHB's also welcome by Tablizer · · Score: 1
    Really, who is this guy arguing to? Managers?

    Of course! They make a lot of strategic decisions. My article audience is not limited to just programmers.

    But it's just one way, among others, to go about modeling and solving your problem.

    Indeed. But, the OO approach is over-hyped and thus choices are harmed because it sucks away resources/attention/research/training from other approaches.

    All I really ask for is balance. The hype on my page simply mirrors the OO hype.

  191. It's 2001, not 1001 by Tablizer · · Score: 1

    >> Oh..so he hasn't provided any examples of superior OO code <<

    NOPE. Jay posted some pattern examples, but never gave any clear metrics about why he liked them. And no, "If you knew OO as well as I did, you would feel the benefits, not needing words" Zen crap. This is 2001, not 1001

    >> much the same as you never having produced ANY examples of the mythical ITOP code, <<

    Not relavent to OO superiority claims. Red herring from an old debate enemy.

  192. re: generic collection protocols by Tablizer · · Score: 1
    This man is a jackass.

    At least I know how to make paragraphs.

    His says that this is complicated: T t; t.att1 = value1; t.att2 = value2; t.att3 = value3; t.method(); But that this makes sense: fn(value1, value2, value3);

    Where did you get this from? Why is everybody obsessing on parameters? I did NOT say "always use parameters instead of structures".

    If OO is so overhyped then I'd like to see a non-OO library that does container classes and algorithms like the STL. vector myvector; // add elements to vector myvector.sort(myvector.begin(), myvector.end(), ANY_SORT_I_WANT()); No no, i *like* sending pointers to functions around in my code... that's safe, right?

    Ever heard of a RDBMS? I almost never use arrays and hashes in a decent p/r system (except possibly as an interface storage mechanism). They don't scale well as new needs come along.

    Perhaps a DB interface could optionally use arrays/hashes/linked-lists as the underlying implementation, but that is (or should be) abstracted away from most of the application code in a good interface.

    Generic collection protocols are a pet sub-topic of mine. I would be glad to discuss them with you in detail somewhere else. The devil is in the details, and slashdot is too impatient a place to discuss them.

  193. Lack of planning can fubar anything by Tablizer · · Score: 1

    >> object / functional programing <<

    Note that "functional" is a different paradigm than "procedural".

    >> The reusability of a code is very important. Doing a perl module and submiting it, is better than doing a quick and dirty script to do the job. <<

    Doing *anything* quick-and-dirty is usually not going to result in good re-use.

    BTW, Modules are not necessarily the same as "classes", and are found in many procedural languages (depending on how defined).

    >> the object orientation, well used, tends to produce a more readable code <<

    How do you measure "readable"? Could you by chance supply sample mental steps along with a code/psuedocode example?

  194. They said memory mgmt benif thinking was a myth by Tablizer · · Score: 1

    >> No, you ignored my more important points for the sake of poking holes in minor issues. <<

    What did I miss? Most of it is anecdotal. I squashed anything I saw as not anecdotes.

    I defeated your parameter change claims, and your abstraction "missing" claims.

    >> Moreover, "bullshit!" is not a valid comeback. <<

    There is a whole paragraph below "bullsh*t". You didn't read it well then, and you didn't read it well now.

    >> I thought of another problem with procedural languages: memory management. <<

    They chewed me out for not providing any references that somebody believed my memory management "myth".

    Now I have a reference. You.

    >> When you deal with even medium-sized software solutions, you'll probably be using a lot of variables. <<

    Most variables are local to a routine or module. The tables handle most of the more "global" stuff.

    >> Anyway, don't sweat it - in another few years, some new programming abstraction will sweep procedural and OO right off the map, and we'll all bitch and moan about .... <<

    Good. Then OO'ers will know how it feels. The new fadcrap won't have any evidence either except anecdotes from the people who's thinking it fits.

    >> BTW, my comment is a fiiiiiiiiiiivvve, not a fooooouuuuuuuuuur. <<

    Yeah, rub it in mob-boy. They are probably cranking it up *just* to piss me off. I defeated your claims. I have no idea why they like it.

    1. Re:They said memory mgmt benif thinking was a myth by scotteparte · · Score: 1
      I would like to hear your response to my refutation of your "Person and Tax" inefficiency problem. I mean, we're talking about a terribly complex problem with several parts to it. Plus, the tax code changes frequently. Having an object to encapsulate the problem allows you to set the necessary parameters, and then just run T.CalcTax(P). That seems much better than your method.

      Second, using an RDBMS for variable management is probably not such a good idea. Access is ridiculously slow, even for the best of them.

      I'm not sure how you don't see that the Object, Attribute, Method framework is logical. It seems so natural to think of a person as a Person() rather than a more haphazard collection of defining variables.

      As for portability, well, Java serialization allows you to pass objects between platforms. How's that for portable? It just seems like your attempts at abstraction would result in parameter overload: every object would be a list of parameters in your model, and trying to keep track of or pass them around would be sick.

      But hey, write a platform with your model... if it catches on, you will be heralded as the slayer of the OOP efficiency myth. If not, at least you put your money where your mouth was.

      I'm really unsure of your "fad" statement. The move from DBMS to RDBMS was no fad. The move from single-process to multitasking was no fad. I don't think OOP is a fad either.

      In any case, they were trying to piss you off when they modded your comment down. It was a good comeback, for some of it at least, but you just can't convince the Slash crew of what they don't want to hear. You should have seen me try to convince them that copyright wasn't always a bad thing :)

  195. Orthogonality Problems by Tablizer · · Score: 1
    and not expose that behavior and data willy-nilly to the public.

    Another sounds-good-on-paper statement that I have been unable to translate into real benefits. How about a realistic example. I find it hard to draw a single wall around things in a system without creating a nasty little bureaucracy for the team. The "walls" depend on the aspect that you want to view things by at the moment. Aspects are often orthogonal. For example, one manager might want to "lock" things up by region, another lock things up by product line, another by org ranking, etc. OO assumes too many mutually-exclusive walls and divisions. The real world does not offer clean borders like that. The borders are often orthogonal. OO deals with orthogonality rather poorly overall. Look at something like the OO Visitor Pattern. That is the mess created by increasing the aspects by *one* dimension. Add another, and kapoof!

    Sparingly is not the same as not at all.

    Close enough. Languages should only support fairly common things, not blue-moon things. Otherwise, it ends up being and electronic packrat or offer arbitrary features for bored programmers to futz around with (and they *do*).

    It is probably not what you hear from the inexperienced Java and C++ programmers who think they know OO because they are using an OO language.

    Yeah, everybody bashes everybody else's modeling techniques, even WITHIN the OO community. This is what happens when there are no metrics. Metrics are the cops of ideas.

    What are you talking about? Custom does not imply not componentized. A custom application can be built from existing components. Similarly, just because you are writing something for the first time does not mean it is not a component.

    I hope you are not one of those who try to generitize everything. Even most OO fans seem to agree that this usually backfires because:

    1. The orthogonality issue (above)

    2. It is hard to make a decent, flexible interface to anything complex.

    The idea that you build all these generic tool interfaces and use over and over again via simple plug-n-play is bullsh*t. Time magazine had a hyped-up article on this dreamy idea about 4 years ago. (It is at my in-law's house, so I can't cite it right now.)

    I find the most intra-shop re-use from things with simple interfaces. Whenever one "thing" starts to have a complicated interface, it will almost NEVER achieve true genericness. It rapidly turns into a monster as you try to adapt it to new requirements. K.I.S.S. and intra-shop re-use go hand-in-hand IME.

    It looks at the processes to be modeled, aka use cases.

    This is not really OO, per se.

    OO is things and their actions, procedural is nothing more than actions. And that is why procedural applications are poor models of the processes they are supposed to be modeling.

    Bullsh*t!!!!!!

    Here is a copy of a message I posted on comp.object:

    Title: A 3-Graph P/R Model

    The way I model procedural/relational business applications in many ways does model the domain world. The data model (ER) is based on actual relationships between things (customers, products, invoices, etc.)

    Then the interface design is based on the flow of the UI (or tasks), which is more or less "real" (at least visually tangible).

    Thus, we have one graph (network) for the data and another for the UI/task flow. OOD tends to try to force-meld these two with it's self-controlling-noun viewpoint, which in my opinion is a mistake. (There are some places for potential overlap, but not enough to justify only OOD, IMO.)

    These two graphs are then connected usually via SQL joins (you can automate some of the joining in frameworks if you wish). Thus, there are three graphs: the ER graph, the UI flow graph, and the Join graph.

    SQL tends to "flatten" the source of the data supplied to the UI/task modules so that you can change the tables or relationships, but a given task still works by only needing an SQL statement change. Thus, SQL serves as a kind of *interface broker* to relate the two. In other words, you de-couple the data relationships from the task at hand by limiting the data source negotiation to one spot (usually early in the task/module).

    I don't know if OOD has similar techniques for turning real world relationships into classes in the business domain. OO classes often seem obtuse and unrelated to anything real. They will have names like StateTransitionManager, etc. I don't know whether that is bad engineering or over engineering, but I find it unpalatable.

    The 3-graph model has worked well for me and tends to relate to actual, real world domain relationships, and is fairly simple. It is hard to beat that.

    I have been thinking over the years how to best describe my modeling techniques, and the 3-graph description is my latest articulation attempt.

    (I am preparing a write-up to describe it in more detail.)

    1. Re:Orthogonality Problems by smack.addict · · Score: 2
      Another sounds-good-on-paper statement that I have been unable to translate into real benefits. How about a realistic example. I find it hard to draw a single wall around things in a system without creating a nasty little bureaucracy for the team. The "walls" depend on the aspect that you want to view things by at the moment.

      No, you appear not to understand OO encapsulation at all. The aspects you speak of are nothing more than views of the object, and it has nothing to do with encapsulation.

      OO encapsulation actually works very well in the real world. Consider, for example, the use of a Date object instead of a char array or even a long. With the Date object, you have one place to fix your Y2K problem if you made the mistake of storing the date internally in the Date object as a char array with the year in 2 digits. If you make the same mistake in the procedural world, you end up with a big ass bug that costs a hell of a lot of money to fix.

      Look at something like the OO Visitor Pattern. That is the mess created by increasing the aspects by *one* dimension. Add another, and kapoof!

      If you think it is a mess, then you do not understand the pattern. The Visitor Pattern helps eliminate the mess the same code would otherwise have in either OO or procedural realms. And, the Visitor Pattern is also overused in places where it is not appropriate.

      Close enough. Languages should only support fairly common things, not blue-moon things. Otherwise, it ends up being and electronic packrat or offer arbitrary features for bored programmers to futz around with (and they *do*).

      Ugh, it is not "close enough". It is nowhere near close enough. Most classes in an OO system will inherit from something else. Sparingly means that your inheritance trees are simple and shallow.

      Yeah, everybody bashes everybody else's modeling techniques, even WITHIN the OO community. This is what happens when there are no metrics. Metrics are the cops of ideas.

      First, this paragraph changes the argument. Your original point was that a lot of OO "fans" seem ignorant that OO is about design, not coding. Now you say that the problem is everyone is bashing everyone else's modeling techniques and there are no metrics. A different argument.

      On the new argument, however, you are still wrong. There are formal processes, with the Unified Process being the most widely accepted process. And as with anything, there are expert OO modelers and there are wannabes. Expert OO modelers are getting the job done.

      I hope you are not one of those who try to generitize everything.

      Nothing I said suggested I do. So the rest of the paragraph that follows is meaningless since it is based on that assumption. However, your claim that you can never have true genericity is absurd as trying to make everything generic. What do you call the Date class in Java?

      On use cases, This is not really OO, per se.

      Uh, yes it is. It is the starting point of OO software engineering. Non-OO processes do not model things in this manner. They start with workflows and decision trees, which are very, very, very different from use cases and object interactions.

      The rest of your post is on how you think your tables and procedures are the best models for a reporting system. First of all, your dismissal of OO for this problem shows a poor understanding of how the modeling should be done. ER data models are nothing more than collections of DATA and ways of relating the DATA. While the data is data about things in the real world, the table structure is only indirectly and poorly a representation of the thing being modeled. The result is that systems relying on the relational database as a model of the business processes end up being difficult to impossible to maintain over the long haul.

  196. GIVE CHOICE A CHANCE! by Tablizer · · Score: 1
    I find it easier to organize the structure of a program, even small ones, before i program it. This is just my preference and I do use other methods depending on the task at hand. I suggest rather than picking one method over the other, understand a bunch of methods and pick one that best fits your programming task.

    I wish it were that easy. The non-OO choices are shrinking because of OO hype. C++ at least allowed easy procedural programming. Java does not. At this pace, the next language is going to give out an electric shock if one tries to do procedural programming.

    The tools, education, attention, PHB approval, etc. for procedural programming is rapidly drying up.

    I WANT CHOICE!

  197. Re:OO only shines on LARGE projects? Make up mind by Tablizer · · Score: 1

    I was counting the *usage* time, not the development time.

    If a project which took 5 years to make is no good, then it make only last 3 months, for example. (Then they will sweep it under the carpet and nobody will ever talk about it again unless they are really drunk.)

  198. Wanted: Multilingual Programmer by Tablizer · · Score: 1

    >> and OOP *did* make the overview and management of the data-structures very much easier. <<

    Probably because you are a crappy procedural/relational programmer. Most challengers end up exposing this fact.

    >> I've been programming for some years now in all possible languages <<

    In all 5,000 implemented programming languages?
    Boy, I feel sorry for the *follow-on* guy:

    ---------
    WANTED: Programmer, Immediate opening.
    Must know Ada, Afa, Amaga, Amonza, Amu, Azure, B, B++, Baana, Beep, Beltran, .....etc..etc.....Z, Z++, Zebra, ZEEK, Zenith, Zu, Zubol, ZZ, and ZZ++. Good communication skills also a must.
    --------

    >> If this guy only has to *script* twiddly-diddly less-than-10,000-lines programs <<

    Most of the systems that I worked on like that were NOT originated by me because I know how to factor and often move the repetition to tables instead of code (menu systems, field and form defintions, etc.). However, I have worked on a few systems of that size started by less skilled programmers who like linear, repetitious comb-code that inflates the count via set/get-like crap.

  199. Re:No Magic Bullet. by swillden · · Score: 1

    Programmers just need to be familiar with multiple programming practices and languages. Programmers need to know when just hammering out some _properly_ planned procedural code will fit the case better than some _properly_ planned OO code.

    In an ideal world, I agree 100%, but in the real world this doesn't work well. Let me explain why.

    Almost 10 years ago I was really into NeXTstep (I still think there were/are many great ideas in that OS and toolset) and I became very enamored of Objective-C++. All of the NeXT development tools were built around Objective-C, which is a very Smalltalkish OO extension to C. But NeXT (or someone) chose to implement Objective-C in GCC, to which others were adding C++ support. At some point someone realized that the syntax extentions of Objective-C and C++ were essentially orthogonal, and that it wasn't too difficult to implement a compiler that allowed programs to mix them freely.

    The result was (IMO) beautiful. C++'s strengths are strong typing and the performance advantages of minimizing run-time binding. Objective-C's major strength is the supreme flexibility of completely dynamic binding (as well as simple syntax, but I'm looking at this from the point of view of a developer who understands the languages thoroughly). Objective-C even offers a nice middle ground between strong and weak typing in the form of "Protocols". Finally, since Objective-C++ was built on C, I could always use procedural styles where appropriate (plus, of course, the ultimate escape hatch -- assembler).

    With this toolset I always had just the right tool at hand and could for any situation implement the perfect balance of dynamism, reliability and performance. I wrote some really nice code, if I do say so myself :-)

    Then, one fine morning, my boss decided that I could use some help and brought in two other programmers to work with me on my project. In general, that was a good thing. The project wasn't in a crisis mode, there was plenty of time to get the other guys up to speed and they were both bright, although still a little green.

    Can you imagine what they did when they saw my code? I had spend years cultivating a deep knowledge of each of various styles of programming, both OO and procedural. I had a visceral knowledge of what the compiler would do with any bit of code and how common processors would execute it. I had a complex system of semi-formal rules that I used to decide how to approach a given problem, *and* the understanding to know when the rules didn't apply.

    To those two bright greenhorns my code looked like a mess of conflicting styles with no real rhyme or reason to it. They couldn't make minor changes without breaking something and they had no hope of adding major chunks of functionality that would blend nicely with the existing code base.

    This is a really extreme example, of course, and I chuckle at my own naivete, foolishness and arrogance when I look back, but I think there's a very valuable lesson to be learned here:

    Most software, today at least, is written by relatively inexperienced programmers. These greenhorns won't have the background they need to select the right approach from a wide variety of options. Simple, but adequate, toolsets are the best choice. Slightly more experienced developers (like I was) may have the knowledge required to use diverse and powerful toolsets effectively, but the result will be very difficult for anyone less experienced than the author to maintain. Worse, the result may even be difficult for someone of comparable or greater experience to maintain, because they won't understand the author's style.

    Rather than a single powerful toolset, you might suggest a collection of simpler tools, so that the developer must pick one, appropriate, tool for the job at hand. Again, though, this results in an unmanageable profusion of languages and tools. I'm in favor of picking the right tool for the job, but IMO, we're better off with a single simple, easy-to-learn/use general-purpose language and toolset alongside a small number of other tools that are very well tailored to specific applications (and obviously very poor for anything else).

    Should that basic tool be OO or procedural? In theory I don't really care (in practice, I'm more comfortable with OO).

    My point here, though, is that unless the project is (and will always be) a one-man job, the tool choices need to be constrained in the interest of maintenance.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  200. Both suffer the same problem by Tablizer · · Score: 1

    You see, people abandoned procedural stuff because without planning it grew messy over time. OO came along and suggested that if you use the 3 buzzwords, then things would almost *automatically* work out.

    Guess what. They were wrong. If anything, OO needs *more* babysitting.

    I am not saying procedural is (objectively) better. I am only saying that neither is OO. Both deserve tools, research, etc. Procedural is *not* ready for the legacy pile. There is still way too much to be squeazed from it (when joined with RDBMS).

    People just keep switching paradigms every 5 or so years in search of the magic bullet that does planning for them. Until Hal9000 works, it is good old fashioned management, oversite, reward systems, and planning that is needed.

  201. from alt.humor.best-of-usenet by tnt · · Score: 1

    ----
    Subject: My thoughts on `topmind@technologist.com` AND his site
    From: "Peter" <peter@somewhere.net>
    Newsgroups: comp.object

    [Submitter's Note: Topmind has been baiting people on comp.object for
    years. People not familiar with him try to correct his ignorance, but
    invariably become frustrated by his refusal (inability?) to learn.
    Occasionally flame-gems are produced.]

    Please excuse any spelling or grammatical errors (I have just popped an analgesic which is starting to kick it. I hasten to add I reviewed http://www.[deleted].com/SiliconValley/Lab/6888/oo pbad.htm with a clear head.

    People usually want to know 'where someone is coming from', what therebackground is so I'll pre-empt any questing on the matter. My commercial experience follows

    I have programmed in three xBase langauages.

    I am an experienced C systems programmer on numerous flavours of Unix and in Win32/NT. (Most of this stuff doesn't even have a user interface).

    I have also programmed in VB.

    I am well versed in all of the structured methods (analysis, design and programming).

    I have RDBMS (Oracle, Sybase) experience.

    I currently relearning OO/VC++/MFC.
    Thus I am approaching it all with a critical eye.

    Now on to the substance of my post.

    Firstly the "OOP Myths Debunked" section.

    Myth: OOP is a proven general-purpose technique
    Myth: OOP models the real world better
    Myth: OOP makes programming more visual
    Myth: OOP makes programming easier and faster
    Myth: OOP eliminates the complexity of "case" or "switch" statements
    Myth: Inheritance increases reuse
    Myth: Most things fit nicely into hierarchical taxonomies
    Myth: Self-handling nouns are more important than self-handling verbs
    Myth: Only OOP has automatic garbage collection
    Myth: Components can only be built with OOP
    Myth: Only OO databases can store large, multimedia data
    Myth: OODBMS are overall faster than RDBMS
    Myth: C is the best procedural can get
    Myth: Implementation changes significantly more often than interfaces
    Myth: Procedural/Relational ties field types and sizes to the code more
    Myth: Procedural/Relational programs cannot "factor" as well

    Where did these come from ?

    Surely these are just "straw men" you are fighting. I mix it with C programmers, C++ programmers, RDBMS programmers, GUI programmers. I have read literally dozens of books on these topics and I read numerous IT journals and periodicals and I have not encountered anyone uttering these alleged myths. Where on earth did they come from ? You are fighting straw men, you have found some fool uttering these remarks and recorded it as 'beliefs held by OO practitioners' for your easy refutation.

    I'll comment specifically on the those especially worthy of attention:

    "Myth: OOP is a proven general-purpose technique "
    Again, this a broad sweeping statement that I have not heard anyone assert. I have read Bjarne Stroustrup argue that C++ is a proven general-pupose language and this is unequivocally true. C++ is used to write literally all kinds of application.

    However, the genericity of OO depends on its implementation. This is the same as procedural languages. Not all procedural languages are of general application. So who or what are you arguing against ?

    "Myth: OOP models the real world better "
    Better than what ? Better than the structured methods ?
    Which structured methods ?

    "Myth: OOP makes programming more visual "
    You are using a misconception that uninformed people have about the relationship about GUI and OO and using this as a criticism of OO ? Lame indeed ?

    "Myth: OOP makes programming easier and faster "
    Well that depends on which language you are using and whether you are using class libraries, templates and/or frameworks. More straw men.

    Myth: OOP eliminates the complexity of "case" or "switch" statements
    I think you are referring to the connection between polymorphism and case/switch statements. The idea is not that case/switch statements are complex. The idea is that polymorhism -- implemented correctly -- will eliminate the need for 'mainline' case statements that need to be amended to add new options. This is pretty straightforward.

    Myth: Only OOP has automatic garbage collection
    I've read heaps of OO material from reputable authors and I have even read a book on AGC algorithms and I have not encountered this assertion. Where did you get it from ? More straw men.

    Myth: Only OO databases can store large, multimedia data
    Not even OO vendors say such a thing. Another straw man.

    Myth: C is the best procedural can get.
    Did you make this assertion up ? You can go on comp.lang.c and will not find anyone asserting in an unqualified fashion that C is the best procedural language. For embedded controller programmer it may be the best procedural language owing to its space/time efficiency. I am a C programmer and I know plenty of them and this idea that you post as a myth -- implying that it is a widely held misconception -- is a load of rubbish. "C is the best procedural can get" in certain domains. A higher-level domain specific 4GL will be better at putting together a General-Ledger system.

    It seems what you have done is qulified your position

    "SCOPE DISCLAIMER: I have been programming small and medium custom business applications for most of my career. Most of my complaints against OO are related to this rather large niche. Perhaps OO is good for other niches..."

    But have put a series of unqualified and lame -- deliberately dogmatic sounding -- statements in the mouths of others and proceeded to argue against them.

    Your qualification in your "SCOPE DISCLAIMER" limits your domain of discourse to small-meduim databased applications. You say this is a "rather large niche", but that is not what is relevant. The salient facts are the sizes of the applications and their data oriented nature. You are speaking from the bottom end of the market: small, mainly single-user applications, databased, servicing 1-100 (?) users accessing small databases (~1000s records, ..dbf files are limited from what I recall). The size of the market segment is irrelevant, what matters is the type of applications you are developing.

    On the basis of this narrow and specialised position you are trying to mount a general critique that OO is a load of rubbish.

    It would take about 20 pages to dismantle your site -- and it would be like shooting ducks in a barrel -- but I have better things to do. I deliberatley scrolled up and down really fast and stopped randomly. I arrived somewhere in the "Another Fad?" secion. OO has been around since the late '60s (Simula) and C++ (the most popular OO language in industry) is more than 20 years old.

    I can print out your site and throw a dart confident it will land on more
    idiocy: "The GUI Link".
    The consensus of opionion amongst Windows developers in general is that VB is the best tool for creating GUI, many Windows programmers use a mixed-language model: VB for the interface, C++ for the actual application logic. This was the case even before VB4 when some OO support was introduced.

    I could go on and on. But I'd be wasting my time. You are plainly an intellectual fraud.

    You say,

    'Do you think I am full of horse droppings? I have offered a challenge to produce realistic business examples demonstrating OO's alleged superiority. So far a few attempts have failed. I often like to say to brochurish braggers, "put your code where your mouth is." '

    But what is the connection between your vague, ill-expressed allegations presented as myths and your challenge ? What can refute a set of vague claims that no one with any standing or credibility states anyway ?

    Horse droppings have use and value. Your ideas, thoughts and web page are without any discernable value or merit.

    More dross plucked at random:

    "In short, business programming does not get the respect that it deserves. Just because it has failed to produce the aura of "rocket science" that other niches have, does not mean that business programmers should have to put up with technologies and paradigms better tuned for other niches."

    Which business programmers exactly ? Those that produce small systems (few users, small database) or those that help develop the large databases that hold motor vehicle registration, census data, national flight reservation systems, stock-exchange transactional data etc ? Are you proposing that the NYSE could throw out Oracle db and replace it with one of your cute Clipper applications (LOL) ? Is it all the same to you ?

    You seem to live is a very simple universe. Your categories are broad and monlithic (when it suits).

    Your web-site is doing a disservice to business programmers (Incidentally I started my career as one) and you definetly do not deserve any respect. I think you need to actually learn about a topic before criticising it. That is a basic requirement.

    Have you actually had any experience with a business system that has several hundred "entities" (in the relational modelling sense of the word). I can tell you -- as can many case studies that you obviously don't nother to read -- that OO greatly aids in the management of the complexity that several hundred interrelated entries presents.

    You should take your little Clipper compiler and continue writing POS systems, Video rental systems or whatever the heck other cute little systems you write and just do your thing. If you don't like OO don't use it. No law has been passed that requires its use. Your trying to pass yourself off as someone worth listening to but you are like an old whore in a dimly lit room, attractive from a distance but frightening up close. You are a charlatan.

    I too could dredge through Usenet looking for idiotic opinions and arrived at a set of `myths` on any topic. But this is the classical informal logical fallacy of the "straw man". If you want to do a serious critique then go for it. What you have on your site is your parochial and selfish concerns about the future of your skillset and some really lame critique of OO.

    Whether you like it or not OO is here to stay. C++ is most definitely here for decades to come. Its too early to say for Java. Irresepective of specific languages, OO is most definitely here to stay as per structured methods.

    Give us a break with the

    "Programming Wisdom Center"

    "By the Galileo of Programming (the only dude with enough arrogance and smarts to fix the computer world!) Death to Unproven Fads!"

    stuff.

    There are websites by those that are literally geniuses that have made substantial contributions to IS and CS that don't self-proclaim their genuine brilliance. Their work speaks for them.

    Your website distinguishes you as not only ignorant but meta-ignorant. Your understanding of OO is poor -- this establishes you as ignorant. You are not even cognisant of the things in IT that you know nothing about, hence you meta-ignorance. Ponder this, it is meta-ignorance that is the more dangerous of the two. Ponder.

    On the topic of your self-proclaimations: xBase is flat in complexity. It's a crappy procedural 4GL, conceptually simpler than MS-Access. I haven't seen anything on your web-site or posts that indicates anything other than mediocrity and priggishness. Smarts ? Where were they ?

    I could be more hostile -- and you would deserve it -- but there is a whole NG full of people like you (that I occassionally follow for the same reasons people watch wildlife documentaries) , see comp.databases.pick. These guys aren't even familiar with structured programming. They are convinced that `Pick` a late 60s vitage DBMS is flawless, was the best, is the best, will remain the best. I know better than to waste my time on people like you. Perhaps you could subscribe to comp.database.pick and try convince them that xBase is the way to go. This would be redolent of the asylum scene in '12 Monkeys'.

    --
    Moderators accept or reject articles based solely on the criteria posted
    in the Frequently Asked Questions. Article content is the responsibility
    of the submitter. Submit articles to ahbou-sub@duke.edu. To write to the
    moderators, send mail to ahbou-mod@duke.edu.

    --<end quote>--

    --
    -- we turn sound into light...
  202. OO has NO monopoly on PLANNING! by Tablizer · · Score: 1

    >> but I'll tell you that it's certainly more fun to code using some kind of plan/design. <<

    OO has NO monopoly on PLANNING!

    I discussed some of my procedural modeling techniques under the "Orthogonality Problems" message.

    >> In other words, the code was not factored at all <<

    Procedural factors JUST AS WELL overall.

    >> just shows that the problems with OO are not really problems with OO but with OO that is misapplied by developers who don't really understand the paradigm. <<

    Try a simpler, more natural paradigm for once instead of one that requires the real world to change only in a hierarchical way in order to work as advertized.

  203. One great win of OOP: exceptions. by renoX · · Score: 1

    While exceptions is not really related to OOP, usually non-OOP languages (C,Pascal) do not have exceptions while OOP languages have them.
    C++ has exceptions but there are rarely used.

    Why am I so fond of exceptions?

    Well, they ensure that errors are dectected, so by default you are aware of errors!
    Otherwise you must hope that the programmer wasn't lazy or the error won't be noticed, if you're lucky the problem will cause a core dump if you're unlucky the programm will seem to work correctly even if it don't!

    The major downside of exceptions is a performance issue, but as long as you use exceptions to send error messages only this is not really a problem..

  204. Re:OO only shines on LARGE projects? Make up mind by TheKodiak · · Score: 1

    No, you were trolling.

    --
    -=Best Viewed Using [INLINE]=-
  205. Sorting is not a realistic re-use example by Tablizer · · Score: 1

    >> Really??? I think that generic programming is the missing key to effective code reuse. If I find myself sorting things over and over again, shouldn't I abstract that out into a generic sort algorithm, <<

    Sorting is something that has complex algorithms, but a realatively simple interface. Most business "things" require fat, complex interfaces.

    There are so many tools out there to sort, that anybody who has to write a sort by hand is either doing something wrong, or using dumb tools/langs.

    I have been letting the DB system do any needed sorts 99 percent of the time. The remainder is because some idiot used arrays where a DB table should have been. Arrays suck! They are the GOTO's of containers/collections.

    Similar comments apply to collections in general. There should be no reason why an applications developer should have to code standard collection operations by hand these days.

    In one aborted OO challenge an OO fan tried to demo how easy it was to build a half-ass DB in Python. I am not impressed by how easy a language allegedly makes writing stuff that is already readily available. Some people get off on the stupidist things.

  206. re: Tax example details by Tablizer · · Score: 1

    >> I would like to hear your response to my refutation of your "Person and Tax" inefficiency problem. I mean, we're talking about a terribly complex problem with several parts to it. Plus, the tax code changes frequently. Having an object to encapsulate the problem allows you to set the necessary parameters, and then just run T.CalcTax(P). That seems much better than your method. <<

    It is hard to cover a realistic tax example in a few paragraphs. I would be happy to dig into it at ezboard.com (see msg #900) or some other forum system of your choosing. But not on slashdot.

    >> Second, using an RDBMS for variable management is probably not such a good idea. Access is ridiculously slow, even for the best of them. <<

    My point was that using tables reduces the *need* for lots of variables. It is not really a matter of putting variables into tables. Again, I would have to study specific examples. Sweeping generalizations usually don't cut it.

    >> I'm not sure how you don't see that the Object, Attribute, Method framework is logical. It seems so natural to think of a person as a Person() rather than a more haphazard collection of defining variables. <<

    It was an example to illustrate a specific point. I have since replaced it with another example because that one seemed to confuse people who did not follow the links.

    One nice thing about tables is that it is easy to see and manage the data (state) without the clutter of implementation. I compare this to only seeing the front of the control panel instead of having to wade through the guts of the insides of the box. Some OOP IDE's can do something almost like this, but they emphasize trees, which you already know my opinion on.

    >> As for portability, well, Java serialization allows you to pass objects between platforms. <<

    How is that better from say EDI, XML, or DDE? Also, only Java can participate without converters, unlike EDI and XML, which is more language agnostic.

    >> It just seems like your attempts at abstraction would result in parameter overload: every object would be a list of parameters in your model, and trying to keep track of or pass them around would be sick. <<

    Like I said, I use RDBMS for this.
    The original example was misleading without following the entire link trail.

    >> But hey, write a platform with your model... <<

    I don't need a dedicated platform/language for it. (It would simplify many aspects of it if I did though, and I have plenty of suggestions and draft protocols on my website.)

    >> In any case, they were trying to piss you off when they modded your comment down. It was a good comeback, for some of it at least, but you just can't convince the Slash crew of what they don't want to hear. You should have seen me try to convince them that copyright wasn't always a bad thing :) <<

    That is a common complaint of importance ranking: unpopular, but potentially good ideas get slashed (pun). If Einstein had slashdot when he first came out with relativity, he would get a lot of zeros. Most good ideas are not welcomed with open arms when they first surface. That does not imply that my suggestions are on the same level, but new/fresh ideas and junk usually do get the same treatment under voting.

    Democracy: where 51 percent *dictate* to the other 49 percent.

  207. Red Herring, missing references not pivotal by Tablizer · · Score: 1

    The points next to the missing references are rarely pivotal to my arguments.

    Complaining about that is not key.

  208. Re: Tax example details by scotteparte · · Score: 1
    I don't think we'll agree because we're stuck on the object vs. RDBMS debate. I love relational DB's, in fact I used them extensively in my previous job (PostgreSQL, Oracle, MySQL even though it's not really an RDBMS). But I found them better for storing data long-term than for programming, because the write/delete time is horrendous, especially if you use a good indexing system, which you must to get reasonable read times.

    "Democracy is two wolves and a sheep voting on what to have for dinner. Liberty is a well-armed sheep protesting the vote."
    -Benjamin Franklin

  209. specifics, people, specifics! by Tablizer · · Score: 1

    Yet more anecdotes. Why can't anybody give specifics of where OO allegedly helped. Again, the few times that I actually got to see some specifics indicated either personal subjective preferences or bad procedural techniques. At least one little example. Arrrrrg! Frustrating.

  210. Re:Free of the Tree, socket and rocket in your poc by Tablizer · · Score: 1

    >> And besides, it makes everything considerably more complicated to have lots of multiple inheritance involved. <<

    I was not really thinking about multiple
    inheritance as the way to get away from
    a strict (single) tree.

    >> I also have canRead(), canWrite(), and canSeek() members to tell me if these options are available. <<

    I notice in my collection protocol analysis that operations like seek() {as in query, not position} are often not-all-or-nothing. If no index/hash is available, then a sequential search is still possible, just more expensive. If there are only 50 items, then rejecting a seek just because an index does not exist may not make sense. Also, many collection engines cannot tell you if a seek expression can use an index or not.

    Those are the kinds of sticky details one encounters when trying to make generic anything.

    I have some draft examples of generic collection stuff at:

    http://www.geocities.com/tablizer/array1.htm

    Perhaps we can combine your sockstreams and my collection protocols and make the ultimate generic "multiple thing getter"......just a thot

  211. one last Soviet analogy, if you don't mind by Tablizer · · Score: 1

    >> and has been willfully resistant to all efforts to educate him. <<

    As in Soviet style "re-education".

    Todd Blanchard and his group are a bunch of egotistical clubby trivia pedantics who could not create external proof if their Linux box depended on it.

    They piss on the scientific method and rational, step-wise analysis. Being right or wrong is based on a club vote, and not external, inspectible evidence.

    Their brand of Zen Science is similar to what fuels OO hype.

    Show me your 3 code examples or shut the h*ll up! I am tired of your authoritarian hot air.

  212. Bad OO versus Bad Procedural by Tablizer · · Score: 1
    But where you use a non-OOP-optimized method of programming, you're wasting your time.

    Since most programmers are mediocre, what if we look at the paradigm from that standpoint instead of under ideal conditions?

    I once asked what works better with mediocre or bad programmers, and surprisingly some of the OO fans would rather work with bad procedural code than bad OO code.

  213. That is just my observation by Tablizer · · Score: 1

    It is true that companies don't want to spend on upgrades, but it just seems that things get toss or replaced anyhow IME.

    I have seen a lot of stuff that was tossed because of mergers, new server brands, can't find programmers, manager retirements, purchase a whole new packaged/bundled deal and so old stuff gets tossed if it was good because of one that comes with the bundle, etc.

    That is just my observation. I will change the figure to "3-to-5 years" just to be on the safe side. Better?

  214. Ah, the good ol' days by Tablizer · · Score: 1

    I *won* the dollar-sign argument. Malraux agreed it could be done. What are you bragging about? It wasn't even about OO.

    Regarding the device driver, I already admitted that OO may be better at device drivers on my anti-OO webpage. (But, in my domain I spend zero time writing device drivers, so it is moot.)

  215. re: seperation of biz rules from display logic by Tablizer · · Score: 1

    (* This is not a programer! *)

    That is how most "programmers" (or whatever the h*ll you want to call them) do their GUI's.

    Perhaps you are going to rattle on about seperating biz rules from display logic, blah blah; but IME it does not work out that clean in the real world, partly because such taxonomy boarders are often fuzzy or artificial (similar to IS-A mentality in general), and partially because it costs a bit more to do it that way in the short-run and thus few companies bother to pay for the time.

  216. LabView is OOP? by Tablizer · · Score: 1
    I work for a large engineering company and I recently had to learn LabVIEW which is OOP. At first I thought it was going to be extreamly easy, but there is more to it than people think. I find it very useful when doing multi-layers and sub routines because if you save things right you can re-use.

    Labview is OO? Isn't that the visual chip-like interface where wires between chip-like blocks are parameters and the chips are the functions?

    An interesting concept, but hardly OOP.

  217. bridge between arrays and RDBMS by Tablizer · · Score: 1

    >> But I found them better for storing data long-term than for programming, because the write/delete time is horrendous, especially if you use a good indexing system, which you must to get reasonable read times. <<

    I am not sure what you mean. If you mean like as a substitution for arrays, then I agree that some sort of "lite DB" engine/driver would be nice. XBase had such readily avialable. I am not saying that XBase is the ultimate language, but when it comes to temporary array-size structures that may grow to need a spectrum of relational operations, then it was wonderful.

    Perhaps if more languages/libs offered a lite-driver that was upwardly compatible with RDBMS calls (and some little syntax adjustments), then it would do that kind of job using less resources. After all, its only a protocol.

    As far as indexing, if you need the indexes to begin with, then you are doing something that a simple RAM collection probably cannot handle to begin with. IOW, indexes are optional.

    Perhaps you were on an expensive SUN box? It seems Sun shops are relunctant to buy faster servers, and thus worry more about performance. Just a hunch. NT might be crap, but hardware upgrades are relatively cheap. Switch to Linux instead of Sun perhaps.

  218. Goodwin Oriented Programming by Tablizer · · Score: 1

    Actually, I should compare it to a religion, not politics. It is all based on faith and anecdotes. Nothing external to inspect.

    Why is there nothing external to inspect?

    BECAUSE OOP IS NOT BETTER!

    I have seen decent examples of how OO could help with device drivers, so examples/proof *can* be made for benefits. However, nobody can do the same with biz apps/models.

    What else am I to conclude?

    (Actually, I might take another stab at those driver examples one of these days. But for now, I will give them a tentative victory.)

  219. I've done lots of maintenance by Tablizer · · Score: 1

    >> I think that this guy's point of view is incorrect though because he has only ever had to be the initial designer of a product and has obviously never had to assume somebody else's code base where he had to figure out what the initial developer's purpose of code was. <<

    I never said that was the case. Where did you get this presumption?

    >> By the way, there have been new development disciplines to speed up this exact process he is complaining about. http://www.extremeprogramming.org/ <<

    Extreme programming is orthogonal to OOP. Frankly, I think XP's effectiveness depends on the group/people involved. It makes some rather shakey assumptions about human interaction behavior that may apply to some, but not all people. Anyhow, another topic.

  220. Why would God need a compiler? by Tablizer · · Score: 1

    >> Myth: OOP models the real world better.
    OOP models objects really well <<

    Do you mean real world "objects"? If so, Bertrand Meyer disagrees with you. He says that the purpose of OOP is not to model the real world directly.

    >> Myth: OOP eliminates the complexity of "case" or "switch" statements.
    Yes with a properly designed class hierarchy. <<

    Prove it with CODE.

    >> Myth: Most things fit nicely into hierarchical taxonomies.
    Actually most things can if they can if designed right. <<

    Do you mean that if real world things are "designed right"? Are you telling God how to program or Honda how to make cars?

    >> Myth: Components can only be built with OOP.
    Again not true but it is easier and more natural to develop components in a OO framework. <<

    Demo, example, proof?

    >> Myth: Only OO databases can store large, multimedia data. Where does he get these? <<

    Bertrand Meyer.

  221. JDBC == FORTRAN in JAVA by Tablizer · · Score: 1

    >> If you do not like set/get methods so jsut skip tehm and access teh datafields. <<

    Then you have a typical DB access approach that has not changed for ~25 years. JDBC looks an awlful lot like the Fortran DB API's I used to use on a Prime when I first started. (It was even a pre-SQL engine that was not upgraded for about 10 years at the time I came.)

    IOW, no advantage over procedural/relational. Wash.

    >> all who access direct the field have to be changed if the field is changed) <<

    And odd self-stopper of DB's is that once they are populated with data, you don't change existing fields very often because then you lose backward data compatibility. Generally you would just add a new field and slowly phase out (any) old one.

    It is just one of the odd self-preventing situational rules of thumb. What is the name of that concept? I can't remember.

    Anybody?

  222. The ultimate Shapes website by Tablizer · · Score: 1

    Jim Weirich started cataloging the same Shapes example done in many difference languages, both OO and procedural:

    http://w3.one.net/~jweirich/oostuff/

    It is sort of a take-off of the 100-bottles-of-beer website, but with shapes instead.

  223. The Java risk by Tablizer · · Score: 1

    You might be right. If OO falls out of style, then C++ will live on, but Java will toggle to legacy-status.

    Java bet the farm on OO by not catering to procedural very well. (It is doable, but not as easy.)

  224. another proofless Zen-head by Tablizer · · Score: 1

    >> He's also (ironically) not very well versed in relational techniques, either. If the entire world went back to XBase he'd be in his element. <<

    That is a sloppy misrepresentation of my point of view. Jerkass!

    You are just sore because you CANNOT make code proof that OO is better.

    Flunkie!

    >> One time he claimed that cursors in external processes ran more slowly than stored procedures in the server for political reasons. :-) <<

    Ignoring the set-optimization issue, I still say this is true and you have not proved me wrong.

    >> He likes to compare it to pure OO, as if OO programming can't use relational paradigms as well. :-) <<

    I allowed you to combine OO with whatever you wanted. You are lying (or bad Reagonitous on your part).

    OO and RDBMS are hardly a clean fit anyhow. Look at all the expensive tools to simply translate from one paradigm to the other. What a waste.

    However, that is what you often have to do because OODBMS are flops.

  225. print() versus system.print() by Tablizer · · Score: 1

    I think he meant "many blocks" or "more syntax".

    Classes not meant to be instantiated are often bulkier syntactically than procedural in many languages.

    Would you rather type/read:

    print("foo")
    print(x)

    or

    system.print("foo")
    system.print(x)

    all over the place?

    global methods would be nice in certain cases.

  226. swappable implimentation issue again by Tablizer · · Score: 1

    >> This is amazingly powerful. You can adapt existing classes to multiple purposes, mix in new behaviour, or swap out an old class for a better designed one. <<

    I perfectly understand these swappability and override-differences concepts, and talk about them extensively on my website.

    However, I have been *unable* to apply it to *real* stuff in my domain. It is woooonderful on paper, but.....

    Like already discussed around here, new things often/usually require major *interface* overhauls. The idea that the interface is stable and all the dynamicism is only/mostly *underneath* the interface just does not apply to the real world, at least as I see it.

    Perhaps for device driver domains it might be great, but I can't find much use for it in custom biz software.

    The client is only going to pay for *one* implimentation per interface, and exceptions/variations don't fit cleanly into inheritance trees.

    If you can show me a good biz example, that would be great.

    Been waitin' for 3 years.

    1. Re:swappable implimentation issue again by KagakuNinja · · Score: 1

      In my case, we were rewritting "business intelligence" tools; data query, analysis and report writing, with a GUI. OO would not be that great for device drivers, due to inefficiencies.

      I never said interfaces didn't change. In the course of the two year project, several interfaces changed multiple times. That did not make interfaces any less valuable however. It is simply a tool for managing complexity, and most OO advocates do not claim it is the magic solution for all situations.

      I won't go into more detail on this; others have expressed my opinions more elquoently.

    2. Re:swappable implimentation issue again by Tablizer · · Score: 1

      >> In my case, we were rewritting "business intelligence" tools; data query, analysis and report writing,... <<

      Two of these can, and often do, come from off-the-shelf stuff. Why were you re-inventing them?

    3. Re:swappable implimentation issue again by KagakuNinja · · Score: 1

      Uh, so that we can sell products to customers for money?

    4. Re:swappable implimentation issue again by Tablizer · · Score: 1

      >> Uh, so that we can sell products to customers for money? <<

      So you are making database engines and report writers from scratch so that you can re-sell the system without say Oracle and Crystal Reports?

      Are we talking 10 sales per year, 100, 1000?

      It sounds a little funky. I haven't surveyed the report writer component market, but there are plenty of existing lite DB engines out there.

      You are doing something wierd, man.

    5. Re:swappable implimentation issue again by KagakuNinja · · Score: 1

      No. We competed against Crystal Reports. Report writing is one component of the system.

      This is the Business Intelligence marketspace, worth several billion and expected to grow...

    6. Re:swappable implimentation issue again by Tablizer · · Score: 1
      No. We competed against Crystal Reports. Report writing is one component of the system.

      So why were Crystal Reports and other commercial reporting components not sufficient?

      Most businesses choose not to write their own report-writers and DB's from scratch. You seem to have made a minority choice. If you wish to claim that OO allows one to re-invent DB's and report-writers faster, go right ahead. Most biz won't care about that.

  227. Re:Both right and wrong... by Tablizer · · Score: 1
    This was an astute observation. [however.....] The author also doesn't address newer OO patterns which are coming into popularity, such as attributes, dynamic relationships, and so on.

    Examples? links?

  228. okay, why a '4' people? Only quoting scriptOOres by Tablizer · · Score: 1

    This message almost sounds like it was copied verbatim from the "why you should use OO" chapter of a Java or C++ book. I agree that the concepts sound wonderful on paper, but they rub against a reality that does not plug into these concept cleanly.

    The message has things like:

    >> This is quite powerful; with a single line of code specifying what to inherit from, your object gains a whole lot of new functionality "for free". <<

    But then tempers it with:

    >> Once again though, there is very little special here, it can all still be done with imperative languages. OO languages just, once again, make this concept more a part of the syntax and constructs of the language. <<

    Which does not mean much if the pure version is too idealistic to work in the first place.

    >> Inheritance also allows you to override methods, so if the object you inherit from has a function, you can redefine that function to behave differently. <<

    If you solve the "method boundary not matching the difference boundary" issue, then this might just fly. (For example, only 1/3 of a given method may need to be different than the parent.)

    You also have the "fragile-parent" problem to deal with.

    Tackle the hard issues rather than keep repeating the doctrine over and over. That is what is really needed.

  229. Response to SQL example by Tablizer · · Score: 1

    [quote]
    Just compare getting the address of the client's parent with:

    theclient.parent.address

    vs doing the same thing with:

    select address from people p
    inner join people p2
    on p2.idparent=p.id
    and p2.id=theclient

    [end quote]

    If that was a common need, then write a function to do it. (Personally, I don't encounter a need for such very often, but specific apps might be able to make need of such a fucntion.)

    [quote]
    In the end, no-one needs to prove anything about any language, db type or method of working since everyone will just go ahead and use what works best for them.
    [end quote]

    But like I aready said, the over-emphasis on OO is harming tools/training/research in the alternatives.

    No programmer is an island.

    BTW, thanks for the example. They are rare around here.

  230. auto-planning? please explain by Tablizer · · Score: 1

    >> I can sit down and hack C freely without thinking of the problem ahead. Doing so with OOP approach is next to impossible, OOP makes you work <<

    Note that you can plan for good structure and future change handling in procedural/relational code also.

    However, you seem to be implying that OOP *forces* you to plan, and therefore it is good.

    This is hard for me to swallow. Somebody who wants to hack out OOP code can do the same by following the standard simplistic/formulaic-OO rules: One class per major noun, and subtyping for any variations on these nouns.

    That *will* get you "instant OO". Now, wether it will look so good 2 years down the road is another matter.

  231. as a brain stimulator, maybe a good idea by Tablizer · · Score: 1

    >> If you break OOP down into it's basic parts, there are some good and useful ideas there. OOP as a religion sucks. <<

    Sometimes looking at things in an OO way can indeed stimulate some thinking. However, I rarely conclude that the OO way would have been the best path (unless, sometimes the specific p/r language I am using does not have a certain p/r feature, and OO is the next best alternative.)

  232. Best practices can be made for any paradigm by Tablizer · · Score: 1

    >> What a lot of people missed out about OOP is the fact that OOP does nothing but "unifies" common programming practices and provides a common "language" and communication gateway for developers to use when they are working on their projects. <<

    So if somebody wants to resurrect
    respect for procedural/relational programming,
    then what they need to do is codify the good practices?

    I guess I am the one who is going to have to do
    that. (Fortunately, I have already started).

  233. Hey, it rhymed by Tablizer · · Score: 1

    >> Abstraction is the most important and useful thing you can do as a programmer. It takes many forms, but no matter what paradigm you're working in, programming is all about abstraction. <<

    I picked that title mostly because it rhymed. I am NOT against abstraction, just OO's brand of it.

    The bottom line is that there is still no proof that OO is better, REGARDLESS

  234. re: OO versus SQL by Tablizer · · Score: 1

    >> I've written server scripts with raw SQL statements, and trust me, this is much easier. <<

    You may want to look at:

    http://www.geocities.com/tablizer/chal01.htm

    Bottom line: you can have a procedural/relational framework tha hides most SQL also.

    The good thing about SQL is that you can paste it directly into an SQL browser and play with it to test or debug or experiment with it and then put it back in when you have what you need. A framework may make this harder to do.

    There is indeed alot of duplication in SQL that can be factored out, but when access gets tricky or complicated, the framework will not work. For example, I have not seen how they deal with left outer joins as an option. Can anybody fill me in on this?

  235. Wallet Oriented Programming - Yeaaah Baby! by Tablizer · · Score: 1

    >> Because languages like Java and C++ let me bring home the bacon! Thank You, OOP! ...
    Let's face it, all programming languages and paradigms mostly suck. I gave up on searching for truth and beauty (at least with programming) years ago <<

    I wish I could learn to go with the flow.......of money.

    Hmmmmm. Maybe I can be the next Bertrand Meyer of Table Oriented Programming and also sell $75.00 books.

    My website might have bad references and apostrophes, but at least I did not charge you 75.

  236. That is a new claim by Tablizer · · Score: 1

    >> Object orientation makes it easier to manage changing interfaces. <<

    How? That is a rather new claim.

  237. Comparing C to Java? by Tablizer · · Score: 1

    >> Being a programmer, I can say first hand the OO is easier to learn at an intuitive level. <<

    Intuitiveness is highly person-dependent.

    >> FYI I coded a chat server in C, and it took me about 1/2 the time to do it in Java. <<

    I am not surprised. C sucks as far as human productivity is concerned.

  238. That is what OO was actually invented to do by Tablizer · · Score: 1
    There is one case that comes to mind where I have been able to make things *less* complicated using OOP: Engineering simulations involving structures (think animation). Objects work great here, b/c every object can have it's own state assigned to it, and then it's just a matter of doing an object->move, object->rotate, etc. OOP is the better way to go here. I guess this applies anywhere you have several 'things' all doing something different at the same time. OOP makes sense for that. But if you are working with only one 'thing', why would you need an object to describe it? You could simply use normal subroutine calls instead. OOP masks that complexity for multiple instances of a 'thing'

    That is actually what OO was originally invented to do. It started in Simula-67, which was a modeling and simulation language. Thus, your experience there is not surprising.

    Note that "multiple instances" (state) usually go into tables in my domain. Easier to view, manage, report on, and monitor the "state" there also IMO. However, relational/indexed tables may not be suitable for some engineering apps due to timing or hardware constraints.

  239. Re:Eliminating case/switch statements? by Tablizer · · Score: 1

    (* Someone care to explain to me why one might see this as good thing? I tend to use these a bit *)

    Background info:

    http://www.geocities.com/
    tablizer/meyer1.htm#singlechoice
    (you will have to concatenate these URL sections, because the browser cannot handle long things--either can my wife, he he.)

    and

    http://www.geocities.com/tablizer/shapes.htm

    BTW, my page stated "eliminating the *complexity* of case/switch statements". It makes a difference when you get into the nitty-gritty of the debate.

  240. Well, it's a start by Tablizer · · Score: 1

    >> OOP gave us just right level of hierarchical abstraction to make platform-specific issues irrelevant to higher layers; <<

    But how did this system get around the "method boundary" issue?

    >> at those higher-layers, the mind-boggling flexibility of table-driven rule sets provided a potent way to model business processes without trying to put everything in exactly one box. ...
    I do believe we are heading for a convergence of sorts. The tables in question are going to be XML, with Java (or pick another OO language) providing the framework in which (and with which) to parse it. <<

    XML? Yikes!

    XML is:

    1. Not Relational
    2. Not Easy to browse by itself if lots of cols.
    3. A storage/xfer format only

    The format that the data is stored/transported in is a table/DB implementation detail, not an end-all-be-all.

    But, if that is the best way to sell T.O.P. to the world, then I will pretend that I like it.

  241. questions about your anecdote by Tablizer · · Score: 1
    Object reuse only coming after years. Well, I work for a company that is a big user of object technologies. We have our own data access, mapping, and server objects that are our bread and butter, we can go in and have an application up in little time because we don't have to write most of the functionality, just abstract the business logic.

    I don't dispute that OO worked well for you, but what exactly are you comparing it to?

    Procedural shops can also acheive high amounts of re-use if they try and given planning time by the powers that be.

    It might also be that OO fits the way your particular team thinks.

    Not everything is abstractable/in a hiearchy, true but I find in most of the work I do, it is.

    Which line of work is that? I think that may be the key. If the domain is tree-able, then OO may indeed shine. But, when where how and why this occures is not well studied. I was just chatting with a radar installation software guy, and he said that his interfaces tend to be very stable and thus they can use the OO Driver Pattern or something similar. But, I rarely see (write) this kind pattern in my domain.

  242. tendor loving care by Tablizer · · Score: 1

    >> Anyone familiar with procedural programming can testify that scanning lines of undocumented and tightly written code can be a nightmare. The old ideals of syntatic efficiency at the expense of readability, while fun and good in the hacker world, don't fit into the corporate world. <<

    Bad code can be written in *any* paradigm.

    Often there is no incentive or training to improve procedural talents. It is as if software engineering training has been *written off* for procedural works because OO is supposed to take that mantel.

    The self-fulfilling-prophecy-ghost is back

    I can see plenty plenty plenty of places that procedural code can often be fixed up when I encounter slop like you talked about.

    Almost 80 percent of p/r code *I* see is *highly* in need of tender-loving-care.

    It is amazing how something simple can be fubared in the hands of ignorant/stupid programmers. Oh the crap that I have seen. But ALLLLLLL fixable.

  243. Re:OOP *is* really the next level by Adam+Wiggins · · Score: 2

    I'm not really that concerned with convincing anyone, in truth. If there are good tools available and you choose to make your own work harder by ignoring them, it's no sweat off my back. :)

    However, here's a quick example where OO excels. I was in the game industry for many years. Virtually all games involve a bunch of "things" moving around on the screen, anything from spaceships and laser beams to puzzle pieces falling from the sky.

    For years I struggled trying to reconcile the fact that all of these "things" are very similar in many fundamental ways. They all move around and bump into other things. They all need to be saved to disk and loaded again at savegame time. They may need to blow up or otherwise be destroyed when certain game events happen. And of course, they need to display themselves on the screen somehow. Yet they are all very different - the logic that controls, say, an homing missle is quite different from the logic that controls the player character, for example.

    During this time I wrote hacks involving void points, casting, functions with huge "switch" statements at the top to try to figure out what something was, and other roundabout ways to handle all the similar functionality of these things in one place, yet still allow for all the special code that goes with each type of thing.

    OO solved all of that nastiness for me. It pretty much works the same in the end, but it's much easier to code, and *vastly* more maintainable. I can now make a base class entity, and derive all my specific types of things from them. I have virtual functions for Move(), Collide(), AI(), Update(), Draw(), which have defaults, but I fill them in with special code for each type of thing, and I never have to duplicate my basic motion/collision/whatever code, nor are there any messy hacks to be able to put all these types of things into one giant list of entities, but still have each thing "know" what it is and how to behave.

    It's more complicated than this, but that's the gist of it. Every game company I've worked at has used this scheme almost exactly (although the terminology may differ) because it works so well.

  244. does size matter? by Tablizer · · Score: 1
    Most of the points made in the article are very close to the truth in the general medium and large business world. I worked on a OO project (we did use OO design methodology) at a large corporation in the early to mid 90's, and it mostly played out exactly as the article describes. .......I personally believe that OOP can be extremely powerful and productive for an individual developer or for a very small team of like-minded, cooperative developers

    While I am glad you tend to agree, the size thing seems to be the opposite of what many OO fans are saying: that is "OO tends to shine more as the project gets larger".

    About half of OO proponents seem to say that improvements scale with size, while the other half says that OO helps all project sizes (except for one-off scripts).

    But the suggestion that it mostly shines (or can shine) for smaller projects but not larger ones is kind of unique.

    Just something to ponder.

  245. Database Misconceptions by Tablizer · · Score: 1
    One of the reasons that OO is helpful is because you do not need to worry about the format of the data in an object. If you want to use a database or a flat file it is all the same outside the object.

    I am all for a consistent collection protocol. Whether the back-end engine is Oracle, a flat-file driver, or arrays, it should not matter. Look at ODBC. You can make an ODBC driver for a hair-dryer if you want. (There *are* ODBC drivers for flat files, spreadsheets, Word documents, etc.)

    You don't need OOP to do that.

    The way to do something ad-hoc in OO is to subclass. Usually when you subclass you are saying that you specifically want to deal with how the data is stored and you are willng to accept the consequences.

    Why? SQL is easier. If your query links 4 classes, then you have to subclass 4 times. Besides, where do those links come from? And, all that code left around if you forget to delete it.

    You just run the risk of making your data unusable to your object. But again a risk that your proceedural program would face as well.

    I am not sure what you mean.

  246. Re:implementation versus protocol by lscoughlin · · Score: 1

    by "two dimentional" i mean logical. With an rdbms you can't make an intellegent nested structure without a myriad of joins and lookups. Flattening a tree into X tables (or a single self referencing table) drives me batty.

    The native format issue is mostly an elegance issue. Good engineering makes complex structures easy to deal with. So a well engineered view centric data orgainzation system should make dealing with data as either a tree, or a table equally elegant. So where do you start...

    -T

    --
    Old truckers never die, they just get a new peterbilt
  247. Us OO bashers come in all shapes and sizes by Tablizer · · Score: 1

    >> However, unlike many people who criticize OOP, I don't believe that "C is all you need" <<

    As an OOP hater, even I would rather use Smalltalk than C for most projects.

    However, if sombody's mind works well with C and they can prove it with productive and flexible code, then nobody should complain. The things that throw me in C might not throw them (and other C fans).

    >> What has made OOP successful is that it encourages its practitioners to build abstractions and to think about how software may evolve and be reused in the future. That would have been possible in reasonable, traditional, procedural languages, but the world needed a gimmick in order to have people listen, and that gimmick was OOP. <<

    Agreed to some extent, but people then stop looking for procedural/relational gimmicks to improve focus on software maintenance because all the attention goes to OO. IOW, the self-fulfilling-prophecy again.

    >> But support for runtime safety, garbage collection, reflection, genericity, aspects, and other features is important and allows you to build much more complex software systems much more easily. <<

    I don't know. Often you get pack-rat languages with more toys for bored programmers to make messes with. Minds wonder. Spend complexity wisely.

    Besides, there are some sticky tradeoffs in that list, but I will leave them to Smalltalk versus Eiffel battlers, etc.

  248. Re:implementation versus protocol by Tablizer · · Score: 1

    I would have to look at a specific, real example. Tables overall have more dispatching power than classes.

    Besides, "nested structures" are of limited use IMO in biz applications and the "nestedness" is a *particular* view for a particular need. Tables allow multiple views of things better than any other collection handling structure. Perhaps they are not optimized for each and every specific "kind", but they the most morphic and most practical.

  249. We knew that was coming - re: MS Word by Tablizer · · Score: 1

    Using Microsoft Word as an example of the benefits of OOP flies like a lead balloon around here.

    But, to continue beating a dead horse: MS Word is buggy and has a crappy interface IMO. I think MS inherited the bugs by encapsulating stolen polymorphic designs.

  250. Re:OOP *is* really the next level by Tablizer · · Score: 1

    >> However, here's a quick example where OO excels. I was in the game industry for many years. <<

    Note that most of my criticms target biz apps and not games. I don't know enough about games to be any authority on them.

    >> During this time I wrote hacks involving void points, casting, functions with huge "switch" statements at the top to try to figure out what something was, and other roundabout ways to handle all the similar functionality of these things in one place, yet still allow for all the special code that goes with each type of thing. <<

    It almost sounds like a good use of tables, if it was perhaps not for speed considerations (i never tried it). Giant switch/case statements in biz apps are almost always a sign that you need a table, especially if the list repeats.

    I love tables. They compact information so tight and concise and understandable. Classes and hierarchical browsers can't compete, at least not in my mind.

  251. Dude, think you need a vacation. Long hrs catching by Tablizer · · Score: 1

    RE:

    "Took a shower this morning, looked on the bottle and it said:

    0. Hair takes water
    1. Hand takes the shampoo
    2. Hair takes the shampoo
    3. Hand works shampoo into lather
    4. Hair takes water which removes instance of lather
    5. this->repeat()

    A lot of OOP programming I see is like procedural except the first parameter is the object. Like foo(bar,crud) becomes bar.foo(crud)"

  252. OOP is Soylent Green! by Tablizer · · Score: 1

    >> It appears the mob has spoken, Troll Boy. <<

    But my counterpoints *were* valid, were they not?

    I don't get it. (Neither the ranking nor OO.)

    I squashed a fooooouuuuuuurrr fair and sqare.

    Is a "mob" the opposite of a "troll"?

  253. re: "encapsulation" by Tablizer · · Score: 1
    Just because many people don't understand the definition does not mean that the definition is vague or watered-down.

    But there is no clear, standard reference. For example, "encapsulation" contains some aspects of security, and some of positional locality (next to each other).

    These are sometimes orthogonal. I think they should be divided in sticky discussions.

    I would more likely blame lack of coherent design.

    Often there is more than one candidate for grouping something by. If you group it by aspect B, then you risk A-related problems. If you group it by aspect A, then you risk B-related problems. I find these kinds of tradeoffs common in arguments over how and where to group things. Code is generally one-dimensional, but life is multi-dimensional. Thus, a forced tradeoff.

  254. wrong by Tablizer · · Score: 1
    As for syntax.. well, you should have seen some of his earlier missives on semicolons on IWE. (nevermind when people _explained_ why they were used, etc... he didn't like them, so they were stupid"

    A gross, biased over-simplification. My summary: they said they made compilers faster and more predictable. I simply weighted the tradeoffs and concluded that errors caused by human semicolon typos were a bigger cost than rare re-structuring of code that the compiler may trip on.

    Prove him wrong, pin him in a corner, and its a technicallity/silly/not important. More often, he'll just ignore them,

    Bull! Name your best 2 points that I ignored? Name them or shut-up! Most often your best victories are imaginary.

    Regarding the Capers Jones LOC study, I discuss it on my "goals" webpage.

  255. Irrelevant, you STILL have no proof by Tablizer · · Score: 1
    Why don't you dig up some of those references you accidentally lost?

    I could lose a thousand references, and you would STILL have to inspectable proof that OO is better.

    A personal, pedantic, red herring attack. Typical of you guys.

  256. PKD by matt_king · · Score: 1

    not related to the article per se, but i do like your sig quote ;)

  257. Re:Another reason ... by FunOne · · Score: 2

    All the things you've mentioned are compiler isssues.
    FunOne

    --
    FunOne
  258. Evolving interfaces by Chalst · · Score: 2
    The author makes two valid (but unoriginal points): firstly that
    trying to do everything with inheritance is bad (every non-novice OO
    programmer agrees), and secondly that you don't support for classes
    and objects to get the benefits of object orientation (but you need
    first-class functions and dynamic/existential/abstract types, obvious
    to the LISP world for over twenty years).

    Object orientation makes it easier to manage changing interfaces.
    Support for object orientation makes it easier to achieve this in
    programming practice. The author seems so upset about bad designs he
    has encountered caused by an inflexible, deep inheretiance that he
    seems blind to the fact that OO support can facilitate good design.

  259. Re:Is taco sad...? by phillipps · · Score: 1
    `...perl's bastardised version of OOP; which, BTW, sucks balls.'

    Well, I'm in that category. I came first to Perl 5 (having used Perl 2..4) then tried to make sense of C++. Not pretty.

    Larry's done a remarkably good job of adding OO semantics to Perl. And has had one hell of a good idea: splitting bless from creation of the object. I put this on a par with Unix's split of fork and exec, which allows flexibility unknown to other OSes.

    I have used Perl a lot; and of my programs about 10% have used the OO semantics. They are handy, but not worldbeaters. There is a problem set that can use OO, but it's not everything by any stretch. If there really is a set of "objects", maybe. Otherwise not.

    Just my £0.02 (worth a bit more than $0.02).

  260. Find what you look for by Mall0 · · Score: 1

    This "article" is biased from the getgo, and I smell a familiar stench of elitism. This "Real programmers don't use " is getting tired. The author does allow that he is not informed on enterprise level needs/development, but from my sandbox, OOD is the best thing since slice(bread). When coding for a paycheck, freeflow art usually doesn't last/can't be maintained/extended/scaled. OOD provides a great framework if you think OOP constantly.

  261. Re: seperation of biz rules from display logic by twitter · · Score: 1
    Perhaps you are going to rattle on about seperating biz rules from display logic, blah blah...

    No, I think I'll just tell you that people who click on little boxes all day are program users not makers. Yes, this does lead to spagetti code with fuzzy borders that's imposible to maintain, but that kind of con job is another story. The man's a troll, Tablizer, he knows better than what he writes and seeks ignorant responses such as yours.

    --

    Friends don't help friends install M$ junk.

  262. Re: seperation of biz rules from display logic by Tablizer · · Score: 1

    I usually do a compromise, something like
    this:

    ...
    acell("name", t.name, "")
    acell("rank", t.rank, "")
    acell("cost", t.cost, "$")
    ...

    sub acell(title, data, options)
    formatStuff()
    display(title, stuff)
    display(data, stuff)
    more_formatstuff()
    end sub

    This way the formatting stuff is near-by
    but not repeated over and over for
    every fricken column and cell, like
    amatures do.

  263. Re:People think in objects by sjames · · Score: 2

    One of the basic assumptions is that the human brain is built to think about the world in terms of things that have properties and behaviour. We can think in terms of procedures and execution flow as well, but we're not nearly as good at it.

    The problem is, humans tend to think in terms of something acting on something else. With the data and methods mixed together, it feels like building a house by 'asking' the nails to hammer themselves rather than 'asking' the hammer to act on that nail.

  264. Re:People think in objects by Tablizer · · Score: 1
    The problem is, humans tend to think in terms of something acting on something else. With the data and methods mixed together, it feels like building a house by 'asking' the nails to hammer themselves rather than 'asking' the hammer to act on that nail.

    An OO fan could argue that you need hammer.slam(nails) instead of nails.slamBy(hammer), or the like.

    I notice that in most sentances there is only one primary verb, but often two primary nouns (subject and object). Thus, it appears that the verb is a more central and consistent a concept to model around. I find that in (decent) "procedural programming" the grouping will be more consistent. The module grouping is almost always around a central verb or activity. With OO you cannot predict which noun that the behavior was stuck into. Thus you go into somebody else's OOP program not knowing whether the nails will be doing the action/asking or the hammer.

    That bothers me about OOP. I never came to grips with that.

  265. The real benefits by SpinyNorman · · Score: 4

    The article is vapid since it addresses a collection of OOP myths that don't cover the real benefits, and secondly comletely ignores the practical reality that for most people the OOP/procedural choice is C/C++ choice, and that C++ has many features (such as constructors/deconstructors) that while not necessary for OOP, are huge benefits.


    Myth: OOP is a proven general-purpose technique
    Myth: OOP models the real world better
    Myth: OOP makes programming more visual
    Myth: OOP makes programming easier and faster
    Myth: OOP eliminates the complexity of "case" or "switch" statements
    Myth: Inheritance increases reuse
    Myth: Most things fit nicely into hierarchical taxonomies
    Myth: Self-handling nouns are more important than self-handling verbs
    Myth: Only OOP has automatic garbage collection
    Myth: Components can only be built with OOP
    Myth: Only OO databases can store large, multimedia data
    Myth: OODBMS are overall faster than RDBMS
    Myth: C is the best procedural can get
    Myth: Implementation changes significantly more often than interfaces
    Myth: Procedural/Relational ties field types and sizes to the code more
    Myth: Procedural/Relational programs cannot "factor" as well


    Classic OOP features such as inheritence may generally be over-hyped, but specific cases such as polymorphism are very useful (even if there are ways of doing the same thing in languages such as C that were not designed for OOP).

    Some of the major benefit of OOP, and specifically C++'s objects, are:

    o It is a clean module packaging mechanism that encourages cleaner interfaces between modules

    o It encourages opaque data interfaces (method access vs public access) which results in less bugs

    o It makes use of self-initialization/cleanup (constructors/deconstructirs) that avoid a whole slew of programmer errors.

    o The self-containedness of objects does make code reuse simpler and less bug prone.

    etc, etc.

    The guy who wrote the article (and the esteemed Mr. Taco) appear not to have much hands on experience writing OO code.

    1. Re:The real benefits by SpinyNorman · · Score: 1

      These arn't my myths - they're the list that the linked article was written to address!

    2. Re:The real benefits by mybecq · · Score: 1

      I agree with your Myths, but with clarification:
      Myth: OOP always models the real world better
      Myth: OOP always makes programming more visual
      Myth: OOP always makes programming easier and faster
      Myth: OOP always eliminates the complexity of "case" or "switch" statements

      These would all be myths if they were supposed to be true in every case.

      In the general case for/against OOP, I much prefer to use OOP when writing applications.

      For a good idea of how OOP helps programmers, write an application for BeOS.
      For a better idea of how non-OOP burdens programmers, try writing an application for Windows, without using any frameworks. Whenever you talk to the OS, you're always having to pass a handle as the first parameter! This just screams: this should be OOP.

      Of course we all know OOP isn't for all programming tasks, but it definitely has its place.

    3. Re:The real benefits by FredK · · Score: 1

      Dr. Les Hatton has written quite a bit about the disadvantages of OOP, or to be more precise, of C++. A colleague of mine attended a conference where he gave results from an investigation of a large number of projects, including some large one. Languages used included C, C++, Ada, and Fortran. Maintenance costs were the same for all languages except for C++ where the costs tended to be 3 times greater. Note that Dr. Hatton is a highly respected research worker in this field.

    4. Re:The real benefits by PSC · · Score: 2

      Disclaimer: I code in C++ mostly and am generally positive towards OOP... as long as it's done pragmatically! (As opposed to those religious OOP nuts.)

      Some of the major benefit of OOP, and specifically C++'s objects, are:

      o It is a clean module packaging mechanism that encourages cleaner interfaces between modules


      Which is definately a Good Thing if done properly. Point is, in my observation, for most people it seems to be MUCH easier to define proper procedural interfaces than to design proper OOP ones.

      o It encourages opaque data interfaces (method access vs public access) which results in less
      bugs


      Only it the accessors do any check! In our current project (high energy physics) we have lots of objects which consist largely of floating point numbers, and you can't do much checks. So accessors make no sense here. If the data structures change, the client code has to be changed anyway because we can't take a performance hit. (This happened exactly once in more than a year, so what?)

      o It makes use of self-initialization/cleanup (constructors/deconstructirs) that avoid a whole slew of programmer errors.

      Granted, they are very useful indeed, but, as you say, not necessarily OOP.

      o The self-containedness of objects does make code reuse simpler and less bug prone.

      I don't buy that one. A well-designed C module is just as easy to maintain and reuse. Basically classes (without inheritance) are just structs with syntactic sugar (i.e. the first parameter, "this" in C++, is written in front of the function name).

      Cheers, patrick

      --
      --- The light at the end of the tunnel is probably a burning truck.
    5. Re:The real benefits by elflord · · Score: 1
      Basically classes (without inheritance) are just structs with syntactic sugar

      Classes without inheritence are not OO either.

    6. Re:The real benefits by Harmast · · Score: 1
      Classic OOP features such as inheritence may generally be over-hyped, but specific cases such as polymorphism are very useful (even if there are ways of doing the same thing in languages such as C that were not designed for OOP).

      Some of the major benefit of OOP, and specifically C++'s objects, are:

      • It is a clean module packaging mechanism that encourages cleaner interfaces between modules
      • It encourages opaque data interfaces (method access vs public access) which results in less bugs
      • It makes use of self-initialization/cleanup (constructors/deconstructirs) that avoid a whole slew of programmer errors.
      • The self-containedness of objects does make code reuse simpler and less bug prone.
      etc, etc.

      Plus, OOP is one way to make having multiple programmers work on the project more likely to be productive. When programs can be broken down into clean interfaced modules then different programmers can work on them with much less coordination than in pure structured programming. In my experience writing BIG BUSINESS in house apps (as opposed to the author's small and medium business) the procedural COBOL work is in some ways organized in an intuitive parallel to OOP.

      It is worth noting the in the 30th Anniversery edition of The Mythical Man Month Fred Brooks admitted that one thing he had been wrong about was data and method hiding and that breaking software into pieces that are essentially black boxes does make a difference.

      In conclusion, while not a silver bullet by any means, what OOP (and some other advanced design techniques) do is help make the man month a little less mythical not by making it possible for two people to write one project, but by dividing the project cleanly into two to be written in parallel. It may not half time while doubling programmers, but it does allow more programmers to take less time instead of more (within limits). It also makes it easier for new people to do maintenance by limiting their problem space when tracking down a bug or adding a feature.

      I wonder how the next programmer to maintain the author's code will feel about his objection to abstraction and separating the project into self-contained pieces.


      Herb

      --
      Herb
      Again, feel free to sentence me to death if my questions annoy you. I'll come back in 5 minutes anyway. -Sythi
  266. Are they really myths? by RobinH · · Score: 1
    Myth: OOP makes programming easier and faster

    I agree that this is very commonly said by OO enthusiasts, but since most people don't believe this, I don't think it qualifies as a myth.

    In my experience, writing up a quick program is much more easily done in straight C, and faster too. Most people realize this.

    IMHO, the strengths of OO programming only arise when you are writing a code base for *other* people to use, simply because it encapsulates everything and provides an abstracted interface. For instance, when you go to design a GUI, it's much nicer to create a button instance and pass that to a form, than to call a function that puts a button on the screen, and continually have to keep track of all the details.

    I think that OOP is actually *harder* because if you do it correctly, you have to think about how others see your interface. This is something that should be done even if you are writing code procedurally, but OOP forces you to do this.

    I agree though, that there are other paradigms that are just as good. Anything that promotes modularity and generalization is good. OO is one way of doing this, but normal modular programming habits, peer review, and even structuring your app as separate processes or threads will also help to achieve the same results.

    --
    "I have never let my schooling interfere with my education." - Mark Twain
  267. Re:OOP sucks! by sv0f · · Score: 1

    Lisp has had object-oriented facilities for at least as long as C++ has existed (e.g., Flavors). Common Lisp is an object-oriented programming language with several unique properties. As I understand it, Common Lisp was technically the first object-oriented language that fully passed ANSI standardization. Lispers think of their language as multi-paradigm (functional, procedural, object-oritented).

  268. OO (probably) is the future. by gimpimp · · Score: 1

    in university at the moment, we're taught a lot about oo programming and design. in fact - this subject come's up more than any other.
    it's becoming a trend, to not only to develop your programms using oo design - but more and more new languages claim to use it too.
    in my opinion, the benefits of using (code reuse, easy maintenance) it will eventually make it the standard design of all programming languages in the coming years.

    --
    i wish i was but oh well
    1. Re:OO (probably) is the future. by Kphrak · · Score: 1
      In my opinion, the fact that the universities are all using OOP is not necessarily good. The problem is that some professors now actually grade projects based on HOW MANY CLASSES ARE USED! Grrr.

      I recall several professors I've had adding in the requirements for a project..."must use at least four classes", or something like that. Ridiculous. In one of them, I wrote the whole thing using two classes, then added the other two, which were completely unnecessary. The addition of the extra classes made the code uglier and harder to understand, while doing nothing for the program. What a waste of time.

      Of course, plenty of students who are good programmers will realize that this is a load of crap and wind up writing stuff more efficiently later, but I'm worried about what could possibly be a majority of students doing things by the book and then getting used to writing every little thing as another class. Old habits are hard to break.
      -Andy Schmitt

      --

      There's no sig like this sig anywhere near this sig, so this must be the sig.
  269. OOP can be good by Srin+Tuar · · Score: 1
    Many people learn an OO programming language in order to hop onto the bandwagon. They are actually, for the most part fairly easy to learn, and pretty soon you can be defining classes, adding members, etc.

    The problem is that most people dont get far past that point. The hardest part of using an object oriented programming technique is deciding how to structure your class heirarchy. Even for a trivial program, deciding how to throw up an elegant, scalable, and expandable set of classes to implement it can be a non-trivial problem.

    There are countless bad coders who dont concern themselves with that aspect of the problem, and go around creating mob's of classes that work, but are not ideal for the problem domain. Pretty soon their code degrades into spaghetti worse than procedural coding styles. Also, they tend to use the good interfaces available to them in horrible ineffecient ways (doing alot more work than needed to solve the problem).

    They give the whole technique a bad name, and I think wrongly so. It is possible to gain advantage from OO code, and to minimize the drawbacks, but its alot harder than some think. Many programmers fail to make the jump from procedural style to OO style without realizing it.

    The fundamental problem with non-functional programming is something called side-effects. C code is rife with side effects stemming from global data, static function variables, assignment, the environment etc. Object Oriented programming is a technique for minimizing side effects, and confining them to small manageable sections of code. This is known as "encapsulation".

    When used properly, changing how one part of the program works will only break things in a small part of the program (one source file usually). This can be a tremendous benefit.

    OO programming techniques, combined with C or C++, give you the best combination of application efficiency, portability, and development expediancy avaiable today.

    What it wont do is turn bad coders into good ones. Actually quite the opposite: it tends to turn bad coders into horrible ones.

  270. OOPs ;) by chickdigger · · Score: 1

    Every useful programming project I've ever completed was done in C or TCL/TK. I've even paused to wonder how much easier or understandable my code would have been if it was C++, and I have to say honestly that it would NOT have been. If anything, it throws in too much jargon and demarcation. I'm sure Java is an improvement in OOP, but I don't use it, so I can't comment on it. The only useful application of C++ that I'm familiar with is MFC. M$ COM model is vague and ties the developer to too much proprietary M$ crap. It is too bad TCL/TK never caught on in the scripting world. It is much easier to read than Perl, has an excellent GUI toolkit, and is easily interfaced through C constructs.

  271. Why bother... by Gruneun · · Score: 1

    When I drive to work I generally go one route. However, there are days when I realize that because of traffic, weather, or just for the sake of doing something different, I go a different route.

    When I write code, I tend to go with OOP. I find it's easier to explain to co-workers and easier for me to visualize restructuring whole sections of code. Then there are the days that the I don't. For whatever reason, I throw OOP out the window for that particular project. For me, the methodology is defined by the project.

    I look at an argument bashing one or the other and shake my head. I don't have time to fiercely defend or attack either one... I have code to write.

  272. Re:reusability... by slim · · Score: 2

    Properly implemented, code re-use can pay off immediately.

    I don't know very much about OO -- I learned about it at University (in Eiffel) but it never 'clicked' and I always found OO design to be something of a strain. I only mention this to demonstrate my bias :)

    However, you seem to be implying that code re-use is something you only get from OO, and that just doesn't make sense to me. I really only code in C and Perl these days, and I reuse code all the time.


    --

  273. Table-Oriented + OOP by theonetruekeebler · · Score: 2
    The article really hyped the idea of table-oriented programming. I've seen both brilliant and horrible example of T.O.P. since I started programming. The horrible examples were, of course, the ones where the developers insisted on absolute purism in every corner of the system. This is true in just about any development environment--the difference between reality and a model of reality is that reality usually doesn't fit into models very well, because it is a inherently a superset of any model.

    And I've seen at least one OOP project go down the tubes because the designers, among the smartest people I've ever met, treated data persistence as just another implementation detail--they had been seduced by the model of a computer that never fails and has unlimited memory.

    But one of the most successful projects I've seen is one where an object-oriented framework provided a transportation and communications infrastructure on which table-oriented applications could be developed. OOP gave us just right level of hierarchical abstraction to make platform-specific issues irrelevant to higher layers; at those higher-layers, the mind-boggling flexibility of table-driven rule sets provided a potent way to model business processes without trying to put everything in exactly one box.

    I do believe we are heading for a convergence of sorts. The tables in question are going to be XML, with Java (or pick another OO language) providing the framework in which (and with which) to parse it.

    --

    --
    This is not my sandwich.
    1. Re:Table-Oriented + OOP by Shadowlion · · Score: 1

      This is true in just about any development environment--the difference between reality and a model of reality is that reality usually doesn't fit into models very well, because it is a inherently a superset of any model.

      There's an old saying which demonstrates this: "The difference between theory and practice is that in theory, there is no difference between theory and practice."


      --

  274. This is not just OOP versus Procedural by Tom7 · · Score: 2

    There are lots of paradigms around. You can go ahead and choose your favorite, but let's not make this an OOP versus Procedural battle.

    Check out abstract, typed functional programming in a language like SML, O'Caml, or Haskell (I find it's much easier to write abstract modules in these languages than it is to do so in an OOP language). Check out logic programming in a language like Mercury or lambda-prolog. Don't forget the zillions of other genres and subgenres.

    C'mon, slashdotters, it's your responsibility to ignore the marketing hype and use technology because it's superior. Do your shopping before you fall for something because everyone uses it (procedural) or because it's buzzword-compliant (OOP).

  275. there is something to be learned! by segmond · · Score: 2

    i totally disagreed with this article, but i respect the guy, why? because he is not just sprouting shit, he wrote lots of materials and preseneted them from his own humble point of view! learn, learn, learn! is there anyone in slashdot, who is willing to write half as that much to prove him wrong? nah, instead the best most of you can do is flame him with 4 line comments. OOP is not a HYPE, yes it has been overhyped, it is not the cure to all as well, it is here to stay.

    --
    ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
  276. OOP isn't difficult, is it? by KjetilK · · Score: 1
    Well, I'm not really a programmer, I do some coding once in a while, and had a course or two. Anyway, this guy seems to make a big point that OOP is difficult to learn. Well, I really never had a class without OOP, I attempted some hacking before I knew OOP, but really, it isn't more difficult to learn than any other style of programming, is it? At least, I found it pretty easy.

    There is a lot of sucky OOP support out there. IDL is really bad. R on the other hand, has some very simple OOP support, but it is certainly very nice, and makes the job done very nicely. I haven't really gotten the hang of the Perl OOP stuff, but then, my Perl stuff isn't really sophiscated.

    --
    Employee of Inrupt, Project Release Manager and Community Manager for Solid
  277. It's a good analysis by scott1853 · · Score: 2

    It tends to be a little too anti-oop though.

    I use OOP and procedural programming because they each have benefits. It enables me to clearly envision the flow of code and make everything modular. It also enables me to manage multiple instances of the same type of object easier. However, it's possible to implement the same functionality in procedural form. And somebody familiar with coding everything as procedures can visualize the code just as easily. If you have used procedural all your life and are familiar with it, then you can perform the same tasks as somebody that is experienced in OOP.

    Using procedures, you may have a separate source file for procs related to working with strings. You could also use OOP to declare a string object, and just put all the functions within the object. Note: The above is just an example, don't EVER waste time with string objects unless you are forced to.

    It's really more of a personal preference than anything else. Synonymous with your wallpaper. In the end, all that really matters is whether or not the software performs its intended function.

  278. Myth... by DaveWood · · Score: 4
    Myth: Implementation changes significantly more often than interfaces

    This is the most stingingly correct point, in my opinion. In fact, in my experience, they change equally often at best. And in cases where code is actually meant to be reused - something which, by the way, some of my smartest friends have told me, after no small amount of experience over the years, never actually happens - its the interface that often proves more likely to need modification...

    1. Re:Myth... by BeanThere · · Score: 2

      And in cases where code is actually meant to be reused - something which, by the way, some of my smartest friends have told me, after no small amount of experience over the years, never actually happens

      Where I work now, we've put a lot of effort into designing reusable components. And it's paying off, bigtime. We've built a powerful, flexible SDK, all our applications use it, and now we save a huge amount of time and money every time we create a new application. Also, by abstracting away a lot of the technical, low-level / difficult stuff, we don't need to hire super-knowledgable people any more to do the applications. Worked for us.

      The thing about making reusable code is that it has nothing to do with the language, and everything to do with good software design. The application also makes a difference. We mostly make Virtual Reality training simulators, so building reusable components has worked well.

      People also seem to forget the "code reuse" that happens every single day. People will spend a few weeks using re-usable components - e.g. write a gtk+ application, using reusable libraries for image loading, re-usable components in the posix stuff, re-usable components in the C and C++ standard libraries - and then at the end of all that they'll come out and say "geez this code reuse thing is a complete myth".

  279. How about OO hardware controller programming? by AFCArchvile · · Score: 1

    That's what I'm doing in my Electronic Design class in college. I'll be using HPVEE to have hardware controllers do stuff. Then, I'll use it for my final project to show off a piece of equipment that fulfills a set of objectives. I'm already light-years ahead of what the big hardware design corporations are doing. Take Intel, for instance. They haven't been able to release a reliable chipset for two years!

    --
    "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
  280. Re:Poor criticism by rw2 · · Score: 2
    I agree with you on this one Neutron. My favorite comment was:

    I just heard someone say that they found an old procedural program of theirs that used too many global variables and too many parameters. Rather than blame his bad programming or lack of knowledge about procedural/relational organization techniques, he blamed the paradigm and used it as a sorry excuse to proceed with OOP.

    Ironic given his very long rant essentially pointed at bad OOP implementations rather than OOP as a paradigm!

    Of course, I run Cetus Links so I may be biased...

    --

  281. core reuse and objects by josepha48 · · Score: 2
    have nothing to do with each other© If you reuse object you can stil get stuck with stuff that you dont want© An object has properties, and it may be that the object that you are using has properties that you probably don't want, but if you use that object you get stuck with them©

    Personally I think OOP is okay in some cases© Take for instance Tcl/Tk© Tk is probably the best GUI programming language that I have ever used© Unfortunately that is about all it is good for© Yes you can do more with it, but I think the GUI is is probably the best© Guess what it is done with objects as well© The button, the text the lable the entry, etc© Tk is also not to heavy as far as overhead either© Some may say that java is better, but I have actually tested a simple GUI text editor and the java editor was slower to start and slightyl slower than Tk© I have also used powerbuilder© Now there is a nice OOP language© To bad it is so slow and flakey©

    I have also tried C/C++ and the problem they both have it memory management© And lets face it trying to figure out do I need to destroy or free this can be a real pain in the butt©

    Personally I'd like to see a language that has syntax like perl, but is compiled and effecient like C© Maybe C with garbage collection© Instead of me having to malloc and free, I'd just declair char * item;, and then maybe item = "string"; Then when I am done with that string I'd forget about it© Sort of like Java, but a language that does not require you to do everything with objects like perl© More like a JavaScript / perl / C / Java cross© Powerscript ¥Powerbuilder is close, but is not a general programming language, it is a propritary language©

    Oh and if you look at KDE and GNOME projects, both have major code reuse and one is OOP and the other is not ¥not really, and they are both awesome works of coding©

    I don't want a lot, I just want it all!
    Flame away, I have a hose!

    --

    Only 'flamers' flame!

  282. Re:Another reason ... by taniwha · · Score: 2
    nope - virtual method calls are a language feature, and calling lots of little subroutines is a coding style encouraged by OO devotees.

    On the other hand a compiler could spend time optimizing this stuff more (maybe more inlining of those tiny calls at least).

    The one thing that is a compiler issue in my posting is the poor use of the call/return paradigm (for example using a jsr to make a call, but not ret to get back means the architecture can't do a hidden [branch target predictor] stack cache to keep the pipe moving - many modern cpus, even x86s do this)

  283. Re:Ask Slashdot: What do you masturbate into? by cyberdonny · · Score: 1
    • Into the third punchhole on the Palm Beach butterfly.

    And now the price question: will it become pregnant?

  284. Re:I tend to agree with the author.. by Alioth · · Score: 3
    OOP (IMHO -- I'm crazy for the acronyms today), is just a fad. Like structured programming was before it.. Unfortunately a lot of these companies today fall into "trendy" programming methodologies.

    Structured programming a fad? OOP a fad? A rather long-lived fad then! Software developers have been using structured programming techniques and OO design for years, and will continue to do so.

    Personally, I believe you should program using the style you're most comfortable and familiar with. If you're trying to fit a mold it will slow you down.

    That's fine if you're working on a small project with maybe one developer. But if you had 30+ developers using their own techniques and styles on a large project (like the >1MLOC project I've been working on for the last 5 years) you'll end up with an unmaintainable mess. If everyone conforms to a standard methodology and style then at least you can maintain each other's code.

    This is one of the differences between software ENGINEERING and code that's been congealed instead of designed. Software engineering should result in a robust and maintainable system. Letting every programmer go off and do their own thing as you advocate leads to the truth in the phrase "If builders built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization!" It sounds nice to let the programmer go off and just write in their own style using their own unique design techniques. But it's terribly naive and unrealistic in the real world.

  285. Re:My view by Alioth · · Score: 2
    I am *not* a OOP programmer. To be honest, I've never been able to understand it.

    snip

    And you know what? I've never understood OOP. I just don't "get it." Sure, I understand the theory, but when it comes to real work, I've never understood it.

    It's like if everyone started calling the TV a "forbick". Doesn't make any sense does it? I mean, it's a TV. Why call it a forbick?

    To use a language (any language) you have to grok it, and think in that language or - in the case of OO - in that kind of style. Your example of calling a TV a "forbick" is kind of right on - the French, for example, call cheese "fromage".

    You'll never be a good Francophone if you have to think in English, then translate to French, and say it. You have to actually think in French. Same with computer languages. When I first learned C, I was thinking in BASIC and translating. It didn't really work very well. (BBC BASIC doesn't have pointers for one). It was not until I grokked C and started thinking in C that I got any good at the language. Although it seems natural to think in C then code in C++ because the languages are so similar, unfortunately it won't work out very well. You have to think "object oriented" instead of thinking in non-OO and translating. Once you get to that stage, you'll truly grok OO and its usefulness.

    I'm currently learning Perl. I'm trying to start off thinking in Perl rather than thinking in C++ and translating. So far, it's working OK, but I'm still doing things the C way that would be better done the Perl way, so I guess I'm not truly thinking in Perl yet!

  286. Re:My view by Malc · · Score: 2

    I understand where you're coming from. Everybody's minds works differently. I found structural/procedural programming reasonably straigh forward. When I switched to OO, it felt orders of magnitude more natural, and I never want to switch back. Other paradigms were much harder for me. Functional programming, such as lisp or scheme where a real nightmare... eventually I learnt how do recursion in other languages from the experience. SQL has been the hardest challenge for me... I just don't think in sets like that! That caused me a lot personal grief and stress... I think I'm a reasonable C++ programmer, but when I had to do some stuff the database, I felt incompetent. Eventually I got my mind around that too, but I'm certainly no great SQL guru (and I doubt I ever will be).

  287. Re:GUI's vs GUIs by emarkp · · Score: 1

    Actually you need to check your grammar. An apostrophe is commonly used to denote plural for acronyms and such, hence it is perfectly correct to write "GUI's" to mean the plural of GUI. I think you need to slap yourself in the face.

  288. OOA article by bmongar · · Score: 2

    Much of this article seems to be OOA, Out Of Ass. The author states many figures such as designing takes 3 times as long with no backup. There are some points but most of the apply to missused OOA&D.

    Object reuse only coming after years. Well, I work for a company that is a big user of object technologies. We have our own data access, mapping, and server objects that are our bread and butter, we can go in and have an application up in little time because we don't have to write most of the functionality, just abstract the business logic.

    Buy in. That is true, if not everyone buys in the programmers will be pulling their hair out, however this is true in the development contract of many methodology.

    Not everything is abstractable/in a hiearchy, true but I find in most of the work I do, it is. There are cases where some of what needs to be done doesn't make pretty objects, but that is the exception

    --
    As x approaches total apathy I couldn't care less.
  289. A longer viewpoint... by whitroth · · Score: 2

    I've been programming for over 20 years now, and, unlike almost anyone here, I've been on mainframes, and PCs, and w/s.

    'Bout 7 years ago, I took some coursework in OOPs and GUI (sounds like someone dropping an egg, to me), and what I saw then was this:
    1) OOD looked real good...BUT the closer you got
    to actual coding, the fuzzier it got (as
    opposed, for example, to flow charts), and
    2) what OOP appears to be doing is enforcing by
    compliler all the good coding practices
    that they've been trying to teach for
    25 years (y'all use goto's in C,
    frequently? how bout type checking?).

    What I've seen since then is that it *may* be possible to write good, tight code in an OO language (though I found the person who worked on chips cmts, above, fascinating), the overwhelming majority of coders write *lousy*, bloated code - you want a clipping of Gojiro's (Godzilla, to those who don't know) toenail, and you get the big guy, himself, with a window frame around his toenail. Explain Lose98, or LoseMe, or M$ Office....

    Reusability - isn't that where knowledgable management assigns the position of librarian to someone (*sigh*, probably the configuration manager), and they make sure that programmers use existing subroutines? Oh, right, sorry 'bout that oxymoron about "knowledgable managers".

    Thank you, some of us would rather master our discipline (check the meaning in the dictionary that doesn't refer to whips), and write good, tight, fast code...that can be maintained by someone else, when we've moved on.

    mark

  290. OOP isn't magic, but it's still great by ZanshinWedge · · Score: 2
    Granted, OOP is not the silver bullet that will solve all your problems as some people seemed to think it was. It will not make your programs automatically more easily updated, faster, and give you a full glossy coat of fur. However, OOP is most definitely not a fad, it is here to stay and will continue to be very important. There are many circumstances where Object Oriented design is completely unnecessary and would give no advantages, however there are also many cases where OOP is in fact the magic bullet that makes everything click together.

    Personally I write OOP only very rarely, but that's partly to do with the nature of my work which is more small program oriented than large system oriented. However, I do find OOP to be significantly useful in lots of occasions. One way that Objects are particularly useful is in extending programming languages. The old style of libraries is somewhat cumbersome and leads to unnecessarily bloated code that is more difficult to read (and to understand easily), whereas extension via object makes immenently more sense and keeps your code (which may or may not be Object Oriented) a lot tighter. Perl demonstrates this excellently since most Perl programs are not Object Oriented, but almost all the "extensions" to Perl that are being written (and being used) these days are Object Oriented.

    And in some ways OOP is still playing catchup with older programming styles, it's a lot easier to change languages than it is to change to a whole new philosophy of programming and I think that has shown. OOP is not a fad, it's most definitely here to stay and in fact I think it will grow as more and more languages (other than C++ and Java) take on Object Oriented design and more and more programmers learn when and when not to use OOP.

  291. Article Only Proves Low Education Level by scotteparte · · Score: 5
    It seems our skeptical OOP critic is pulling graphs from nowhere and making logical flaws left and right. Refuting his article is quite easy, but there is no doubt in my mind that he would not accept the refutation. His failure is that he refuses to accept the absolute need for abstraction.

    I work in a software company, and our product takes up no less than 300 MB of code. Even in the most well-organized non-OOP code, our software would be impossible to debug or even build, because we would need to go through hundreds of lines of code. In addition, reusability would be hurt, since even though the functions would be there, minor changes in the arguments might make the entire function worthless.

    The author's example using People and Taxes is particularly striking. He suggests that an object oriented approach would create a person object and a tax object, set their attributes, and run the T.CalcTax method on Person P, while a procedural approach would just feed the relevant parameters to a function. I wonder if the author has ever actually filled out the 1040 Personal Income Tax Return Form. The easy version has 70 entries, and while some are calculations, others are references to other, much bigger, forms! Keeping track of all these variables without some structure to hold them all is just stupid. Object orientation is necessary when code hits a level of complexity where several people, or several hundred, are simultaneously working on a project. The "black box" approach allows for greater flexibility and optimization, since a code change will be transparent to the objects around it.

    Another thing to consider, although I know CmdrTaco would berate me for even mentioning it, is the expansion of OOP provided by Java. The Interface in Java allows you to specify several functions, abstractly, that are required for a class to implement the Interface. The implementation of these functions is class-specific: for example, all clothes implement the Wearable interface, but you would not want underwear and shoes to have the same implementation of Wear(). However, in Java, you may specify a function to take a Wearable object, and not need to specify any further. This abstraction level is why OOP does, in fact, better model the real world.

    In conclusion, the rantings of a PASCAL junkie should not constitute a Slashdot article. Anyone who has coded in procedural and OO languages should see the extreme idiocy of the article within milliseconds. On the other hand, Perl powers Slashdot, so I guess this is the place for the procedural approach to have its message heard. In fact, Slashdot totally vindicates the article: its non-OOP approach is fast, effective, efficient, and easy-to-understand. Highly scalable and expandable as well. I especially like Slash.pm (aka THE BEAST) and the my_conf{shit} variable. I'm sure the non-OOP approach will really take off once everyone switches over from C++/Java to Perl.

    1. Re:Article Only Proves Low Education Level by scotteparte · · Score: 1
      How small is a small business app? We have both enterprise-scale and small-business scale versions, but neither would survive long as a procedural app. Moreover, the enterprise "niche" is the greater part of the software market. There's no reason to object-orient the shitty little linux apps that you use, since they are usually 1-2 wannabe code monkeys writing bad C++. Any multi-employee project requires the kind of abstraction that only OOP provides.

      I read as much of the article as I could stomach before his baseless graphs and lack of data made me stop, but I saw enough to know an Epsilon Minus Semi-Moron trying to sound academic. It was a pathetic article, and anyone with a college degree and a smidgen of programming experience would tell you the same thing. It certainly provided a lot of laughs in my office.

    2. Re:Article Only Proves Low Education Level by Shotgun · · Score: 2

      I work in a software company, and our product takes up no less than 300 MB of code. Even in the most well-organized non-OOP code, our software would be impossible to debug or even build, because we would need to go through hundreds of lines of code. In addition, reusability would be hurt, since even though the functions would be there, minor changes in the arguments might make the entire function worthless.

      And your niche is the specific case that the author spent considerable time excusing from his argument. The niche he talked about was the small business application that would not be expected to last more than 3 years. He specifically stated that large applications written by software houses for others were the province of OOP and OOD.

      Read the article before making a fool of yourself in an open forum.

      --
      Aah, change is good. -- Rafiki
      Yeah, but it ain't easy. -- Simba
  292. The Author Just Doesn't Get it. by ArcadeNut · · Score: 1
    I started out doing procedural code (COBOL, FORTRAN, BASIC) in the old days and thought OOP was stupid when it first came out. It wasn't until I started using Delphi and C++ that it really "Clicked" for me.

    After that, I started learning more about OOP and OOD. What I found out is that done right, OOP can be written just as fast as procedural. Sometimes faster. Once you get into the habit of doing things a certain way and thinking a certain way, it becomes second nature.

    OOP is not just for GUIs. In fact, if done right, your should have a GUI object that talks to a Business Object which talks to a Database Object. You should be able to change out any combination of the three and not notice any change (in a perfect world ).

    Obviously you can do this in a procedural fashion, but OOP lends itself more to this (i.e. makes it easier on the programmer).

    People complain about the speed of C++ and OOP in general. Speed is not a major problem with todays computers when it comes to business applications. What is more important is the ability to have stable software that you can change easily and quickly. When speed is important, there are always ways to optimize.

    See, I can ramble on just like the author....

    --
    Visit the Arcade Restoration Workshop @ http://www.arcaderestoration.com
  293. OO is dead as a silver bullet, alive otherwise. by Ars-Fartsica · · Score: 2
    Like any technique or technology, OO methods must ultimately be incoporated into a larger scheme of structured and generic programming (and perhaps one day, functional programming).

    Ultimately, multi-paradigm languages that can absorb new techniques as they mature, like C++ and perl, will be the winners. I have yet to see a mono-paradigm language have sustained appeal over a five to seven year period.

    1. Re:OO is dead as a silver bullet, alive otherwise. by Black+Parrot · · Score: 2

      > Like any technique or technology, OO methods must ultimately be incoporated into a larger scheme of structured and generic programming (and perhaps one day, functional programming).

      IMO, OO is just a further refinement of the traditional values of modularity, data hiding, etc.

      Some authors treat it as a fourth class of language, yielding {procedural, functional, declarative, OO}, but I disagree. I get {procedural, functional, declarative}, with OO being a refinement of procedural, just like structured programming, data hiding, etc. are, rather than a new classes to themselves.

      My language of choice is an OO language, but I think the big OO push is mostly hype. As far as code reuse goes, OO still has not provided additional reuse on the scale of what we already had with (say) glibc. (You do realize that linking to a library is code reuse, don't you?)

      In my experience, low-level components are reasonably likely to be reused, but high-level components are rarely reused outside the program they were originally written for, or at least a very closely related program. (Here, I use "low-level" to mean things like widgets, sorters, etc., not "low-level" languages.)

      OO is a useful idea, just like modularity, structured programming, data hiding, etc., but it seems to be surrounded by a disproportional amount of hype. Look at the number of development lists where people regularly suggest rewriting an existing C project over in C++, and sometimes even actually start a branch project for that sole purpose. The argument usually boils down to "because it's better". I have never seen an instance where changing the language would let the maintainers solve a problem that they couldn't solve with their current language, nor have any of the rewrite proposals that I've ever seen offered any arguments that the rewrite in an OO language would provide benefits that outweighed the cost of the rewrite. There just seems to be a widely held belief that "OO is better, so we should convert everything to OO implementations".

      --

      --
      Sheesh, evil *and* a jerk. -- Jade
    2. Re:OO is dead as a silver bullet, alive otherwise. by jstott · · Score: 1
      I have yet to see a mono-paradigm language have sustained appeal over a five to seven year period.

      1977 Fortran. Not the tool for every job, but damn good at what it was designed for.

      -JS

      --
      Vanity of vanities, all is vanity...
  294. Spaghetti code, anyone? by bgalbs · · Score: 2
    Ignoring the tone of the article, which had a distinctive mid-pubescent feel, the thesis is mildly interesting: can procedural methodologies be as maintainable as object-oriented ones?

    Unfortunately, the thesis was quickly replaced with some teenage-esque rants that have been noted already.

    What seems to have been overlooked is the advantage of OO: code maintainence. In entreprise environments, a great deal of time is spent on project maintenance. Anyone familiar with procedural programming can testify that scanning lines of undocumented and tightly written code can be a nightmare. The old ideals of syntatic efficiency at the expense of readability, while fun and good in the hacker world, don't fit into the corporate world.

    OO attempts to solve this problem by introducing a methodology that makes it easier for programmers to make their code maintainable.

    This is analogous to the manager that keeps all his notes in his head versus the manager that documents his job and his notes. Both can probably do a great job, but when they move on, which one do you want to replace? I'll take the latter.

    All the arguments about procedural programming being faster and easier than OO are moot: it's the nature of the beast. But OO is definitely a great tool for facilitating ease of code maintainence and leveraging past effort.

    I can't believe the guy that wrote that post has had any career of significant length.

  295. Re:I tend to agree with the author.. by slim · · Score: 2

    I wonder how much C++ code is actually OO, though?

    I've seen any number of C++ books which are effectively C books, using cout instead of printf, with an object orientation chapter tagged on as an afterthought.

    I'll bet a lot of Windows programs use OO to work with the GUI (because MFC makes them) but have an underlying program structure that's procedural to the core.

    I've no doubt that OO is heavily used, but you can't get comparisoms just by counting how many programs were built with a C++ compiler.
    --

  296. OOP in the real world...... by blogan · · Score: 1

    Took a shower this morning, looked on the bottle and it said:

    0. Hair takes water
    1. Hand takes the shampoo
    2. Hair takes the shampoo
    3. Hand works shampoo into lather
    4. Hair takes water which removes instance of lather
    5. this->repeat()

    A lot of OOP programming I see is like procedural except the first parameter is the object. Like foo(bar,crud) becomes bar.foo(crud)

  297. Re:Anonymous hack berates OOP by squiggleslash · · Score: 5
    Absolutely. Let's look at OOP vs Communism:

    Classes: Communism - adamantly against. OOP: For, not merely for, but in favour of more classes than you could possibly imagine.

    Inheretance: Communism - opposed to. Inhereted property regarded as a prop for the aristocracy. OOP: Treats the concept with a reverence not known even amongst the Kennedies and Rockafellas of this world. Encourages, aids, and supports.

    Property: Communism - private property treated as an ambonination. OOP: Supports, allows objects to have whatever properties they want, and decide for themselves what is public and what is private.

    Objects: Communism - usually on the side opposing the objectivation of anyone, women, minorities, etc. Even cynically, prefers to deal with people as an anonymous mass rather than discrete objects. OOP: Pro-objectification. Treats everything and everyone as objects.

    I think it's pretty obvious that our OOP berater has no idea what sie's talking about. That said, most communists I know feel the need to talk in wordy jargon to demonstrate their superior intellects. With OOP programmers making sure they use everything from 'abstraction' to 'polymorphism' in every other sentence, I can see why the author might have been confused...
    --

    --
    You are not alone. This is not normal. None of this is normal.
  298. Re:Tell us something we don't already know... by Anonymous Coward · · Score: 2

    Taco is a perl c0d3r; what do you expect. The relationship between perl c0d3rz and programmers is in the 'distant admiration' category.

  299. There's no magic bullet... by Greyfox · · Score: 3
    The hype of OOP is that it's a magic bullet that does all your thinking for you and that all you have to do to write a completely new program is derive a new class and change a couple of lines. This is, in a word, crap.

    Thing is, if you can't do design in procedural code, OO's not going to buy you anything. Projets that buy into the aforementioned hype will fail. A company throwing OO at a projet without investing in training of it programmers will see the project fail. There are some simple OO mistakes that you see new programmers or procedural programmers who've never done OO before. Deriving everything from everything else. Using inheritance for everything. Habits that it's hard to break them of because nobody realizes that they're bad habits.

    Do a bit of research though, and you can find ways to be very productive using OO. If the designs are good, it does actually get easier. Buy "Design Patterns" and poke around in the various OO language netnews archives for little nuggets of wisdom and you will find your object designs improving immensely. Read about STL and use well designed toolkits like gtkmm and you'll start to realize benefits from using Object Oriented programming.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  300. Wrong by cje · · Score: 4

    I think you need to look at the definition of an "Object Oriented" language. You'll see that to be OO a language must support certain things like inheritance, polymorphism, run time binding (dynamic binding) and many other fun things that you can't do in procedural languages. C doesn't support any of those.

    Of course it "supports" them. It's just not as easy as it is in other languages. As has been pointed out before, creative use of function pointers in C can be used to implement polymorphism and "dynamic binding."

    Think about it a minute. What does a C++ compiler do? It translates the (high-level) C++ code to (low-level) assembly code. Are you somehow suggesting that there is no way that the generated assembly code can implement inheritance and polymorphism because no assembly language "supports any of those?" If so, how is it that C++ programs are able to compile, link, and execute? The original C++ compiler, cfront, generated C code as output from the input C++ code. Surely the output C code was no less "object-oriented" than the C++ code it was generated from.

    You can write object-oriented code in nearly any language. The difference is how much language-level support for OO is provided. Just because you can't write "virual void myFunc()" in C doesn't mean you can't generate the same behavior.

    --
    We're going down, in a spiral to the ground
  301. "Hype"?! by WinDoze · · Score: 1

    How can you refer to something that's been going on for what, at least 10 or 12 years that I know of, as "Hype"? Britney Spears, there's hype for you. But OO? You'd consider the Web established, wouldn't you? Well OO is certainly older than the Web!

  302. digidave's rules of OOP by digidave · · Score: 1

    1) When it works, it works really well
    2) When it doesn't work, nobody can understand what it is anymore.



    -----

    --
    The global economy is a great thing until you feel it locally.
  303. Wow! A Troll on the frontpage! by PureFiction · · Score: 2

    Seriously, did anyone read this before they posted it?

    OOP is communistic?

    No references? (Sorry, we lost them...)

    A giant stinking POOP image header?

    perhaps this should be under the humor category...

  304. Re:Article is missing a lot by Malc · · Score: 1

    And the one code example about persons and taxes was so contrived and bogus. OO doesn't say you have to do it this way. A good programmer evaluates the situation and does things appropriately.

  305. Re:Author is a USENET troll/pest by Shadowlion · · Score: 1

    What, the Apple suing Freetype article not too long ago wasn't enough of a troll for you?


    --

  306. People and Taxes by maroberts · · Score: 2

    For a code example, suppose we have an application that calculates taxes for individuals. A common object oriented approach is to create a Person class and a Tax class...

    Nope, I'd just add a calcTax function to the Person class I already had. Maybe this explains why my objects seem to have a lot of functions....
    :-)

    To take the Tax and People example you have given, you have overlooked the fact that an object oriented approach allows inheritance and lots of other stuff. For example, if there was more than one type of tax T on a person P, one could still call a generic function T.calcTax(P) for both InheritanceTax and IncomeTax classes which inherited from the basic Tax class.

    Object Orientation is not an answer to Life, The Universe and Everything. And you often find that one persons idea of an object oriented approach to a problem is totally different from another persons idea. But having said that, I find that it is easier to work out what someone has done if they have used an object oriented approach than if they haven't. For one thing, most people implement all functions of each class in a single file named after a class, something you're never quite sure of with a parameter approach.

    Object orientation simplifies maintainability, by encouraging people to write in a style which may be easily understood, something many other methodologies have singularly failed to address.

    --

    Donte Alistair Anderson Roberts - hi son!
    Karma: Chameleon

  307. Code reuse is overrated. by amorsen · · Score: 1

    "Code reuse" is easy to sell to managers and the advantages seem obvious to anyone. There is a serious lack of studies proving that extra work done to facilitate code reuse ends up paying itself back on average.

    Using object oriented design to structure programs can be a great help. Design is a very personal topic and no set design system can fit everyone. I have seen people who would design things using a functional model, essentially using a scientific method to solve problems. Others, perhaps the author of the article, think primarily in terms of the work that the program needs to do, and are productive that way. Still others are most productive when they design things as collections of objects that interact.

    A given programming language tends to fit a specific design paradigm best, but there is nothing stopping you from designing using one paradigm and using a programming language intended for a different one. It is just a matter of knowing what you are doing. The author uses relational database tools as an example. Yes, it sucks to use a relational database if you design object oriented, but since other people already developed the methods needed, it is a SMOP.

    --
    Finally! A year of moderation! Ready for 2019?
  308. Free software succeeds where OOP has failed by Adam+J.+Richter · · Score: 1

    In practice, free software has solved the "software recycling problem" in a way that object oriented programming proponents promised and generally failed to do, because it is much easier to reuse free software in ways that were not originally anticipated, and it is economically unoptimal and often impossible to anticipate all of those ways.

    For example, people adapt hardware drivers (kernel, X windows, etc.) to new hardware and there are frequently features that require internal changes that could not have been easily anticipated in the original programming interface.

    This is one reason why mutually compatible copying conditions are so important to free software.

    I also think that embarrassment over this why one well known OO proponent denounced free software.

    This is not to say that inheritance, data abstraction, and calls of the form object->function(object,...) are useless. They are useful at times, and sometimes even in the peculiar combination called "object oriented programming", but their benefits have been oversold and the demand for free software is a testament to the fact that OO failed to remove most of the barriers to reuse that make the proprietary model so much less efficient.

  309. Re:Examples? by piggy · · Score: 3

    OO does not bring benefits for all projects. OO does not always bring short term benefits. Where OO excels is maintainability and understandability, as well as distribution of labor for a medium or large scale project. A 15 hour project is nothing. Worst case if you need to expand or maintain that project, you waste another 15 hours. A large scale multiple year project, however, truly benefits from an OO approach.

    If implemented with discipline and knowledge, an OO project is better maintained than a procedural one. However, I would take a disciplined procedural project over a messy OO project. The overall guiding point is rigorous software engineering, and OO provides some language level discipline, while procedural programming provides nothing at the language level. If a good process is followed, though, language level support is just convenient fluff.

    Russell

  310. new logical fallacy: the communism fallacy by kellan1 · · Score: 1
    i've run into a trend several times lately (once in a personal conversation, once when reading about john ashcroft, and now this) that i thought had died out in mid-60s when McCarthy was made too look like such an idiot.

    its called red-baiting, and its often used "this thing is like communism, and we all know how evil communism is" (or fascism, or whatever)

    its dumb folks, the dumbest sort of strawman arguement in existence, and because its such a rotten example of a strawman, i think we should rename it the communism logical fallacy (or maybe just the name-calling logical fallacy)

    either way, this guy is crackpot, is arguement are poor, stacked, rambling and often incoherent, and falsely didactic.

    i can't begin to imagine how such a poorly written article made it to the front page of slashdot. honestly, no idea. none. really.

    kellan

  311. FUD by winchester · · Score: 1
    Everyone /. screams when Microsoft puts out a piece of FUD like this about Linux. This is the same thing...pure fud. The author may have some valid points, none of which he has any arguments for which support his points, but the entire piece just screams FUD.

    Please remember that nothing in this world is a panacea, there are trade-offs in every decision one makes. The same counts for OO... it's no magic solution to problems the industry faces, but it is IMHO a step in the right direction.

  312. Re:OOP is a tool, not a philosophy by barjam · · Score: 1

    Either one factors to the same thing. A single entry point into the program. Java does the object thing by default because there is no idea of a "global" function. But it is still just a "main" function in a class that starts the thing. I find this feature of the language VERY useful because I can put a main function in a class I am testing and run it independant of the system I am creating. Without having to make a dummy executable file to do the same thing. So basically you have to bootstrap the program somehow (into a function). Its all the same.

  313. NO silver bullet but C++ multiparadigm is usefull! by UnknownSoldier · · Score: 2

    The author is correct that OOP won't solve every problem. But he tosses the baby out with the bath-water! The author obviously hasn't read any of these great books/articles:

    What is Object-Oriented Programming? (Link to papers, since I can't find the .pdf for this one)

    Multiparadigm Design and Implementation in C++

    Design and Evolution of C++

    Now I'm not saying C++ is the end-all and be-all, but every language was designed to solve a certain problem. Use the right tool for the right job! If C++ lets you solve your problems quickly and efficeintly, then use it. If not, then use what works.

  314. Sadly, I must agree with this article by timcuth · · Score: 1

    Most of the points made in the article are very close to the truth in the general medium and large business world. I worked on a OO project (we did use OO design methodology) at a large corporation in the early to mid 90's, and it mostly played out exactly as the article describes.

    However, in the course of my participation in that project, I saw some absolutely amazing things done, both by our staff of programmers and by the outside consultants (several sets of them) who came in to mentor and tutor us.

    I personally believe that OOP can be extremely powerful and productive for an individual developer or for a very small team of like-minded, cooperative developers. There ARE some strong benefits to be had from OOP/OOD but, just as the article says, you have to apply the paradigm consistently in order to reap them.

    I still enjoy using Smalltalk (Squeak) at home, but I never get the chance to use it professionally, anymore. I wish I did.

  315. Re:reusability... by Skapare · · Score: 2

    You obviously have a situation that calls out for OO design and programming. Now explain how that means that absolutely everything to be programmed has to be programmed in an OO language.

    What I got out of the article (which I thought was poorly done) was that the problem isn't OO itself, but that OO is being overly applied where it isn't needed, and even where it gets in the way.

    --
    now we need to go OSS in diesel cars
  316. Re:Another reason ... by kaisyain · · Score: 1

    On the other hand a compiler could spend time optimizing this stuff more (maybe more inlining of those tiny calls at least).

    Or in other words, it's a compiler issue. Which is pretty much exactly what he said in the first place.

  317. How can OO be a "fad" if ... by Lumpish+Scholar · · Score: 4

    ... it's been around (and used successfully) for over fifteen years?

    As Jim Coplien has pointed out, OO (objected oriented programming / design / analysis) is older today than "structured" programming / design / analysis was when OO first burst upon the scene. (The structured movement first got some serious press in the mid to late 1960s; the classic book by Dahl, Dijkstra, and Hoare was published in 1972. OO started no later than Simula-67 and Smalltalk-72, and first gathered mainstream attention in the 1980 - 1982 timeframe. The first OOPSLA conference was in 1986.)

    Yes, some snake-oil salesmen overhype OO ... or whatever buzzword they can apply to their product. Surprise.

    No, OO is not a panacea. It's not even always the right tool to apply to a particular design or programming problem. (Coplien's recent book, Multi-Paradigm Design for C++ , is a tough but worthwhile read that addresses this issue.)

    You may dislike a particular language that supports OO (Smalltalk, C++, Java, even Perl) but find the paradigm worthwhile in some other language.

    For comparison, compare with this message in Risks Digest: "The structured programming revolution is a real bad idea that has been significantly holding back progress for years.... Have there been any double blind studies which unambiguously show that the kind of programs that structured programming partisans enjoy are really more maintainable than some other kind of program? I've heard lots of testimonials, but no real evidence." Sound kind of familiar? (Heh.) --PSRC

    --
    Stupid job ads, weird spam, occasional insight at
  318. the key phrase is: properly implemented by HiyaPower · · Score: 2

    The key is as you say: properly implemented. Too much oop has been implemented by the sorts of folks who will term a database as "almost relational". It takes intelligence and rigor to make sure that the corners are not cut that will reduce your small amount of oop to a very large amount of smoking oops.

  319. Good point... by T.Hobbes · · Score: 1

    but can you link to some of your own code (perl, preferably) to give an idea of what you consider acceptable? Otherwise, you're just blowing some rather pungent hot air.

  320. Re:Author is a USENET troll/pest by rkent · · Score: 4
    Ha! Man, he's probably trolling around here, too. I wonder what his slashdot ID is? Probably the same one who submitted the story ;)

    Wow. I think /. has been seriously trolled this time.

  321. Objects & RDBMS by hugg · · Score: 2

    I agree that for some applications, making an object->relational mapping is just a giant pain in the flipper. For the kind of timelines project managers impose on web projects, and the terrible ever-changing specifications given, it's usually easier to fill up an Oracle table and worry about elegancy later. This guy is probably recovering from wounds from some sort of overanalyzing OO web consultancy, having been forced to wear UML diagrams as underwear.

    Technology is rarely the problem -- the usual problem with projects and OO is that the zealots win, and centrists who want to use the most-suited technology for the specific application get ignored or called "hacks". The over-ambitious 3-tier agent-based project gets canned, and the "hacks" get called in to fix it using a less long-bearded method.

  322. hindsight 20/20, or is it? by Stalcair · · Score: 1
    as is usually the case, I find myself not in the middle, but on the side of this. I approach programming in this respect much like cooking. I have developed my own personal style, but upon examining it, I find that it is actually just a standard style with a tiny bit of my own flare thrown in. There are a lot of chef's styles out there, and many classify them in a generalized manner in order to help themselves and others relate and learn. Furthermore, in the kitchen whether you are cooking a big meal or just like making some of the parts of meals used frequently ahead of time... well, you find that the method and tools you use, along with the finished product, are often very similar. If you have specialized cooking tools and utinsils that don't go together you end up being innefficient (and a bad speller :)

    The point of all this, is that there is a different method for programming but that still evolves (like adding to your cooking equipment, etc) over time faster than the older one, at least IMHO. Now, I like both. I like to use different styles and tools for different tasks. But I find it both disturbing and strangely amusing that there is such a large contingent of snooty, self promoted elitists out there who think that by snubbing the newer method they are afforded some extra degree of credibility and recognition than they would gather from good work and assistance to others. Perhaps I just see them as the snobs that fall all over themselves trying to prove that they have been doing what you do, longer, more, or their father/mother did it, making them l33t.

    As for OOP vs. Procedural and all... ahh, what are ya gonna do? I have heard a lot of the talk about OOP being bad because it has more overhead (compiler or pilot error?), larger file size (see above), and the ol familiar, how can you reuse code when the method to reuse keeps changing? (well, that sounds like the upgrade argument, its gonna happen for awhile, so get used to it!). If you don't like it, or are stuck in the Procedural world, fine. I am sure you can do the very same thing (or very close at the very least) as an OOP program. But if you take someone with 20 years procedural experience and habit who then writes an OOP, then bitches about it and the results... well I'll let you finish this. cheers

    --

    I seek not only to follow in the footsteps of the men of old, I seek the things they sought.

  323. Re:Poor criticism by VirtualAdept · · Score: 2

    Agreed. Frankly, I nearly stopped reading him when he mixed up OOP with poor business practices.

    Beyond that, he pointed a lot of problems with the way people design OO models that aren't necessarily a design flaw with OO. For instance, his argument about the dangers of 'IS-A'. From what I've read (Design Patterns), IS-A is pretty much regarded as less extensible than has-a. When you can use a has-a, use a has-a. If you want to use a is-a, think twice about if you really need to use one. But no, an OO language does not loose a lot of its benefits as compared to procedural when you use has-a. Modules do not have state. Objects do, which is frequently important.

    I think the last straw for me regarding this article was the unclever section comparing OOP to Communism. Gee, a social movement failed, therefore a programing methodology will fail too.

    --John

  324. Eliminating case/switch statements? by The+Shrubber · · Score: 1

    Someone care to explain to me why one might see this as good thing? I tend to use these a bit

  325. I come not to praise Caesar.... by DirtyDevo · · Score: 1

    "We are not saying the OOP is bad, per se;" Hmm...interesting URL you chose then...

  326. Re:I tend to agree with the author.. by johnnyb · · Score: 3

    I don't think its a fad. Structured programming is still the model we use, even when using it within object-oriented programming.

    The guy who wrote the article missed one of the most important aspects of OO, and that's _interface_ inheritance. Interface inheritance is _NOT_ subtyping, and is vastly more flexible and usable than subtyping, which seemed to be one of his big gripes. If you want to know more about interface inheritance, look at my page at

    http://members.wri.com/johnnyb/comppapers/factor in ginheritance.html

    I called them "feature factors" here.

  327. People think in objects by Gorimek · · Score: 4

    Does OO make assumptions about human nature?

    Actually it does. But it's a correct one.

    One of the basic assumptions is that the human brain is built to think about the world in terms of things that have properties and behaviour. We can think in terms of procedures and execution flow as well, but we're not nearly as good at it.

    1. Re:People think in objects by lrichardson · · Score: 1
      One of the basic assumptions is that the human brain is built to think about the world in terms of things that have properties and behaviour. We can think in terms of procedures and execution flow as well, but we're not nearly as good at it

      Of course, that brings up the whole issue of people associating things differently. I see a chair and think 'computer time!', Bob sees a chair and thinks 'Furniture', Jolene sees a chair and thinks 'Beige'. Speaking solely from personal experience, the vast majority of OO types I've worked with haven't got a clue on data structures: they simply shoehorn in something that works. No thoughts for efficiency of execution, ease of coding, nor future mods.

      The worst example of OO stupidity I've seen was where there was huge buy-in, from a VP, through Directors, Managers, Team leads, and, of course, the hordes of OO programmers hired. An insurance proposal system, displaying less that 1000 individuals. Names, addresses, health plans selected, dependents ... it took over five minutes to build the data on the most maxed PCs available. The mainframe side (for the calculations) did it's work in fractions of a second. Each recalc - fraction of a sec on mainframe, five minutes on PC. Stupid thing was, a couple of us started waving our red flags over a year before the project ran into the wall. As the article says, it often requires a total leap of faith to accept OO. And once someone has made that leap, no amount of reason can bring them back. Stupid thing was, I implemented virtually an identicle system a decade previous, using (thankfully non-GUI) CICS.

      OO, and the Visual bunch seem to be more obsessed with looking pretty and 'current', than actually doing the job. In that I totally agree with the article.

  328. Who IS this guy? Don't waste your time. by jageryager · · Score: 1
    He seems to have a lot to say for a guy who doesn't have anything of value to say.

    I got through the first few paragraphs before I stopped reading. You don't get far in this article before you start seeing stuff that doesn't look right. He says, "Myth: OOP is a proven general-purpose technique " I HAVE seen OOP proven on several projects.

    Later, he writes "Fact: OO fans have repeatedly failed to demonstrate OO superiority. They can talk up a good storm, but cannot walk their talk. " OK, name one software programming technique that HAS demonstrated it's superiority. Have any? If so, let me know so I can start using it. Superiority FOR WHAT? Every application has different requirements. It like saying "truck owners have failed prove that trucks are superior."

    Those 2 gems are before the article even starts.

    Don't waste your time..

    --
    "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety"-B.Franklin
    1. Re:Who IS this guy? Don't waste your time. by sceptre1067 · · Score: 1
      Yeah...

      He,and his article, showed up on comp.lang.object a couple of months ago. Since then its been a long number of threads on both sides of the issue.

      From the OO side, he hasn't done a great job of supporting his critiques on the news group. sigh... can't we all just get along.

  329. Re:/.-ed within 3 mins? by Malc · · Score: 1

    Stop your whining... I forgot to check the box that removes the +1 posting bonus. If it is too high, it'll get modded down as over-rated, or something.

  330. Boy, does this ever miss the point by scorbett · · Score: 1
    The author flat out states that OOP doesn't allow you to do anything that you couldn't do with straight procedural programming. Okay, fine. Let's invert that, and say that procedural programming doesn't allow you to do anything that you can't do with OOP. Asking which one is "better" is missing the point - they are both valid approaches if they are done correctly. I have seen terribly written procedural code and I have seen terribly written OO code, likewise I've seen amazing procedural code and amazing OO code. The approach you choose is irrelevant, as long as everyone on the project does it the same way, and you do it right. Asking which is better is like asking whether you prefer apple juice or orange juice - they're both good for you, it's largely a matter of personal taste.


    --

  331. Re: Poor criticism - and biased by MidnightLog · · Score: 2

    First let me admit that I didn't read the whole article. I skimmed it and I read the Table Oriented Programming article (which is linked to in this article and presumably written by the same person) about a year ago. I believe that this OOP criticism page was around at that point. Although it is hard to take this page seriously (the comparison with Communism just killed me), I think I'll comment on a few of his points.

    I guestimate custom software systems last about 3 years on the average. This is well behind the alleged payback period of OOP.
    If that's true then why did I get all that Y2K work back in '98 and '99 fixing 5 to 10 year old programs?
    When a new language fad replaces OOP, how do you convert legacy Java objects into Zamma-2008 objects? (I will eat a week's pay if OOP is still in vogue in 2015.)
    I think here the author is refering to the data part of the object, not the logic. If so then this is a very good point, but its not an argument against OOP. Its an argument for "future-proofing" your system.
    A common misconception is that one has to change all the procedural code if a DB field type or size changes. For example, if a percentage rate changes from an integer to a float/real, then OO fans often claim that it causes a procedural code change cascade. However, this usually only matters in strong-typed languages, like C, Java, and Pascal. (Weaker typing is better for p/r usage in my opinion.)
    Here I just think its funny that he lumps C in with Java and Pascal as a "strongly-typed language".

    I'd like to add that IMHO, OOP builds on procedural (structured) programming. It usually allows better abstraction than procedural programming, just like using C allows better abstraction than assembly language. In general, abstraction is neither good or bad. As systems get larger and more complex, however, its necessary.

    --

    To understand what's right and wrong, the lawyers work in shifts ...

  332. C'mon....it's not really that bad..... by zerofoo · · Score: 1

    OK, i'm just a comp sci student not smacked by the real world yet. I've been (mostly) taught C, C++, Java, Perl...etc. Most guys (in the real world) tell me that they love Java...why? Not because it's an OO language...because deployment is quick and "multi-platform" (more or less). I think this guy has spent too much time on a non-issue. -ted

  333. Re:inheritence is also about design reuse by elflord · · Score: 1

    But how does one do interface reuse in C ? Perhaps you should study OO more carefully ( in particular, polymorphism )

  334. OOP useful in some cases, but usually not. by SCHecklerX · · Score: 1
    There is one case that comes to mind where I have been able to make things *less* complicated using OOP:

    Engineering simulations involving structures (think animation). Objects work great here, b/c every object can have it's own state assigned to it, and then it's just a matter of doing an object->move, object->rotate, etc. OOP is the better way to go here.

    I guess this applies anywhere you have several 'things' all doing something different at the same time. OOP makes sense for that. But if you are working with only one 'thing', why would you need an object to describe it? You could simply use normal subroutine calls instead. OOP masks that complexity for multiple instances of a 'thing'

    Of course there are many other examples, but this one was the most obvious to me. That said, most the stuff I do is procedural unless objects make it easier in the long run (rare).

    I think people forget that the whole point of OOP is to make modular routines that *MASK* the complexity of the function. You simply do object->foo, without worrying about the internals.

    If you aren't masking the complexity of the action with an object, you shouldn't be using it in the first place.

  335. Re:Another reason ... by SpinyNorman · · Score: 2

    Poor design and algorithms is a much greater cause of inefficency than the fit of C/C++ generated code to a processor's architecture.

    Anyway, 99.99% of programs don't need anything approaching the full performace of a modern processor, and those that do (such as games, speech recognition, media encoding) are always going to have been heavily optimized anyway.

  336. Re:My view by dbarclay10 · · Score: 2

    Like I said, I understand the theory.

    If an object is data with functions, then I've been doing object-oriented programming all my life. Even with assembly. Sure, it might not have been in the code, but each bit of data I was working had a function associated with it.

    Dave

    Barclay family motto:
    Aut agere aut mori.
    (Either action or death.)

    --

    Barclay family motto:
    Aut agere aut mori.
    (Either action or death.)
  337. You're programmer? by msergeo · · Score: 1

    ... or just somebody pretending?

  338. Talk about flamebait... by Samrobb · · Score: 5

    The article is topped off with a gif image tagged "OOP Stinks!". That should give you a good insight into the level of discourse that follows.

    Of course, the author absolves himself from all responsibility for having to present anything more than an emotion-filled diatribe by stating early on:

    Disclaimer: not all myths discussed are necessarily shared by all or even most OO proponents. They are based on "common notions" found in the business and programming world as I have observed them. I am making no claims as to the frequency of beliefs in the myths. My frequency of encounter may differ from yours. Discussing myths is not the same as "punching a straw-man", which some OO proponents claim I am doing by mentioning myths.

    So... his article is based on debunking "OOP Myths", which he states are not "necessarily shared by all or even most OO proponents." He repeatedly fails to back up any of his points with citations or references (and at one point, actually states "Sorry, we accidentally lost the references.") Instead, he justifies his arguments by making blanket statements like "Many OO books and even some OO fans suggest that OO only shines under fairly ideal conditions." Which OO books? "Some" OO "fans"? (Remember the disclaimer - not neccesarily all or even most OO proponents...)

    Finally, some of his commonly (or not-so-commonly - take a look at that disclaimer, again) believed OOP myths are outrageous to the point of being silly... OOP eliminated the need for case or switch statements? OOP makes programming more visual? Only OOP has automatic garbage collection? Components can only be built with OOP? Only Only OO databases can store large, multimedia data? Who, exactly, does believe these myths? PHBs? Certainly not anyone with a CS education or decent amount of programming experience.

    The best thing I can say about this article is that I think the author has a few good points and compelling arguments that are, unfortunately, lost amid the noise and confusion of unsubstantiated facts. If you can read it through and keep from grimacing in pain as OOP is compared to communism and the lack of research in non-OOP languages is decried, you might be able to find an idea or two that will reward you for the effort.

    --
    "Great men are not always wise: neither do the aged understand judgement." Job 32:9
    1. Re:Talk about flamebait... by RevAaron · · Score: 2

      I know a lot of other, more primitive languages still rely on case statements, but there is none in Smalltalk. With proper OOP, you really shouldn't have to need them. Of course, it's easy to write in your own case statement to the language, but it's not a neccessary thing.


      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    2. Re:Talk about flamebait... by Wraithlyn · · Score: 1

      Sounds to me like he read a bunch of old marketing hype about OOP and decided to attack its validity. The problem of course is that ALL marketing hype is slanted and biased, but who believes that shit?

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
  339. Missing the point? by CharmQuark · · Score: 1
    The opening sentences, "OOP became popular primarily because of GUI interfaces" shows not only the myopia of the authors, but also their concern with perception over reality. OOP is important not because of GUIs, but because they allow large projects to happen quickly.

    Furthermore, that people may perceive OOP to only happen in C++ and Java does mean that it cannot happen in Pascal or C. This is the same for structured programming in Pascal instead of Basic. It is harder to do structured programming in Basic, but not impossible. If we are going to talk about OOP, lets talk about facts, not perceptions.

    It is also true that OOP can take more time. On the other hand, the same can be said for any project in which reuse and modularity is an issue. I believe time can be saved with OOP because the mechanism for reuse is part of the language. I completely agree that if reuse of code is not an issue, then OOP may not be your best choice. Likewise with objects, interfaces, etc.

    When I read an article like this I wonder if the author has ever written anything over 3000 lines, or worked with a team greater than 2. The article may be useful to someone who has never coded more than 'Hello World', but no one else.

  340. overboard? by johndoe42 · · Score: 1

    First, I'm inclined to agree with the article. There are many cases of OOP that is seriously overdone. I'll use COM as an example. What was MS thinking when they made DirectX a COM object? It would be faster and easier if it was a normal API! But there are many good uses for the COM abstraction. It allows implementation reuse and dynamic binding to objects. Yes, this could also be done without COM or OOP, but it makes it more straightforward. Many of my programs use OOP for some parts and straight procedural code for other parts. Sometimes I use OOP-like structures in my program but without classes. It depends on the project.

    What I don't like is the way the article is written. It lists things that it debunks, but then makes vague claims as to why they are bad. It even compares OOP to communism (!). If the article gave real-world examples, I would like it. But it simply criticizes blind faith in OOP while requiring blind faith in the article. This is not a good way to make an argument.

  341. In the tiger compiler book by f5426 · · Score: 4

    the quote on top of the object oriented langages chapter was something like:

    "object: to feel distate for something"

    I laughed my ass off (even if I do OO programming since 1991).,

    Cheers,

    --fred

    --

    1 reply beneath your current threshold.

  342. Re:My view by WinDoze · · Score: 1

    To be quite honest (and it pains me greatly to say this being a C++ programmer) try Java. I've heard many people mess about with C++ and say they just didn't "get it". Then Java came along, and more than a few of those same people suddenly "got it". Having not used Java very much I can't say I know why, but I've seen it happen... let's see... I can remember 3 separate occasions.

  343. OOP Good...OOP Bad. by BorlandInsider · · Score: 1

    I wasn't that impressed with the article at all. I've worked with OO systems in big business and as a Tools Developer. The company I work for is a recognized leader WRT OO.

    In my opinion there are three main aspects of OO:

    1. Polymorphism

    2. Encapsulation

    3. Code-reuse

    These are the pillers of OO. It is no secret that each of these can be accomplished in any computer language. It just won't be as easy or as natural as in a modern OO language. In my experience, I have found that if your OO code isn't small and easy to understand the design was wrong. A properly designed OO program feels right. Incrememtatl changes tend to fit right in and is more solid. I can't imagine developing any of our products in a procedural language. Ugggh!

    --
    BorlandInsider

    Kylix - Just too damn cool!

  344. "Abstraction Distraction" my ass by VonKruel · · Score: 2

    Abstraction is the most important and useful thing you can do as a programmer. It takes many forms, but no matter what paradigm you're working in, programming is all about abstraction. It's the simplest thing in the world: when you find two or more sections of code in your program that look very similar, you ask yourself, "what is the common ground here?". In doing so, you are engaged in abstraction.

    OO is simply a way of exploiting this abstraction to maximum benefit. Because abstractions can pay off so well, you are encouraged to find them. As a programmer, you are not paid to be a typist, you are paid to think. Thought in general is part imagination and part abstraction. If you are not capable of finding such abstractions, it is not because OO is inadequate, it's because your skill is inadequate. So should you accept your incompetence, or try to better yourself? The author says you should just accept it and choose a paradigm more befitting your lowly intellect. I disagree with that.

    Is OO oversold? Sure - people do expect to gain benefits magically just by using OO languages and tools. There is no substitute for talented people. And OO is not appropriate for every project. But there are a lot of examples of great things that are nonetheless oversold. Look at the Nasdaq for example.

    I found the article to be pretty weak. He shows pretty graphs without citing references, and seems to be shaking a stick at OO more than anything else. Though he makes a few rational arguments, for the most part it's fairly obvious sophistry.

  345. Good objects are a lot of work by WillWare · · Score: 4
    I work in C and Python. In C, I occasionally do a tiny amount of C polymorphism using function pointers, but it's infrequent. Python's OO model is very easy to deal with, but I find that prematurely OO-ing my code is as bad as premature optimization. If I'm really lucky, my objects will be useful for some later project. This is by no means guaranteed.

    Objects are great where they work, and where you have the time and experience to tune them to perfection. The Python libraries are full of beautifully crafted, wonderfully useful object definitions. But that investment is large, and in many cases, doesn't make sense for the purpose at hand. And there are problem domains for which objects simply aren't the natural description.

    The OO people say that the wrong way to reuse code is the cut-paste-tweak method, because then you have two diverging copies floating around. In a perfect world everything might be in a source code repository and I could submit a change rather than spawn a private tweak. But change submissions mean bureaucracy, if I'm working with other people. If my tweak will never see public use, the overhead is an unnecessary diversion.

    The cited geocities page makes noise about table-oriented programming. I remember hearing similar things in the past, stuff like "Put the intelligence in your data and keep your code simple". I would have liked to see a better description of TOP, perhaps a few pointers to tutorials. The guy's own descriptions are pretty useless for quickly grokking his point. Maybe he's only preaching to the database crowd, and I'm not supposed to get it.

    --
    WWJD for a Klondike Bar?
  346. Re:reusability... by Camel+Pilot · · Score: 1

    You make some good points.

    However, (there is always an however) you seem to imply that abstraction and good interface design is the dominion of OOP only.

  347. Beware!! Your coding dept. breeding bolsheviks! by corvi42 · · Score: 2

    Yes, those dastardly Lenninists are at it again!

    In their most fiendish and heart-chilling conspiracy ever they are targetting the free worlds most valuable intellectual resource! First they created a godless empire ranging across europe and asia. Then they sent their agents to infiltrate america. Then they tried to corrupt the youth of the free world with their underground beatniks and seducing the young into the sloth of hippydom with drugs and satanic music. Then they tricked us all by pretending to dismantle their empire, lulling us all into a false sense of security.

    Don't be fooled by marxist plots! They are still hard at work, and they have infiltrated into the most valuable resource of the information age - they are corrupting our programmers!

    They have put their best agents into key positions in the programming world, and unleashed the most mostrously conceived pinko commie plot since the flurodation of water!

    Boris and Natash say: "Java and C++ vill destroy the evil capitalist pig-dogs".

    B: "Gorsh Rocky, what can we do? Boris and Natasha are running amok!"

    R: "I don't know Bullwinkle - but we must warn the honest IT managers of America to reject OOP"

    B: "Hey Rocky, watch me pull Fortran out of my hat!"

    R: "But that trick never works!"

    B: "This time for sure. Presto!"

    --

    There are a thousand forms of subversion, but few can equal the convenience and immediacy of a cream pie -Noel Godin
  348. Three? Try nine... But its ALWAYS been like this. by crovira · · Score: 2

    OO is a design technique and OO systems can be implemented in Assembler (like CICS/IDMS-DC) all the way to Smalltalk.

    Brooks in "The Mythical Man-Month" talked about the difference between programs and systems back when they were building OS 360. The complaints talked about here aren't limited to OO.

    However, every non-trivial implementation of any successful system can be shown to be OO in design and technical every failure can be shown to have violated OO principles (that's not counting management, direction marketing and every other reason for failure.)

    Most systems tend to become unmanagable because the peoplle in the trenches doing the maintenance get "too busy" to maintain the documentation and rely on osmosis and oral tradition to pass on the system lore. Things get lost with ever departure until its necessary to start over again. ("Read the code" has NEVER worked for more than trivial stuff because the code only caries traces of its INTENT and clever programmers tend to obscure that through 'clever' hacks.)

    Smalltalk, a best of breed, has several short comings but that doesn't mean it can't be made to work easily. You just have to remember the limitations of container-based implementations.

    Java, C++, C#, CLOS, Simula, and Smalltalk ALL share in these deficiencies:
    1)Contained object don't know that they are contained unless you explicitely make a reference to the container part of the object.
    2)Object instantiation is made without regard to context.
    3)Objects don't understand anything about participation in relationships.
    4)Class membership tends to be hard to mutate.

    When we have a language that can model the difference between the cuppola of the Piaza Duomo in Firenze and a common garden wall, then we'll have something to work with. Until then OO is the best design technique we've got.

    --
    MSBPodcast.com The opinions expressed here are my own. If you don't like 'em... Think up your own stuff.
  349. Re:Criticizing Knuth's Tie Clips by segmond · · Score: 2

    if you think you have a point, go checkout ruby and python. :-)

    --
    ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
  350. Objects don't interact with everything by SilentBob · · Score: 1

    While this kid makes some valid points, the one "point" that kept annoying me through the whole thing is that an object is limited when it needs to interact with something it wasn't supposed to. The example he gives is a victim not having a victim.mug() method, so a mugger can't rob him: well, isn't that a good thing? If I design an object for a specific purpose, there's no way I can see into the future and see all the different uses my object may be used for. An object is not carved in stone: if your new app needs a method not provided by my object, then you add that method, and keep the rest. There's no law that says that you can't modify the object. The other example is that in the real world objects interact with unexpected things like trees and earthquakes. True... but this isn't the real world. This is a system where the programmer defines the scope - any external object that wants to interact with my object has to be explicitly added to my object somehow. I don't see how procedural programming, or any other programming paradigm, can see into the future and know everything it has to interact with. I apologize for this probably making no sense.

  351. Point - Counter Point by Radical+Rad · · Score: 1

    He didn't mention maintainability much in his rant. Perhaps because it would be a major counter point to his assertion. The only place where I can remember it even being mentioned was in an idiotic metaphor with automobile mechanics.

    -- Jane you ignorant slut --

  352. If we'd all been using Pascal... by slickwillie · · Score: 2

    About 20 years ago Pascal was about as popular as C. But C won out because it didn't impose as many restrictions as Pascal ("look, I can cast a function pointer to int..."). And besides, Pascal was developed for teaching good programming practices, not for "real" projects like C. So, being lazy, people started using C, and Pascal faded out of use. Even Modula-2, the "Object Oriented Pascal" couldn't save it.

    How many virus exploits would have been averted if Microsoft had chosen Pascal?

  353. One word... by p3d0 · · Score: 1
    Inlining. Some compilers, which use languages more amenable to analysis than C++ (ie. almost any other language), are able to inline all those itsy bitsy functions so that you can write code in an OO way and still have good performance.

    This one does that and lots of other stuff. It generates some great code.
    --
    Patrick Doyle

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
    1. Re:One word... by krlynch · · Score: 2

      Many cases of virtual function calls can be completely optimized away at compile/link time. Read, for example, here.

  354. Re:My view by dbarclay10 · · Score: 2

    That might explain why I'm starting to understand it with Python. Python may be sufficiently different than anything else I've used that it makes me re-learn stuff.

    On the other hand, Lisp is also very different, but to me, only syntactically. 90% of the code I've ever written uses dynamic data for everything. I never did #a = $b + $c, it was always add(b, c, a) type things. Which is suprisingly like (setq a (+ b c))

    Dave

    Barclay family motto:
    Aut agere aut mori.
    (Either action or death.)

    --

    Barclay family motto:
    Aut agere aut mori.
    (Either action or death.)
  355. I find a hybrid of the two works best by bigman921 · · Score: 1
    In my short time of being a programmer i've found that often a hybrid of OOP and structural programming work really well. Both styles work in their own situations.

    The author didn't seem to want a real comparison, but to trash OOP. Each have their stengths and their weaknesses. If you use OOP when it would be better to use structural, it will lead to bad code and vice-a-versa. It is more important that a project is well organised then the style that is going to be used.

    I recently read the "conversation" between Linus Torvalds and Andy Tenanbaum about Micro Kernel Vs. Macro Kernel. After reading both it and Linus' essay in Open Sources i figured that it was the organization of the project that was more important then the paradigm used. There's no need for a flame war over this, it's just not nessasary.

    --
    "So you call this your free contry, tell me why it costs so much to live?" - Three Doors Down
  356. If it doesn't work, it's not fast by Wrexen · · Score: 1

    The efficiency argument against OOP is quickly wearing thin given moderm processors. Realistically, function calls are NOT killing your performance; poorly written code and hitting the disk/swap file too much is going to slow you down more than anything else. The main thing people *should* gain from OOP is safety. In the book "Writing Solid Code" (no ISDN/author, look it up yourself) the author points out (from the perspective of a procedural coder using C) that the most important thing about software is removing bugs, which, if done properly, is easier and more reliable under OOP. Despite all the cycles you may save without OOP, every single performance gain you made will be lost in just one crash; speaking in terms of how well the software works for the user. I think any of us could stand waiting for our *nix/*BSD/Win* box for an extra 30 seconds or even 5 minutes on boot if we knew that it wouldn't crash once it was loaded, the same going for any other program used for creating content or doing something useful. The point here is that OOP's main point beyond data structuring is safety, which can be far more easily obtained if done properly.

    Disclaimer: Badly done OOP projects are doomed to fail miserably, far worse than their procedural equivilents. TANSTAFL.

    1. Re:If it doesn't work, it's not fast by Tasfalen · · Score: 1

      I'm afraid I have to disagree on one point. If you state that safety is a desireable property of computer programs and a general computer environment, then I would like to point out that on the one hand, "safety" cannot be assumed to be equivalent to "good". On the other hand, I could equally assume that "safety" is equivalent to "stagnation". In all fairness, however, those two are not the same either, semantically speaking. :) If you did not intend to state that safety is a desireable property, then you gain no benefit from utlizing OOP, according to your post.

  357. Re:Another reason ... by taniwha · · Score: 2
    I think you're missing the point a bit - it takes years for silicon to come out - as I pointed out in my posting the call/ret issue you mention is a real problem - partly I suspect because the compiler writers don't take it into consideration (and in the x86 case it's probably made worse by a lack of tmp registers that end up pushing people into using the stack for PC manipulation).

    The whole reason I was doing the work I was was so that we could discover and address exactly these sorts of issues.

    The problem with branching to an unknown offset is - well - it's unknown - and you often don't know what it is untill you've completed a data cache miss to get the address (that's a double pipe break in my mind) - the solution can be things like branch target caches (which make a guess at the target and start a speculative stream).

    Remember you're stuck a primary architecture (x86) that are decades old - that were optimized for compact code (at the expense of registers because they were designed for a system with no icache and limited memory bandwidth) that force complex language constructs into overusing the cache/memory subsystem - of course you are going to get data/branch interactions

    The other big problem in the architectures we see today is marketting - GHz is all - it's what Intel/AMD's marketting people know how to sell - it's a nice number that they can wave at their competition). It's driving their architects to longer and longer pipes to get the clock rates up ... and reducing the CPI into the bargin I'm sure it has a lot to do with why P4 is such a dog - I bet when their engineers are faced with the question "should we make virtual method calls run faster or shall we make it easier to up the clock speed" the clock speed wins every time - no one's saying lets make the pipes smaller (and clocks slower) so the actual programs will run faster

  358. Where is Churchill when you need him? by PHAEDRU5 · · Score: 1

    OOP is the worst possible way to write code.

    Except for all the other ways.

    --
    668: Neighbour of the Beast
  359. Why I like Object-Oriented Programming by Art_XIV · · Score: 1

    Why do i like OOP?

    Because languages like Java and C++ let me bring home the bacon! Thank You, OOP!

    Let's face it, all programming languages and paradigms mostly suck. I gave up on searching for truth and beauty (at least with programming) years ago. I'm sick of companies that want their projects implemented in Java/ASP/JSP/C++/COM/VB/Oracle/SQL Server/etc. without really knowing why they want it done that way, other than having been impressed with a sales rep.

    But... Programming for 60K+/yr will always be better than having a real job, especially one that involves manual labor.

    --
    The only thing that we learn from history is that nobody learns anything from history.
  360. Re:You're right, but... by .pentai. · · Score: 1

    and in the mean time, lets have the compilers just create the code in the first place, yes?

    I mean, I don't mean to sound like a dick, but you're blaming your slow inefficient code on a tool instead of on your code. If you can write something in a different order and have it be faster, that's YOUR issue, NOT the compilers. Yes, optimizing compilers are nice and all, but you can't expect them to do everything for you.

    Face it, function calls take time, OOP produces a lot of function calls (you said it yourself), so there you have it.

  361. You're right, but... by FunOne · · Score: 1

    OOP does produce a BUNCH of little subroutines. Thats how OOP usually works best (abstraction, encapsulation, etc.).

    But in this day -n- age compilers should be able to work around that. Compilers should do more than literally translate code into assembly, they should be able to optimze, inline, and re-arrange code for speed. If I tell you to do A,B, C you can figure out that its faster to do A, C, then B, and to start the stuff for B when you do A so it'll be ready in time. A good compiler should do that too.
    FunOne

    --
    FunOne
    1. Re:You're right, but... by yugami · · Score: 1
      Face it, function calls take time, OOP produces a lot of function calls (you said it yourself), so there you have it.

      I'm not sure about a lot of other langs but C++ makes method calls inline by default (hence the code bloat people complain about) and therefor the function calls OOP produces is a void argument for c++ performance

  362. Re:Another reason ... by lscoughlin · · Score: 1

    Sure. But those little subroutines tend to be inlined alot more often as they are part of the namespace and are usually jumped to with the proper jsr/ret combinations. What i'm curious about is the performance of a lot of the applications that we wrote under contract in c. They sorta faked oop with structures holding function pointers used as components. This gave us much better modelling of dynamic objects because their behaviors could be changed at run time.

    --
    Old truckers never die, they just get a new peterbilt
  363. I tend to agree with the author.. by Omega · · Score: 2

    OOP (IMHO -- I'm crazy for the acronyms today), is just a fad. Like structured programming was before it.. Unfortunately a lot of these companies today fall into "trendy" programming methodologies. Personally, I believe you should program using the style you're most comfortable and familiar with. If you're trying to fit a mold it will slow you down..

    1. Re:I tend to agree with the author.. by MidnightLog · · Score: 1

      It sounds nice to let the programmer go off and just write in their own style using their own unique design techniques. But it's terribly naive and unrealistic in the real world.
      Hmmm. It sure sounds nice to let me (as a programmer) go off and write in my own style using my own design technique (and writing in whatever language/environment I feel like). As for the rest of you so-called "programmers", you better start standardizing based on what I do (coding style, design techniques, haircut, etc). If you ask me nicely enough, I might even provide a set of written guidelines (when I get around to it).

      Relax, its only a joke... Or maybe a daydream.

      --

      To understand what's right and wrong, the lawyers work in shifts ...

    2. Re:I tend to agree with the author.. by paul+r · · Score: 1

      Yes, this is topmind's stuff. Semi-kook is a good way to put it.

      If you take a look at the comp.object archives in the past few weeks there have been a few whacks taken at exactly this article. Try this deja.com link: My thoughts on `topmind@technologist.com` AND his site

    3. Re:I tend to agree with the author.. by ProtonMotiveForce · · Score: 1
      What a trenchent analysis. "It's a fad."

      It's not a fad, it's been around for decades, it's been used to develop countless professional grade applications.

      I have a suspicion this article was written by TopMind (a semi-kook who posts to comp.object). He's not without his points, and OO isn't perfect in every situation, but this article was just plain silly.

      "It's a fad." Yeah. Sure.

    4. Re:I tend to agree with the author.. by squiggleslash · · Score: 2
      Aw now come on! This "Fad" has lasted at least ten years. I remember in the late eighties magazine article after magazine article about how OO was about to change the face of programming as we know it, Zortech's C++ compiler and the massive uproar that followed.

      I agree it's overrated, and used predominantly because it's trendy not because the people proposing its use necessarily have made considered decisions, but a fad? I think we commonly agree now that the Internet is not a fad, just how long does a form of programming have to be mainstream before it, too, is no longer treated as one?
      --

      --
      You are not alone. This is not normal. None of this is normal.
    5. Re:I tend to agree with the author.. by cburley · · Score: 1
      OOP is just a fad. Like structured programming was before it.

      Right on! And don't forget other fads like so-called "high-level languages" (such as FORTRAN II, COBOL, and INTERCAL), assembly (mnemonics are a waste of time and energy -- just memorize the instruction encoding and the opcodes instead!!), and similar programming tools.

      --
      Practice random senselessness and act kind of beautiful.
  364. He just doesn't get it. by dentin · · Score: 1

    Maybe he just thinks differently, but honestly I don't see where he can say 'I dont accept anecdotes as evidence' when his whole damn argument is based on nothing but.

    It also seems to me like he really just doesn't understand it well enough to properly criticize it. OOP isn't a magic bullet, and it wont solve all problems, true - but then again, no-one was claiming that either. But it is powerful, and in most cases it is more powerful and more maintainable than procedural programming. And in large projects, it is damn near invaluable, due to the tight constraints that can be forced on the usage of objects and data.

    And why the hell should it matter what the average lifetime of a project is? What if your project just happens to be one of those that lasts for 30 years? If good, maintainable designs were done in the first place, 3 years would most likely be unrealistically short. I personally think most projects are tossed because they too quickly become unmaintainable due to poor design, regardless of language.

    And as for it taking many years to reap the benefits of OOP on a particular project, I certainly beg to differ. The rewards seem to come to me much quicker, on the order of months for breakeven - because the little utility classes and even large structures become like a library, a library of well tested code that does exactly what I want, and that I am very familiar with.

    I remember thinking the same as this guy several years ago, when I knew C++ but didn't truly understand it. I have since learned the strengths and weaknesses of OOP, and changed my mind.

    Anyway, I think I'm done with my rant...

    -dentin

    --
    Alter Aeon Multiclass MUD - http://www.alteraeon.com
  365. VB Programmer by fdiv · · Score: 1

    Most of the assumptions he disproves are ones that are not even valid. For example on one specifically, any programmer worth his salt knows that garbage collection is fairly language independant. It works better with some language syntax than others but it can be put into any language if you want to write the code to do it.

    I'd be willing to guess that this guy along with a number of others hate OOP because of the large number of beginner C++ people that think they must use every feature of OOP in every program they write.

    It all boils down to this, OOP is another tool in the tool box. You wouldn't use a hammer to tighten a screw, but it certainly does put nails through wood very well.

  366. Huh? by Spamuel · · Score: 1

    This article is a troll, right?

    1. Re:Huh? by TulioSerpio · · Score: 1

      yes it is

      --

      I'm from Argentina: Tango, Asado, Mate, Gaucho, Maradona, YPF

    2. Re:Huh? by Malc · · Score: 1

      It read like trolling rant. Perhaps written by somebody who's been doing it one all their life, and now finds that they can't or aren't willing to adapt.

  367. The biggest problem with OOP by AlgUSF · · Score: 2

    The biggest problem with OOP is when people use it too much, and end up with like a million classes.
    Example:
    class HelloWorldClass {
    HelloWorld() {
    printf("Hello World!!\n");
    }
    };



    --


    I want my rights back. I was actually using them when our government stole them after 9/11.
  368. Re:Author is a USENET troll/pest by rkent · · Score: 1

    Hey, thanks, good eye.

  369. Criticizing Knuth's Tie Clips by DaveWood · · Score: 2
    I love it when people get into the OOP/procedural debate. Especially when almost all of the time, it's a debate between C people and C++ people...

    C - a language which is one dreadul kluge after another... preprocessors, function prototypes... and yeah, your code runs fast, but you'll wear your wrists out trying to do robust, verifiable programming, the dreadful excuse "API"... At the end of the day, you're still feeding text files into the chute and turning the crank. The whole thing makes me feel like I'm in the 1880's.

    And then we have C++. Which has all of C's faults, with some additional syntax kluges thrown in to do "object oriented" code... while keeping C's superior style, apparently. So now in addition to everything else, I have to #IFNDEF SOMESHIT #DEFINE SOMESHIT blah blah #ENDIF. Fantastic, guys. Just make sure you get all of your libraries specified on the command line in the right order... Let alone the fact that when you do RTTI or exception handling the compiler gives you the distinct impression it's doing you a favor. Oh, you want a virtual method? I thought you just wanted to seem object oriented, not actually be it.

    Java was a wonderful change from all this, because it simplified and organized the source and sanitized the compilation process. Simply having array bounds checking and garbage collection (let alone the vastly superior and standardized API) made development take up to half the time it would take in C++... and I _HATE_ the VM. I could care less about it. I just find myself amused when people driving horse carts around the back woods get pissed off about the speed limit being 120mph. Our development systems are primitive! OOP or not is a drop in the bucket. The real misunderstood tradeoffs are elsewhere entirely.

  370. Re:fp by Quid · · Score: 1

    Hmmmmm. That's really deep...
    ----Quid

    --
    ----Quid
    Less talk, more caffeine
  371. Re:Three? Try nine... But its ALWAYS been like thi by elflord · · Score: 1
    2)Object instantiation is made without regard to context.

    I would have thought that factories and prototypes meant that one could instantiate objects "with regard to context".

  372. Re:Code Reuse by slamb · · Score: 1

    I've done quite a bit of C++ programing and never once in my life have I reused code through inheritance

    Then you weren't doing object-oriented programming. I don't care what language you used, that's a central part of OO. You can write in C without using do/while/for/switch as well, it just won't be good C.

  373. Pick the right tool for the right job! by tmoertel · · Score: 2

    Look, folks, object orientation is just one tool of many in the big box of software tools. Use it when appropriate, use something else when it isn't. This guy rants rants about OOP basically on three grounds, all of which are straw-man agruments:

    1. OOP doesn't live up to the hype of its most zealous proponents (What does?)
    2. When you do stupid things with OOP, you get stupid results. (What did you expect?)
    3. Contrived, obviously-false statements about OOP are not true. Examples taken from the document: "Myth: Only OOP has automatic garbage collection", "Myth: Only OO databases can store large, multimedia data", "Myth: Components can only be built with OOP", and so on. These aren't legitimate myths widely believed by folks who use OOP; these are straw men propped up so that he could knock them down.

    The reality is that OOP is a good tool for solving a lot of common problems. It's also a lousy tool for solving a lot of other common problems. When OOP isn't the right tool, don't use it.

    Just use the right tool to begin with. When it comes to programming paradigms, there are lots of tools in box:

    Use the right tool for the job. You'll be glad you did. (And you won't have to put up a web site just to rant about your bad experiences with using a hammer to place dry-wall screws.)

  374. Ahmen by Anonymous Coward · · Score: 1

    YES!!!

    As a working programmer, I can appreciate this debunking tremendously.

    I have worker mostly on both large, windows GUI applications as well as large, server side GUI applications. Having worked with more complex applications than the author, I would say that he actually gives OO too much credit. It is even worse than he thinks.

    Certainly, SOME factors of OO are extremely useful for large programming projects. But the "theory" and the hype of OO both produce more harm than good.
    OO produces more "tight coupling" of code on more levels than procedural programming.
    -- One example is that a large function can be broken into smaller functions and each function moved another file. Once you have a large C++ class, you're basically caught by it. You can't break it easily into anything. ==> And this is only one of several ways that OO essentially screws you.

    The thing is that OO "theory" is hype. Unlike, say, relational database theory which rest on both mathematical logic and rigorous ideas of data usage, there are no rigorous concepts behind OO "theory." The basic "ideas" of inheritance, polymorphism or encapsulation are simply intuitive, adhoc systems to make things easier.
    They draw anologies between many common features of data structures.

    The problem is that they force these anologies rather than calling on programmers to be extremely carefull in determining whether these analogies actually work. Sure, if an anology between an OO class and what we intuitively take as an object, "real worl" or not, then OO is useful. But for other objects, like GUI windows, lexical elements of a computer language or rows of database, the analogy is forced and counter-productive.

    Oddly enough, despite being designed with an "intuitive base" of object, OO often becomes a matter of myth in practice. Rules like "no downcasting" are applied without an eye to actually reduce the complexity or increase the robustness of the resulting code.

    Also, a lot of the arguments for OO, begin something like "If the definition is tight and the operations are well defined, then you have acheived OO'ness." This implies clear thinking and exact design, something seperate from OO.
    So basically, it's like saying "with OO and a dollar, you can get a cup of coffee."

    Best wishes.

  375. Issue over Code Reuse by Misch · · Score: 2

    This is just my humbl opinion, but in my Software Architecture course, I've noticed that there is something more to all of this than jsut straight up "code reuse"... Architecture reuse is going to be far more important. Sure, we have those nice little design patterns that tell us how to achieve small tasks within our program, but with large-scale systems, recycling the _architecture_ is becoming more important. How do you think Microsoft made Office so rapidly? They used the same architecture, same components, jsut with a little bit of different function.

    It's one thing to recycle a few hundred LOC every now and then, but it's a whole different ballgame when you can recycle the plans for a complete system. I feel (and I may be wrong) that this just isn't as easy under the procedural system.

    --

    --You will rephrase your request for me to go to hell. Goto statements are not acceptable programming constructs
  376. A cop-out? by TDScott · · Score: 3

    Disclaimer: not all myths discussed are necessarily shared by all or even most OO proponents. They are based on "common notions" found in the business and programming world as I have observed them. I am making no claims as to the frequency of beliefs in the myths. My frequency of encounter may differ from yours. Discussing myths is not the same as "punching a straw-man", which some OO proponents claim I am doing by mentioning myths.

    So... this is based on his experiences, without research? He has based this piece of writing on merely his viewpoint? Surely, if any technical critic wishes to be taken seriously, he should back his work up with proper figures and research, rather than "myths".

    Communism also looked good in theory, but its base assumptions about human nature were flat wrong!

    Okay... he's comparing OO with Communism? I don't see the connection. Does OO make assumptions about human nature?

    This seems far too much like a rant, backed up with a few web pages... I would not take this seriously.

    1. Re:A cop-out? by pjrc · · Score: 2
      Okay... he's comparing OO with Communism? I don't see the connection. Does OO make assumptions about human nature?

      Indeed, his point is poorly made, and as nearly as I can tell goes something like this:

      • Communism seemed like a good idea, but we all know it didn't work out.
      • Communism failed because it "got bogged down in bureaucracy"
      • He personally experienced bureaucracy having to fill out too many forms to get a business license (probably not in a communist state)
      • Object methods often are implemented requiring references to other objects, which often times are built with constructors which require a large number of fields, similar to having to fill out those unpleasant gov't forms.
      Maybe I missed something, but I was under the impression that communism failed because it lacked incentives for productive behavior which ultimately resulted in a massive decline in productivity. Some people have suggested to me, also apparantly incorrectly, that communism was too suceptible to abuse of power. Because capitalism also suffers this problem, I've spent the last 15 years or so believing the fundamental problem with communism was the lack of financial incentive for productive accomplishment.

      Silly me. I learned something today. The real reason communism failed and capitalism works is because communist nations had to bear the weight of excessive bureaucracy while the government structures of the western nations were able to run mean-and-lean, with very little overhead and only minimal bureaucratic hassle.

      I tried to learn more things from Jacob's long rant about OOP, but somehow I didn't manage to come away with much insight.

  377. Re:Another reason ... by garoush · · Score: 5

    How far is "... a while back while working on an unnamed CPU project..."? If you are talking 5+ years, or even 3+ years, than you data is out of date as today's compilers are much more efficient about optimizing C++ code.

    --

    Karma stuck at 50? Add 2-5 inches.. err.. 2-5x Karmas Count to your pen1es.. err.. Karma all naturally and private
  378. Re:Author is a USENET troll/pest by Anonymous Coward · · Score: 1

    Seems to be Tablizer

  379. Re:This is bogus ... by DigitalDreg · · Score: 1

    I should have proofed it better ...

    OO stands apart from GUI. OO is useful for implementing GUI systems, but OO is useful for lots of other things too. The athor implies that without the need for better GUI implementation techniques that OO wouldn't be so popular today. I disagree with that - GUIs or not, OO is still popular.

    A lot of people confuse these concepts:

    - object oriented
    - encapsulation
    - code reuse
    - inheritance/polymorphism

    I'm not about to sit down and write a crisp definition - that's for the textbooks. Apparently the author hasn't read any recently. ;-)

  380. Re:Not a pain? What about massive inbred inheritan by Anonymous Coward · · Score: 1

    C++ sucks. C++ sucks. C++ sucks. Bleat as necessary.

    'nuff said?

  381. clueless nonsense by ckeeper · · Score: 1

    OOP is not a panacea, but as far as rapid
    development (especially for a *group* of people)
    and maintainability as well as novel and
    innovative programmatic structures it is far
    superior to procedural programming for most
    tasks. (I said most tasks... some tasks are
    better done from a procedural standpoint...
    choose the right tool for the job..)

    In general I would say that OOP is 21st century
    programming.

    I didn't like OOP either.. until I got it. After
    I got it, I loved it.

    Java is by far my favorite OOP language by the
    way. C++ is a little kludgy but probably a
    close 2nd.

  382. Re:inheritence is also about design reuse by mangino · · Score: 1

    My statement about properly implemented OO gives you code reuse can be applied to paradigms other than OO, but I haven't done it will.

    About half of the good OO code I have written in my life has been done in C. That does not include polymorphism or any other pure OO construct, however the design of the components themselves are modeled as objects.

    A better word to explain my vision of OO is component based design.
    --
    Mike Mangino
    Sr. Software Engineer, SubmitOrder.com

    --
    Mike Mangino
    mmangino@acm.org
  383. References... by funkapus · · Score: 1
    If this was an academic paper, his professor would be laughing hysterically as threw it in the garbage.

    Quotes:
    "Sorry, we accidentally lost the references."
    "Although no references will be given here, this figure is fairly widely accepted in the industry."

    I mean, come on here. Those two sentences ruin the credibility of the entire article. An assertion that is backed up by nothing is worse than useless.

    The whole article suffers from a preaching-to-the-choir attitude and the only folks likely to agree with it are those that agree already. So what was the point of writing it then?

  384. Is This Guy Nuts? by BxT · · Score: 1
    "Thanks to commercials whose media techniques are outstanding, even guys now recognize split ends."
    Come on now! I don't know a single guy who worries about split ends. Do you?

    -BxT
  385. oop bad? by holzp · · Score: 2

    Yeah yeah yeah, Yeah yeah yeah, Yeah yeah yeah I think I did it again, I made you believe we're more than just objects Oh baby, It might seem like some code OOPs!... I did it again, I played with your paradigm, got lost in the code....

  386. reusability... by GoNINzo · · Score: 2
    Bleh! If I hear reusability one more time, i'm going to kill someone...

    The right tool for the right job. By building such a generic tool, you ruin it's effectiveness. and the article points out that the benifits of reusability only come after years.

    But he makes a great point. You can't have all OOP and no procedural skills. and you see it time and time again. If all you know how to us is a hammer, pretty soon everything looks like a nail.

    --
    Gonzo Granzeau

    --
    Gonzo Granzeau
    "Nothing the god of biomechanics wouldn't let you into heaven for.." -Roy Batty
    1. Re:reusability... by donny · · Score: 1
      Properly implemented, code re-use can pay off immediately. I have worked in shops where every time we added a client, we needed a new copy of the code. Even though most of the processing was the same for the new client, we had to start out with a copy of the code

      Whoa! Since when did OOP have a monopoly on code reuse? cp copies procedural programs too!

      Donny

    2. Re:reusability... by mangino · · Score: 1

      Of course. I thought the article was poorly written and flat out biased. OO is not a solution to every problem, however it can help encourage reuse. I did not mean to imply that OO was the perfect answer, only that code reuse through OO can have immediate returns under the right conditions.
      --
      Mike Mangino
      Sr. Software Engineer, SubmitOrder.com

      --
      Mike Mangino
      mmangino@acm.org
    3. Re:reusability... by mcwop · · Score: 1
      In my limited experience as a project manager, it appears that reusability is hobbled more by crappy documentation than by anything else. Am I right?

      --

      "I don't think it's selfish, to eat defenseless shellfish." -NOFX

    4. Re:reusability... by infodragon · · Score: 2

      You are absolutly right, so for the sake of karma, I'll expand a little on what you said...

      A clearly defined and documented interface provides the integral part of any software project. With out them all the diagrams and quality control will not help when it comes to maintenance and new development.

      One thing that comes from clearly defined interfaces is extremely modular code. Modular code encourages de-coupling of components, making it easier to develop new features and fix old ones.

      Another thing that interfaces provide, if they are properly used, is a true abstraction from the implementation. So when a new programmer comes onto the scene he gets a good feel for what the module does before he gets into the implementation. If the code is really bad then it can be replaced without breaking other software, by rigidly adhering to the definition of the interface.

      Yes this is not a perfect thing but it is a wonderful start. I'm a C++ programmer with 7 years of experience. When I develop a new object or related objects I create a base class that just defines the interface. I use pure virtual functions so there is no implementation. I define what each of the methods do. Through inheritance I then implement the interface. I may write crap code for proof of concept or just a time constraint but when I go back and re-implement the clearly defined interface it does not change the behavior of code that is dependent on that interface.

      Another method I use is factories. I have objects that construct related objects and return a handle to just the interface. This way other code
      that I write is never directly accessing the implementation of the object.

      I do understand that other languages do not support some of the features that C++ does but with a little thought and design the same ideas can be used to implement strongly defined interfaces and good decoupling of modules can be achieved.

      This is a more hands on approach to software but it is something that I feel is missed by most software development. A strongly defined interface will always allow for easier development, maintenance, and addition of new features.

      --
      If at first you don't succeed, skydiving is not for you.
    5. Re:reusability... by flashbang · · Score: 1

      Not to mention the simplicity OOP affords. Sure your can do all the OO stuff in C like many have posted, but for God's sake, who in thier right mind would want to maintain that code.

      Reuse is such a big factor in OOP. I work in a very heavy client/sever environment, three tier architecture system. I could not imagine doing it in C. Keep in mind that most programmers really are not that good, and when you get your average programmer in to debug some software and they have to spend days trying to figure out the byzantine use of obscure C practices and other abortions in code, bugs become very, very expensive to fix.

      As Mike posted, the key is proper OOA/OOD. This really does pay off quickly. If you've never seen it in action, you should try to check it out.

      --
      My sig left me for a younger user id.
    6. Re:reusability... by nojomofo · · Score: 1

      Yes, but if you start reusing code using the "cp" command, then you have extra copies of the code to maintain. With OOP (or even carefully with procedural program), you can maintain one copy of the code no matter how many times you use it....

    7. Re:reusability... by mangino · · Score: 5

      It has been a long time since I last posted to Slashdot. I can normally restrain myself, but this is just pure and absolute BS.

      Properly implemented, code re-use can pay off immediately. I have worked in shops where every time we added a client, we needed a new copy of the code. Even though most of the processing was the same for the new client, we had to start out with a copy of the code. Code re-use would have bought us hundreds of thousands of dollars very quickly. (This did not ocurr at my current employer)

      Properly implemented abstraction and OO along with iterative design can save a large amount of money very quickly. The key is to prototype your interfaces for the application you have in mind. Once you have done that, think of a completely unrelated use of the interface and test that. If you can handle 2 or 3 different uses, you have a good interface to start with. Rinse and repeat for the rest of your system.

      People may question you immediately, however the minute somebody decides to change the system message transport from http to JMS, you should be able to convince them of the value of proper abstraction and code reuse, just change the transport class and you are done. I did this in a system where we did all of the work necessary to change the transport in less than 30 minutes. The consultant that had been working on the same problem for 3 months was absolutely amazed at quickly I made the change.

      OOP is not a cure all, however its use along with proper abstraction can lead to large savings from code-reuse in a short time.

      Mike
      --
      Mike Mangino
      Sr. Software Engineer, SubmitOrder.com

      --
      Mike Mangino
      mmangino@acm.org
    8. Re:reusability... by flashbang · · Score: 1

      You obviously don't understand what reuse is. Copying is exactly what you want to avoid.

      --
      My sig left me for a younger user id.
    9. Re:reusability... by Paradise_Pete · · Score: 1
      I really only code in C and Perl these days, and I reuse code all the time

      I think you're confusing Copy and Paste with reusability.

    10. Re:reusability... by dlkf · · Score: 1
      FYI, see the book: Multiparadign programming in Leda by Tim Budd.

      personally i havent read the book, but i know that he has written some excellent books on languages and it sounds similar to what you are talking about.

    11. Re:reusability... by TulioSerpio · · Score: 1
      I always dream of a Programing enviroment that let me program in all paradigms/lenguages.

      image program functions in haskel, calling from samlltalk or C++ or Java or Delphi or whatever conbination.

      All in the same Compiler-debugger.

      --

      I'm from Argentina: Tango, Asado, Mate, Gaucho, Maradona, YPF

    12. Re:reusability... by Chokolad · · Score: 1

      > But he makes a great point. You can't have all OOP and no procedural skills. and you see it time and time again. If all you know how to us is a hammer, pretty soon everything looks like a nail.

      Huh ? What is object in most OOP languages ? It is data AND methods. If you don't have procedural skills - how can you code methods?

  387. Good class libaries. by Joseph+Vigneau · · Score: 1

    One reason people "get" OO after working with Java is that its standard class libraries were designed with polymorphism in mind. For example, many methods depend on an InputStream object as a parameter. But, since InputStream is abstract, you have to pass in a subclass. Where can you get an InputStream? Well, you can create a FileInputStream, call the openStream on a URL object, create a StringBufferInputStream from a String, get one from a Socket, etc. It's also much easier to create your own InputStream type than it is in C++, IMHO...

  388. Re:Another reason ... by acroyear · · Score: 1
    calling lots of little subroutines is a coding style encouraged by OO devotees

    If i remember my first-year CS classes, calling lots of little subroutines is encouraged by structured programming as well -- "always break up a function that's more than 10 lines long" or stuff along those lines...

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  389. CmdrTaco flaunts his ignorance by Katz_is_a_moron · · Score: 2

    "The Object Oriented Hype"

    How can a paradigm that has been a foundation of successful application development for years be called hype? That's akin to calling procedural languages hype.

    "Personally, I've never been a huge fan of OOP"

    I'm not try to convert you, but have you done any serious OOP programming?

    What some people don't understand is that knowing how to program in a OO language doesn't automatically mean a person knows how to do OO programming. If a person partitions an application into objects that don't make sense (e.g., an object that should really be multiple objects), then he isn't really isn't getting the advantages offered by OOP.

    I've seen programmers try OO languages and say "it sucks". When I look at their code, I tell them their OOP sucks.

  390. My view by dbarclay10 · · Score: 2

    Now, I'll be honest. About four paragraphs into the article, I had to stop. I didn't understand it.

    I am *not* a OOP programmer. To be honest, I've never been able to understand it. The first programming language I learned was dBase(if you can call that a programming language), and I learned that when I was around 5 or 6.

    After than, I learned assembly. 16-bit, 80286-style Intel assembly.

    When I was around 16, I learned Borland Turbo Pascal. I've been using computers my entire life. I'm good. Not great, but good.

    And you know what? I've never understood OOP. I just don't "get it." Sure, I understand the theory, but when it comes to real work, I've never understood it.

    Now, that's not to say I've never used it. I've used it, and used it well. But I never knew why they had to call it "object-oriented". It always confused me. Whenever someone started talking about OOP, I'd have to leave the room. It didn't make any sense. It's like if everyone started calling the TV a "forbick". Doesn't make any sense does it? I mean, it's a TV. Why call it a forbick?

    Anyways, I'm beginning to understand a bit more. I've been playing with Python, and I think I'm starting to grasp it.

    Ah well, I'm tired and babbling :)

    Dave

    Barclay family motto:
    Aut agere aut mori.
    (Either action or death.)

    --

    Barclay family motto:
    Aut agere aut mori.
    (Either action or death.)
    1. Re:My view by baka_boy · · Score: 2

      Not to nitpick, but using that example of how Lisp is just 'syntactically' different from procedural languages shows your conditioning for them pretty strongly; the whole idea of functional programming is to reduce side effects such as variable assignment to a bare minimum, and have the program directly represent the correct solution to the problem statement. That way, you can actually divide a program into its individual algorithms, and understand them, without running around with a debugger, tracing two dozen variables at a hundred breakpoints, just to understand a single subroutine.

    2. Re:My view by asuffield · · Score: 1
      (BBC BASIC doesn't have pointers for one)

      Actually, it does. Although I never used them until I had learned C, and then had to go back and do a little dabbling in BASIC. Remember that nasty , obscure ! operator? (There is at least one other, but this was about 6 or 7 years ago - I can't remember exactly) It takes an integer argument (can be a variable) and behaves as if it was the memory address given by that argument - that's a pointer. It's called "peek" and "poke", but that doesn't stop it being pointers by another name.

    3. Re:My view by Schnedt+Microne · · Score: 1

      I think I can understand what you're getting at.

      I started out and still prefer to work in Assembly Language. I just don't deal as well with abstraction, and anything but Assembly Language (and Assembly language itself, to people who program in machine code) is pumped full of abstractions.

      When I need a high level math routine I'll code it in C and have a C compiler spit it out in Assembly language I can get my hooks into.

      Not a lot of my code runs in an 'Operating System' however. And almost none of it runs on anything bigger than an 8 bit processor. I spent years coding for NEC 4-bit processors for which there isn't a C compiler. Just a plain vanilla Assembler at first, then eventually a Macro preprocesor.

      People who code in high level languages flounder about in embedded projects, if they don't start with a pre-packaged 'framework' of some sort. I've seen C coders forget to initialize ANYTHING in the system (timers, RAM, stack, etc.).

      --
      Hay thar.
    4. Re:My view by BeanThere · · Score: 2

      picture the "gtk+" toolkit without all the ugly hacky typecast macros and the hacky inheritance structure

      Before anyone flames me for this comment, I just want to stress that I *LIKE* the *design* of gtk+, I think its vastly superior to the Win32 SDK "design" (in "" because Win32 doesn't look designed at all, it looks like an ugly huge blob thingy that evolved to the point it is today, and MFC is godawful too.) Yes, I've used all of them, and gtk+ is by far the cleanest, simplest, easiest-to-learn and most flexible UI toolkit. I just think gtk should have been C++, since it essentially is.

    5. Re:My view by BeanThere · · Score: 4

      "If an object is data with functions, then I've been doing object-oriented programming all my life"

      Generally when people talk about "OOP" they're referring to three general things you'll find in an OOP language:

      1. Encapsulation: This is what you've been doing, by the sounds of it. Data, along with its associated functions, is grouped into an "object" (called a "class" in C++, I think its called an "object" in pascal, IIRC.) This is called "encapsulation", since both the data and functions are organized into a single entity. This grouping is very easy to do with any imperative language (as well as assembly) and follows traditional seperation of programs into "code" and "data" sections. OOP languages just bring the concept closer to the language by providing constructs like C++'s "class". Something else the languages do is facilitate "data-hiding", by allowing you to specify with language constructs (C++'s "public" "private" and "protected") which members are for general users of the class, and which members are for the class's internal use only. Nothing special here - you can do this in C also. C++ just gives you some language constructs to enforce it at compile-time, and perhaps make things a little more organized and readable.
      2. Inheritance. OO languages typically allow these encapsulated objects to 'inherit' behaviour from other objects. This is quite powerful; with a single line of code specifying what to inherit from, your object gains a whole lot of new functionality "for free". Once again though, there is very little special here, it can all still be done with imperative languages. OO languages just, once again, make this concept more a part of the syntax and constructs of the language. Inheritance also allows you to override methods, so if the object you inherit from has a function, you can redefine that function to behave differently.
      3. Polymorphism. Also called late binding. Probably the most powerful aspect of OOP (although, yes, once again, you can hack something in a language like C that will mimick the same behaviour.) Polymorphism is like inheritance, except the version of an overridden function that gets called is determined at runtime rather than compile time, and uses a table of pointers to methods called a "virtual method table". A little difficult to explain .. if I have a generic "widget" class with a function called "Draw", then specific types of widgets (e.g. scroll bars, buttons etc) would firstly inherit from the general widget, and then override the virtual method "Draw". Now a program that handled the user interface can just have alist of pointers to generic widgets (which will in reality be scroll bars, buttons etc), and it does not have to worry about what sort of widget they are, it just has to call the "Draw" function on each of them when it needs them to be drawn to the screen, and using the vmt, the correct "Draw" will be called depending on what type of widget it is.

        Sounds like you've done mostly encapsulation, maybe a bit of inheritance is natural too. Probably not polymorphism though.

        The thing about OOP is, although it supports these concepts in the language, it doesn't automatically lead to good design, and that is the point that the author of the article this whole thread is about seems to have missed. You still have to think about your design very carefully to build good reusable components. In general it does make you think a little bit more carefully before you just start coding away, which isn't a bad thing. There is nothing you can do in C++ though that you can't do in C. C++ just lends itself more readily to expressing certain types of ideas within the language's native syntax, e.g. picture the "gtk+" toolkit without all the ugly hacky typecast macros and the hacky inheritance structure.

        Presumably there are some OO zealots out there (I personally don't know any but the article author seems to think almost every C++ programmer is an OOP zealot) but in general I think most OOP programmers are more focused on solving real-world problems than on spreading hype. For every rabid OOP zealot, there's a rabid anti-OOP zealot. This guys just one of the rabid anti-OOP zealots. When you really do speak to most people in the business, they *dont* have big issues about programming paradigms. They just use the best tool for the job and are actually mature about it.


    6. Re:My view by rfsayre · · Score: 1
      Just thought I would point out that programming takes place in many environments that people who are into procedural languages would never touch. Indeed, many people program in a realm so abstract they may not realize they're programming.

      The example I'm about to offer is pretty much flamebait, but here it goes. One of the stranger examples of an OO language that I can think of is Macromedia Flash Actionscript, which uses syntax largely borrowed from Javascript . Many OOP concepts are absent or hidden from the programmer, but I have to say that it's a strange feeling to set the attributes of an object drawn with a paint brush tool. Especially when you do that from a database or user input.

      It's probably obvious that I'm not exactly a professional programmer (assembly is indistinguishable from magic to me :), but I am familiar with more than the kind of programming I described above. I've worked in C and C++, LISP, and JAVA, but have never done anything substantial in any of those languages. Once I took a class in OpenGL (mandated by CG department in college), and let's just say I found it... counter-intuitive. That doesn't make me stupid.

      In the interest of keeping any responses on topic, let's leave a few concerns out of this:

      1.)Flash is hated as closed source tool

      2.)It's often used in very poor taste.

      3.)It's not something professional programmers use.

      I can't say I know much about what the underlying code of Flash is like, but I do know that programming in a context of hierarchical timelines, layers of graphic objects, and interactivity brings about many possibilities that would otherwise be unexplored. You also get people who can program and draw towards one goal. It's fresh.

  391. OO Allows for Optimization (Re:Another reason ...) by tony+clifton · · Score: 1
    I'll agree that this isn't really a compiler issue, it's one of judicious optimization. O-O is about modelling a system correctly, producing code which is relevant in a multi-year project when 20% of your staff is turning over every year.

    Unless you're designing a system with pretty extreme realtime constraints *everywhere*, odds are that less than 10% will impact real performance. That's where you re-code in C or assembly or whatever works. And the remaining 90% involves control structures and network and database calls. Who cares -- speeding this up will have minimal impact on system performance, you'll just call NOP more often.

    Data point: I worked a few years ago on a fairly large exotic finance application. In Smalltalk. There was a competing system which had been written in C++ (also object-oriented, but especially at the time wasn't used very well). Smalltalk runs between 2 and 10 times slower than C++, especially for floating point performance (because they're portable across architectures). And when you're pricing derivatives, you do a lot of floating point.

    End result? Not only was out system written substantially quicker -- which is the norm for experienced smalltalkers, but it was **faster**. Because we had a more understandable system, we had better tools to identify the 10% which was slowing things down, and we were able to make it work smarter.

  392. Maybe your cache design sucks by the+red+pen · · Score: 1
    So... you know your cache doesn't work well with common code execution patterns, and you blame the programmers. "What are you doing wrong with my bug-free product?!"

    Did you think about a stack-based cache?

    I'm sure if you designed cars, they'd get great gas mileage... unless you drove them at speeds between 20 and 70 MpH, right?

  393. Re:Moderators.. by w.mode · · Score: 1

    here, you can only start something; there is no stopping.

  394. OOP = Communism ??? by Anonymous Coward · · Score: 1

    What the fuck is this guy smoking? Why is slashdot linking to some idiot's ranting on a geocities page?

    1. Re:OOP = Communism ??? by kuzinov · · Score: 1

      I've noticed a trend with /. to have a lot of crap rants like this. The more people who hang out here and flame each other over it, the better /. looks to their advertising clients. I have stopped coming here for any real info or news (even the gaming news tends to be something that was posted on Blue's News or Voodoo Extreme two or three days before). All /. (I'm spelling it that way out of laziness, not to appear "l33t") seems to offer any more is half-baked agendas and lame Cowboy Neal jokes.

      --
      Great minds think alike,but,fools seldom differ.
  395. OOP beats structured programming hands down. by hajo · · Score: 1

    I am currently working on an artificial life program using Opengl in Python. I actually started out in C. However the program became too complex; too many switch and case routines etc... Beyond all that (And I know how to do this in C with good use of structs) the nice thing in OOP is the fact that you can easily scope your variables. Having worked inteams of programmers this is a godsend. Another issue is the use of good case tools. Like the gentleman who wrote the original article said: he basically knows small to medium sized business programs. I come from a background of fairly complex systems. The use of case based tools if only for documentation is invaluable in those cases. I do agree that C++ is an ugly language. I recommend that the author looks at OO Pascal (Delphi, FPK) or if he needs to be more platform independent Python or Ruby. Those last two languages are extremely popular with their users for good reason. One more issue; I am not sure after reading the article if the author understands OOP in the sense that he understands the philosophy behind it. Bruce Eckel's books do a very good job at going into that aspect of OOP. Also OOP predates GUI's big time. They have nothing to do with each other besides the fact that developing a GUI using OOP is a lot easier than in straight C. (Trust me; I've spend a long time developing GUIs out of staright C and using classes is just a lot easier. The problem with OOP is one of bloat. However unless you do embedded systems that same bloat is very much offset by modern machines. Frankly it is a lot cheaper to buy a new server than to have a bunch of programmers tweak code.

    --
    Hajo Monogamy: Belief so strong that millions of people end perfectly good relationships in order to start a new one.
  396. Duh,the comparison is simple! by Hairy_Potter · · Score: 1

    Both communism and OOP rely on the concept of classes for the fundamental flavor.

  397. Re:my own 2 cents by bigbadbuccidaddy · · Score: 1

    Orbacus is faster than Orbix, adheres more closely to the CORBA spec, comes with source code, has better customer support, supports more platforms, has no run-time licensing fees, and is available for free for non-commercial use. There are probably some more advantages, but I don't remember them off the top of my head.

  398. OOP is Worth It by Arandir · · Score: 2

    OOP is worth it. It is valid. It works.

    It won't work for every project, of course. It only works for projects that can be modeled as objects. Thus, most systems programming is not suited to OOP languages. But most applications programming is. Even the C and Perl programmers know this, even if they won't admit it. GTK is OO, a hackish OO but OO none the less. Use the right tool for the right job. Procedural is good for some things, functional for others. And there are plenty of projects where OO is a natural fit.

    Sure, OOP is over hyped. So what? Most things in life are. The article wasn't about the overhyping. It was a thinly veiled attack at OOP, nothing more.

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  399. OOP = Communism!!! by JWhitlock · · Score: 1

    Check it out! OOP=Communism!!!

    I'm sorry, but you lose a little credibility when you start comparing something to communism or fascism. Yes, there may be problems with an OOP approach to everything, but such comparisons only draw away from your criticism.

    Even so, I'm still reading the article, even down to the little soviet flag at the bottom.

  400. What makes headlines in Slashdot? by sean_akira · · Score: 1

    Why is this a /. headline story? A few pages of html with no research done by a "business application" (sounds like a VB fan) programmer who obviously himself does not even understand OOP. No one ever claimed OOP was the cure to all programming, but this article does not even attempt to tackle the underlyning issues, it is just a rant by someone with little to no comprehension of OOP or design patterns. Atticles with this low level of journalism that don't bring any constructive coversation should not be posted, what is /. thinking?

  401. Objects by sharkey · · Score: 1

    Please don't treat women^W^W^W^W^Wcode as objects. Please regard them as individuals, as worthy of your respect as any of Gods other creations.

    --

    --

    --
    "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  402. Re:Another reason ... by taniwha · · Score: 1
    I said: On the other hand a compiler could spend time optimizing this stuff more (maybe more inlining of those tiny calls at least).

    Or in other words, it's a compiler issue. Which is pretty much exactly what he said in the first place

    Umm - that's what 'on the other hand' means - I'm trying to argue both sides of the issue in order to be fair - it's one of those things one does to try and keep oneself intellectually honest - no issue (esp. not computer architecture!) is completely one sided you have to argue all sides to try and find a good place to stand - a really good architect has a gestalt of all the issues and some good idea of the 'sweet spot' he/she is trying to address - it's never easy :-).

    My point was that there ARE some compiler related issues - BUT lots that are more language/methodology related

  403. OOP ... not for me by wamckee · · Score: 1

    Man, don't get me started. The artical makes some good points but what it comes down to is choosing the right tool for the right job. As a programmer, I have to make a zillion choices about how to implement the next great idea my boss has. To OOP or not to OOP ... that's about the last thing i think about. If you break OOP down into it's basic parts, there are some good and useful ideas there. OOP as a religion sucks.

  404. Is it that time of the decade again? by Orgasmatron · · Score: 1

    The points he lists are all technically correct, but this is hardly new. These debates have been raging for decades now.

    --
    See that "Preview" button?
  405. OOD good -- OOP breeds bad programmers by Skapare · · Score: 2

    Object Oriented Design is the great idea. It's best for larger projects, but even works on smaller ones, too. It's suitable for use regardless of what language the project will be coded in.

    Object Oriented Programming is where start to get bad. An OO language is supposed to be able to readily translate a good OO design into code to compile and run. It does that fine. The problem lies in the fact that vast numbers of programmers don't understand or even attempt to do OO design, and just dive into a project programming it in an OO language, and assume that it will be correct. Afterall, it is Object Oriented so it must be right ... NOT!

    Object Oriented Programming shares a problem with higher level languages. By making things easier to do, they make it possible for idiots to actually accomplish something which they would not have been able to do before. For some things that's fine. GUIs allow idiots to use computers. That's not all bad (we don't want to fill out their spreadsheets for them). But when things get into the realm where the person involved has to be smart enough to know about all the problems and situations, such as security, reliability, integrity, and performance, which need to be handled, then it's no time to be allowing someone who couldn't even program in a lesser language at all to be attempting this. Good programming tools should be about making it easier for good programmers to do their task correctly and quickly; not about handing the task off to someone who will just screw it up.

    --
    now we need to go OSS in diesel cars
  406. Tell us something we don't already know... by Shoeboy · · Score: 5

    Personally, I've never been a huge fan of OOP, so I tend to agree on a lot of these points.

    Taco,
    Some of us remember what slashcode looked like before pudge and friends started cleaning it up.

    Not only are you opposed to OOP, but you don't seem to be terrible wild about structured programming either. Nor do you give readibility and maintainability the time of day. Your relationship with elegant code is in the "distant admiration" category and you seem to consider sobriety an impediment to productivity.

    Not that I disagree with you on any of these points, I just wanted to mention that we allready know about them.
    --Shoeboy

    1. Re:Tell us something we don't already know... by Azghoul · · Score: 1

      ad buttfuckonium is one of the funniest things I've read on /. lately. I must be getting tired...

    2. Re:Tell us something we don't already know... by The+Troll+Catcher · · Score: 1

      This doesn't mean that there aren't programmers who happen to work in perl. Don't make that assumption - it's dangerous.

      It certainly does take discipline to code readable, maintainable perl, but it is definitely possible.

  407. the big, fuzzy hairball of OOP by q000921 · · Score: 2
    OOP is not a single technique. Languages that supposedly support "OOP" differ profoundly by how much they support encapsulation, substitutability, inheritance, safety, isolation, dynamic binding, and other features considered part of "OOP". C++, for example, may have better encapsulation than Smalltalk at the level of the type system, but it allows any object to hack the bits of any other object, even accidentally, through pointer tricks. Smalltalk allows objects to be substituted for each other if they have the same methods, while C++ and Java place very tight restrictions on what can be substituted where.

    In fact, I think none of those things are what have made OOP successful. Inheritance and dynamic binding are marginally useful techniques that actually play a role in only a tiny part of most real programs, and there are excellent alternatives to them. (Of course, some methodologies, like the Eiffel/Meyer school of programming use something they call "inheritance" for expressing all sorts of concepts but the same concepts could be expressed just as easily using other constructs, so that doesn't make "inheritance" essential.)

    What has made OOP successful is that it encourages its practitioners to build abstractions and to think about how software may evolve and be reused in the future. That would have been possible in reasonable, traditional, procedural languages, but the world needed a gimmick in order to have people listen, and that gimmick was OOP.

    However, unlike many people who criticize OOP, I don't believe that "C is all you need" or something like that. I think better languages and better programming constructs are very important for building better software. It is just that the constructs central to OOP don't give you much more functionality than you would already have gotten from a decent type system and function pointers.

    But support for runtime safety, garbage collection, reflection, genericity, aspects, and other features is important and allows you to build much more complex software systems much more easily. That's, at least, my experience from using a variety of languages, procedural, functional, dynamic, and object oriented over the last 20 years.

  408. That's the real myth here by eclectro · · Score: 1

    Reusability is a croak. People were talking about reusability in the days of Pascal, but yet I never see anybody scrambling to re-use all that old Pascal code.

    --
    Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
  409. The mans a loony by Vanders · · Score: 1

    He compares OOP to Communism for Christs-Sake!

    The guy just doesn't seem to grok OOP in any meaningful way, and seems to have some serious issues with software development practices overall.

    Maybe the guy used to date a Software Manager who liked OOP?

    1. Re:The mans a loony by Yunzil · · Score: 1
      Still, in this job, you get used to dealing with ignorance (I'm a programmer).

      I guess I must be ignorant then, because I do not naturally think in OO terms. I understand OO; I can code OO; but it's just not how my brain works. I had a similar (but much bigger!) problem with functional programming in college. Or maybe it's just C++ I have problems with. I code on a MUD using LPC, which has a lot of OO features, and it's just so much cleaner than C++.

      I won't say OO is a load of rubbish, but I will say that trying to apply it everywhere is a mistake.

  410. This is bogus ... by DigitalDreg · · Score: 1

    OO is about defining data and operations on that data. If the definition is tight and the operations are well defined, then you have acheived OO'ness. Thus, you can do object oriented programming in BASIC, COBOL, C++, C, Java, etc.

    If the guy wants to trash specific OO methodologies, then fine. However, generalizations such as linking GUI to the rise of OO program are hilarious.

  411. Rebutting a couple points by DeadSea · · Score: 2
    OOP is Non-Table-Frindly.
    OO systems are not very good at ad-hoc queries
    OO systems are in essence Xenophobic

    A pitfall of OOP: When all you have is hammer, everything looks like an ... object. Somebody on java.lang.help recently wanted to program a chess program with GUI. They were going to have pieces, and squares on the board. Have each piece associated with a square. It was suggested to them that the board might be best left unsubdivided into squares. A piece could just have a position on the board which would allow it to move between squares for example.

    Along the same lines programmers working with tables often try to treat each piece of data in their database as an object. In many instances it would be better to simply look as the entire database as an object and forget about the smaller objects.

    One of the reasons that OO is helpful is because you do not need to worry about the format of the data in an object. If you want to use a database or a flat file it is all the same outside the object.

    Using OOP it is much easier to adopt a new data format. There is no such thing as an OO way of storing data that perpetuates itself Xenophobically.

    The way to do something ad-hoc in OO is to subclass. Usually when you subclass you are saying that you specifically want to deal with how the data is stored and you are willng to accept the consequences. If you data is in an SQL database, nothing prevents your from using the correct tool for the job and also using SQL queries. You just run the risk of making your data unusable to your object. But again a risk that your proceedural program would face as well.

    To sum up:

    • If objects are getting in your way, make your objects bigger. Everything is still proceedural inside an object.
    • If objects are causing you to structure your data in a certain way, you can change.
    • OO doesn't prevent you from hacking. It just discourages it.
    1. Re:Rebutting a couple points by scrytch · · Score: 2

      > OO doesn't prevent you from hacking. It just discourages it.

      What utter rot. Through mere subclassing, I was able to make the very OO Perl Template Toolkit behave in radically different ways depending on properties of the Application objects in the fastcgi framework it ran in (I didn't care to take the system down to rewrite the dispatcher every time a new behavior was created). Holy cow, just try coming on a MOO sometime and claim no one can hack anything because it's OO. Most of the complaints I get about something being non-customizeable is because the relevant code has been stuck on a $*_utils object somewhere with no way of making it polymorphic.

      You people amuse me. You really do. You would deliberately throw tools out of your toolbox because your trusty jackknife can fix anything.

      --

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  412. Re:Is taco sad...? by gsf · · Score: 1

    Actually, the NT kernel is written in C and assembly language.
    I guess you won't be using those anytime soon ?

  413. The 90/10 rule by elflord · · Score: 1

    Who cares if 90% of your C++ program is horribly inefficient ? I only care about the 10% that represents a performance bottleneck, and by the time I'm done optimising it, that part of the code will be as fast as C. Sure, features like virtual methods etc come at a cost, but that's hardly a problem if you have 1 virtual method call to a thousand add or mult instructions.

  414. Re:fp by S.+Allen · · Score: 2

    best review of this "article" to date

  415. The Chrome Bullet by JPelzer · · Score: 1

    I'll try to make a long story short:

    My first computer was a Commodore 64. I wrote programs in BASIC. The programs started getting bigger. Harder to manage everything in my head (remember lines like GOSUB 3510?)

    So I went to "SuperTurtle BASIC" (From an old Compute! magazine) which gave symbolic jump labels (GOSUB CalcPercent) and some nice graphics commands. But the programs got bigger, harder to manage.

    Then I got a PC, and learned C. Now I had functions, scope, types, pointers... These were things that I knew I needed, before I even knew that a language existed that supported them. I'd been approximating them with my previous languages, just to keep myself organized. But then my programs got bigger, and eventually got hard to manage.

    And then I learned Java and C++ (yes, just about simultaneously... I'm not sure which was first). OO was something I knew I needed... Again, I'd been approximating OO techniques with C, just to stay organized.

    So OO isn't some magic bullet, of course... It helps those that already think in OO write those thoughts down in an efficient manner. Those people already try to write code in a maintainable manner. They already try to document code for themselves and others.

    So OO doesn't do anything unless it's in the right hands. And with so many programmers now entering the field with an OO language as their FIRST language, I think there might be a problem... If you've never seen the hell of tracing GOTO statements all over the place on a C64, what makes you think differently? What makes you want to name your variables so you can tell its function and type by its name, if you've never had to find a bug with adding a STRING "0" to an INTEGER 0?

    These aren't OO problems, but they're a way of thinking that OO kiddies never had to tackle, and I think it may be the reason OO has gotten this bad rep lately... I've met an awful lot of programmers that can't think OO, even though their only language is Java, for example.

    So my suggestion is that with the economy slowing down, go out and pick up a C64 or Apple IIe and start from the beginning... Then when the wireless boom hits, you'll actually understand the technology from a more fundamental level... Plus you'll get to play a lot of Dig Dug in the process!

    -Jason

  416. Modules are simpler to design than object model by cnewman · · Score: 1

    A good module API is far simpler to design than a good object model (although neither is easy) and provides more potential for code re-use since it can be in a more portable programming language. Given the lack of good programmers with real-world experience, it's foolish to use OOP techniques unless there's a very strong need for the paradigm. The article is a bit weak, although the list of myths at the start is good. I also liked the observation that grouping procedures with data in OOPS tables is a bad idea. Seems a lot like grouping web page logic and source in the same file -- something experienced web designers know is almost always a bad idea.

  417. Re:Examples? by boudreau · · Score: 1
    I would have to wholeheartedly agree with this post. I work for a large services company that has probably more Java programmers than Sun Microsystems (You can probably guess which company I am talking about).

    On many of our projects, project managers and solution leads have touted the benefits of OOA&D, but then push for a rigid time schedule and do not maintain a disciplined OO approach. This frustrates me and many of the other developers.

    However, there are a few projects which have started from the beginning using a rigid methodology. With good architects, I have seen some projects move inception to delivery very quick and smooth... touting all the benefits of OO. I see this as a good thing, and here is why: Many of our clients come hire us to give them additional functionality in their existing application, most of the time this additional functionality is simply expanding their business onto the web. Many of these clients have poor or no frameworks in place, giving way to much redesign and much recoding. These projects that I referenced above that used a rigid methodology have very good frameworks in place will enable our clients to put in place additional functionality in the future with minimal rework.

    Right now, I am working on a reusable asset library. These are most written in Java and are (at the risk of using a buzzword) OO. These assets have already been deployed on multiple projects, already realizing a quicker time-to-market.

    With all that said, I do not believe that an OO approach is always the best. I do believe that it has its place and I have seen its benefits; however, there have been tasks that I have been assigned that I did not believe OOP was best, so I wrote my stuff in a more procedural manner.

    MB

  418. I work for a large engineering company and I recently had to learn LabVIEW which is OOP. At first I thought it was going to be extreamly easy, but there is more to it than people think.

    I find it very useful when doing multi-layers and sub routines because if you save things right you can re-use. I'm a big fan of the lib. system. I think if it catches on enough it will make programming easier in the long run.

  419. I work for a large engineering company and I recently had to learn LabVIEW which is OOP. At first I thought it was going to be extreamly easy, but there is more to it than people think. I find it very useful when doing multi-layers and sub routines because if you save things right you can re-use. I'm a big fan of the lib. system. I think if it catches on enough it will make programming easier in the long run.

  420. What a load of BS by BeanThere · · Score: 2

    Seriously, the way the guy goes on, you'd think OOP was the cause of all world hunger and disease.

    In my 4 years of doing comp sci at University (which included learning both OO methodologies and a wide variety of others), I can't remember ever hearing a single one of his supposed "Myth"'s. Where did he get those? Perhaps I missed all the hype, but I sure as hell have never heard anybody claiming that OO was the panacia that he seems to think people claim it is.

    OOP doesn't do or solve *anything* *for* you. It doesn't facilitate components/re-use - GOOD DESIGN facilitates reuse. It doesn't make programming easier and faster - GOOD DESIGN does. And garbage collection? Who the hell ever claimed that only OOP languages have garbage collection? Now thats garbage.

    All OOP does is provide a few extra constructs that make certain types of things more convenient. It certainly doesn't automatically make your program design a good one. That's still up to the programmer. In fact, learning to make good OO designs takes more programming experience than learning to make good imperative designs. Some software designs really *do* fit better onto a hierarchical inheritance structure.

    For goodness sake, OOP isn't trying to "compete" with your (insert your favourite paradigm here.) It's just language support for programs structured in a certain way. Choose whatever suits your needs, but for gods sake, its not a 'battle' of paradigms, they all serve different purposes. Grow up.

  421. Re:Author is a USENET troll/pest by twitter · · Score: 3
    Actually, you can just look at his pages to find gems like this:

    Actually, most GUI application programmers almost never see the code structure that makes up their screens. They simply click on a screen item, an event selection box comes up (Events like: on_click, on_exit, on_keyboard, etc.), and then a "code snippet" box comes up to edit the event code. Whether that event code is in a method or subroutine does not matter that much to the programmer. If you changed the generated code implementation from OOP to procedural and/or tables, the programmer may never even know the difference.

    This is not a programer!

    --

    Friends don't help friends install M$ junk.

  422. OO Assembler as well - so what? by Gorimek · · Score: 2

    You can also do OO programming in assembler. In fact, any OO program does get translated into assembler code before being executed.

    But what's the point?

    You can do any fancy language construct manually in lower level languages. That doesn't mean it's a good idea. If you're gonna do OO programming it makes sense to use an OO language. Let your tools work for you.

  423. Re:"Object-oriented" languages by Richy_T · · Score: 2
    Obviously, I have not made use of any object-oriented facilities,

    Not that I don't get your point but surely the fact that your Now, if you want to stick printf in there, I'm with you all the way

    Rich

  424. Uh, yuck? by Dfiant · · Score: 1
    I play on both sides of the fence, but this stuff's so stupid it's funny. For instance:

    For a code example, suppose we have an application that calculates taxes for individuals. A common object oriented approach is to create a Person class and a Tax class. You might end up with something like this:

    Person P = new Person("Fred")
    Tax T = new Tax()
    // assign attributes to our person ("//" = comment)
    P.x = foo
    P.y = bar
    P.z = blah()
    // display tax amount
    output T.calcTax(P)

    A more traditional, parametric approach may look something like this:
    output CalcTax("Fred", foo, bar)

    The parametric approach simply asks for the pieces of information it needs up front and only the information it needs. The OOP approach requires that a Person object be set up as a prerequisite to tax calculation.

    That's kind of ridiculous. By using overloaded constructors, the whole headache of initializing each individual member could be avoided. For instance:

    Person P = new Person( "Fred", foo, bar, blah() );

    I'm seeing lots of flaws in most of these arguments...I agree that OOP isn't the best solution for everything, but it certainly is more useful than this article claims it to be. I also think it's funny that he makes a comment that explains what a comment is in C++...what's the point? You can do C-style comments in C++; it's just another example of how he berates the language for spite.

    Did he have an object bite him as a child?

  425. Poor criticism by Mr+Neutron · · Score: 5
    The linked article seems to have more to do with the "silver bullet" mentality than OOP specifically. Anybody worth listening to will tell you that it's just as easy to screw up a OOP project as it is a procedural project. Really, has anybody used "it's object-oriented" as a selling point since 1989 or so?

    In general, the criticism contained in the article is poorly founded. The author uses some nice charts, but has no citiations for them. For instance:

    The problem is that building generic abstract modules (intended for reuse in later projects) requires roughly three times the effort as a project-dedicated (regular) module. Although no references will be given here, this figure is fairly widely accepted in the industry.
    Accepted by whom? I've never heard that asserted by anyone in my academic or professional careers.

    Some of the things he calls out apply equally to procedural languages, such as:

    When a new language fad replaces OOP, how do you convert legacy Java objects into Zamma-2008 objects?
    When Pascal replaces C, how do I convert my C functions into Pascal functions? Eh?

    He makes some good points about measuring the effects of change (everybody should do that!) but I don't think this really strikes a death blow to OOP.

    Neutron

    --
    I get my kicks above the .sigline, Sunshine.
    1. Re:Poor criticism by td · · Score: 1

      When Pascal replaces C, how do I convert my C functions into Pascal functions? Eh?
      When that happens, I'll use the concommitant flying pigs and infernal snowballs to solve all my programming problems.

      --
      -Tom Duff
    2. Re:Poor criticism by Lord+Omlette · · Score: 1

      "When a new language fad replaces OOP, how do you convert legacy Java objects into Zamma-2008 objects? (I will eat a week's pay if OOP is still in vogue in 2015.)"

      I don't mean to bother you, but it may not be necessary... .NET can use/inherit objects written in one language in another. That's probably not the answer you're hoping for, but it'll work on Windows in any case.

      Here's to 2015, when Oxygen-project generated comps will do our programming for us... And then we'll all be out of jobs. Wait a sec...
      --
      Peace,
      Lord Omlette
      ICQ# 77863057

      --
      [o]_O
  426. Re:Myth: Implementation vs. interface changes by juliao · · Score: 1
    Myth: Implementation changes significantly more often than interfaces Well, it does depend on your interfaces.

    The author of the article seems to enjoy passing lots and lots of attributes around instead of just passing an object. Stick to that, and i bet your interfaces are going to change veeery quickly...
    -----

  427. Re:Another reason ... by jmaessen · · Score: 1

    Chip designers have indeed done a piss-poor job of branch prediction in the presence of procedure calls. This hurts any code that isn't written using gigantic procedures. Yes, compilers respond with heavy inlining---but that's what leads to the ever higher icache miss rates.

    It's time computer architects admitted that branching to an unknown offset is important. It's important because it's part of every procedure return, every shared library call, every piece of relocatable code, and every dynamic method dispatch that is ever done. There are limited solutions---the Intel architecture tracks CALL instructions and tries to map the to the corresponding RET. However, these solutions are so limited that common idioms---like the PC fetch required for relocatable code in .so and .dll shared libraries---break prediction completely for subsequent code.

    When this prediction works reasonably well, everybody will benefit. Even better, the need for inlining will be much less and we can hope for improved icache hit rates and smaller binaries. There is promise; the Pentium IV's trace cache uses a technique for eliminating dynamic branching that's proven itself when done dynamically in software (a la the HP Dynamo project). Too bad they made the ICache far too small to be useful. The Itanium provides special registers for branch destinations; these can be loaded well in advance, giving some hope that the processor can keep up.

    For now, we're stuck. It galls me no end to hear claims that our [Procedural, OO, Functional, ...] code is lousy when our processors can't even make relocatable code work in a reasonable way.

  428. Proof Burden is on YOU, Mouthrot by Tablizer · · Score: 1

    I asked for 3 biz examples that demoed how
    OO was better, and you only made excuses
    and gave me Software Engineering Vocabulary
    tests.

    Typical style of the defeated who are only
    good at trivia. God, that group was so
    obsessed with trivia SE vocab. sick.

  429. oo is not for fools by jilles · · Score: 2

    In the hands of somebody that does not understand OO, an OO language can cause quite a lot of dammage. Good use of any tool requires knowledge and you don't gain knowledge by staring at a book for half an hour. This article is provocative, and rightly so. Proclaimers of OO have claimed a lot and OO turned out to fail to be a silver bullet. But guess what? There are no silver bullets.

    The truth is that OO languages are an excellent tool for structuring large, complex systems. Simply applying inheritence everywhere you can of course does not work. Using an OO language requires you think differently about how you structure your programs. Some people get this, some never will.

    Of course OO has its limitations and there are many research initiatives to work around those limitations or provide alternatives. Falling back to procedural programming is really no option for anything but the most simple stuff. The article points out that you don't need an OO language to do things like components among others. That is true, but it is so much more convenient with a language that supports the concepts you are working with.

    Another disturbing statement: "OOP eliminates the complexity of "case" or "switch" statements".

    Read Martin Fowlers book on refactoring, it describes how to convert a switch statement into an inheritance based solution (the state pattern). Bottom line, if you understand OO, you know you don't need switch statements. And if you worry about performance, read Fowler's chapter on this topic and you'll see it is not an issue.

    --

    Jilles
  430. counter argument: hasn't really been tried by peter303 · · Score: 2

    The same argument as with uptopias, socialist or
    otherwise: many detractors haven't really implemented
    a full OOP project cycle through maintenance and
    re-use with a decent OOP (C++ sucks).

  431. Re:Author is a USENET troll/pest by Hard_Code · · Score: 2

    Slashdot poster: "Well, we've been trolled by the best son"
    Slashdot moderator: "But dad, you we're the best"
    Slashdot poster: (with a stern look) "We've been *trolled* by the *best*

    (adapted from Simpsons, can't find the exact quote)

    --

    It's 10 PM. Do you know if you're un-American?
  432. OOP...in BASIC? by cr0sh · · Score: 2

    Please - someone show me an example of this - and not in VB.

    Show me an OOP'ed "Hello World" BASIC program, using a circa 1980 or so version of BASIC...

    Can this really be done (and would it be at all readable)?

    Worldcom - Generation Duh!

    --
    Reason is the Path to God - Anon
    1. Re:OOP...in BASIC? by Richy_T · · Score: 2
      You could write an OO basic but you have to ask what the benefit would be since BASIC is supposed to be a gentle introduction to programming. OOP should be coming in around about the time you start looking at real languages anyway.

      After all, Javascript is weakly OO and that's about as close to basic as you can get

      Rich

    2. Re:OOP...in BASIC? by asuffield · · Score: 1
      "Real programmers can write assembler/Fortran code in any language"

      C++ is converted into assembler by gcc, then assembled

      Compile your OO program with gcc, then work back from the assembly into the language of your choice. I suggest Logo as a possibly interesting choice. Or COBOL. Or Fortran itself. Or just decompile back to C.

    3. Re:OOP...in BASIC? by lscoughlin · · Score: 1

      Well... here's an attempt.
      It would be written for Microsoft QuickBasic 4.5 for dos... I don't have a copy any more, or a machine i could run it on... but i _think_ this'd work...

      Giggle... here's a new hello world quest... write hello world in every language using an object oriented paradigm.

      TYPE app
      DIM name AS STRING
      END TYPE

      DECLARE SUB app_run( BYREF theApp AS app )
      DECLARE SUB app_init( BYREF theApp as app )
      DECLARE SUB app_helloWorld( BYREF theApp as app )

      DIM myApp as app
      app_init( myApp )
      app_run( myApp )

      END

      SUB app_init( BYREF theApp AS app )
      theApp.name = "Hello World"
      END SUB

      SUB app_run( BYREF theApp AS app )
      PRINT theApp.name
      END SUB

      --
      Old truckers never die, they just get a new peterbilt
    4. Re:OOP...in BASIC? by rjmunro · · Score: 1

      Err, in BBC BASIC, 1982, you can do something like:

      PROCstring("Hello World","print") END DEF PROCstring(a$,b$) IF b$="print" THEN REM ========== Print method ========== PRINT a$ ENDPROC ENDIF REM put all the other methods for strings here PROCwhateverstringsareinheritedfrom(a$,b$) ENDPROC

      It's kind of object oriented. It might require BBC BASIC 5 (1987) or something, though. I'm sure somebody will say it's not proper OO, but I think I can extend it a bit if neccesary.

    5. Re:OOP...in BASIC? by cr0sh · · Score: 2

      Cool for QB 4.5 - but I am looking for something much older - like with the line numbers, and only GOSUBs and such (no CALL statements)...

      Maybe it can't be done with that old of BASIC?

      Worldcom - Generation Duh!

      --
      Reason is the Path to God - Anon
    6. Re:OOP...in BASIC? by cr0sh · · Score: 2

      More for my own amusement than anything else - It would be a hoot to see an OOP-like piece of code running on a TRS-80 CoCo...

      Worldcom - Generation Duh!

      --
      Reason is the Path to God - Anon
    7. Re:OOP...in BASIC? by cr0sh · · Score: 2

      Unfortunately this relies on CALLed type subroutines - I am thinking older style BASIC, with line numbers, gosubs, etc - no CALL statements...

      Still a pretty cool example...

      Worldcom - Generation Duh!

      --
      Reason is the Path to God - Anon
    8. Re:OOP...in BASIC? by Daniel · · Score: 2

      I don't know about BASIC, but it can be done in POSIX sh. A very cute hack, if also completely useless.

      Daniel

      --
      Hurry up and jump on the individualist bandwagon!
  433. Taco and OOP by Joe+Bananas · · Score: 1

    Of cource, lookin at slashcode will tell you that Taco doesn't belive in structured programming either.

    --

    --
    M-x all-hail-emacs RET
  434. It's Bryce, man! by marlowe · · Score: 1
    This dude first showed up on IWETHEY an awfully long time ago. He was intriguing at first, but he couldn't stand up under the slightest questioning.

    He's also been spanked at:
    here
    here
    here and here .

    --
    http://www.angelfire.com/ca3/marlowe Better a smartass than a dumbass.
  435. bleh by /dev/niall · · Score: 1
    I got about 3/4 of the way thru and gave up. As far as I can see there's little that's new here. This isn't a critique, it's flaming, filled with poor comparisons that are right on par with the OOP myths he debunks (which, btw, was the only accurate part of the paper).

    If he's set out to prove that OOP is the enemy of folks who want to rush code out the door and be the first to market, well then fine... he's done so. Nobody is going to argue that to do things properly takes time, regardless of the methodology you use. Which do you admire more, first to market, or clean, elegant code?

    Is it our fault his tax class depends on another class!!???

    OOP, code indenting, editors, etc. - all personal choices that influence your productivity. I don't complain when I see someone drinking pepsi (ugh!) instead of Coke.

    --
    --
  436. Both right and wrong... by Courageous · · Score: 1

    "The truth is messier, and OO is no better optimized to deal with dynamic feature relationships than competitor paradigms". --------- This was an astute observation. The author also observes that many OOP newbies and zealots alike have a tendency to attempt to jam their class definitions into a forced hierarchy. He's right. Note, of course, that this doesn't at all invalidate OO languages. The author also doesn't address newer OO patterns which are coming into popularity, such as attributes, dynamic relationships, and so on. He seems to not understand that experienced OO programmers like myself already know what he's saying and we've begun moving on to different patterns of design using our OO languages. C//

  437. GUI's vs GUIs by kyz · · Score: 2

    I really want to take that guy and slap him about the face, while explaining that "GUI's" means "GUI is" or "belonging to the [single] GUI". It is not the plural of "GUI". Fool!

    --
    Does my bum look big in this?
  438. Winded...not like an oop program by bobbabemagnet · · Score: 1

    I found the article a little repetitive, but he had good ideas. The point is, do we want a better program or a better programmer? Right now, the programmer costs more than the program, so it would be in the best interest of the company to take shortcuts. If using an object oriented language makes the development process shorter, at the expense of clock cycles, then management will certainly go with oop. They lose money when the programmer takes time, but not when the program does at home. Besides, you've got the cycles to spare. However, what do you use to develop the language? obviously you can't use that language. For example, the java platform can't be written in java. (I'm not sure, but I think it's written in C). The point is, OOP is great for getting a product out fast, but it's a little dirty and doesn't do the job as thoroughly as a higher level language. Either you pay the programmer extra so they can make a more efficient program, or you pay the programmer to produce. In terms of management, which makes more sense?

  439. Re:Another reason ... by uksv29 · · Score: 2

    Your posting shows why it is best to use conventional procedural programming for low level I/O and performance sensitive applications - an extremely interesting read.

    In short, keep the code small, minimise calls and locate all associated parts of the code together as much as possible. It is possible for the compiler to help but when you link together lots of classes from different files (code segments) it is impossible to do it efficiently.

    I spend a lot of my time writing 'Low Level' code, keeping the cache hits up and the pipeline full can make a massive difference to the program performance.

  440. "I tend to agree on a lot of these points" by frinkahedron · · Score: 1

    Which one? The point that OOP==Communism? Taco smokes crack.

  441. Just another kook, methinks by jim · · Score: 1
    The thrust of most of his arguments seemed to run "In OOP you might (emphasis mine) do $THING in $DUMB_WAY_NO_SANE_OO_PROGRAMMER_WOULD_CONTEMPLATE. Procedurally you would do $THING in $SENSIBLE_PROCEDURAL_WAY. Therefore OOP is crap." Then at the end, of course, it's "People who favour OOP only do so because they can't hack procedural programming." Pot? Kettle?

    Then there's the constant assumption that the only thing you would ever want to do with a program is access a relational database. The lack of citations, understanding of how OOP actually works, any semblance of actual logic? And don't get me started on the stupid comparison with Communism. Slashdot, YHBT. HAND.

    --
    -- Arm yourself when the Frog God smiles.
  442. Re:Floundering in embedded systems by ka9dgx · · Score: 1
    I must be a rare gem then, because I was able to shift gears and program a phase accumulator based phase lock loop application for a gluing machine, with all the code to deal with a set of inputs, variable line speed, etc... on a 68HC11 microcontroller... in 511 bytes! (I wanted cheap hardware, put the program in the on-board EEPROM).

    I've also done OOP stuff, databases, etc... it's all just the right tools for the job. Sometimes it's nice to have GWBASIC handy, etc. If you take the time to learn the big picture as you go, the old tools still can be used to great effect, even today with OOP, and other constructs.

    --Mike--

  443. This is definitely a troll by tblanchard · · Score: 1

    The author of that page is a well known troll who wouldn't know a class from his posterior and has been willfully resistant to all efforts to educate him. He has rendered more than a couple of programming message boards all but unusable with his prodigious trolling and oo bashing. Best bet is to ignore him.

  444. Re:"Object-oriented" languages (oops) by Richy_T · · Score: 2
    Forgot the angles

    Obviously, I have not made use of any object-oriented facilities,

    Not that I don't get your point but surely the fact that your << operator is not shifting bits left indicates that you've used *some* object orientated feature.

    Now, if you want to stick printf in there, I'm with you all the way

    Rich

  445. graphs *cough* are very enlightening by rumba · · Score: 1

    Haha. Those graphs made me laugh very hard. I think they were lifted out of time magazine. Well, at least Time's studies involve at least 50 people... Better learn Object COBOL.

  446. OOP can do things, but does not necessarily by WillSeattle · · Score: 1

    The problem is that out-of-the-box OOP is not the same as well-crafted OOP. An example might be SQLWindows/Centura. Great concept - drill down to the API. Lousy method - so hard to do real, effective OOP that it just gets in the way.

    Look, we always have tradeoffs. Full #DEFINE statements for reused constants versus readability of code. Use of statics over globals. Full polymorphism over time to code.

    The trick is to use those OOP features that give you the most bang for the buck. Yes, most OOP is vastly overhyped, but that's because PHBs read trade mags which do feature checklist comparisons. That's why MSFT sells so much dreck, and why things like Word have way to much code in a release.

    But, that does not mean that OOP is useless. Where you do have many programmers reusing many objects, where those objects are well-crafted and not overly static but flexible, then it can really help you get robust code out the door, code that can adapt to the changes that always occur.

    But where you use a non-OOP-optimized method of programming, you're wasting your time.

    --
    --- Will in Seattle - What are you doing to fight the War?
  447. Bryce has been spouting his views for some time... by malraux · · Score: 1

    He's done very little OO programming, and prefers to set up straw-men (the shape example, the taxonomy example) rather than actually learn how to program with OO techniques.

    He's also (ironically) not very well versed in relational techniques, either. If the entire world went back to XBase he'd be in his element.

    One time he claimed that cursors in external processes ran more slowly than stored procedures in the server for political reasons. :-)

    You can read more of his ranting on the ( bloody hell... damned link won't post correctly. Tried 3 times with an a href... oh well. http://pub1.ezboard.com/bobjectorienteddevelopment .html) Object Oriented Programming ezBoard. A good deal of Bryce's material comes from there.

    He doesn't seem to understand that OO is a tool. It's not a tool that can be used exclusively. It happens to be a very effective tool used in the right hands. But just because Bryce doesn't possess a set of the right hands, he thinks OO should be completely discarded so he doesn't have to think about it. :-)

    Another favorite Bryceword: P/R programming (procedural/relational). He likes to compare it to pure OO, as if OO programming can't use relational paradigms as well. :-)

    Ah, well. I could go on for a while. If you're truly interested in more Bryce, use the link above. :-)


    Regards,
    -scott

    --


    Regards,
    -scott
  448. My life and OOP by KagakuNinja · · Score: 1

    Ages ago in college, I simply thought object = data structure + functions. It is a way of packaging code. Later in the military, I went through some OO courses (using Ada, which ironically was not object oriented). When I started to learn C++, I thought "this is just C with objects; I understand this."

    It wasn't until after about 2 years of C++ programming, when our group started to get heavily into interfaces that the light bulb went off, and suddenly I "got it".

    For me, interfaces are the key (in C++ lingo, abstract classes). You can take a class, implement an interface, then plug it into another class that was coded to work with that interface. This is amazingly powerful. You can adapt existing classes to multiple purposes, mix in new behaviour, or swap out an old class for a better designed one.

    Check out the introductory chapters to Design Patterns. I missed it the first time I flipped through the book, but it is all in there... One of the problems with books on C++ and/or object oriented programming is that they focus on simple self contained classes such as Stack, List, etc. Interfaces are key when dealing with complex systems of interrelated objects.

  449. Reuse is overrated, structuring is underrated by Aapje · · Score: 1
    Since OO I have been a decent programmer ;)

    The structuring it imposes is one of the most important benefits. Reuse is mostly applicabel to standard libaries(for instance the API of Java). Only the best of programmers can make universally useful libraries.

    In specific cases reuse can make a lot of money for companies. But the major advantage is in well-structured, maintainable code. Most bussiness-software is used for many years and expanded or partially rewritten many times. Well structured code pays off in each and every debugging cycle during the life of the software.

    Now if only I could learn to structure my code properly, it would end these horrifying debugging nightmares ;)

    --

    The Drowned and the Saved - Primo Levi
  450. Two classic Brycisms: by malraux · · Score: 1

    1: "Biz things are too dymanic to be modeled via tree taxonomies"

    As you have been told time and time again, there is much more to OO techniques than simple implementation inheritance modelling.

    2: "You have to suffer thru a lot of junk to do procedural Java"

    But then again, Java is not the sum of the OO world. Of course, you can't be bothered to learn things like Smalltalk or Python (or even Java, for that matter: "why can't I reference my static method from within a non-static method?" Remember that one? Or perhaps the two image translation programs I wrote for you because you couldn't be bothered to read the documentation thoroughly?).

    BTW, 1/3 of the code is for large projects? What definition would that be? Can you link to it? Can you show your math...?


    Regards,
    -scott

    --


    Regards,
    -scott
  451. Nothing new by Hard_Code · · Score: 2

    You know, the only people I've ever seen claim that OOP is so marvelous and is such a panacea, are rabid people like this, who compare it to communism. Really, who is this guy arguing to? Managers? What is he trying to prove? Who really believes OOP==GUI? Or that an OOP product is necessarily better than anything else? I might have believed that someone believed this maybe 15 years ago...but not now.

    He's right - OOP is more of an organizational philosophy. In fact you can apply OOP concepts to languages that don't inherently support OOP. And (surprise!) you can apply procedural concepts to OOP languages (duh). OOP is merely a convenient way of thinking about things. Of course it has its flaws, not the least of which is the restrictions of inheritence (is-a/has-a) and the overhead of thinking out and abstracting the problem. But people who use OOP languages without thinking through their problems because they think it's magically going to solve it deserve to get burned (and I guess that's who this article is directed at). But it's just one way, among others, to go about modeling and solving your problem.

    Next issue: "Expose: High Level Languages - They're Not All They're Cracked Up To Be! (plus, they're communist)"

    --

    It's 10 PM. Do you know if you're un-American?
  452. What's wrong with GOTO? by ka9dgx · · Score: 1
    I have to use GOTO every once in a while in Delphi... which has very nice constructs to avoid it... because doing otherwise would just be stupid. GOTO is a tool, as good as any other statement.

    --Mike--

  453. Re:Is taco sad...? by BitwizeGHC · · Score: 1

    I have the same ambivalence towards Perl that I do towards OOP, but one thing that rocks about Perl is that it reveals these magical objects to be the frauds that they are: aggregate structures with type information that connects them with a series of functions, and some syntactic sugar in the language to make this structure appear opaque.

    --
    N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
  454. Article is missing a lot by Maryck · · Score: 1

    I am a java programmer, so obviously I'm a bit biased towards OO techniques; even so, I do recognize that OOD does have its failings and agree with several of the author's points. My major gripe with his article is that it seems to be one big rant against OO with very little in the way of decent alternatives. He lists all of these problems with OO, but never really says how similar tasks would be accomplished in a non-OO language except for some very trivial cases. Even when he talks about C, he is critical; so my question is, what techniques/languages does he suggest we use? VB? Pascal?

    Unless he can answer that question, I don't think he has made a decent point for abandoning OOD.

  455. Another reason ... by taniwha · · Score: 4
    (for the record I first wrote smalltalk code in the 70's, I regularly code in C++ ...)

    I'm a sometimes chip designer, sometimes programmer ... a while back while working on an unnamed CPU project I did some low level performance analysis on a number of well known programs (maybe even the browser you're using now) basicly we were taking very long instruction/data traces and then modelling them against various potential CPU pipeline/tlb/cache architectures - we were looking for things that would help guide us to a better architecture for our CPU.

    I found that quite early on I could figure out which language something was coded in from the cooked numbers pretty easily - OO (ie C++) coded stuff always had a really sucky CPI (clocks per instruction - a measure of architectural efficiency that includes pipe breaks, stalls and cache misses) - I spent some time looking at this (since it seemed that C++ code would probably become more common in our CPU's lifetime) - basicly C++ code sucked because it took more icache hits (because the coding style encourages lots of subroutine calls which tend to spread over the cache more filling the I$ quickly) and it took more pipe breaks (also due to the subrotine calls and returns - it turned out that some code generators did stuff that broke CPU's return stack caches causing many more mispredicts) and finally virtual method dispatches (basicly load a pointer, save the pc on the stack and jump to the new pointer) tended to cause double pipe stalls that couldn't be predicted well at all even though these weren't done much they were a real killer (if you've one a bit of modern CPU architecture you learn that with long pipes you live or die on your branch predictor's hit rate - these were very bad news)

    In short C++ and more genrally OO result in code and coding styles that tend to make code that makes modern CPU's run less efficiently.

    Anyway - you often hear about 'efficiency of programmers' etc etc for OO - I thought I'd add a data point from the other end of the spectrum.

    1. Re:Another reason ... by taniwha · · Score: 2

      2-3 years

    2. Re:Another reason ... by Hard_Code · · Score: 2
      In short C++ and more genrally OO result in code and coding styles that tend to make code that makes modern CPU's run less efficiently.

      On the contrary, what if I think the modern CPU generally makes object oriented code run less efficiently? I mean, does your computer work for you or do you work for it? Maybe CPUs just need to be redesigned so they run high level languages more efficiently. I think you have to #undef ASSEMBLER=GOOD.
      --

      It's 10 PM. Do you know if you're un-American?
    3. Re:Another reason ... by glgraca · · Score: 1

      Even if this were always true, wouldnt the benefit of a cleaner, better documented and mantainable code outweigh the cost of the added cpu cicles??

      For most projects, human resources are very expensive when compared do hardware requirements.

    4. Re:Another reason ... by bertok · · Score: 1

      That's just a fault of the early compilers, not the language itself. The newer compilers have been known to beat hand-tuned assembler at many problems. For example, I'm writing a real time 3D engine, and there is not one instance where I had to resort to C or assembler. Even virtual functions can be inlined by clever compilers that analyze the entire source database at once. Even if they are not, I've seen benchmarks of C function calls vs C++ virtual function calls, and the difference is peanuts. It's only stupid coders who put reams of trivial one line code into virtual functions that pay the price. I laugh every time I hear the clocks per instruction "benchmark". A higher CPI is better. Only assembler can approach a 1.0 CPI, because it's the most primitive language. More abstract languages have a higher CPI, but less instructions. I can describe the equivalent of 10 lines of C in a single elegant line of C++!

    5. Re:Another reason ... by Wraithlyn · · Score: 1

      I don't know if compiler optimization will do anything.... a sub routine call is always going to be a sub routine call, which has always slowed down CPUs. In OOP-intensive code, practically EVERYTHING is sub routine calls (methods).

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    6. Re:Another reason ... by kaisyain · · Score: 2

      They can't be optimized away?

      You might want to check out:

      Urs Holzle and David Ungar. Optimizing dynamically-dispatched calls with run-time type feedback. In PLDI '94 Conference Proceedings.

      Urs Holzle, Craig Chambers, and David Ungar. Optimizing Dynamically-Typed Object-Oriented Languages with Polymorphic Inline Caches. In ECOOP '91 Conference Proceedings.

      Craig Chambers and David Ungar. Making Pure Object-Oriented Languages Practical. OOPSLA '91 Conference Proceedings.

      Craig Chambers, David Ungar, and Elgin Lee. And Efficient Implementation of SELF, a Dynamically-Typed Object-Oriented Language Based on Prototypes. In OOPSLA '89 Conference Proceedings.

      Also of interest from the same authors is "Do Object-Oriented Languages need special hardware support?" in which they find that "in summary, our data show that execution behavior is more a function of compiler technology than of the source language characteristics."

      The SELF compiler, which by now is very dated, required three to five RISC instructions to perform the dispatch test. It also eliminated "more than 75% of all dispach tests, i.e., less than one in four source-level message sends actually involves runtime dispatch overhead."

      And in SELF, every method is virtual.

      So, I reiterate: It's a compiler issue.

  456. Communism? by ragnar · · Score: 2
    He compares OOP to Communism. Give me a break. This is really a matter of perception. He sees it as beaurocratic to have a series of steps before calling a final proceedure. To me this looks orderly and increases the odds that my superclasses or logic wrappers can catch sequence errors.

    The athor actually makes a few good arguments, but it takes some effort to get past laughable comparisons like OOP and Communism. Oh well, I don't mind being a Java programmer, comrade.

    --
    -- Solaris Central - http://w
  457. agreed--fighting anecdote with anecdote. by KFW · · Score: 1

    This guy complains about purported lack of evidence of the benefits of OOP. Then he comes up with statements like these (emphasis mine).

    "There are also a few studies that show that even non-OOP COBOL projects can achieve the same famous "code reuse" and flexibility" goals that OOP lays claim to if managed properly. (Sorry, we accidentally lost the references.)"

    "The problem is that building generic abstract modules (intended for reuse in later projects) requires roughly three times the effort as a project-dedicated (regular) module. Although no references will be given here, this figure is fairly widely accepted in the industry."

    What a hoot this guy is.
    >K

    1. Re:agreed--fighting anecdote with anecdote. by lscoughlin · · Score: 1

      From a business programming perspective, he's correct. Developing generic libraries is a much slower process than developing application specific code to do the deed. Any coder should be able to see that in the fruit of his own work.

      As far as the cobol example... I can't say. But i _CAN_ give you an assembly example.

      The AIG Life Companies use a program called LifeComm on their IBM Mainframe. It handles all contract information storage and retrievel in the form of vsam files delineated with trailers.

      It is written entirely in OS/390 Assembly, and a very strict coding and design principles and oversight has kept it extremely modular, and the code very re-reusable. It's probably one of the best kept source repositories i've ever seen.

      The program itself is quite flexible and extremely reliable, as well as efficient.

      All in Assembly.

      It's not the language or the methodology, it's the discipline.

      It takes a very dedicated and disciplined programmer to turn out quality reusable code. The methodology and language he uses is irrelevent.

      --
      Old truckers never die, they just get a new peterbilt
  458. What are you talking about? by bobbabemagnet · · Score: 1

    It's a geocities site. They can handle boatloads of traffic.

  459. Is C# the answer? by peter303 · · Score: 2

    C# is the first MicroSoft development product I've
    found interesting. (I've been programming five
    years longer than MS has been in existance.)
    (MS was originally a development products
    house before it got into OS and Apps in the 1980s.)

    There are languages that are theoretically nicer
    like SmallTalk and Eiffel, but not as widespread
    or efficient. There are languages very kludgy
    such as C++ or a little bit kludgy like Java.
    C# larns the best from the C family and is likely
    to widespread and efficient.

  460. The most important OOP benefits by CharlieG · · Score: 2

    I really think that the most important OOP benefits of OOP in order are:

    1)Information Hiding
    and
    2) Polymorphism

    For instance, were I work, we have standardized on certain method names. Want an object to populate itself from the database? Call it's GetData method. Want it to save itself? Call PutData. We've also standardized that each object tells IT'S children to populate/save THEMSELVES. Want to save your whole data tree? Tell the root node "PutData", and your whole tree will walk itself and save.

    No object has to know how to save it's children, it just says to the child "Save Yourself".

    We get programmers up to speed on new projects QUICKLY, because the know the basic methods of all our classes.

    Can you do this in a procedural language? Of course you can, but it's easier in an OOPL.

    --
    -- 73 de KG2V For the Children - RKBA! "You are what you do when it counts" - the Masso
  461. Answer: it gets you labeled a "Ludite" by Tablizer · · Score: 1

    Re: What's wrong with GOTO?

    The software industry is as fad obsessed
    as ANY other industry. XML is not even
    Turing Complete, and look at all the
    hype it is getting.

  462. C++ is *NOT* OO! by Eric+Green · · Score: 2
    C++ is syntactic glop on top of "C". Object Oriented programming can be done in any modern language. I regularly write object-oriented "C" code -- when I am programming, I naturally write things as "objects" (structs) whose members are operated upon by the routines mentioned in a particular .h file (the "methods" that go with that "object"). So if I have a struct netstream { stuff } ; in a file named net.h, I also list the routines that operate upon stuff of type 'netstream' (and implement them in a net.c file too, of course). This way I know all routines that operate upon data of that type, and in the rest of the program can create and destroy netstreams and do various operations upon them without having to track down code scattered all over the landscape.

    I think that most of the criticisms that have been aimed at object oriented programming are in fact aimed at particular programming languages and implementations. Object oriented programming has nothing to do with any particular idea of "classes" or "inheritance" or with any particular programming language. I can write object-oriented code in assembly language -- and have done so. There are things that are much nicer when language support exists -- inheritance is not easy to do in "C", for example, while in Python it's as natural as breathing -- but that doesn't make them impossible, merely more difficult.

    Finally: I recently was project lead on a large project written mostly in Python. I can attest that an object oriented paradigm saved us a ton of programming time and coding time. Encapsulating generic database table access into a 'dbaccess' class, then subclassing our various tables using that class, for example, saved us a ton of programming time. There are some of our classes that consist of nothing more than the import of 'dbaccess' and the subclassing of 'dbaccess' in a class whose only (non-dbaccess) members are the data type descriptor strings for that table. Being able to say "d=Destination(destid); tape=d.FindFirstTape() ; if t.is_recycled() ... " is not just the natural result of object oriented programming -- it also allowed my team to write a major application in an amazingly small amount of time.

    My basic conclusion: Object oriented programming is not a buzzword or a programming language. It is simply how you build big programs -- no matter what language you're building them in.

    -E

    --
    Send mail here if you want to reach me.
  463. Ah, back to the insults again, I see. by malraux · · Score: 1

    Typically, Bryce tends to devolve in this fashion quite early in the discussions, hence earning himself the nickname, "Toddler".

    Interested readers are invited to form their own opinions at the OO ezBoard.


    Regards,
    -scott

    --


    Regards,
    -scott
  464. "Object-oriented" languages by cje · · Score: 2

    If you want to look at it that way, I suppose assembly language is "object oriented".

    There really is no such thing as an "object-oriented language", if your definition is "a language you can write object-oriented code with." As an adjective in that context, "object-oriented" is really only meaningful when it's applied to code. For example, I claim that the following program is legal C++ code:

    #include <iostream>
    int main( void ) {
    cout << "Hello, world!" << endl;
    return 0;
    }


    However, I wouldn't dream of claiming that the program is "object-oriented" simply because C++ is perceived to be an "object-oriented" language. Obviously, I have not made use of any object-oriented facilities, so there is no way that I can make this claim. However, when I write a GTK+ program in C, and I call gtk_widget_set_usize() with arbitrary widget types, including some that I have created myself by inheriting built-in widget types, I can (correctly) claim that I am writing OO code, even though C is not perceived to be an "object-oriented" language.

    The useful working definition for "object-oriented language" must remain what it always has been, namely, "a language that supplies direct, language-level support for OO concepts." That does not mean that you're required to write OO code in that language, nor does it mean that you cannot write OO code in other languages that do not meet that definition.

    --
    We're going down, in a spiral to the ground
    1. Re:"Object-oriented" languages by joto · · Score: 1
      Of course it is object oriented. You send two messages in sequence to the "cout" object. so you've made use of an OO concept, namely message-passing. So there...

      :-)

    2. Re:"Object-oriented" languages by elflord · · Score: 1
      I agree with your post, but I can't resist the temptation to nitpick. First, your program is incorrect (cout and endl are both in namespace std). Secondly, you do actually use polymorphism there. operator<< is defined in ios, not in ostream. it's just like calling gtk_widget_resize with arbitrary widget types, only it's operator<< with arbitrary stream types.

      Cheers,

    3. Re:"Object-oriented" languages by Unknown+Lamer · · Score: 1

      Actually...
      cout is an iostream object. iostream is a member function of the ios class so...when you use cout, you have created a new object. And, you have used operator overloading even though you may not realize it. Well, it is object oriented then. Except you personally aren't making objects, so it really isn't idelogical object oriented coding. If it was, you would have made a hello_world class and put the code there...

      class hello_world{
      hello_world();
      }
      hello_worl::hello_world(){
      cout "Hello World" endl;
      }

      int main(){
      hello_world hello;
      return(0);
      }

      of course, screwing objects is so much easier.


      -------------

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
  465. XML is a markup language. by malraux · · Score: 1

    Not a programming language.

    It doesn't need to be Turing complete.


    Regards,
    -scott

    --


    Regards,
    -scott
  466. No Magic Bullet. by maddboyy · · Score: 3

    This article can be applied to any kind of programming paradigm. Basically, the author concludes that OOP isn't any good because some developers and managers aren't applying it correctly. Well, that's the case for procedural programming, declaritive, functional, etc. Yes, OOP will not solve the problem of rushed projects, poor management, or stupid programmers; neither will any other programming style though.

    Programmers just need to be familiar with multiple programming practices and languages. Programmers need to know when just hammering out some _properly_ planned procedural code will fit the case better than some _properly_ planned OO code. There is no magic bullet and because of this, I think it's a bit pointless to say that one programming style is leaps and bounds better or worse than another.

    I really wish the author had the confidence in the claims to actually site some hard facts and not some made up claims. Most of the article just seems like old rehashed FUD from the dawn of the OOP movement. The author mentions all of these failed business apps and blaims OOP for their problems. I guess IBM, Oracle, NASA, and some of the other big software shops are a bunch of idiots for doing any OOP. But of course this guy must be an expert on software design practices and that's why he has a Bell Labs URL.

  467. I am that "troll" by Tablizer · · Score: 2

    Welcome!

    I am the author of that page.

    Rather than do a summary dismisal, how
    about specifics. Better yet, meet
    the "biz app" challenge listed there.

    IOW, put your code where your mouth is.

    Nobody has found any objective proof
    or metrics which show OO better in
    the stated niche.

    Less lines of code? NOPE!
    Less change points? NOPE!
    Better "grouping" NOPE!

    (Often it trades one perfectly valid
    grouping for another perfectly valid
    grouping. IOW, zero sum benies.)

    If it is 50 percent better, then proof
    would be easy. If it is 10 percent better,
    then personal differences are more
    significant than averages.

    Anybody want to race to the finish?

  468. Can someone verify this? by JWhitlock · · Score: 1

    Taco,
    Some of us remember what slashcode looked like before pudge and friends started cleaning it up.

    Not only are you opposed to OOP, but you don't seem to be terrible wild about structured programming either. Nor do you give readibility and maintainability the time of day. Your relationship with elegant code is in the "distant admiration" category and you seem to consider sobriety an impediment to productivity.

    I'm all for biting the hand that feeds us, but is this just one man's opinion? He may even be trolling for karma, since attacks against the creators tend to raise eyebrows and earn karma.

    I don't have time to look over the slashcode, and I don't know what it used to look like. I do know that often, in production scenarios, you have to run with your prototype and what you are familiar with, OOP and style be damned.

    Anyway, I'm wondering if someone who knows more than myself wants to defend slashcode, or give some examples of what Shoeboy is talking about.

  469. Not Objective by Maurice · · Score: 1

    I just had to look at the name of the article html file to know that this guy is just ranting. It's called "oopbad.html"

  470. Myth takes by BorlandInsider · · Score: 1

    Myth: OOP is a proven general-purpose technique
    No actually OOP is a proved specific-purpose technique.

    Myth: OOP models the real world better
    OOP models objects really well

    Myth: OOP makes programming more visual
    Actually RAD tools make programming more visual. OOP is perfect for modeling component hierarchies.

    Myth: OOP makes programming easier and faster
    Not the first time. But it does make it easier to reuse code the second time.

    Myth: OOP eliminates the complexity of "case" or "switch" statements
    Yes with a properly designed class hierarchy.

    Myth: Inheritance increases reuse
    It can but so does aggregation. Actually aggregation or has-a relationships are easier to reuse. Unfortunately, Is-A relationships are easier to visualize but actually require more thought to implemement properly.

    Myth: Most things fit nicely into hierarchical taxonomies
    Actually most things can if they can if designed right.

    Myth: Only OOP has automatic garbage collection
    Not true.

    Myth: Components can only be built with OOP
    Again not true but it is easier and more natural to develop components in a OO framework.

    Myth: Only OO databases can store large, multimedia data
    Where does he get these?

    Myth: OODBMS are overall faster than RDBMS
    RDBMS have had longer to develop. And talk about improper models. Not all data should be modeled as relational.

    Myth: C is the best procedural can get
    Does he make these up?

    Myth: Implementation changes significantly more often than interfaces
    This is a design issue. If interfaces are imporperly designed then, yes of course, they'll change.

    Myth: Procedural/Relational ties field types and sizes to the code more
    I don't think so. OO or not if you don't properly encapsulate your variables you'll have trouble. It is just more natural to do this with OO.

    Myth: Procedural/Relational programs cannot "factor" as well
    This statement has nothing to do with OO. You can factor in p/r languages. You can always factor too little or too much.

    OO is no silver bullet but it does a damn fine job until something better comes along.

    --
    BorlandInsider

    Kylix - Delphi is just too cool to keep behind windows.

  471. OOPs! by z33d · · Score: 1

    object oriented programming is gay!

  472. Yes. And BryceJ from IWE, and Tabilizer from by addison · · Score: 1

    ObjectOriented programming.

    Hey, should have seen those pages *before* the IW and comp.object crowd pointed out the BIGGEST piles of BS there. :)

    http://pub1.ezboard.com/fobjectorienteddevelopme nt languagewars

    *sigh* Bryce made the front page of slashdot. Maybe slashdot finally HAS hit rock-bottom.

    Addison

  473. I smell burnt Taco... by the+red+pen · · Score: 2
    Shoeboy, will you be grillin' up that Sacred Cow? I'd like cheese on mine...

    tee hee hee

  474. Trees and Files by Tablizer · · Score: 1

    It is true that I focus mostly on the biz domain.

    However, personally I think directory services should be based on RDBMS, not on trees. Trees are only one of many possible views of files. Most companies have very messy file directory trees. Part of the blame is lack of planning, but I also think that part of the blame is trees. Sure, weening people off of pure dir trees would not be easy, but worth it IMO.

    The anti-tree guy.

    (I am preparing a write-up on this.)

    1. Re:Trees and Files by lscoughlin · · Score: 1

      Ugh.

      Trees are very flexable...

      Most RDBMS stuff i've run into is trying to flex trees into two dimentional structures...

      All one to many associations can be mapped this way.

      The difficulty is that pure trees become exercises in walking algorithms.

      Directory services should have mixed views because very often it's far more flexible (cascading permissions, organizational grouping etc.) to deal with a tree for those items. However as often as not you want to say "give me all employees with level 2 security clearence", and pulling that from a table would be far more efficient than walking the organizational trees for atlanta, langley, washington, and annapolis.

      The real question, is which format does the data exist in natively....

      --
      Old truckers never die, they just get a new peterbilt
  475. mOOt - you could not even provide one by Tablizer · · Score: 1

    All the past arguments don't matter.

    You guys simply FAILED to come up with
    3 biz examples that proved that OO
    was better. (They did not even come up
    with one).

    Stop launching red herrings. You flunked,
    failed, flopped, and dropped.

    Admit failure like a man instead of playing
    sissy games. (Gee, I sound like such an
    inflamed troll when I say that. Oh well.)

  476. But Rob... that's not his "niche" by malraux · · Score: 1

    And therefore it isn't a "business app". By definition.

    I'd post that definition, but I seem to have lost the reference. Accidentally...


    Regards,
    -scott

    --


    Regards,
    -scott
  477. abstraction pays dividends... by blurpy · · Score: 1

    this past year i was in charge of a rather large software project at an internet startup (may it rest in peace). i and our other programmer followed very strict oo analysis and design principles (don't think they're very different from most other analysis and design principles), and the author is somewhat correct that the initial design and start of implementation was relatively slow.

    however, being in an internet startup, with all the attendant chaos and rapidly changing plans, we very quickly realized the payback on the abstraction investment. as our managers thrashed about trying to please all the various investors / business partners (sometimes changing the whole focus of large portions of the application) we found it relatively straightforward and quick to morph the app in the way we were being led, all without hopelessly breaking our original codebase. i have been on more procedural or data-centric projects where the type of changes we had to do here would simply not have been possible without enormous rewrites. (i have actually been through some of those rewrites and they are very painful.)

    yes, cracks were beginning to appear here and there in our model because of all the change, but the entire structure was sensible, and major changes could be effected by modifying implementations in the superclass or overriding methods, etc. in short, rather than waiting three years for the payback (lots of time saved) we enjoyed the payback in under three months.

    an added benefit was that our code was so well organized that when i went to technical meetings i could very quickly describe the structure of our app in great detail in a way that even business people could begin to understand, because it was all based upon entities in the domain that they could relate to.

    i agree oo can be overhyped, and it is certainly not the silver bullet for all problems, but it isn't difficult and it provides very simple benefits without all that much investment of time and effort.

    blurpy

  478. OOP can be helpful by Vassily+Overveight · · Score: 2

    I think the usefulness - or lack thereof - of OOP depends a lot on one's personal learning/working style. Sort of like some people are perfectly fine with abstract mathematics, while others need to relate math to the physical world in order to understand what's going on. Personally, I find it helpful to create objects that possess properties and accessors to get at them. It not only makes what I'm creating more 'real', but it divides the application into nice self-contained chunks that can be dealth with separately.

    --

    "If I have seen further than other men, it is by stepping on their glasses." - Michael Swaine

  479. Re:Author is a USENET troll/pest by FatHogByTheAss · · Score: 2
    No doubt. He is a well known troll on comp.lang.perl.misc. When he showed up there the first time, he was pissed that Perl wasn't Visual Basic, then he went away for a while. When he showed up again, he was pissed that Perl wasn't COBOL (seriously). The truth is that he has escaped from the accounting department, and fancies himself an expert on whatever topic he read about last. However, it doesn't surprise me that the moronators that moronate /. thought his rantings worthy of their own ariticle.

    --

    --

    --
    You sure got a purty mouth...

  480. If your non-oop coding sucks, by GameGuy · · Score: 2

    it's still gonna suck if you use OOP.

    OOP has it's place, like everything else. Tools should be used when the best fit - ever try to drive a nail with a wrench? Anyone selling a one tool that does it all..well...I think I just answered that..

    On the other hand, saying OOP has no value is just narrow minded.

    --
    The Game Guy
  481. Re:Real world objects, procedural objects by aardvarkjoe · · Score: 2

    "a chunk of code that performs some task?" We got those -- them's a relatively unknown C contruct, called a -- dagnabbit, what's it called ... oh, yeah -- function. Yeah, you can make an object out of just about everything, if you feel like it ... but that doesn't make it the best way to go. I absolutely cannot see how simply surrounding functions with an object-oriented architecture is helpful. That's what I was trying to point out.

    --

    How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
  482. Very Poor Article by HarpMan · · Score: 1

    I thought it was a very poorly written article. There are a lot of problems with OO that need exposing, but this article didn't do it.

    For example, he gave two code examples, showing how one might calculate a tax using OO and procedural programming:

    // BAD, COMPLICATED OO APPROACH ///////////
    Person P = new Person("Fred")
    Tax T = new Tax()
    // assign attributes to our person
    P.x = foo
    P.y = bar
    P.z = blah()
    // display tax amount
    output T.calcTax(P)

    // SIMPLE, ELEGENT PROCEDURAL APPROACH
    output CalcTax("Fred", foo, bar)

    He complains that the OO approach requires you to understand the Person class, and is more verbose. Regarding the latter, the OO code could look like this, using the Person constructor:

    Person p("Fred", foo, bar);
    Tax t;
    output t.calcTax(p);

    Or even:

    output Tax(Person("Fred", foo, bar)).calcTax().

    So, the OO approach needn't be that much more wordy that the procedural approach. In many cases, it's more concise.

    Now on to the more substantial criticism, that the OO approach requires you to understand the Person class to calculate the tax. Well, the procedural approach requires you to understand the parameters to the calcTax() function, and to remember the proper order for the parameters. And, the parameters you pass to the calcTax() function are in essence the attributes of a person necessary to calculate the tax -- so conceptually, you have to know just as much about people and taxes in either approach. The OO approach just seperates the concept of Person from the concept of Tax more explicitly. If you change the way that you identify a person (perhaps by SSN or employee id instead by name), you change the person class, but neither the interface nor the implementation of the Tax class needs to change. For example:

    Person p(1234); // construct from person key
    Tax t(p);
    t.calcTaxes();

    In the procedural approach, the calcTaxes function would have to change.

    There are many limitations of OO. The book "Generic Programming" discussed many of them, and demonstrates how generic programming tools (templates, code generators, etc.) can help alleviate them. Functional programming languages like ML take a different approach, which could be better than OO. But this guy seems to be advocating a return to traditional procedural (not functional) programming, which be a big step backwards.

    Also, there are many know limitations of naive or traditional OO. For example, inheritence is overused by many programmers new to OO. Java's combination of strong typing and lack of generic programming facilities (no templates) forces programmers into creating overly complicated interface (pure abstract inheritence) hierarchies, since you can't easily create generic methods. So, Java encourages complicated interface hierarchies. But, the guy should read "Design Patterns" regarding why aggregation is often a better tool than inheritence. Saying the OO people think that the whole world can be represented in an inheritence hierarchy is attacking a straw man. Contemporary OO gurus don't think that way. Oh, and inheritence is not primarily a code reuse mechanism -- it's a typing mechanism.

    --
    Stephen Molitor steve_molitor@yahoo.com
  483. OO reach my university :( by lovepot · · Score: 1

    Ims in 3rd year of Computer Science at a university in Spain, and i really got annoyed when new students told that they were not teaching the procedural approach anymore. They have moved form Pascal to Object Pascal in first year, and second year you only see C++ and more Object Pascal. Do they really think that you need a hello object to write the hello world program?

  484. A boil down for this long article by retinaburn · · Score: 1

    Procedural is great because its what I know now, why would I bother learning something new where people will know more than me.

    Its not immediatley better than procedural so just give up.(Lets see what 30 years of compiler tweaking can do.)

    Spending 4 times as long to make it reusable later to save time is stupid, who know how long im gonna be around on this planet anyways

  485. Bryce has been doing this forever. by malraux · · Score: 1

    In fact, I can point out several references on his pages that directly refer to either myself or the group of people that have been arguing these points with him for the past 3-4 years. :-)

    Bryce's biggest problem is that he won't actually learn how to use the stuff he criticizes. He's more concerned with making the point than actually making a *valid* point.

    He was an XBase programmer for a long time, and gradually saw his "niche" get eroded as people went on to better ways of programming business applications that subsumed his "TOP" methods. However, since he doesn't understand these other methods, he would prefer that the entire world take a step back in the WayBack machine and merrily go back to using FoxPro and Clipper.

    He's also never done anything larger than what I would consider to be extremely small applications. A few of his comments are applicable to a very small segment of the programming world, but unfortunately he tries to apply them across the board.

    Don't ever try to pin him down, though. His niche will morph as he tries to avoid any logic you might bring to bear on the discussion. :-) Another favorite tactic: stridently insist that everyone else bring the proof. He's making the observations, but we have to prove it. :-)

    Priceless hours of entertainment if you ever get him in a discussion, but after a while it wears thin. He tends to get abusive and obscene when things aren't going his way. He has moderated that a bit lately, but occasionally the old Bryce surfaces...


    Regards,
    -scott

    --


    Regards,
    -scott
  486. the article has no valididity by mozkill · · Score: 1

    I agree with his premise based upon what his application development space has been. Typically, OOP practices do not pay off until the maintenance period of a product and it does tend to slow down the development cycle because you have to put more thought into what you are designing. I think that this guy's point of view is incorrect though because he has only ever had to be the initial designer of a product and has obviously never had to assume somebody else's code base where he had to figure out what the initial developer's purpose of code was. He has a pretty narrow view of the world and I think if he had to maintain somebody else's code or take an existing product and continue to evolve it, he would rapidly find the advantage of code reuse due to OOP practices. I also noticed he has some fundamental misunderstandings about OOP. I could pick apart almost every statement he makes about the downside of OOP. I only agree with 2 statements of his - OOP advantages are only realized over time and that an OOP project needs to be well managed in order to be effective. This latter point though is true for any project and in fact ends up encouraging well managed projects whereas non OOP products tend to promote a program as you go methodology that promotes mistakes too late into development to back track from. I could write an entire book on why this guy's views are inaccurate and from a very narrow point of view. By the way, there have been new development disciplines to speed up this exact process he is complaining about. http://www.extremeprogramming.org/ . What he needs is not a non OOP language but instead a faster methodology for development of an OOP application.

    --

    -- Betting on the survival of the media industry is a serious risk. I advise investing elsewhere.
  487. Re:the key phrase is: properly implemented by dlkf · · Score: 1
    I think that one of the problems here is that there are alot of people who learned procedural programming techniques before they learned oop techniques. consequently their oop designs have flavors of procedural designs. my advisor is always talking about how people say that his lisp programs look like pascal programs and that his c programs look like lisp programs because he learned pascal before lisp and lisp before c. IIRC, alan kay did a study on this in the mid seventies. he found that it was easier to teach the children how to program in smalltalk than it was to teach professionals how to program in smalltalk. the professionals had been programming in one mindset so long that they tried to morph the oop techniques into what they already knew. i know that when i first learned how to program(and i see this at too many schools), the first course was all procedural programming in pascal. the second course was on data structures and some object oriented techniques(pretty much just inheritance and polymorphism) in c++. consequently i found myself trying to use an oop language to do procedural programming. the only oop techniques that i found useful were the ones that made my procedural programs easier to write. it wasnt until i had an actual oop course that stressed viewing things in terms of objects and their behaviour that i was able to understand what it meant to use oop design.

    my point is that people dont properly implement programs with oop techniques because they have only been taught how to write procedural programs and dont know how to design a program in terms of objects and their behavior. if we want more people using good oop techniques, we need to teach the first programming courses in oop languages and stress oop design from the beginning.

  488. If you're wanting OO... by Kupek · · Score: 1
    This begs the question why use C? I have nothing against C, but I like to use the right tools for the job. I hate having to force things. If it's easier to write OO code in C++, why write it in C?

    Anytime one find themselves having to write workarounds, they should sit back and ask themselves this: If that's what I want to do, and this tool won't let me do it easily, why am I using this tool?

  489. The performance Issue & Stackless by Frums · · Score: 1
    A lot of the performance hit (granted very small in practice) with gnu C++ stems from stack issues because gcc converts to C.

    What happens in a non C-stack compiler? The only one I am remotely familiar with is Stackless Python, which is, obviously, impossible to validly compare to gcc, but avoids the C stack. By allowing frame changes the way it does (cannot remember the term the devs using it like for changing execution point between frames, grrr, it should in theory allow much more efficient virtual method calls.

    Ah well, this is all one more reason to go back to grad school again and build better compilers :)

    Frums

  490. Which 'People'? You know what is best for *me*? by Tablizer · · Score: 1

    [quote] OOP is to help *PROGRAMMERS* write better, more extensible, more maintainable code, and optimization of code, speed, and badly written code are secondary. [end quote]

    "Meant to help", yes.

    Proven to help? Try again.

    "The road to hell is paved with
    good intentions"

    (And by which metrics?)

  491. my own 2 cents by segmond · · Score: 2

    I am not a huge OOP fan, but I firmly do not believe it is hype, yes, it has been OVER HYPED, but when you take the hype out, it is still worth it. OOP is not the solution to everything.

    I was weaned on C and assembly. I learned to write structure code, C and assembly fits fine perfectly, I can sit down and hack C freely without thinking of the problem ahead. Doing so with OOP approach is next to impossible, OOP makes you work, I hate it most of the time, and that is the reason why most people hate OOP, if you have the hacker mentality, you will hate OOP approach.

    But, even with the hacker mentaility, OOP can still be good, anyone here who has done GUI programing with C, C++, Python or Java knows that language that totally dominates is the languages with support for OOP not C. If you have done programming with CORBA, you will appreciate OOP just as well. Look at Orbix for example, the fastest CORBA ORB that I know, the dirtiest to hack for, look at other ORBs supporting C++, not the fastest in terms of execution speed, but much much painless to code for.

    Some people might want to argue about speed, but in this age we live, it is no longer about the speed of execution, but of development, at least in my case.

    --
    ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
  492. It all depends on how you view OOP by garoush · · Score: 2

    If you take OOP as a "silver bullet" solution for your development problems, than yes, you have fooled yourself. What a lot of people missed out about OOP is the fact that OOP does nothing but "unifies" common programming practices and provides a common "language" and communication gateway for developers to use when they are working on their projects.

    Without OOP, we could all be talking about MVC (Model/View/Controller), call-backs, iterates, etc. in a completely different language and yet not understand each other which result into communication breakdown.

    For those who are not familiar with OOP my suggestion is to read the "Design Patterns" book. The book doesn't talk about anything new or revolutionary. On the contrary, all the stuff in the book (and most other OOP books) are things that were covered over 30+ years ago. All what the book does is "unifies" those practices so that the next time when two developers are working on a call-back design, they don't just give it their own invented "cool" name or "cool" implementation.

    Folks, OOP is no different than what you would find when you talk to an electrician (or any other well establish engineering field). In those fields there are "standard" language, process, and practices that get carried out and communicated. It is time for the software filed to standardize too.

    Finally, regarding the payback of using OOP that the article pointes out -- there are countless research and study that show that on medium to large projects, OOP is the way to go.

    --

    Karma stuck at 50? Add 2-5 inches.. err.. 2-5x Karmas Count to your pen1es.. err.. Karma all naturally and private
  493. Hmm... by cr0sh · · Score: 2

    One thing that bothered me was his tax example program. He states that:

    We are assuming that Tax may handle other entities besides people, so we are making it a separate class instead of a method of Person.

    Now, I am not an OOP programmer by any means. But wouldn't you do some form of inheritance of the base class Tax, forming a class Person_Tax (which might have specifics to people, but inherits other Tax items), then create an object method in Person based on this class?

    I know my terminology may be screwed up, but I know that you don't need a whole seperate class in this example - you are just ordering and reusing components through inheritance. The power from this comes when you change, say, the Tax class - everything trickles down, and updates all other uses of the class and objects created from the class - so you don't have to change things in a billion different areas in your code, like you may have to in a procedural language (now, with good design and attention, you would black box a procedure with arguments you could pass in telling it what to do, like Function CalcTax(type, unit, var1, var2) - so that tax = CalcTax('Person', 'John Doe', var1, var2) is different from tax = CalcTax('Corp', 'JD, Inc.', var1, var2) - and this could be extended for various types, and modified if needed, affecting all areas that called this routine to calculate tax - however, this has to be the only routine used to calculate tax)...

    Worldcom - Generation Duh!

    --
    Reason is the Path to God - Anon
  494. good programmers matter more by Owen+Lynn · · Score: 1

    Doesn't matter what language you've decreed to be used, if all you have are bonehead programmers, you're going to get bonehead code. The, um, quality of the code may be *slightly* different based on the language you've picked, but not enough to matter.

    Hire good managers, hire good people, and let them pick the language and write their code.

  495. Is this TopMind from comp.object? by ProtonMotiveForce · · Score: 1
    This looks like his drivel. OO isn't perfect, but this pathetic bit of sophistry and oversimplification looks very familiar.

  496. Thanks for the admission. EVERYBODY ELSE! by addison · · Score: 2
    Before you go replying....

    http://pub1.ezboard.com/fobjectorienteddevelopment languagewars

    Trust me. you WANT to read through that.

    Trust me.

    You'll be rehashing the same things over and over - read that first, and then decide if it is a "fair challenge" (minor note - most of the people there have been "discussing" this for 2-4 years with him).

    Addison

  497. OO Design Techniques - OpenSource and more... by Rotten · · Score: 2

    OOP is always what comes after an OO Design.
    Yes, OO Design is far superior than other Design techniques, but sometimes is also harder. Why? Because you have to give your designers the WHOLE PICTURE since the BEGGINING OF THE PROJECT.
    The Designer comes to play a key role here.
    In my poor experience (counted in years, not decades ;)...non OO Design Techniques actually gave shorter design times, but when the design team was gone (working in the next project) coders have to start to work out ugly hacks in order to make the system work like the customer wanted.
    Whit OO Design, you can present your customer a nice graphical interpretation of the system behavior BEFORE EVEN IMPLEMENTING A LINE OF CODE. And yes, my mom can understand those UML diagrams...it's easy.

    At the implementation level, OOP and NON-OOP are good in their own category. But wait! A programming languaje is as good as the programmer using it.
    I've seen nasty things using OOP and real good things using plain old C.

    So, to this point, we can see that OOP is very design dependant.
    The rehusability grail is very design dependient. I can make a "CAR" class, or I can make a "VEHICLE" class. That's up to the designer. But when the same group of programmers/designers/software engineers have to write a "BUS" class, because the "CAR" is quite different...well, REUSABILITY my ass. Stop everything and start over again. (up to some level, the CAR experience will be usefull, but not transparently and automagically reusable).

    So, I won't blame OOP, I tend to blame OO Designers. And yes, I think that most commercial projects (small to medium) don't get benefits in using the OO combo.

    OO Techniques (Design and Coding) could be a big benefit to the OpenSource Community.
    I remember www.theClassRoom.org, nice idea.
    Collect classes from opensource projects and present them to the Community for reusing.

    Have you ever seen a image bank? Well, I think of many good uses for a class bank.
    Search, read license, copy, paste, use, extend, submit to the community. The real Open Source spirit.

  498. Suspect rhetoric by hyacinthus · · Score: 2

    I happen mostly to agree with the thesis of this article, that OOP has been applied indiscriminately as a programmer's panacea. The head of development at my previous job was a tremendous proponent of OOP, and he urged us all to read DESIGN PATTERNS and write up detailed class hierarchies. If there were any savings in effort and reduction in complexity, I didn't see them; instead, I saw a proliferation of classes and a disposition to spend more time drawing up nice-looking diagrams than in grappling with real problems.

    But I don't care for some of the rhetorical tricks this article uses. Graphs without units or cited source, e.g. the "productivity comparison" which laughably charts "results" versus "time" for OOP technique and the highly specific category of "other". The bandying-about of general claims, with the excuse, "Sorry, we lost the references." The scarcity of citation throughout the document (and _no_, a URL link to another website does not count as another citation; I'm talking about citation from _real_ sources with good credentials.) Belabored, if not ludicrous, analogies (OOP and communism??) And of course, the obligatory venom towards academia.

    One day, I hope, "computer science" will not be an oxymoron. But mostly I see stuff like this article--intelligent to a degree, propounding arguments which merit some consideration, but in the end, just as much a "religious" document as the OOP texts the author disparages.

    hyacinthus.

  499. Where OO is good. by rkent · · Score: 2
    First of all, I laughed out loud when the article pointed out the futility of a lot of OO "training" programs, like modeling heirarchies of shapes ("SQUARE is a subclass of RECTANGLE..."). I mean, how often have you ever needed to CODE that?! So, good point there.

    But, that does kind of relate to the domain where OO is maybe best: GUI programming. This is a point acknowledged in the article, so I won't try to use it as a counterargument. Overall, that page does a pretty good job of claiming that OOP is overhyped, and not perfect for every situation. The author's not saying it sux0rs.

    However, I think there is one important domain that was missed: database interaction. The author makes the point that a lot of seemingly OOP-related problems, like employee types, etc, are maintained by accountants in database relations, and not by coders in their programs. BUT, there are some great frameworks for interacting with database rows & relations as Objects! Here I'm mostly thinking of Apple's EnterpriseObjects, but please enlighten me about your favorite one.

    In my experience, using code-level Objects to access database rows instead of raw SQL can be a helluva timesaver in many situations. And, to free engineers from controlling the data schema, EO even comes with a data modelor that can automatically generate Obj-C or Java classes to manipulate your database data.

    IMHO, than rocks. I've written server scripts with raw SQL statements, and trust me, this is much easier. Even if we don't reuse it for 30 years. The main problem I see is that EnterpriseObjects in particular has like 6 billion layers of abstraction, so the performance is never quite what you'd like. It seems like there'd be some kind of compromise, though.

  500. re: inheriting a struc by Tablizer · · Score: 1

    [quote] That's not a misconception at all. I think you need to look at the definition of an "Object Oriented" language. You'll see that to be OO a language must support certain things like inheritance, polymorphism, run time binding (dynamic binding) and many other fun things that you can't do in procedural languages. C doesn't support any of those. You can't do things derive a new type of struct from another type of struct. [end quote]

    Personally, I use relational tables instead of internal array strucs. More scalable in many many ways. (Please, no arguments about speed.)

    However, I doubt such a feature would have much use in my domain. The differences in things are usually not well modeled with tree-based inheritence.

    For one, what if you wish to change the original structure? You then have the "fragile parent" problem. Few things are safe to couple in such a way IME because few business things are IS-A relationships (unless you are a bad modeler).

  501. Re:I am that "troll" - What fun!!! by HEbGb · · Score: 1

    I haven't enjoyed a good old-fashioned proto-rational flame war since I stopped reading USENET. I'm delighted to see it has thoroughly made its way to slashdot.

    Face it, dude, you are a troll. You're just after attention, and you've got it. We've all seen this behavior before.

    (as I fan the flames... whee!)

  502. Do we need an addition to the moderation system? by puppetluva · · Score: 2

    Maybe we need a way to mark a top-level post as "flame-bait" now.

  503. re: storing state, and "looks good on paper" by Tablizer · · Score: 1

    [quote] But no, an OO language does not loose a lot of its benefits as compared to procedural when you use has-a. Modules do not have state. Objects do, which is frequently important. [end quote]

    The "state" is usually (and best) stored in a RDBMS (or it's buffers) IMO. (RDMBS have flaws of their own, but they are usually vendor-specific and not a fault of the paradigm.)

    [quote] I think the last straw for me regarding this article was the unclever section comparing OOP to Communism. Gee, a social movement failed, therefore a programing methodology will fail too. [end quote]

    That was not my point. Like Communism, OO looks great on paper, and it sucked in a lot of intellectuals because of that.

  504. Tell the press and PHB's that. by Tablizer · · Score: 1

    with all this hype about "smart templates" and crap. I just met a sys admin who was sucked in.

    It may certainly have it's place, but like OO, it is way overhyped at the moment.

  505. In for a penny... by Static · · Score: 1
    • Right now all we have is opinion. Prove first, THEN innundate the instrustry with the winner. NOT the other way around.

    Indeed. We tried this back on IWETHEY, and earlier back on IWE. It didn't take us anywhere but 'round in circles.

    Good luck with the clueless horde here on /. You'll need it.

    Wade.

  506. How I fell off the greasy pole by akc · · Score: 1
    Object Orientedness is as much a mindset and philosophy as it is language constructs. (OO languages are designed to facilitate the philosophy, not guarantee it.) Many studies say in practical terms that most OOP projects fail to produce benefits over non-OOP methods because for political, technical, or training reasons, OOP is "not being used properly

    My failure to realise this in the mid '90s was why I fell off the greasy pole. I was a technically oriented manager who pushed one of my project teams to build the next product in an object oriented way. I failed to understand that whilst an OO mindset was obvious to me, to the programming team they couldn't get a handle on where to start. Net result is a project that went nowhere for 6 months and didn't get moving until I abandoned my insistence on an OO approach. This killed me with the costs of the project overspend which brought the rest of my profit centre to its knees. I am no longer a manager with these sort of responsibilities.

    Even today, I still feel architectually the OO is right and works the way I happen to think - but I have to be honest and realise most programmers don't seem to have the same mindset and that kills the benefits that can be had.

  507. Objects = Identity + Intent-to-extend by Xenophon+Fenderson, · · Score: 1

    In "What's in a Name?," Kent Pitman makes the case that the notions of identity and intent to extend are at the core of object-oriented programming, not some check-list of features. But read the paper, not just my poor paraphrasing, as Mr. Pitman always has an interesting point to make.


    Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16
    --
    I'm proud of my Northern Tibetian Heritage
  508. New Myth: OO would have prevented Y2K by Tablizer · · Score: 1

    [quote] Although it is hard to take this page seriously (the comparison with Communism just killed me) [end quote]

    That is just an excuse to ignore the rest.

    [quote] If that's true then why did I get all that Y2K work back in '98 and '99 fixing 5 to 10 year old programs? [end quote]

    I discussed Y2K OO claims in the "Meyer" section.

    I guess I should add "OO would solve Y2K problems" to my myths.

    [quote] Here I just think its funny that he lumps C in with Java and Pascal as a "strongly-typed language". [end quote]

    Compare C to Perl, and then try another giggle.

    [quote] I'd like to add that IMHO, OOP builds on procedural (structured) programming. It usually allows better abstraction than procedural programming [end quote]

    I disagree. OO's brand of abstraction is too narrow (single-aspected) and relies too much an tree-based taxonomies. (Without the trees, it is not much different than procedural, as already discussed.)

  509. Re:That's hard? by aleclee · · Score: 1

    Where once project is broken down into may parts and when you use another part, you don't see source but just get a library. Even when you don't have "source" you still have header files. That being said, I hope I never have to use C++ again.

    --
    This message composed using 100% recycled electrons.
  510. Re:"Object-oriented" languages (oops) by cje · · Score: 1

    Not that I don't get your point but surely the fact that your << operator is not shifting bits left indicates that you've used *some* object orientated feature.

    Operator overloading is a C++ feature, not an OO feature.

    --
    We're going down, in a spiral to the ground
  511. Author is a USENET troll/pest by h_jurvanen · · Score: 5
    For a long time now USENET groups like comp.object have been tormented by the author of that article with his constant barrage of FUD and inability to construct meaningful arguments. For an idea of what I'm talking about, check out his posting history.

    Herbie J.

  512. Once again, /. shows its inner nuttiness by inkless1 · · Score: 1

    I stopped reading this site after the whole Apogee incident a while back, now I'm tempted to hop off again. I mean c'mon, this article is nothing but a trolling rock of flamebait, and a bad one at that - it could have been condensed into a one paragraph synopsis of "I hate OOP because..."

    This article is nothing but rant. There are no sources, especially for it's "graphs" (which I suspect took someone about 10 minutes in PhotoShop to research). It's almost completely subjective rhetoric with some mock code tossed in for good measure. My cats running on the keyboard chasing a string could have written a more constructive and thought-out analysis of OOP.

    The description for this should have read: Here are some good links on OOP. They're at the bottom of this otherwise useless webpage, so scroll quickly.

    OOP is a mindmelding piece of communism?? I mean do you guys read these things before posting them??

  513. geocities... by TWX_the_Linux_Zealot · · Score: 1

    It's on a geocities server... expect it to be slow; at least, geocities sites generally seem to be slow as far as I can tell...

    "Titanic was 3hr and 17min long. They could have lost 3hr and 17min from that."

    --

    IBM had PL/1, with syntax worse than JOSS,
    And everywhere the language went, it was a total loss...
  514. OO == New Qwerty ? by Tablizer · · Score: 1

    [quote] Really, has anybody used "it's object-oriented" as a selling point since 1989 or so? [end quote]

    Java (Sun), MS, etc. Any new language, even a scripting one, HAS to be OOP in order to be "in".

    [quote] Accepted by whom? I've never heard that asserted by anyone in my academic or professional careers. [end quote]

    I am sorry I did not keep better records. However, that figure has floated around several times and most debate participants seemed to agree with it.

    [quote] When Pascal replaces C, how do I convert my C functions into Pascal functions? Eh? [end quote]

    Don't. Put most of the control information into a database. It is easier to transfer data than transfer algorithms.

  515. Code Reuse by destrago · · Score: 1

    I've done quite a bit of C++ programing and never once in my life have I reused code through inheritance - it's actually more cumbersome to do it that way.

    --
    Destrago Z. Scudiero -Noize Incorporated -Void42
  516. Polymorphism by slamb · · Score: 3

    The author doesn't describe in depth what I consider one of the greatest advantages of object oriented programming -- polymorphism. Polymorphism is great because it allows you to invoke different methods for the same operation based on the derived class.

    That makes more sense with a real example. I'm working on a set of classes that has a Stream abstraction. Derived classes must provide ways to do raw reads and writes, close the stream, and a few other things. (Preferably, they also provide some way to open the stream -- but that's not a virtual function.) The stream class itself provides buffered IO and some convenience functions for writing stuff in network order, a nice gets function, etc.

    That allows me to have the same easy IO operations on top of many different kinds of streams:

    • OSStream - what the operating system considers a stream. Can attach to a given fd, etc.
    • FileStream - derived from OSStream, adds the ability to open a named object. (kind of a misnomer, could be a FIFO or whatever.)
    • StreamSocket - also derived from OSStream, blends with a lot of socket functionality.
    • PGLargeObjectStream - a PostgreSQL BLOB (binary large object). Basically, like a file but stored in a PostgreSQL database instead of using an inode. Handy because filesystems have limited number of inodes, not good for lots and lots of small files.
    • SSLStream - a SSL connection, requires another open Stream (probably a StreamSocket) to connect.

    Each one of these provides the same basic abilities -- reading/writing, seeking/telling (where applicable), closing, etc...but they do it in different ways. I need abstract read/write code so I can put shared higher-level code on top of it. Otherwise, I'd have to reimplement the higher-level code for each one. That would suck.

    This doesn't even necessarily need an object-oriented language, just an OO concept. OpenSSL, for example, has a set of C functions that do a lot of the same things I'm talking about. It does it by providing a struct with function pointers...basically, a virtual function table. It's definitely not as pretty (I wish they would have just done it right and used C++) but it does work.

    This is just one advantage of object-oriented programming, but I think it's a very significant one. Worthwhile by itself.

  517. insults != wrong by Tablizer · · Score: 1

    I might have a big mouth, but that does NOT
    make me wrong.

    BTW, where are your 3 examples?

    Where is one?

    What, no proof?

    Ah, poor widdle kid.

    1. Re:insults != wrong by pjrc · · Score: 2
      Tabilzer writes:
      >BTW, where are your 3 examples?
      >Where is one?
      >What, no proof?
      >Ah, poor widdle kid.

      Why don't you dig up some of those references you accidentally lost?

  518. Vote Self Authority != Proof by Tablizer · · Score: 1

    [quote] Indeed. We tried this back on IWETHEY, and earlier back on IWE. It didn't take us anywhere but 'round in circles. [end quote]

    No, the trivia battles went in circles. The proof itself NEVER CAME. You guys do not have the smarts to build 3 biz app/model proofs.

    You flunked!

    (Note that many admitted they didn't want to bother making examples. But, that is their short-coming, not mine.)

  519. Re:Examples? by Aunt+Mable · · Score: 1
    Microsoft?

    -- Eat your greens or I'll hit you!

    --

    -- Eat your greens or I'll hit you!

  520. beentheredonethat - granularity by Tablizer · · Score: 1

    [quote] If you don't like the way a class works - rewrite it - but preserve its interface. [end quote]

    http://www.geocities.com/tablizer/chal03.htm

    Also, the problem with method overriding is that the granularity of the differences often don't match the method scope. It is tricky to override say 1/3 of a method without refactoring your interfaces.

  521. Anonymous hack berates OOP without foundation by navyrain · · Score: 1
    Navyrain steps up on his milk-crate o' preachin'

    Peope with any sense at all will ignore this article. Of course OOP is not ideal for everything. It seems to me that the author had trouble with OOP, and wants to whine about it. Sure, he a couple got articles to support him, but that is no big feat, considering how many articles there are out there about this topic (pro or against oop).

    Perhaps the author is working with some OO code that is really ugly, or back-asswards. It's my personal belief that by far the best part about OOP is it's tendancy to be self-documenting. The NOUN.VERB(OTHER_NOUN) convention is great. Sure, procedural programming can do that, but there is no convention for such things.

    Navyrain steps down

  522. Re:Anonymous hack berates OOP by ichimunki · · Score: 2

    I have to think that some of the moderators around here are on crack (as in why is my parent post either flamebait or a troll?). I posted very early on, with a succint summation of what a load of crap this article was-- all of my hunches were proven true as I read the comments. The guy who wrote the article apparently frequently complains about this stuff on Usenet. He is apparently widely considered a flake for it. In his article, which I read before posting, and suspect the moderators did not do before moderating me down, he comes across as someone who has lost project bids to people who were more buzzword compliant than he is. And rightfully so since he appears to want to code in Fortran and something he calls "table oriented programming". His article completely overlooks functional and logical design as alternate paradigms, additionally he has added no real world examples (his charts are completely fictitious since as he says, "no studies have been done") to back up his claims either way.

    In fact he does compare OOP to communism. And rather poorly since his complaints about communism all seem to be derived from problems he has with American democratic capitalism and it's overwhelming bureaucracy. The article is lame. Slashdot putting flamebait like this on the front page is semi-lame. It did engender one of the better discussions Slashdot has had in my recent memory, which makes it forgivable in my book.

    --
    I do not have a signature
  523. stop dwelling on the headlines only by Tablizer · · Score: 1
    So... his article is based on debunking "OOP Myths"

    NO, that is NOT what it is all about. There are plenty of technical issues to take head on: multiple orthogonal taxonomy criteria, the "method boundary" issue, etc.

    He repeatedly fails to back up any of his points with citations or references

    Moot. The burden of proving that OO is better is on you, not me. Remember: benefits are same or unknown until proven otherwise. I DONT claim that my favorite paradigms are provably better.

    myths are outrageous to the point of being silly... Only Only OO databases can store large, multimedia data?

    Bertrand Meyer hinted this in OOSC2. (See OOSC2 critique section). Many trade rags also imply similar things. Is Berty silly then?

    Who, exactly, does believe these myths? PHBs?

    YES! I did not exclude PHB's from my audience, BTW. They are full of myths as well.

    The best thing I can say about this article is that I think the author has a few good points and compelling arguments that are, unfortunately, lost amid the noise and confusion of unsubstantiated facts.

    Being that I have zero budget, it is not a perfect paper. However, there is plenty of technical meat in there for those not looking for instant-reasons-to-excuse-it.

  524. Real world objects, procedural objects by Eric+Green · · Score: 2
    One thing that Python makes easy is the concept of a procedural object -- a chunk of code that performs some task. For example, in BRU Professional the tape switcher (that switches tapes in a tape loader as you proceed in a network backup) is a procedural object. The high level backup/restore/verify code that actually manages tapes initializes the tape switcher with a list of what slots in the tape changer to go to for which volume in the backup, then passes this tape switcher object down to the lowlevel code that actually touches the hardware. The lowlevel code then calls the tape switcher object's "load a volume" method whenever it needs to change tapes.

    I can't think of anything more procedural than an actual tape backup, but even there many things can be easily abstracted out as objects -- not just the high level stuff like "drive" and "tape", but also lower-level procedural items such as changing tapes.

    -E

    --
    Send mail here if you want to reach me.
  525. A crank and a troll. by StrawberryFrog · · Score: 1

    An article by Katz on how the infospere is filling up with crap, next to this article... it's a sign I tell you.

    I was going to write to refute this junk, then I got to the bit about "Why OOP is like communism" and realised that it was a waste of time. He's a crank and a troll.

    --

    My Karma: ran over your Dogma
    StrawberryFrog

  526. Why is this troll story even posted? by Fly · · Score: 1
    Sure, it is from the "sure-why-not" department, but come on! You might as well post a link to the Time Cube instead of someone's rants against why she or he doesn't get OOP. I would much rather see a nice review of Program Development in Java: Abstraction, Specification, and Object-Oriented Design (which I highly recommend) than the whining above.

    OO isn't something you plug into your software development system the way you put a faster processor into your computer. Instead it's a different way of approaching your problem space. From this perspective, it becomes much more like religion so why do we bother discussing it? Because we have to. If I design a system in an OO way, then those using my APIs had better learn to like them. However, arguing that ridiculous points like those in the article above isn't going to get you anywhere towards this goal in a software development organization. Liskov's book provides ample support for how object abstraction can help software. The subjects discussed in that book above show why OO is good, but do not forget that many ideas can be applied in non "00" languages. Liskov talks a lot about abstraction, which can be used in any programming language.

    Sheesh.

    Go ahead and moderate this message down. It's just a troll---the same as this entire thread.

    --
    end of line
  527. OOP is a tool, not a philosophy by Have+Blue · · Score: 1

    I have encountered many places where OOP is placed as the main priority for any programming task. Make it object-oriented and all problems become easy etc etc etc.

    OOP is a tool, like any other language feature. If the problem you are trying to solve could be easily done with a collection of interacting, self-contained objects, go for it. If not, use something else.

    For example [entering the flamebait zone], I have never seen the point of making the entire app a class. Can someone explain to me how this is better than a simple main function?

  528. The King of Argument By Authority (Addison) by Tablizer · · Score: 1


    You guys did nothing but argue by authority and vote. You presented nothing inspectable, only presented irrelavent trivia games.

    1. Re:The King of Argument By Authority (Addison) by BlackStar · · Score: 4
      I roundly disagree with the arguments presented against OOP, on the basis that the author's own references cite the advantages of it, as well as the disadvantages. The consensus on the reference *academic paper* is that it had advantages, but is not necessarily "revolutionary". Indeed, OOP codifies much of what *can* be done with good programming practice in procedural or even functional programming.

      My experience in systems design is that OOP shows benefit when you know it, and with larger *REAL* systems. Networked apps, distributed apps, and yes, even large business apps. I've been involved in an IS project written completely in C, using good, structured programming techniques. At a different company, we were building a similar application, using C but applying a more data-centric approach, close to OOP but not there yet. It was much quicker to build, and easier to enhance. If I took a crack at the domain yet again with OOP and C++/Java, I know it could be improved yet again.

      The issue though, is that if it's one guy, building a one-shot fire and forget app, don't bother. Code it however you want. If you have a significant project with multiple team members, OOP acts as a common framework and a basis for communication. It draws some borders and sets some guidelines and methods to give a common frame of reference. It's possible, but more difficult to do that with procedural code in *most* cases.

      Obviously though, the proof, as the author says, is in the pudding. Millions upon millions of development dollars is OBVIOUSLY being wasted by the industry as it moves to use OOP methodologies and tools. Not just as dictated by PHBs, but also as dictated in start-ups by lead programmers.

      Quote from a pundit who knows the industry better than most of us, Robert Cringely, from a slashdot interview no less:

      Something else that has changed a lot is how software is written. OOP has paid off more than we even know, so there are a lot of chances to make businesses out of selling cogs that fit into other people's machines. Your driver question, for example, wouldn't have even made sense a decade ago.

      Hmm. More than one company now. There's a benefit. Predefined interfaces and component technologies. Can you do that in procedural approaches, yes. Is it easier and more natural and efficient in OOP, yes.

      And finally, as I don't want to get too long, let's take another /. post, a reply from John Carmack.

      First of all, the fact that none of our deployed games used OOP does not mean that I don't think there are benefits to it. In the early days, there were portability, performance, and bloat problems with it, so we never chose to deploy with it. However, all of the tools for DOOM and Quake were developed in Obejctive-C on NEXTSTEP. Q3 also came fairly close to have a JVM instead of the QVM interpreter, but it didn't quite fit my needs. I'm still not a huge C++ fan, but anyone that will flat out deny the benefits of OOP for some specific classes of problems like UI programming and some game logic is bordering on being a luddite. I still don't think it is beneficial everywhere, but, if anything, I think we are behind the curve on making the transition.

      Hmm. Use the best fitting tool. But even a die-hard success phenomenon like John Carmack seems to think OOP is good for things link UI AND game logic. Not everywhere. No argument from me.

      Jeez, I think he essentially can be construed as having called the author of the original post a luddite.

      I tend to agree.

  529. Been there, done that... by KagakuNinja · · Score: 1

    Sure you can write OO code in C. I can tell you fron personal experience that it is a pain in the ass.

    We had inheritance. Kind of.

    We had virtual functions. Kind of.

    We had templates. Kind of.

    We had exceptions. Kind of.

    It was all proprietary (meaning that new employees would have to learn "our way" rather than just use existing knowledge of C++). It also integrated poorly with debugging tools, and contained bugs. (And I realize that templates and exceptions are not OO per se...) Switching to C++ and throwing out most of that crap was amazingly liberating...

  530. delaying gratification (hacking, not spanking) by Sebastopol · · Score: 2

    OO isn't fun for boys because it requires too much foreplay. 99% of 'em just wanna charge of to the clitoris and hack hack hack.

    The way I sees it, OO philosophy splits effort 80/20: 80% on planning, documenting, philosohpy, interface, roadmap (compatbility fwd/bckwd)etc. --20% is actually writing code.

    Granted one could argue that any good coding effort requires the above, however on projects I've work (C/x86-asm), 30% is spent deciding what to do, and 70% of the time is spent designing and coding simultaneously. Which can work, b/c procedural coding is immediately gratifying, whereas intelligent OO requires much more foreplay, er, planning.


    ---

    --
    https://www.accountkiller.com/removal-requested
  531. Re: Burden of Proof (cheese racing) by Graspee_Leemoor · · Score: 1

    >>IOW, you claim your car is faster, but you won't race it. If you won't race it, how can I compare? All I can do is concluded that you are probably full of it. This is where the situation stands right now.

    No, you dumb-fuck, it's more like YOU claim that your type of cheese is better than my type of cheese, and that my reluctance to enter a cheese race is due to the fact that I think my cheese will lose, when it's in fact the case that you can't race cheese. (i.e. you can't PROOVE that OO is SUPERIOR to procedural, it's just true that my nice fresh cheddar is better than your 20 year old piece of Brie you found behind the 'fridge...)

    Graspee

    P.S. Please, no posts on the practicalities of cheese racing- it might encourage G. Lucas to put a scene in Episode II...

  532. implementation versus protocol by Tablizer · · Score: 1
    Most RDBMS stuff i've run into is trying to flex trees into two dimentional structures...

    I have nothing against specific wrappers for tree-centric operations, but overemphazing trees is not a good idea IMO. Microsoft has started orginazing feature selections into trees, and they often drive me bats when they get above say 80 nodes.

    By "two deminsional" do you mean physical or logical?

    The real question, is which format does the data exist in natively....

    Should that matter? Is it a speed issue, conversion issue, or what do you have in mind?

    IME, the "format" is often mixed.

  533. Re:python by Graspee_Leemoor · · Score: 1

    Is a can of c++ like a can of worms?

    Heh heh, oh yeah, of course it is.

    Graspee

  534. word games by Tablizer · · Score: 1

    [quote] However, every non-trivial implementation of any successful system can be shown to be OO in design and technical every failure can be shown to have violated OO principles [end quote]

    Example?

    Many OO debaters often stretch the meanings of the the big three (poly, inher, encap) to mean whatever they want them to mean. I sometimes say that OO is the Al Gore of paradigms. "Encapsulation" is such a vague, watered-down word that it can mean just about anything you want it to. Anything that is "not at the right spot when you need it" can be blamed on "lack of encapsulation".

    Note that many of the goals of OO can be achieved in ways that are not necessarily OOP.

  535. If he had spend the time learning OO ... by angel'o'sphere · · Score: 1

    The author spend a lot of time in writing his thesis, he should have spend that time for learning OO.

    His writing is full of sentences: some claim so and others argue that way ...
    Or: even OO purists admit ...

    Well, there are so many errors in his writing that it realy scares me:

    E.g. OO is not a technologie of the past ten years, during the past ten years it came in comon use.

    OO is at least 40 years old now and in academic environments NON OO is rarely ever used during the past 10 years.

    Actual Software Sciense is allready far beyond OO, currently we are working on Subject Oriented and Aspect Oriented programming. -> www.aspectj.org, or see alphaworks.ibm.com and search for hyperJ.

    Or Active Libraries and Adaptive Programming.

    He talks about OO data bases and also about their complex API, and need for mapping or middle-tier mapping experts.

    Modern OO data bases have nearly no API, the DB is "mapped into virtual memory" (thats a simplification). There is no mapping needed from attributes/objects to fields/tables.
    (But you can define one if you think this is more efficient for your purpose)

    He covers nearly everything from frameworks via patters over internal(whitebox) and external(blackbox) reuse up to metrics.

    Nearyl every buzzword of OO is in his papers!
    Sad that he did not spent the 15 years research the pattern experts spended nor the 30 years research the framework experts spent nor the 15 years research the OO data base experts spent, not to talk about the 40 years research the relational database experts spent.

    Sorry, folks, its silly to talk about productivity in a question wether procedural or oo is more productive and to compare a 30 year XPed procedural programmer with a 5 year XPed oo programmer.

    In my opinion its also silly to talk about programming regardless what kind of programming you do and regardless what paradigm you use if you have less than 10 years experiance.

    That everybody and his dog can programm with Visual Basic does not mean that those are programmers.

    I program in C++ and JAVA and C++ gives me a lets say 2 fold boost in effectivity versus JAVA and JAVA gives me nearly a two fold effectivity versus Pascal. I KNOW for my own that OO is the better concept. (I had 10 years Pascal XP before I realy switched to C++ and have now +10 years XP in C++ and about 4 in JAVA)

    Regards,
    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  536. show me wrong by Tablizer · · Score: 1

    [quote] 1: "Biz things are too dymanic to be modeled via tree taxonomies"
    As you have been told time and time again, there is much more to OO techniques than simple implementation inheritance modelling. [end quote]

    Show us all code proof!

    Besides, you take away trees and tree-driven polymorphism, and OO starts to look an awful lot like procedural.

    Besides, some OO fans still insist on tree-based modeling.

    [quote] But then again, Java is not the sum of the OO world. Of course, you can't be bothered to learn things like Smalltalk or Python [end quote]

    But some of us don't want to move to Ohio to get jobs.

    Further, how do they improve things? Code example?

  537. What are you talking about? by Tablizer · · Score: 1
    No, you dumb-fuck, it's more like YOU claim that your type of cheese is better than my type of cheese, and that my reluctance to enter a cheese race is due to the fact that I think my cheese will lose, when it's in fact the case that you can't race cheese.

    If you are unable to prove that OO is better, that is NOT my problem. Stop making excuses.

  538. The reason why this article doesn't cut it by esap · · Score: 1

    That article is very funny. First, it presents many alleged myths of OOP. Sure, these are very well myths from 70's, I guess there have once been people with such beliefs.

    The author seems to confuse OO with some other programming techniques. What does OOP have to do with garbage collection, multimedia, OODBMS, visual programming, or even taxonomies or modelling the real world? These are all part of what programmers need to deal with, but none of them are OOP. So at minimum, blaming OOP for this is seriously misplaced.

    The article also confuses and mixes object oriented _modelling_, object oriented _analysis_ and object oriented _programming_ with implementation mechanisms used commonly in major programming languages (e.g. C++). Look at some differently designed programming languages (e.g. Haskell), and you see that none of the assumptions made in that article are valid.

    There is the concept of modelling the real world in object oriented _analysis_ (OOA), but even there, the article fails to reveal any insight on the problems people are having with modelling. In reality, no analysis method currently available does adequate job in modelling the real world. Nor are they intended to attain the impossible.

    The concepts that programmers are modelling are more complex than many people think. However, mostly all the analysis machinery is exactly the same whether one uses OO methods or any other modelling technology. All analysis methods focus on finding the relevant pieces of information, and creating a simplified model that reflects it. Different modeling techniques make different simplifications. Then the software is written to assume this idealized reality.

    The most common problem with modelling is that there are too many things that are simply *unknown*. Good software designers can identify concepts or constraints that are not well known, and reflect this uncertainty in the model by introducing flexibility. How this flexibility is provided is not important. Polymorphism (and not inheritance) is one tool provided by OO to doing this. Asking for user input for the unknown things is another (non-OO way).

    In contrast, the article attacks inheritance because it uses a hierarchy. This is just silly. I was not surprised at the references to communism.

    For *really* good information, see: Portland pattern repository, or any bibliography server (e.g. NEC Research index)

    --
    -- Esa Pulkkinen
  539. Here we see another Bryce technique by malraux · · Score: 1

    Repetition ad nauseum.

    As I said, people who are interested can go read the OO forum. I don't intend on wasting any more time on this subject than I already have over the past few years.

    Hopefully this will trigger one of Bryce's "repeat the same word or phrase over and over again in the hopes that his argument will be lent more credence by the act" episodes. Those are always entertaining.


    Regards,
    -scott

    --


    Regards,
    -scott
  540. OOP *is* really the next level by Adam+Wiggins · · Score: 3

    I fought it for many years, and finally gave in. Now I wonder how I ever got by without it.

    There are applications - small ones - for which OOP is not appropriate. Code which generates web pages, for example, is generately best written in a procedural language. The vast majority of applications, however, are easier to extend and maintain (although not necessarily write, at least until you've been doing it for quite a while) if written with OO.

    And of course, you don't need an OO language to use OO. The Linux kernel is very OO, and it's written in C.

    FWIW, the examples given in this article are terrible. Not only are they not very relevant, but they are badly written. If someone I was working with wrote OO code like that, I'd seriously question their ability as a programmer.

  541. no it doesnt stink by c0rr0ded · · Score: 1

    First of all, OOP is just a method for programming. It is not about reducing the size of the code or making programs run faster. It's main purpose is to make programming projects, particularly large ones easier to organize. The website seems to attack object oriented prgramming beacuse other people have attributed non existant quialities to it. Instead of attacking OOP, it should try and explain what OOP is really about, rather than making it seem like a really useless (or stinky) method. OOP is not bad or good it is simply another method of programming. IMHO OOP is my programming method of choice. I find it easier to organize the structure of a program, even small ones, before i program it. This is just my preference and I do use other methods depending on the task at hand. I suggest rather than picking one method over the other, understand a bunch of methods and pick one that best fits your programming task.

  542. I like OOP for one very good reason. by Kupek · · Score: 1
    It's easier for me to think about. When I think in procedural code, things get out of hand in my mind and the interconnectins betweens sections of code gets garbled. When I think in terms of objects, things are clearer in my head, and it's easier to fit the pieces together.

    People can go on and on about why one is better than the other, but if one is more natural for me to use, it's better for me. And that's what counts.

  543. Re:the key phrase is: properly implemented by HiyaPower · · Score: 2

    What you say is quite true and I could not agree more. I have seen a great many things butchered because of the mindset that is used. To make programs work properly with oop and/or databases work properly with relational methods imply thinking of things as the object with a set of qualities, attributes, & etc. first, and then only after that, deciding what they mean. Thinking is a different paradigm than coding (sorry to say) and is not easily taught.

  544. Unfortunately... by malraux · · Score: 1

    "We accidentally lost the references."


    Regards,
    -scott

    --


    Regards,
    -scott
  545. OOP is about making Turing machines visible by mstone · · Score: 1

    the original article has its points, but the author is really rejecting the culture of hype which has admittedly grown up around OOP, without really tracing it down to its theoretical roots.

    the thing that makes programming hard is that you have to try and reduce a set of ideas in the human mind to a set of operations that can be performed in a Turing-complete computational environment.

    that's not easy, because most people don't think in a computationally disciplined manner. . those who did presumably got flattened on my mastodons a few zillion years ago when they experienced the caveman equivalent to a BSOD.

    therefore one of the things languages and programming styles do is give programmers ways to keep track of the larger-order logical machinery of their code. . the better a language is at making that logical machinery manageable, the more useful it can be.

    structured programming isn't just the programmer's version of brussel's sprouts.. something you have to put up with because people say that it's good for you.. it makes finite automata and pushdown automata immediately visible in your code. . at least, it makes them visible if you know where to look.

    here's the trick: every function is a state machine, usually following the pattern:

    (acquire data) --> (verify data) --> (calculate new value from data)

    with conditionals being there to handle internal branching, like reporting an error when the verification step fails, instead of doing the calculation.

    and since each function has its own private scope for data storage, each function can act as a self-contained section of data storage.

    when you chain finite automata together, such that one passes a value to the next one, and receives a value in return, you get a pushdown automaton. . therefore, structured programming is really just the art of reducing problems to computational methods that are easily expressed as pushdown automata, and represented as code in which functions with isolated scope pass parameters and return values back and forth.

    and that's lovely, but it's not powerful enough to be useful.

    pushdown automata have their limits, and there are some problems you just need to handle with a Turing machine.. binary multiplication, for one.

    to get around the inherent limits of purely isolated function scopes and parameter/return passing, structured programming languages also support global variables, which make data accessible to any scope, regardless of its connection to the call-return chain of the pushdown automaton.

    and that makes structured programming powerful, but it opens up room for all sorts of messes. . the global values that link sections of the program together are harder to keep track of than the calling heirarchy of a structured program, so structured programming isn't quite the best tool for making the logic that holds a program together visible. . then there's the little fact that with two integer counters and a bit of determination, you can implement a fully-functional Turing machine that's all but invisible within the code. . most people don't do that per se, but if you store enough important information in global variables, it becomes difficult *not* to evolve a Turing machine to manage it. . and that Turing machine evolves in a million little corners of the program, none of which seem to have any obvious connection to each other.

    OOP makes Turing machines visible, because it gives us the concept of an isolated scope which is larger than a single function, but smaller than the entire program. . other languages have done the same thing.. C's file-scope restrictions, for example.. but OOP is the system that actually puts a name on it and makes it easy to see.

    the data structure which forms the visible instantiation of an object can be seen as the tape of a simple Turing machine. . the object's methods manipulate values on that tape, but only those methods have access to that tape. . the rest of the program only communicates with the object (Turing machine) through an i/o interface that doesn't affect the data stored on the tape.

    an object-oriented program is a network of Turing machines.

    can you fuck that up royally? sure.

    can you write well-organized code with other tools? of course.

    is one style of programming inherently better than another? hell no.

    the reason to care about OOP is that it's convenient.. that's all. . it gives us a nice framework in which to arrange important ideas, so we can get on with the real work of reducing human assumptions to computationally effective logic.

    and that's why programmers need to know.. as in 'grok in fullness'.. as many different styles of programming as they get cram in their heads. . each one gives us a convenient way to talk about some other set of important -- and *useful* -- ideas.

  546. Betcha I can match it by Tablizer · · Score: 1

    [quote] C++ is *NOT* OO! [end quote]

    I will save you guys time: This usually de-generates into a discussion about whether OO is a philosophy or language features, or degenerates into C++ fans versus Smalltalk fans.

    [quote] Finally: I recently was project lead on a large project written mostly in Python. I can attest that an object oriented paradigm saved us a ton of programming time and coding time. Encapsulating generic database table access into a 'dbaccess' class, then subclassing our various tables using that class, for example, saved us a ton of programming time. There are some of our classes that consist of nothing more than the import of 'dbaccess' and the subclassing of 'dbaccess' in a class whose only (non-dbaccess) members are the data type descriptor strings for that table. Being able to say "d=Destination(destid); tape=d.FindFirstTape() ; if t.is_recycled() ... " is not just the natural result of object oriented programming -- it also allowed my team to write a major application in an amazingly small amount of time. [end quote]

    Give me more details and I bet I can write a procedural/relational equivalent that is just as simple/small.

    If there is only one-level of inheritance, then subroutines can centralize things just as well. If there is more than one level, then I can probably show some "fragile parent" design problems.

    You are probably just comparing bad procedural with good OO.

  547. "You won't need it" by Julian+Morrison · · Score: 1
    In any programming language, in any style of coding, "don't waste your time putting in nifty shit you won't need" has always been a primary rule of sane coding. Or as Scotty put it "the more they over-think the plumbing, the easier it is to stop up the drains". Abstraction distraction is a beginner's mistake that you can make in any language. In fact one could argue that messy languages like C make this a worse problem - lack of harsh interface isolation makes it hard to add that stuff in later when you do need it, so one has to over-engineer somewhat in the beginning.

    The important ting for real world programming seems to me to be that the programmer builds what is needed, when it's needed - so the program's language and design style help with smooth and easy rearrangement of code.

    What this means in practise:
    • Modularity is good, tangle is bad. Otherwise, you can't change one thing without it cascading out into other breakages. OOP is pretty good for this.
    • Specific is good, generic is bad. Building generic stuff takes longer and makes for unreadable code - don't do it unless you need it.
    • Interfaces are good, inheritance is bad. Inheritance is basically a lazy way of gatting interface consistency, that ties it to implementation (the taxonomy you currently use). Also, polymorphism over types is good, since it is basically just "many types same interface" seen from the other side. Interfaces also allow regression testing, in order to prove that changed code works the same as the old stuff.
    • Scripting is good, compiling is bad. If you have a script, you always have the source code, edit-and-test is easier, and you can usually adapt it in place.
    • Doing one thing at a time is good, side effects are bad. Later you might want to split the behaviors up, and you'd run into code that depended on the side effects.
    • Similarly, physically grouping operation by purpose is good, grouping by operand is bad. You add features more often than you add abstractions. Smalltalk/Java style OOP is bad for this, but CLOS and Ada95 are still OOP yet built around "operations on types" not "types with operations".


    Go look up "Extreme Programming" for what is IMO the best approach to real world software building.
  548. Implementation and interface by Eric+Green · · Score: 2

    In my view, the advantage of writing things in an object-oriented manner is not that you can change the implementation without changing the interface. The advantage is that if you ever do have to add things to the interface (e.g., if you find that your nice foobar class needs a new blurbfoo attribute) it's easy to find all the functions you need to touch in order to add that new blurbfoo attribute -- because they're all there as part of that class (if you've done your job right).

    --
    Send mail here if you want to reach me.
  549. GIGO by Tablizer · · Score: 1

    [quote] Repetition ad nauseum. [end quote]

    That is because you repeat your same authoritarian garbage over and over again.

    Just prove me wrong with 3 biz examples so we can end this once and for all. Otherwise, I will keep popping up all over the net.

  550. Troll Article by AShuvalov · · Score: 1

    Yes, this article was not worth to show-up at /. Absolutely out-of date, everything was said 15 years ago. There are 2 correct points in this article: 1) OOP requires more skills, so if you don't have money for a good team, don't do it. 2) Each task requres its approach. In some cases, you have to use non-OOP languages like Prolog, Lisp, C, Perl. All other points in this article are invalid and outdated, IMHO

    --
    Andrew
  551. Then that will be immediately obvious to others. by addison · · Score: 1

    I merely (strongly) suggested they see what has come before, and what has argued before. Before they get into it with you. (Which, in my opinion, follows the same path time and time again...)

    (Searching on Deja for topmind is a good idea too, but largely redundant).

    Of course, if you're right, you wouldn't object to them reading those prior arguments, would you? :)

    I'm quite happy to let them draw their own conclusions. :-)

    Addison

  552. Choices Damaged By OO Hype by Tablizer · · Score: 1
    OO is just a handy way of structuring large systems for maintainability.

    Well then when, where, or why OO is better should be documented and researched. Also, many OO fans say "it's good for small stuff also".

    I disagree with heavy OO modeling for biz apps, large or small. Biz things are too dymanic to be modeled via tree taxonomies. If you disagree, post an example.

    By definition, only about 1/3 of all code is for "large projects". What about the other 2/3's?

    People who dismiss OO out of hand are making the same mistake as zealots who insist that it must be used for everything by rejecting a useful tool.

    I agree with balance, but am not seeing it. You have to suffer thru a lot of junk to do procedural Java, especially if you have more than one file.

    My point is that OO is oversold, NOT that is has NO place.

  553. That is a shop-specific convention, not OOP by Tablizer · · Score: 1
    Nope, I'd just add a calcTax function to the Person class I already had.

    It was only an illustrative example that actual is only marginally related to OOP. Each approach will have it's own pros and cons.

    you have overlooked the fact that an object oriented approach allows inheritance and lots of other stuff. For example, if there was more than one type of tax T on a person P,

    Well, often the differences do not fall neatly into sub-type taxonomies. Real world things don't chop up nicely into taxonomies for the most part I find (at least not lasting ones). See the Employee example.

    But having said that, I find that it is easier to work out what someone has done if they have used an object oriented approach than if they haven't. For one thing, most people implement all functions of each class in a single file named after a class, something you're never quite sure of with a parameter approach.

    A "parameter approach" is only one possible procedural/relational way to do it.

    Object orientation simplifies maintainability, by encouraging people to write in a style which may be easily understood, something many other methodologies have singularly failed to address.

    You are talking about shop-specific conventions (method per file), not paradigm differences. I agree that procedural/relational software engineering research has slowed or stopped, but that is because the OO hype sucked away attention and resources. Again, the self-fulfilling prophecy.

    (I am starting to document what I consider good procedural/relational modeling. Most of the historical stuff ignored RDBMS.)

    You are welcome to supply more examples.

  554. Failure to Understand by smack.addict · · Score: 2
    Critics of OOP fail to truly understand what it is that OOP offers. OOP does not offer quicker time to market. It offers easier maintainability, and maintenance is where most corporate money is spent. But it only offers that maintainability if the programmers in question actually follow good OO practices--in other words, they have to be disciplined.

    Most OO horror stories come from a lack of discipline. No matter what programming language you use, if you do not have a solid OO design, you have failed to do proper OO programming. It does not matter what programming language you are using.

    The result of proper OO development--and unlike the author of the article, I have seen successful OO projects--is a system that is easier for people who had nothing to do with the original to come in a evolve the system. And that is worth a lot to companies.

  555. A wise man I knwo said.... by catseye_95051 · · Score: 2

    "C++ makes good programmers better, and bad programmers obvious."