Slashdot Mirror


The Post-OOP Paradigm

Kallahar writes "American Scientist has an article up about Computing Science: The Post-OOP Paradigm. The article has a great overview of how OOP works, and then goes on to a brief outline of the possible successors to OOP such as Aspect, Pattern, and Extreme Programming. Also a pretty picture of OOP Spaghetti."

363 comments

  1. Analysis by ChaoticChaos · · Score: 2, Insightful

    How could Aspect, Pattern, and Extreme Programming replace OOP? That's ludicrous.

    Aspect programming doesn't have inheritance (that I am aware of) so it is a weaker model than OO. Although we should "...favor composition over inheritance", it doesn't mean we should do away with it! Also, where the polymorphic method behavior of Aspect?

    Pattern design's foundation rests on OO. Take away OO and Pattern can't exist.

    Extreme Programming has nothing to do with any of the above. It's not even an architecture. It lives under the misguided notion that since team-analysis works well, team-programming must work well too. ;-)

    1. Re:Analysis by orthancstone · · Score: 0

      I was wondering the same thing about Extreme Programming. Dunno what this post means...

    2. Re:Analysis by EvilTwinSkippy · · Score: 1
      Although we should "...favor composition over inheritance"

      Ah yes. Are we discussing software design or economics. Did you ever wonder if we were often trying to solve the same problems?

      I know this is going to get me modded down to no end, but It's kind of fun to take a phrase out of context for a minute.

      --
      "Learning is not compulsory... neither is survival."
      --Dr.W.Edwards Deming
    3. Re:Analysis by Anonymous Coward · · Score: 1, Funny

      It means that acadamia will pat themselves on the back with thier new fancy programming paradigm, and industry will continue to code in C.

    4. Re:Analysis by orthancstone · · Score: 0

      All that research money...can't let it go to waste :p

    5. Re:Analysis by ChaoticChaos · · Score: 1

      Too late.

    6. Re:Analysis by PD · · Score: 1, Interesting

      Patterns don't rest on OO. The meta-pattern is as follows:

      1) Describe a sticky situation
      2) Describe a way to solve that sticky situation

      That's it. OO has nothing to do with patterns.

    7. Re:Analysis by Anonymous Coward · · Score: 0

      How could Aspect, Pattern, and Extreme Programming replace OOP? That's ludicrous. Aspect programming doesn't have inheritance (that I am aware of) so it is a weaker model than OO.

      How could OO replace assembly? That's ludicrous. OO doesn't have goto and self-modifying code (that I am aware of) so it is a weaker model than assembly.

    8. Re:Analysis by Anonymous Coward · · Score: 0

      You say:

      How could Aspect, Pattern, and Extreme Programming replace OOP? That's ludicrous.

      From the article:

      Most of the post-OOP initiatives do not aim to supplant object-oriented programming; they seek to refine or improve or reinvigorate it.

      You obviously didn't read it, yet you got modded up to +5. I guess the mods didn't bother reading it either...

    9. Re: Analysis by jdgeorge · · Score: 4, Interesting

      Please read the article before you post.

      The article states:
      Most of the post-OOP initiatives do not aim to supplant object-oriented programming; they seek to refine or improve or reinvigorate it. A case in point is aspect-oriented programming, or AOP.

    10. Re:Analysis by ChaoticChaos · · Score: 1

      What you're saying is fundamentally accurate, but that doesn't change the fact that everyone of the Patterns in GoF rest on OO principles.

      In other words, while what you say is true, the clearest and best manifestation of Patterns is done through OO.

    11. Re:Analysis by FortKnox · · Score: 2, Interesting

      Beat me to the punch. I had the exact same notion. Aspect is a new idea that is going around. Patterns are basically a 'way to code' OOP (being general, here). And putting XP makes me think the author of the article or the submitter has absolutely no idea what they are talking about (site is /.'ed so I can't tell you which).

      Tablizer, however, has ideas to an alternative to OOP that are quite interesting.

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    12. Re:Analysis by Uber+Banker · · Score: 2, Insightful

      Totally agree...

      OO is a concept, not an implementation... as is XP... they are not mutually exclusive (and concepts/languages are often complimentary) so how can one replace the other? Is this supposed to be a flamebait article?

      SMALLTALK FOREVER! man, i hate C++, but still use it every day... POOP surely is a misguided notion :)

    13. Re:Analysis by cpn2000 · · Score: 1

      As I understand, Ascepts may be the only one that makes sense in this discussion. My understanding is that AOP builds on top of OO, so in some ways it could be looked upon as a successor to OO, whether or not it would make a worthy successor ... who knows really.

      --
      All you touch and all you see is all your life will ever be ... Dark side of the moon
    14. Re:Analysis by syle · · Score: 4, Interesting
      Aspect programming doesn't have inheritance (that I am aware of) so it is a weaker model than OO

      This is meaningless logic. You might as well say, "A motorcycle is worse than a car because it doesn't have four wheels." No. If it had 4 wheels, it would BE a car. A paradigm that competes with OO is not weaker just by virtue of not BEING OO.

      --

      /syle

    15. Re:Analysis by haystor · · Score: 2, Interesting

      Or another way of looking at this is that the GoF had a limited imagination and didn't describe any patterns that don't involve OO. This can actually contribute to the problem by naming some OO patterns when there are tons of ways to do things non-OO that work perfectly well.

      --
      t
    16. Re:Analysis by ChaoticChaos · · Score: 0, Troll

      Are you saying that Inheritance has no value in programming? Surely you're not setting forth that notion.

    17. Re:Analysis by PD · · Score: 0

      I have a book of recipes. It's called "100 Chinese eggroll recipes".

      If you claim that you have a recipe book of hamburgers, then you would be *technically* correct that it is a recipe book, but that doesn't change the fact that the clearest and best manifestation of recipes is done with Chinese eggrolls.

      All the patterns you refer to rest on OO principles. I could rewrite every single one of those patterns in such a way that it would be useful to COBOL programmers.

    18. Re:Analysis by ChaoticChaos · · Score: 0, Troll

      LOL!!!!!!!!!!!

      I can't argue with that. LOL!!!!!!!!

    19. Re:Analysis by Anonymous Coward · · Score: 0

      you have no concept of logic

    20. Re: Analysis by FortKnox · · Score: 1

      OK, then how does Extreme Programming refine or improve or reinvigorate OOP? Its something that can be done OOP or nonOOP, so you can't say it will reinvigorate OOP. It will reinvigorate ALL programming styles.
      Patterns have been in use for years, so no luck doing anything 'new' there.

      Aspect programming, maybe I can see being a new trend, but that's it.

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    21. Re:Analysis by ChaoticChaos · · Score: 2, Funny

      You'd have one helluva time rewriting Strategy Pattern in COBOL. I'd like to see that. I'd pay money to see that. ;-)

      How about Bridge? That's meaningless in a non-polymorphic language like COBOL.

    22. Re:Analysis by Anonymous Coward · · Score: 0

      lol? Get a grip, man! This isn't a chat-room.

    23. Re:Analysis by ipjohnson · · Score: 1

      He said no such thing I think you need to read before you post.

      He's saying that just because it is a programming language it doesn't have to have inheritance to be a vaible language. There are many good languages out there that don't have inheritance. Trust me its not the end all be all in programming languages ... give me C any day ...

    24. Re:Analysis by ChaoticChaos · · Score: 1

      Wow! You must have fun driving a Pinto each day too.

    25. Re: Analysis by Chasuk · · Score: 3, Funny

      I believe ChaoticChaos was responding to this: ... the possible successors to OOP

      This was contained in the body of the submission, which certainly would imply that the submitter hadn't read the article, either. ;-)

    26. Re:Analysis by PD · · Score: 1, Insightful

      I'm not a COBOL programmer, but I know how they think. I'll give it a shot:

      Strategy: Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

      OK. I've got a COBOL program that reads a data file, and performs some operation on the data.

      I can write the program like this:

      1) read the data file
      2) the first line of the file is the name of a program to execute
      3) the rest of the data file is consumed by the program named on the first line.
      4) invoke the program that implements the strategy, passing data to and from the program in temporary files
      5) voila. strategy is implemented. This pattern fulfils all of the initial requirements posed in the problem section of the pattern.

      I should have asked how much money you would have paid before I gave my answer. :-)

    27. Re:Analysis by bwt · · Score: 1

      If Aspect oriented programming adopts a programming model that does not include inheritance, then the implied value judgement is that on the whole, inheritance causes more problems than it solves and is best not offered as an option.

      Whether you agree with that or not is up to you, but "surely" you can't speak for everybody. (and please stop calling me Shirley).

    28. Re:Analysis by listen · · Score: 2, Informative

      Which industry?
      Most commercial code now is written in C++, followed by Java, and then sadly VB.
      To be honest, for most of the work they do they are better off. For most of that they would be even better off in a higher level language like Python (if addicted to OO-procedural), Lisp or
      Haskell.

      C is unfortunately considered backwards by a lot of code grinders. It gets most use in the embedded systems and OSS worlds....

    29. Re:Analysis by ipjohnson · · Score: 1

      Some of us can't write crap code and expect it to run well on embedded processors ...

      Do you really believe that C has no value? I mean I can understand if your affraid to alloc your own memory and keep track of it but please don't assume everyone is inept!

    30. Re:Analysis by archeopterix · · Score: 2, Interesting
      How could OO replace assembly? That's ludicrous. OO doesn't have goto and self-modifying code (that I am aware of) so it is a weaker model than assembly.
      A better analogy would be OO vs structural programming. OO didn't replace it - you still have the ifs, whiles & one entry point per procedure (ok, it's usually called method in OO).

      Similarly Aspect, Pattern and XP won't probably replace OOP but rather extend it, if any of them really catch on. Perhaps the functional approach will replace OO at some point in time, but I'd rather bet on some form of OO/functional mix. Python already is a bit like that - it has the functional tools like lambda, filter, map and reduce plus of course objects.

    31. Re:Analysis by PD · · Score: 1, Insightful

      Second challenge: Bridge

      Decouple an abstraction from its implementation so that the two can vary independently.

      OK, my situation is that I've got this COBOL program that reads a bunch of boring business crap. It has to write it's data into an Oracle database OR it has to send the data to a mainframe computer using MQ-Series.

      So, I write the program to process it's data, and write it into a temporary ISAM database. Then, depending on where the data actually needs to go, 1 of two programs will run. The first one reads the ISAM database, converts it to a flat file format and submits it to MQ-Series for mainframe processing. The second program reads the ISAM database, converts it to a relational format, then uses Oracle PRO-COBOL routines to store it in the Oracle database.

      As you can see, Bridge does not depend on polymorphism. The pattern only talks about decoupling the abstraction from the implementation, which can be done without polymorphism support. In this case, the abstraction of the consumer of the data turns out to be a COBOL ISAM database. The producer of the data does not know nor care where the data is going after that.

    32. Re:Analysis by Anonymous Coward · · Score: 0

      You're misinterrepting everything that is going on here. It's not that he's saying OOP is better for embedded processors. That's a niche market (granted a big one).

      This article is about "big concept" items, ie, paradigms. Not the job you do at your crappy little company.

    33. Re:Analysis by bwt · · Score: 1

      What's to understand? One year programming approaches that obey property P are "hot" and the next year it's property Q. Q might refine P or it might be exclusive from P altogether or it might overlap but not imply property P.

      It's all a question of which buzzwords people are concentrating on and more importantly thinking in terms of.

    34. Re:Analysis by ipjohnson · · Score: 1

      Oh and FYI C is and will continue (for a good long time) to be a faster language than C++ or java ... So I wouldn't say I drive a pinto but rather a 911 with a single CD player. C++ is more like a 944 with the kitchen sink sitting in the passenger seat waying you down.

    35. Re:Analysis by ChaoticChaos · · Score: 1

      It has nothing to do with "inept". It has everything to do with everyone dropping their axes once they saw a chainsaw in action.

    36. Re:Analysis by ipjohnson · · Score: 1

      No I'm actually not.

      The point I was going after was the paragigm of inheritence was not need for a language to be useful which is where he was going.

      Oh and my crappy little company is one of the top 3 defense contractors in the US i.e. 80,000+ employes. What crappy "little" company do you work for ...

    37. Re:Analysis by ipjohnson · · Score: 1

      But thats your oppinion of it being a chainsaw. For alot of things its not ... its just a heavier axes.

      I'll grant you that for something it is easier to approach with OO but at the same time you have a whole new set of problems to deal with.

      I've just seen way to many attempts to write object oriented code that just turned out horrible. Just like every other language out there you can write some very bad code in C++.

      OO is not the magic buillet but rather another tool to use when the time is right. The trick is finding a good coder to use the tool belt.

    38. Re:Analysis by (startx) · · Score: 1

      not true.

      I sure as hell wouldn't call this a car, and yet it has 4 wheels.

    39. Re:Analysis by Anonymous Coward · · Score: 0

      Which industry?

      All of them. thx

    40. Re:Analysis by Webmonger · · Score: 1

      That's impossible. C++ is essentially a superset of C++. Virtually every C program is also a C++ program.

      Just because it's there doesn't mean you have to use it. One way of using C++ is simply as "a better C". Bjarne says "C++ was designed to support data abstraction, object-oriented programming and generic programming using templates. It was *not* meant to force one particular programming style upon all users[emphasis his]."

    41. Re:Analysis by ipjohnson · · Score: 1

      That is very true C++ is a superset of C but we weren't talking about using C++ as if it where C. We where talking about the OO paradigm which is inherintely slower (because of ironicly enough inheritence ... as well as a few other things).

      I actually don't dislike C++ I just think that OO can and is used to much or incorrectly by ALOT of coders. I've seen things reimplemented in OO just for the sake of being buzzword complient and trust me they failed misserably.

    42. Re:Analysis by AeiwiMaster · · Score: 1

      And putting XP makes me think the author of the article or the submitter has absolutely no idea what they are talking about.

      No, not at all.
      The article is about methods to control the complexity of software development.
      OOP, AOP, patterns and XP all belongs.

      Knud

    43. Re:Analysis by Anonymous Coward · · Score: 0

      "What's to understand?"

      Is that a question, was it asked for, or is it an excuse to post opinion?

    44. Re:Analysis by Anonymous Coward · · Score: 0
      I've seen things reimplemented in OO just for the sake of being buzzword complient and trust me they failed misserably.

      So? Thats not an argument against OO, its an argument against bad programmers.

    45. Re:Analysis by the_2nd_coming · · Score: 1

      why can't you have aspect OOP?

      --



      I am the Alpha and the Omega-3
    46. Re:Analysis by ipjohnson · · Score: 1

      Its an arguement against reimplementing something for the sake of using OO. There are to many people out there that believe things are outdated or obsolete just because they aren't OO.

      But your right it isn't a reason not to use OO to solve a problem. Just a warning to any that think OO is the solution to everything. I guess it comes down to having good engineers and a good design (which can use OO but doesn't have to ;-)

      Don't let it out but I'm a huge fan of Objective C

    47. Re:Analysis by Anonymous Coward · · Score: 0

      I'm disappointed AC you through incults but you wont come back. :( Oh well

    48. Re:Analysis by Anonymous Coward · · Score: 0

      Agreed.

      I can do quite competent and very efficient OO coding in C and implement all OO's sacred features without the mindless under-the-hood overhead of C++ et. al. I also can do other things than OO as the problem requires.

      Surprisingly enough, not all problems are best solved by the programming religion of the moment. In fact, hardly any problem is well solved except the selling of tools, magazines, books, and seminars for today's momentary and largely useless fad.

    49. Re:Analysis by Anonymous+Brave+Guy · · Score: 1
      I can do quite competent and very efficient OO coding in C and implement all OO's sacred features without the mindless under-the-hood overhead of C++ et. al.

      Most drink-drivers think they're fine at the time. An impartial observer, objectively comparing their performance to a sober driver, would disagree.

      What on earth makes you think you can implement the OO features of C++ manually in C, and do so better than those writing a C++ compiler who have resources to invest in optimising the way they are implemented?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    50. Re:Analysis by ipjohnson · · Score: 1

      I think his point was with a little bit of elbow grease and some function pointer you can do everything you need without the overhead of C++. It doesn't do everything but for some people and job its the right fit. I wrote a C struct/class loader that built its behavior off of XML files. It actually worked quite well and was really fun to write. I use it for the base of a few of my side projects.

      But different strokes for different folks :)

    51. Re:Analysis by Anonymous+Brave+Guy · · Score: 1

      I realise the point he was trying to make, but unfortunately he's still wrong. C++ is designed with efficiency in mind, and in practice you will get identical or better output code using C++ features to model inheritance etc. than you would get by doing it manually in C. The guys writing the C++ compiler can do all the same tricks you can in C, and they can optimise at a lower level as well.

      The "overhead" in using C++ OO features is almost entirely mythical, and has been for years.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    52. Re:Analysis by ipjohnson · · Score: 1

      i always looked it as you can code for particular case easier than some writing a compilier. I mean general case VS specific. And the fact of the matter is C compiliers have been around alot longer than C++ copiliers (if they aren't just pre-processors for a C compilier).

      Now mind you if you try and code alot of C++ feature in you are right it will turn out slower but for simple models and uses it will be faster.

    53. Re:Analysis by Fulcrum+of+Evil · · Score: 1

      If Aspect oriented programming adopts a programming model that does not include inheritance, then the implied value judgement is that on the whole, inheritance causes more problems than it solves and is best not offered as an option.

      This is true only for the class of problems that Aspect programming is targetted at. Another value judgement is that they prefer to achieve the same ends through different means, or that they made the design model too simple.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    54. Re:Analysis by Anonymous+Brave+Guy · · Score: 1

      Could you give an example of the sort of simple usage you're imagining? I can't think of much off the top of my head where you'd use an OOP feature in C++ but it would be faster to implement an equivalent manually in C, but maybe I'm missing something...

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    55. Re:Analysis by Anonymous Coward · · Score: 0

      Because I have.

      In one case C code performed the same fuction with the same design in 1/3 the space and 3 times faster in execution. I was creating a 280 Hz frame based real time fire control system. I could not aford the 1 ms hit per cycle given to me for free by C++. That was more than 1/4 my cycle time and I had a complex control system to compute each cycle. The choice was easy.

      The only reason C++ exists is to attempt to become more Pascal like and to overcome the glaring flaws of K&R C. I write in a very small and very strict subset of ANSI that looks very Pascal like as well as OO.

    56. Re:Analysis by Anonymous Coward · · Score: 0

      The key is faster execution. If you are doing real time system development, you must minimise the invisable overhead. Especially in a high rep rate frame based system.

      C++ wastes too much time in uncontroled and unpredictable memory management functions. It saves the butts of incompetent and lazy programmers in the short run. In the long run you get the glut of bloated, slow, buggy, and crash prone code we all "love" so much.

    57. Re:Analysis by Anonymous Coward · · Score: 0

      I did read it and I nailed that sucker "overrated". I agree with you 100%.

    58. Re:Analysis by Anonymous+Brave+Guy · · Score: 1
      The key is faster execution. [...] C++ wastes too much time in uncontroled and unpredictable memory management functions.

      Sorry, but now I'm lost. What part of C++ memory management do you think is not completely deterministic, and at what point do you think C++ needs to generate less efficient output code than C to do the same thing? Sure, C compilers still sometimes optimise better than C++ ones, and some C++ libraries do silly things like adding overhead and then just calling the equivalent underlying C function from the same library, but these are quality of implementation issues, not flaws with the C++ language.

      I'm familiar with RT systems and their particular requirements, by the way. Presumably you're not doing a whole lot of dynamic memory allocation, which makes your comments about unpredictable memory management functions even more puzzling. What platform(s) are you developing for, and with what compilers?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    59. Re: Analysis by Anonymous Coward · · Score: 0

      >so you can't say it will reinvigorate OOP. It will reinvigorate ALL programming styles.

      Of course you can say that. It's basic logic.

      If XP reinvigorates ALL programming styles, and OOP is a programming style, then the statement that "XP reinvigorates OOP" is certainly true.

      Don't just type...think too!

    60. Re: Analysis by eversunsoft · · Score: 1
      Exactly. I certainly don't consider extreme programming a competitor of OOP. Nor is it a competitor of the use of patterns during development.

      The author was able to show that the development of knowledge and technology happens incrementally. At each stage on the road, there were problems that made current technologies less than optimal

      For instance, in the 50's people were disgruntled that it took 10 steps to solve an exponential function. This led to Fortran... which had problems of it's own... which were solved in part by OOP.

      It's not clear where we are going yet, but it's interesting that the author points to generative programming and XP, two wildly different concepts, as potential roads.

    61. Re:Analysis by sergio.garcia · · Score: 1

      Yes, you can do OO coding in C, and you end up with thousands of void pointers, and no type checking. Nice code!

      --
      "Agree with them now, it will save so much time."
    62. Re:Analysis by arkanes · · Score: 1
      Almost every non-trivial program design can be better implemented in OO - because of the ability to encapsulate things into modules.

      Constructors & destructors are the biggest advantages you get from OO, and they help everything, including embedded processors. C++ code doesn't HAVE to be bloated.

      It's true that creating lots of objects when you don't need to is wastefull, and that if you're needing to write really tight C++ code it's going to look alot like C code. It has nothing to do with being afraid to manage your own memory (sounds like a C programmer who's never really made an attempt at the switch to me) and everything to do with cleaner interfaces.

      It's no easier to write "bad" code in C++ than in C. It is, depending on your libraries, often easier to write less efficent code, because you tend to do things like create extraneous objects on the stack. That's a matter of awareness and coding discipline - just like it's easier in C to write buffer overflows.

    63. Re:Analysis by arkanes · · Score: 1
      Re-iterating my previous post - you're actually incorrect. OO is NOT inherently slower than non-OO, although in practice it often is. Inheritence has no run-time performance effect, unless it's virtual.

      If your project is easily broken into modules, then it can probably gain from OO. Don't think that it'll magically make your code run better - think about it in terms of ease of management and training new engineers.

      If your project is (while perhaps very large) a simple design, then what you gain might not be worth the effort and the re-training.

      OO is a formalization of concepts that you probably already use. It's not just a buzzword. It's adding language level support for concepts that make it easier to engineer software - like modularity and code reuse.

    64. Re:Analysis by arkanes · · Score: 1

      He's talking about wasted overhead of creating temporary objects on the stack, and this is actually a valid complaint. You don't need the overhead of object creation when you're making an integer. In many cases, you don't need it for a string, either, but you make it a std::string (or CString, or whatver) anyway, just for the sake of consistency and convenience. Being aware of it and enforcing discipline suffices to get rid of the problem, the same way you avoid buffer overflows in C.

    65. Re:Analysis by Anonymous Coward · · Score: 0

      I have developed my own memory manager with audit capability (about a two hour effort) and control when and if I use allocated memory. Its simply not possible in any obvious way over all C++ compilers as it is with ANSI compliant C compilers.

      The uncontrolled allocation of objects on the stack is a significant issue as well. With a C compiler, space is allocated on the stack for all automatic variables. The compiler sets up the addressing at compile time. C++ builds all the data objects from scratch each time you use a procedure one nested item at a time.

      I have had my code working using GNU ANSI C on SUN solaris, SG IRIX, and X86 VX-Works. Then there is MS Visual C++ (ANSI C Mode 1.0 to 7.0) variously on MS Dos, Windows 3.1, 95, 98, (I skipped ME), NT (all flavors), 2000, and XP.

      The second issue is that almost everything in C++ is a nested object. When you use any object, there is hidden object creation/distruction overhead that is TOTALLY unnecessary even for strict OO software.

      There is nothing that I have needed to do that I can't do better, faster, and cheaper in ANSI C resulting in smaller, faster, and more portable code.

    66. Re:Analysis by Webmonger · · Score: 1

      There's a case that can be made for converting something into OO, but it doesn't sound like the reasons or the approach you've seen were very good.

      OO does promote code reuse and modularity, but the right way to make something OO is gradual change, not a rewrite.

    67. Re:Analysis by Anonymous Coward · · Score: 0
      Oh and my crappy little company is one of the top 3 defense contractors in the US i.e. 80,000+ employes.
      So you're saying you work for a crappy "big" company? Thanks for clearing that up for us.

    68. Re:Analysis by csguy314 · · Score: 1

      No. If it had 4 wheels, it would BE a car.

      You obviously haven't seen the 4-wheeled Tomahawk.

      --
      This is left as an exercise for the reader.
    69. Re:Analysis by nicodaemos · · Score: 1

      If all you're doing is destroying a tree, then axes, chainsaws and even dynamite may be applicable. However, if you're trying to build something, say carve a totem pole, then you would selectively use both axes and chainsaws to accomplish this. Use axes when you need precision, chainsaws when you want brute force.

    70. Re:Analysis by ipjohnson · · Score: 1

      I think you missunderstand sarcasm .... its ok you didn't really get the rest of the thread either.

    71. Re:Analysis by ipjohnson · · Score: 1

      Ahhh but to some managers and customers OO is a buzzword. If your whole system is written in C and works correctly you don't go ripping out parts that work just fine and replacing them with C++ just for the sake of having OO components. As for training new engineers it all about having good design and documentation and you can do that with C++ or C.

    72. Re:Analysis by Anonymous+Brave+Guy · · Score: 1
      He's talking about wasted overhead of creating temporary objects on the stack, and this is actually a valid complaint. You don't need the overhead of object creation when you're making an integer.

      And creating an integer temporary typically entails zero overhead. WTP?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    73. Re:Analysis by Anonymous+Brave+Guy · · Score: 1

      I question whether you have actually tested any of this theory.

      I work on computationally intensive software that gets built on more than a dozen platforms, including pretty much everything you mentioned. Having examined the assembly output for several of these on numerous occasions, I can promise you that most reasonably modern C++ compilers will optimise away those temporaries, allocate stack space en masse at function entry just as C usually does, inline or completely remove construction/destruction code that serves no useful purpose, and otherwise get rid of the various types of unnecessary overhead you seem to think are inescapable. You seem to write as if C++ optimisers still worked the way they did a decade ago.

      If you prefer C to C++ for its simplicity and elegance, by all means say so. It's a perfectly reasonable position to take. But let's not start making claims about C++ that are demonstrably untrue, OK?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    74. Re:Analysis by chthon · · Score: 1

      Excuse me for probably being pedantic, but you do not need OO to encapsulate things in modules.

      Putting public and private functions in separate C files is also a way of modularising a program. Granted, there is a problem with namespaces, but I have taken this approach in the past. To separate namespaces, I just added a prefix_ thingy before public functions in the file.

    75. Re:Analysis by alexo · · Score: 1

      Then you had either a poor C++ compiler or some poor C++ code.

      I participated in a conversion of an embedded product to C++.

      First, we just compiled the C code as C++ (using the same compiler). The C++ option added a constant (I think it was ~2KB) size overhead and zero runtime overhead during the normal execution (there were several milliseconds added during startup and shutdown).

      When we rewrote the program to take advantage of C++ features it ended up slightly smaller and measurably faster as well as more maintainable.

      The philosophy of C++ is "you don't pay for features that you don't use". If it didn't work in your case, it was a quality of implementation issue.

      Of course, it helps to know the cost of C++ features so you can make an informed decision whether using them is feasible.

      Inheritance: no cost.
      Virtual function call: one level of indirection, same as using a pointer to function in C and usually less than a series of if/else statements or a switch.
      Passing objects by value: same as passing structures by value in C.
      Etc...

      Two things give C++ a bad name:
      1. Exposure to substandard C++ compilers.
      2. C programmers that think that they are good C++ programmers.

    76. Re:Analysis by Anonymous Coward · · Score: 0

      So PD, please describe how you would approach the problem of solving the "Intellegent Children" pattern in COBOL :)?

      I agree with CC on everything but the patterns comment, where PD does make a strong argument. The POINT is (without getting too off track here ), that the original article is retarded if they are suggesting XP as a successor to OOP.

    77. Re:Analysis by arkanes · · Score: 1

      Of course you CAN do all these things in other ways, with other languages. But when a feature (like variable scope) is made part of the language, rather than something you hack on with coding conventions, then you've got less chance for mistakes, and mistakes that are made are easier to catch.

  2. OOP is frequently the wrong answer by joe+cow · · Score: 5, Insightful
    I don't think OOP is dead. Certainly these languages don't have the foundation necessary to overtake OOP's good features: inheritance, (and thus code reuse) and methods.

    However most OOP programmers try to over-OO everything. This is a problem from day one - their instructors show them how to make an object and how cool it is to have the object do something on its own. Thereafter, the students objectize everything. This leads to situations where you've got horribly bloated code that runs slow as hell.

    It's this kind of instruction that leads to programmers writing whole object-oriented interfaces to things that can be very easily manipulated without all the overhead. For example I had a consultant working (briefly) with me who wrote several thousand lines of code that would edit colon delimited files (like /etc/passwd, for example) when a simple strtok in C or split() in perl would have done the trick in a few lines, without all that code to debug.

    People need to always take a step back and see if the language contstructs they plan to use are appropriate for the task at hand. More often than not, they'll find that they higher level languages are too much. Don't write a C program when you can write it in shell. Don't write daemonizing code in your app if it can run from /etc/inittab. Don't write a scheduler when you can do it in cron. And never write OO when procedural programming can do the same trick in less space.

    1. Re:OOP is frequently the wrong answer by chrisseaton · · Score: 1

      Sometimes I see things where all classes inherit from an "object" class, which inherits from a "structure" class, which inherits from a "somebytes" class et cetera ad inifitum

    2. Re:OOP is frequently the wrong answer by yuri · · Score: 5, Insightful

      That's not OO programming, thats a useless programmer, who wastes more time and creates more bugs than a perl programmer just made redundant.

      A good OO design would of encapsulated the functionality in a small class. not thousands of lines, just a few more.

    3. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0

      I couldn't agree more. Object Oriented Programming is now taught as programming to first year Computer Science students. If you automatically associate programming with OOP, it is difficult to think outside of the OOP box even when it would save time/effort/be more effective/efficient.

      YMMV, but from what I've seen this is universal.

      IMHO this is very short-sighted - students should be taught to program first (and I don't even care whether you use C, or Lisp - the language shouldn't matter as long as it doesn't force OOP concepts on them). Then, OOP should be taught, allowing students to see how it really can be useful in some contexts.

    4. Re:OOP is frequently the wrong answer by miyako · · Score: 3, Insightful
      I couldn't agree more, as someone who is currently attending a university, and has several years of programming experience, I have seen this several times.
      I'm not sure if the problem stems from instructors reluctance to admit that there is "too much of a good thing", or if it stems from students having never been introduced to anything else.
      One big problem I have seen in my own classes is that you have a class full of students, and maybe 1 or 2 of them have any programming experience at all. They go in and are instructed on basic logic and then given a class on Java and the wonder of OOP and they never learn anything else.
      We then have (and this problem is not isolated to just the tech industry) a sea of mindless drones being pushed out into the real world and solving all the problems exactly the way they were instructed to without an ounce of actual though or insite.
      You combine that with these new paradigms that basically become buzzwords and you have a bunch of people with no real idea what they are doing getting caught up in the "next big thing" without any idea of when to use what.

      you know you have a problem when someone in your 300 level programming class asks "what's slashdot?"

      --
      Famous Last Words: "hmm...wikipedia says it's edible"
    5. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0
      Wow. I too have seen exactly that example (heavy OO code just to split on a ":").

      I have also seen a complicated language interpreter which consisted of "nodes" which moved themselves into various states in a fashion that I now have hard to remember. Basically it could have been done with a simple state machine and a table.

      I have also seen a multi-thousand line piece of OO code that used threads and monitors that took four weeks to write that incorrectly implemented some procedural code that I wrote in one hour.

      It's the classic story of people who know how to write FORTRAN in any language. Now, I like OO programming too, but there are times when procedural makes more sense, and others where pure functional make even more sense.

    6. Re:OOP is frequently the wrong answer by Billly+Gates · · Score: 2, Insightful
      Unfortunatly company standards get in the way of writing things in langauges like Perl.

      I use to work for a company were only c++ and java could be used. This includes unix scripting. Its the standard and managment actually thought having programmers like yours writting thousands of lines of code was saving them due to support costs. Incredible. I wonder if standards obbsessions are hurting IT more then helping it.

    7. Re:OOP is frequently the wrong answer by pyrrho · · Score: 1

      them are the evil programmers trying to make OOP look bad.

      a major abuse of OOP comes from the common confusion that objects are abstracting real things or acting as metaphors.

      The more general case is that an Object ought to be abstracting a logical construct, to be a logical machine mapping to analytic concepts.

      Not all programs are simulations where encapsulation should match something "real".

      --

      -pyrrho

    8. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0

      "horribly bloated code that runs slow as hell."

      Hmmm, doesn't sound like much code sharing is going on!

    9. Re:OOP is frequently the wrong answer by MeauxToo · · Score: 1

      Let me default this comment by saying that I am big OO proponent.

      The experience referenced in this message has nothing to do with the fact that an OO program was used, it had to do with NIH (Not Invented Here) syndrome. NIH predates OO, and exists in all programming paradigms. The failure of this consultant was in his understanding of OO, but in basic software engineering principles such as using libraries.

      There are plenty of well-documented instances of oevrly complex/decomposed object models, but the exampled cited here does not qualify.

      Finally, I contend, as troll fodder, that a well-written/designed OO implementation is just as compact and efficent as its procedural equivalent. It all about the paradigms that makes the most sense to the designer and programmers, and to imply the OO is not a good, general approach to solving both samll and large problems sound take a peek at Python.

    10. Re:OOP is frequently the wrong answer by doktor-hladnjak · · Score: 1
      I couldn't agree more, as someone who is currently attending a university, and has several years of programming experience, I have seen this several times.

      I'm not sure if the problem stems from instructors reluctance to admit that there is "too much of a good thing", or if it stems from students having never been introduced to anything else.

      Personally, I'm convinced this is really an effect of people not having experience. That's why they want to take classes. There is of course at the heart of this the issue that computer science professors are usually not particularly interested in teaching programming for programming's (or even industrial application's) sake. In the more prestigious (aka theoretical and mathematically oriented) programs, programming is necessary to explain, apply, and understand more advanced concepts.

      I do agree with you with respect to exposure to different paradigms. Actually, I didn't end up writing that much OO code in my undergraduate days. I had courses that required Java, C/C++, Lisp, Scheme, TCL, and some assembly. Any decent program should require exposure to the sorts of differences present in that list.

      One big problem I have seen in my own classes is that you have a class full of students, and maybe 1 or 2 of them have any programming experience at all. They go in and are instructed on basic logic and then given a class on Java and the wonder of OOP and they never learn anything else.

      Sometimes I wonder if this is an effect of the boom. Speaking as somebody who entered university (in the bay area of all places) on the upswing of the boom and graduated after the fall, it was amazing how many people I met who were studying computer science because a) they wanted to make a lot of money or b) they're parents wanted them to make a lot of money.

      I even TA'd a data structures course one summer, where anybody including high school students, community members, etc. could pay some $$$ and attend. I can't even remember how many people told me they were so excited to learn Java. This was back in 2000 when certain skills (especially Java) were in hot demand. A number of people had dropped the course after just a couple of weeks. I think a lot of them realized we were only going to cover enough of Java to introduce basic data structures and allow them to do some larger projects, not write applets. Still there were others, who seemed very upset that we weren't doing "real programming" like they had done in their x years of real-world industrtial experience.

      Naturally, there were also students that summer, who knew nothing (or maybe just a little) about programming beforehand and who really enjoyed learning about more theoretical aspects covered (simple things like big O notation) or trying to understand elegant solutions to problems.

      We then have (and this problem is not isolated to just the tech industry) a sea of mindless drones being pushed out into the real world and solving all the problems exactly the way they were instructed to without an ounce of actual though or insite.

      you know you have a problem when someone in your 300 level programming class asks "what's slashdot?"

      Hmm... not sure about this one. At least not being sucked into the time vortex that is slashdot, they're more likely to get their work done on time. (:

    11. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0

      > It all about the paradigms that makes the most sense to the designer and programmers, and to imply the OO is not a good, general approach to solving both samll and large problems sound take a peek at Python [python.org].

      aside from the fact that your sentence makes no sense, isn't python itself written in C? seems like object oriented isn't always the right answer...

    12. Re:OOP is frequently the wrong answer by wickedhobo · · Score: 2, Funny

      You insensitive clod. Stop treating me like an object!

      --

      --Stupidity is Self Curing!
    13. Re:OOP is frequently the wrong answer by CableModemSniper · · Score: 1
      you know you have a problem when someone in your 300 level programming class asks "what's slashdot?"

      I'm sorry but I don't agree that thats necessarily a problem. I know plenty of successful programmers who have no idea what slashdot is. I realize you were using this statement to drive home a point, I jsut don't think its a very effective way of doing so.

      --
      Why not fork?
    14. Re:OOP is frequently the wrong answer by enjo13 · · Score: 3, Interesting

      Wrong wrong wrong.

      What you are identifying is misuse of an OO language, not an inherent shortcoming in an OO system.

      Your StrTok is an interesting example. StrTok is not part of any language (true, it's part of the C Standard Library but not an inherent part of the language itself). Thus, if you had to write the tokenizer yourself I would expect basically similiar amounts of C code when compared with the C++ equivalent. The properly modelled OO system would have slightly more code to deal with the class related 'stuff', but in the end they are basically equivalent.

      Your initial example of 'students (who) objectize everything' is also flawed. Part of the trick to OO programming is that you must place more emphasis on arriving at proper abstractions. In general a properly abstracted system will require quite a bit less work than the equivalent procedural one. The resulting program MIGHT be slower, but that's more of a language reality than paradigm shortcoming. Properly designed and abstracted OO systems are easy to maintain and much more accomodating of change when compared with similiarly designed procedural systems.

      I completely agree that we should always strive to use the tool that gives us the best results. One inherent problem is that we have to answer 2 questions, however. Is this the right tool for NOW... AND is this the right tool to help me design the system that I may need in the future.

      Some times the answer is obvious. I'll generally write a shell script of some kind to deal with daily admin types of tasks (IE: Sed to split delimited files for other procesing), but most of my product development tasks require me to look to future flexibility. I find that higher level languages, and OO languages in particular, allow me to design proper systems that can handle the addition of new features and new concepts much better than lower level counter-parts.

      NOTE: This is not a discussion of the relative merits of C++ vs. C. Before people start blasting into this saying 'I can design any system in C that you can in C++..' and I would agree. It's certainly more cumbersome, but at some point expressive languages (like C) are able to be utilized using new paradigms (like OO). In other words, C CAN be a OO language if you use it like one.

      --
      Turn s60 photos into awesome videos with mScrapbook for all S60 3rd edition phones!
    15. Re:OOP is frequently the wrong answer by Pseudonym · · Score: 1

      As others have noted, you're talking about inexperienced programmers here, or programmers with no taste, not "most OOP programmers". The one exception I can think of is Java programmers, but they're in a different class (pun unintended) because the object is the only abstraction that Java really gives you.

      One of the strengths of OOP, and one of the reasons why it really caught on, is that it came with a design methodology which was able to handle a bigger class of problems than previous approaches. This is, IMO, one reason why a lot of old or novice OO code tends to be over-objectised.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    16. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0

      In my Java class, 40 people started out, 6 actually finished the class to get a grade. Out of those 6, 4 of them didn't know what they hell they were doing half the time and needed myself and the other to help them.

      It seemed like most of the people signed up for the Java class because they took HTML and thought that was cool. The HTML class gets into JavaScript a little towards the end, and all the HTML people got interested into learning how to do some 'cool' effects with thier pages. They signed up for Java, totally mistaking it for JavaScript. Boy, they all had a hard wake up from dreamland. It was nothing like the HTML class. It made me laugh as I watched the people struggle and drop out like flys passing through a bug fogger.

    17. Re:OOP is frequently the wrong answer by hondo77 · · Score: 1

      Thereafter, the students objectize everything. This leads to situations where you've got horribly bloated code that runs slow as hell.

      Or, as I like to say, I shouldn't have to instantiate the world to tell it "Hello". ;-)

      --
      I live ze unknown. I love ze unknown. I am ze unknown.
    18. Re:OOP is frequently the wrong answer by MeauxToo · · Score: 1

      Actually, the bulk of Python is written in Python. The language is extensible through C (as well as Java and C++), and portion of the core interpriter is C, but alas you miss the point of my comment. OO languages have proven themselves in the large (i.e. Enterprise) system space as a good/great solution. Python demonstrates thtat OO can be very efficent in the small and mid-size spaces as well. Does it really matter what language the Python interpriter is built upon? No. Finally, I didn't say the OO could solve all problems. No language or approach can (otherwise, we wouldn't have so many), but many discount OO approaches as viable only large, complex systems, which is a fallacy. P.S. -- Sorry for leaving out a word. I meant to say, "It is all about the paradigms that make the most sense to the designers and programmers. To imply the OO is not a good, general approach to solving both small and large problems sound take a peek at Python [python.org]." P.P.S -- Bear in mind that BeOS was written entirely in C++ using a very nice OO design. So, yes, OO can be used in the systems programming space.

    19. Re:OOP is frequently the wrong answer by Arandir · · Score: 2, Interesting

      Don't lay this sin solely at OOP's door. We learned it from Structured Programmers, and are smugly pleased that Generic Programmers are knee deep in this iniquity as well.

      Any formalized process can be taken to an extreme. And you yourself are arguing for a formalized process as well: "And never write OO when procedural programming can do the same trick in less space." Sometimes it might actually make sense to write it in OO, because other things may be more important than less space! Programming isn't a field of morality where you must choose a particular code of ethics to abide by no matter what.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    20. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0
      What you are identifying is misuse of an OO language, not an inherent shortcoming in an OO system.

      I had an interview once where the lead architect asked me "say you have a string and you need to break it up. How would you do it?"

      My response was use the built in tokenize class. In this case it was java, so I said StringTokenizer. His next questions was "why is that?" My response was "unless there's a great reason, like the text is complex and doesn't have a regular delimiter, it's a waste of time. if you need pattern matching use regular expression."

      The interviewer was happy with the response and continued with his next question. At the end of the interview he told I had the best interview out of 20. I was surprised and thought there would have been plenty of guys with more experience. I know I can be better and don't consider myself an expert. He then told me one of the interviews, the interviewee proceeded to describe how he would write a tokenize library. This was after the interviewer restated his question and said, "say the file is comma delimited."

      Crappy people are in every field. Let's face it, there are idiots every where and everyone at some point acts like an idiot. Hell I've done and I'll probably make several idiotic mistakes in the next 50 years of my life. Hopefully i won't repeat the same ones too many times.

    21. Re:OOP is frequently the wrong answer by renehollan · · Score: 2, Interesting
      Sometimes I see things where all classes inherit from an "object" class, which inherits from a "structure" class, which inherits from a "somebytes" class et cetera ad inifitum

      That's not necessarily a bad thing: it may be indicative of an attempt to generate automatic serializers/deserialiers for objects by providing sufficient compile-time type meta-information.

      Unfortunately, the resulting code gets littered with the helper classes and remnants of the hierarchy you describe. A traditional (or non-traditional) IDL representation with a pre-processing step that generates class declarations and marshelling code (or tables) tends to be a bit cleaner, though then you run into the issue of having to program in "yet another language".

      --
      You could've hired me.
    22. Re:OOP is frequently the wrong answer by esanbock · · Score: 1

      Using streams I could solve your problem with even less lines than strtok. And unlike strtok, it would be a thread-safe solution. You're problem is the programmer, not the language.

    23. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0

      I agree with your restatement and that is exactly how I feel. I actually like C++ for some things, but hate how far it is taken for the smallest of problems. I hate the sentitment of a previous poster, that even if a problem can be solved in two lines of procedural C, it is still better to think through a full OO model and do it that way for 'architectural' reasons.

    24. Re:OOP is frequently the wrong answer by Bodrius · · Score: 2, Insightful

      I don't think OOP is dead. Certainly these languages don't have the foundation necessary to overtake OOP's good features: inheritance, (and thus code reuse) and methods.

      I'm confused... Languages?

      The article discusses paradigms, approaches to programming. And then makes sure to clarify that modern "paradigm shifts", unlike the drastic jump to structured programming, are complementary to OOP rather than replacements.

      Besides that, I don't think inheritance and code re-use are the "good features" of OOP.

      Sure, they're great, but I think they're overrated when taken as the main goal of OOP, and lead to the typical problems people complain about: confusing, multiple-layer hierarchies with ridiculous levels of abstraction in an attempt to reuse, or make reusable, the most lines of code.

      IMNSHO, the main "good feature" of OOP is that it can make a program semantically clear: use the language of the problem to code the solution. This makes extension, and code re-use easier, but first of all leads to a cleaner program that is more likely to solve the problem.

      However most OOP programmers try to over-OO everything.

      That is true, and there's also a similar sin: over-design everything. In OOP sometimes it's not easy to differentiate, but there IS a difference.

      The problem is that it's not easy to see where you're over-doing it, and it's very easy, and common, to regret not going far enough a few days later.

      XP has a refreshing, if a bit anal (in theory), approach to this.

      For example I had a consultant working (briefly) with me who wrote several thousand lines of code that would edit colon delimited files (like /etc/passwd, for example) when a simple strtok in C or split() in perl would have done the trick in a few lines, without all that code to debug.

      Well, that description may be fair or unfair to the consultant depending on the project.

      A custom tokenizer that is more flexible and powerful than the ones provided by the language (and yet is not a regex engine with all the overhead it implies) seems to be a common need.

      On the other hand, it's not like there's plenty of libraries and available components if you really needed something like that.

      And 99.99% of the time you don't (which is why languages include simple, more efficient tokenizers).

      It's this kind of instruction that leads to programmers writing whole object-oriented interfaces to things that can be very easily manipulated without all the overhead.

      No. What makes programmers write OO APIs to non-OO low-level procedures that can be used without the overhead, is that they know you'll need to use them from within some other, probably OO-ed, project soon and reimplementing them is silly.

      At least that's the good reason to write OO APIs to your utility libraries.

      More often than not, they'll find that they higher level languages are too much.

      Funny, I would think higher-level languages tend to be "much less" due to abstraction, and therefore it's rare for them to become "too much".

      Often it becomes "too much" because you're reinventing the wheel: the string tokenizer example. If the project was not to actually build a string tokenizer, and one is building a string tokenizer as a sub-project to meet the actual goal, it's a good idea to check whether you really don't have one laying around somewhere.

      Other times it becomes too much because, as you mention, you're OO-ing or designing too much, and end up with an algorithm that is too general (and requires general tools).

      How this relates to the "high level language" per se, I don't know. I would think you could be equally stupid and try to reinvent the wheel with assembler. But you do have a point that OO programmers seem more vulnerable to this.

      --
      Freedom is the freedom to say 2+2=4, everything else follows...
    25. Re:OOP is frequently the wrong answer by krumms · · Score: 1

      Thereafter, the students objectize everything. This leads to situations where you've got horribly bloated code that runs slow as hell.



      I think you mean "horribly bloated Java code that runs slow as hell" *grins evilly*

    26. Re:OOP is frequently the wrong answer by Tablizer · · Score: 0, Flamebait

      Your initial example of 'students (who) objectize everything' is also flawed. Part of the trick to OO programming is that you must place more emphasis on arriving at proper abstractions. In general a properly abstracted system will require quite a bit less work than the equivalent procedural one.

      I find that abstraction is relative. The proper taxonomy or interface for one need is often not the proper one for another need. Different users want to handle the same info in different ways.

      Besides, how does one measure "properly abstracted"?

      OO thinkers have focused so heavily on hiding implementation and implementation changes that they have lost sight of factoring, simplifying, and managing the changes in *interfaces* also. IOW, they fail to apply the same design rules to interfaces that they do to implementation.

      For example, duplicate implementation is (properly) frowned upon, but duplicate interface elements and patterns are rampant in OO interfaces and API's and no OO fan seems to give a flying shit about such bloat and repetition. They are blinded by too narrow OO dogma IMO. They are so focused on fixing X because the dogma says X is super bad, that they ignore problems in Y.

    27. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0

      I have also seen a multi-thousand line piece of OO code that used threads and monitors that took four weeks to write that incorrectly implemented some procedural code that I wrote in one hour.

      OO is one of the greatest potential job-security tools ever. It gives you new ways to make bloat and bullshit code that procedural consultants can only drewl over.

      I am not saying that all OOP is necessarily bad, but simply that that it has dogma and methodologies that *can* be twisted to high hell *if* one wants to go that route. IOW, OO offers more creative ways to create tangled shit that only the author can figure out.

      Well, I guess I have to include Perl in this category also. OO + Perl in the hand of an evil consultant is really dangerous.

    28. Re:OOP is frequently the wrong answer by Anonymous+Brave+Guy · · Score: 1
      OO thinkers have focused so heavily on hiding implementation and implementation changes that they have lost sight of factoring, simplifying, and managing the changes in *interfaces* also.

      I don't believe it... I actually agree with Tablizer. :o)

      Many OO languages, including pretty much all of the major ones, suffer from tedious and repetitive syntax to define the various interfaces in use. For example, if I've got a method in a base class and I want to override it in a derived class, there is typically some significant redundancy.

      I think having a separate definition of the interface to a class is useful as a tool for design, as documentation, and as a means of preventing silly errors. It has much the same practical benefits as using a strong typing system. But there is definitely too much pointless repetition in many OO languages.

      It would be good for the industry if the development tools we use routinely all supported basic refactoring, browsing of the object model, etc. Even the best tools do a pretty mediocre job of this at present, resulting in countless hours of developer time wasted doing routine things like moving methods up or down a class hierarchy, or splitting a class.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    29. Re:OOP is frequently the wrong answer by arkanes · · Score: 1
      I have no idea what the heck you're talking about. The seperation of header files and source files? It's true that C++ lacks interfaces, but an interface is basically the same as inheriting from an abstract base class. The whole point of an interface rather than ingeriting is that you're taking the API without the implementation, so of course there's duplication - you wouldn't be using an interface if you didn't want it.

      I don't know about you, but I have tools that can do things like generate header files from source files and vice versa (skeletons only, of course) and browse the object model.

    30. Re:OOP is frequently the wrong answer by pmz · · Score: 0

      In other words, C CAN be a OO language if you use it like one.

      Yes, but when programmers try to build the semantics of an OO language into C using function pointers in structures, for example, things get so ugly so fast that the program becomes unmaintainable (willfully or practically).

      I know this from working with code written by a C-programmer who was bitten by the OO bug. It became pretty clear that it is wisest to stick to C's strengths: structures and functions. As long as the data modeler for a C program understands the language's limitations, then the resulting program will be very successful. It's just that pushing C too far will put that success at risk.

    31. Re:OOP is frequently the wrong answer by Anonymous Coward · · Score: 0

      Why is the above message marked "flamebait"? It is an opinion like any others. It did not call any particular person names that I can see. Hitler was not mentioned.

    32. Re:OOP is frequently the wrong answer by miyako · · Score: 1

      actually, I was just trying to make a joke to offset the rather bitchy tone of the rest of my statment.

      Perhaps a good way to restate that to make a point would be

      You know you have a problem when someone in a 300 level programming class does not know what a compiler is, or an interpreter, or still get (,[ and { confused.

      --
      Famous Last Words: "hmm...wikipedia says it's edible"
    33. Re:OOP is frequently the wrong answer by H*(BZ_2)-Module · · Score: 1

      strtok is not very useful since it insists on modifying the string you are working with, which, at least in my experience, is just about never the behavior one would like. That said, it is certainly straight forward to tokenize a string in C using the other functions.

    34. Re:OOP is frequently the wrong answer by Anonymous+Brave+Guy · · Score: 1
      I have no idea what the heck you're talking about. The seperation of header files and source files?

      That's a part of it, yes. You have various common situations, just looking at classes as an example.

      Every time you have a method in a class, you have to specify it in full in the interface, and then again in the implementation. Except that the names of the parameters can be omitted in the interface (although header files can make good documentation, so they're often reproduced anyway) and default parameters must be specified in the interface (though they, or at least a note of their existence, are commonly added as comments in the implementation as well). There is no need to have two independent copies of all of this information; it's perfectly possible to have a development environment where you spec the interface, and then the code behind each function, without the duplication.

      Similarly, every time you override a base class method, you must specify the whole thing again in the derived class interface, and yet again in the derived class implementation. Again, there's no reason you couldn't have a development environment which worked everything off the single base class interface specification, plus the knowledge that both base and derived class provide an implementation. Don't even mention hiding base class members in a derived class, using declarations to bring them back into scope, and other such irritations.

      Another common one is static data members, which in C++ must be declared (and under some circumstances can even be initialised) in the class declaration, but must then be defined in a single translation unit as well.

      All of these things are just needless redundancy in the source code, created by the structure of C++, adding no value yet multiplying up the time taken to code things, and worse, multiplying up the time taken to change your mind later. With a system where interfaces are well managed and everything else depends cleanly upon them, it is easy to make changes. With a system where your interface spec is needlessly repeated every time someone implements part of it, or some other interface borrows from it, you just create needless dependencies between different areas of the code, which then need to be kept in sync, wasting time and risking errors.

      And yes, there are development tools available today that can help with this, but I stand by my points that (a) most of them aren't that great anyway, and (b) they should be far more universal than they are.

      So instead of a development environment where basic refactoring of classes, functions, etc. is done with a couple of mouseclicks or a keyboard shortcut, we have a model where we manually and laboriously trawl through dozens of different source files just to rename a member function whose purpose has subtly changed, or to extract a block from an inner loop and make it into a separate function. These processes have cost but offer no benefit, and thus, they suck.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    35. Re:OOP is frequently the wrong answer by ryochiji · · Score: 1
      > What you are identifying is misuse of an OO language, not an inherent shortcoming in an OO system.

      Here's a question: If something is misused or abused in sufficient percentages of cases, couldn't that be considered an "inherent" flaw? For example, if people kept crashing a car because it was designed with the gas and break pedals reversed, you could probably safely assume that it was an inherent design flaw that caused abundant and unneccessary misuse.

    36. Re:OOP is frequently the wrong answer by arkanes · · Score: 1

      This is a idiosynchonism (is that even a word?) of a particular set of languages, and it's a holdover from a past where RAM and cpu time were much more limited. More moden (OO) languages don't use seperate header & source files, using modular or namespace based scoping instead. C# and D (here) are examples.

    37. Re:OOP is frequently the wrong answer by Anonymous+Brave+Guy · · Score: 1
      This is a idiosynchonism (is that even a word?) of a particular set of languages, and it's a holdover from a past where RAM and cpu time were much more limited.

      If you're referring to the header/source file separation, then yes, I agree. It's an irritating implementation detail that ought to be hidden away by more powerful development tools.

      (BTW, FYI, it's "idiosyncrasy", at least in the UK.)

      More moden (OO) languages don't use seperate header & source files, using modular or namespace based scoping instead.

      I'm not sure the side-effects of that are necessarily good things, either. Writing function definitions, constant values etc. all in-line, as Java, C# etc. do, has its own disadvantages. Most significantly, you lose the nice "summary" documentation that a well-written header file provides. And you still have a lot of the same problems I mentioned anyway: if you implement an interface or inherit from a base class in Java, you still have to duplicate the name, parameters, return type etc. of that interface in the implementing class.

      I guess my point is that I think worrying about the header/source separation is shooting for the wrong target. What we ought to be doing is allowing programmers to write a simple, self-documenting interface (as you'd typically find in a good header file), but then having the sort of development environment where you can just open up the implementation of a particular function without having to retype all of its signature information. Similarly, a class that inherits base class functionality in whatever guise shouldn't have to duplicate the signatures of things it overrides or implements, there should just be some indication that all functionality of the base class has been inherited, and a means to open that up directly as well.

      Once you've got to that sort of level, basic manipulations like renaming or adding a parameter to a function or moving some function implementations up from a derived class up to a base should be trivial "minor UI trick" features that take a couple of seconds, instead of the ten minutes of error-prone search and replace they tend to involve with most tools today.

      None of this is exactly rocket science, I'm sure you'll agree, and obviously you could write a good editor that worked with any of C++, Java, C#, Eiffel or whatever that provided this functionality. My argument is that this sort of thing should be the norm, not something that most programmers don't seem to use at all, and where even those tools that are available tend to be expensive and elaborate but not particularly powerful.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  3. Isn't "Extreme" programming simply... by Anonymous Coward · · Score: 0

    ...checking your code more than usual? When I read the PR on this, that's all I got from it. The guy went to great lengths to make something that was common sense practice sound like some new idea.

    1. Re:Isn't "Extreme" programming simply... by orthancstone · · Score: 1

      If I remember correctly, isn't it doing some design, coding, and then going back to do more design? Basically, switching back and forth instead of doing ALL the planning before coding.

    2. Re:Isn't "Extreme" programming simply... by lfourrier · · Score: 1

      it was probably common sense, but not common practice

    3. Re:Isn't "Extreme" programming simply... by snatchitup · · Score: 1

      The most significant barrier to Extreme Programming isn't the programming itself. It's getting the client to accept frequent releases. You have to get the client using the latest release, before adding new features. But, you add features little by little (relatively speaking). Your client becomes your systems analyst kind of.

      So no! We are not all doing Extreme Programming.

      I hear too many war stories like this: "We built the system; the client tested and sent back a list of enhancements and modifications; we built those, but in the meantime, the client gave us even more; so we built those. 9 months later, we went to install, and there was a new Project Manager that decided the whole thing was worthless! This before they're not even using the application.

  4. Refinements, not successors by f97tosc · · Score: 2, Insightful

    It does not make sense to say that these other ideas are succeeding/ replacing OOP. I don't think that people practicing for example Extreme Programing have stopped using objects, or that they promote the use of global variables.

    Rather, there are refinements and additions to OOP, and they cover subjects that have not been addressed before. It is not that they address the same issues with a new set of solutions.

    Tor

  5. OOP Spaghetti ... by DogIsMyCoprocessor · · Score: 3, Funny

    not to be confused with this flavor of spaghetti.

    --

    "And this is my boy, Sherman. Speak, Sherman." "Hello." "Good boy."

    1. Re:OOP Spaghetti ... by 4of12 · · Score: 2, Funny

      I daresay that OOP can make a plate of spaghetti look relatively uncomplicated.

      The spaghetti analogy to OOP works better if the spaghetti is overcooked, so that pulling a single strand causes an enormous giant squid-like multi-noodle to emerge from the depths.

      To make the analogy really complete, though, you would need to mix in some other topologically-interesting pasta shapes, maybe even a few Klein bottles.

      To top it off, when you dredge up a strand of spaghetti with a fork, if you started to pull out a re-instantiation of self connected to a fork pulling out a noodle, then that would start to mimic what you can find in OO code.

      --
      "Provided by the management for your protection."
    2. Re:OOP Spaghetti ... by Anonymous Coward · · Score: 0

      The Spaghetti diagram is worthless, as it is not OOP. I suggest the author of that article learn more about OOP. In particular, just about anybody proficient with OOP knows that subclasses need to extend base classes, not restrict them. A pentagon as a subclass of polygon is simply not OOP. As soon as inexperienced programmers try to do what is done in that diagram, problems occur. I suggest reading the following page that discusses how to use OOP inheritance:
      http://www.parashift.com/c++-faq-lite/proper-inher itance.html
      The section called "[21.6] Is a Circle a kind-of an Ellipse?" is particularly appropriate.

  6. Re:Analyze This: Your Tax Dollars Go To Saddam +50 by Anonymous Coward · · Score: 0

    If it's on the internet, it must be true. And, now, it's on the internet!

  7. OOP is always has its place by stonebeat.org · · Score: 2, Insightful

    I dont understand why people think Pure Object Oriented Databases will replace Relational Databases or ORDB. All type Pure OODB, ORDB, RDBMS all will have there place.
    Same thing with OOP, there are tasks which lends themselves better to OOP vs functional programming, and vice versa.
    Every technique will have its place.
    We have the same mix-conception about XML replacing everything else. e.g.
    <actor name="Martin" show="Simpsons">
    <sprach volume="high">ha ha!</sprach>
    </actor>

    1. Re:OOP is always has its place by Anonymous Coward · · Score: 0

      You meant "Nelson", not "Martin"

    2. Re:OOP is always has its place by BigJimSlade · · Score: 1


      <actor name="Martin" show="Simpsons">
      <sprach volume="high">ha ha!</sprach>
      </actor>

      That's Nelson, you insensitive clod!

    3. Re:OOP is always has its place by Anonymous Coward · · Score: 0

      OO database Managment Systems will never replace Relational Database Management Systems.
      OO is heirachical and we ditched that over 20 years ago as it just plain sucked. Set theory and predicate logic work very well and it's a pain that SQL breaks this model but it's still better than the OO DBMS systems I've seen. Now the work Chris Date is doing does sound interesting see
      http://www.thethirdmanifesto.com/

    4. Re:OOP is always has its place by leandrod · · Score: 1
      > All type Pure OODB, ORDB, RDBMS all will have there place.

      OO databases don't quite exist... they are more of OO repositories or application-specific DB construction kits. They don't have the flexibility and capabilities of a RDBMS like Alphora Dataphor -- remember, Oracle, DB2 and the such are SQL, not Relational DBMSs. In fact, they are a throwback to 30 years ago when all we had was CODASYL, IMS/DB and the like.

      ORDBMSs are ugly -- too complex, too big, and sub-relational at best, being based on SQL. A true RDBMS such as Dataphor can do all OO needs with much less hassle.

      --
      Leandro Guimarães Faria Corcete DUTRA
      DA, DBA, SysAdmin, Data Modeller
      GNU Project, Debian GNU/Lin
    5. Re:OOP is always has its place by ProfKyne · · Score: 1

      Yes, but object persistence frameworks are really cool! Get all the benefits of your relational database, but use only [Java] code to access it! SQL is great for some things (generating reports, data mining, etc), but often in an application you just want to map your objects to the DBs and back again.

      --
      "First you gotta do the truffle shuffle."
    6. Re:OOP is always has its place by leandrod · · Score: 1
      > object persistence frameworks [apache.org] are really cool! Get all the benefits of your relational database, but use only [Java] code to access it! SQL is great for some things (generating reports, data mining, etc), but often in an application you just want to map your objects to the DBs

      That is the problem. You see data as subordinate to some application. What every company soon discovers, and most power users eventually, is that you want "direct" (meaning, with a powerful, interactive, not limited, declarative data language) access to data not limited by a hierarchical or network data model such as OO.

      That you think a persistence library can give you the benefits of a relational database only shows you never understood even the basics of relational theory and practice. Suggestion: read all you can from Date, Darwen, McGoveran and Fabian Pascal.

      --
      Leandro Guimarães Faria Corcete DUTRA
      DA, DBA, SysAdmin, Data Modeller
      GNU Project, Debian GNU/Lin
    7. Re:OOP is always has its place by ProfKyne · · Score: 1

      You obviously haven't paid attention to what I was describing. The data is still kept in a relational database, easily accessed by users and tools who need to bypass the object persistence layer and get at the data itself. Torque doesn't require a change in the schema of the database, either. All Torque does is generate classes that make it easy for the developer to access the data from the application, it doesn't replace the database or even mangle the structure of the data in the database. If I need to access the data outside of the confines of the object hierarchy, I can use a typical JDBC call as well.

      And I think you're being a bit too high-handed, though I understand your bias probably comes from your profession (noted in your sig, and yes I acknowledge that as an application developer I have my own bias). Not every business has a need for "direct" access, some simply care about the business actions, regardless of how they're implemented.

      PS: as an example of how I agree with you, the company I am contracted to is right now trying to create reports from information kept in a Versant OODBMS, and it is a royal pain in the ass (I am the person working on it). Instead of being able to use Brio or some other reporting tool, I have to resort to writing a Java-based tool to extract the data, which is taking far longer than it would if the data were available as relational tables.

      --
      "First you gotta do the truffle shuffle."
    8. Re:OOP is always has its place by leandrod · · Score: 1
      > You obviously haven't paid attention to what I was describing.

      Sorry. No, I didn't. After all, persistence & framework are two no-value-added hyping buzzwords for storage & libraries; as you didn't describe Torque, only mentioned it with Marketspeak, I was lead into error.

      > The data is still kept in a relational database, easily accessed by users and tools who need to bypass the object persistence layer and get at the data itself.

      More seriously, do you realise Torque works with SQL, not relational databases? There is a reason why all this OO BS endures, and it is people frustrated with SQL arbitrary limitations and lack of power without realising that's because of violating the relational prescriptions and proscription.

      > Torque doesn't require a change in the schema of the database, either. All Torque does is generate classes that make it easy for the developer to access the data from the application, it doesn't replace the database or even mangle the structure of the data in the database.

      From the scant documentation I gathered one has to create a XML schema, instead of much more rationally taking SQL or some valid D, such as Tutorial D or Alphora Dataphor D4, as input. That strikes me as either requiring duplication of effort, or that the XML be the reference schema -- neither option seems desirable.

      --
      Leandro Guimarães Faria Corcete DUTRA
      DA, DBA, SysAdmin, Data Modeller
      GNU Project, Debian GNU/Lin
    9. Re:OOP is always has its place by ProfKyne · · Score: 1

      Sorry. No, I didn't. After all, persistence & framework are two no-value-added hyping buzzwords for storage & libraries; as you didn't describe Torque, only mentioned it with Marketspeak, I was lead into error.

      Sorry that you can't own up to a simple oversight (you could have even ignored it), and that you feel it's your place to make judgement calls on the value of words. Last I heard, both "persistent" and "framework" are pretty common synonyms for "storage" and "libraries", regardless of whether they add value to the original word or not.

      There is a reason why all this OO BS endures, and it is people frustrated with SQL arbitrary limitations and lack of power without realising that's because of violating the relational prescriptions and proscription.

      Perhaps you can explain this to me, because I'm not familiar with "relational prescriptions and proscription".

      From the scant documentation I gathered one has to create a XML schema, instead of much more rationally taking SQL or some valid D, such as Tutorial D or Alphora Dataphor D4, as input. That strikes me as either requiring duplication of effort, or that the XML be the reference schema -- neither option seems desirable.

      Isn't it six on one side, half-dozen on the other? What if you could easily generate the SQL from the XML, or vice versa? Would it really matter which is "ideal"? I'm being serious -- I don't see the difference if you can effortlessly move from one format to the other, but if you know of one, by all means enlighten me. (And Torque can automatically generate the XML from an existing database, though it's not flawless yet. So you don't have to duplicate your effort, if you started with SQL.)

      --
      "First you gotta do the truffle shuffle."
    10. Re:OOP is always has its place by leandrod · · Score: 1
      > you can't own up to a simple oversight

      I did say I was sorry, and did explain why I didn't care to read into the page referred, and I did correct my negligence. What else do you want, chest thumping?

      > you feel it's your place to make judgement calls on the value of words

      And why not? Do you think Marketspeak isn't misleading, or that it is useful or beautiful?

      > I'm not familiar with "relational prescriptions and proscription"

      I would refer you first to Christopher J Date's and Hugh Darwen's The Third Manifesto there isn't much on the site, I point it to you more as a reference to the book. I keep some more links at DMoz, and if you have a tough skin you can try Chris J Date's and Fabian Pascal's Database Debunkings.

      Sorry about not doing a write-up, but on one hand I am looking for a job now and on the other I don't think Slashdot is the place to do education (as opposed to discussion).

      > What if you could easily generate the SQL from the XML, or vice versa?

      Well, assume that the XML schema did convey all the possible information in SQL. SQL is the standard, why create yet another language? Now assume the XML schema can convey even more information than SQL. In this case, I would rather use something terser, clearer, more straightforward such as Tutorial D or D4 or any other declarative D.

      > Torque can automatically generate the XML from an existing database, though it's not flawless yet. So you don't have to duplicate your effort, if you started with SQL.

      That would be kinda OK, if I can continue keeping my SQL and just regenerate the changes incrementally and transparently.

      But I fool myself: I don't actually like OO, I would rather program functionally. The real problem isn't to have something to interface SQL and OO, but something to replace SQL that would be fully relational and thus satisfy OO requirements.

      --
      Leandro Guimarães Faria Corcete DUTRA
      DA, DBA, SysAdmin, Data Modeller
      GNU Project, Debian GNU/Lin
    11. Re:OOP is always has its place by ProfKyne · · Score: 1

      I would refer you first to Christopher J Date's and Hugh Darwen's The Third Manifesto [thethirdmanifesto.com] there isn't much on the site, I point it to you more as a reference to the book. I keep some more links at DMoz [dmoz.org.], and if you have a tough skin you can try Chris J Date's and Fabian Pascal's Database Debunkings [dbdebunk.com.].

      Hm. I will have to check them out sometime.

      Well, assume that the XML schema did convey all the possible information in SQL. SQL is the standard, why create yet another language? Now assume the XML schema can convey even more information than SQL. In this case, I would rather use something terser, clearer, more straightforward such as Tutorial D or D4 or any other declarative D.

      Perhaps because XML is a pretty widely-used standard format? Apache projects tend to use other Apache projects' libraries as much as possible, and Apache has a very successful XML project, so I'm not surprised that Torque (which was originally part of the Turbine web application framework) uses XML. I'm not really sure why, I don't have much to do with Torque. But I've never heard of Tutorial D or D4. (I googled "tutorial d", and your SF project is the first hit. No offense intended, but I think that this illustrates how much support exists for "Tutorial D", at least in the area of open source projects.)

      But I fool myself: I don't actually like OO, I would rather program functionally.

      You should talk to this guy.

      --
      "First you gotta do the truffle shuffle."
    12. Re:OOP is always has its place by leandrod · · Score: 1
      > because XML is a pretty widely-used standard format?

      That buys us precisely what? It is nothing but text markup. To me it is but an instance of "if all you know is a hammer, everything looks like a nail". Even if one thinks XML is useful for some particular task, the real juice is the XML DTD or schema designed.

      > I've never heard of Tutorial D or D4

      Sad... take a look at Alphora Dataphor for a taste of a relational system, it is proprietary but it is the only one out there. There is also a free software C library at Darwen's site.

      > You should talk to this guy

      Yes, I know tablizer. Last I checked he still didn't grokked the relational model, he thought it had something to do with xBase...

      --
      Leandro Guimarães Faria Corcete DUTRA
      DA, DBA, SysAdmin, Data Modeller
      GNU Project, Debian GNU/Lin
  8. What XP is by Anonymous Coward · · Score: 0

    I had a class in which we had to design via Extreme Programming (XP).

    The essential idea, was to create your program by outlining a bunch of modular components, and create tests for those components. Then you would program the various components (features) one by one, and after you program one, you test it until it passes all the tests that you required of it. Once that's done, you go on and build the next set of features, repeating the process of test and pass, each time you add new code. What's cool, is that you can add features as your resources permit later on in the project.

    The MAJOR advantage of XP is that the cost of changing your program becomes constant after a while, unlike traditional programming where the cost of change becomes exponential!! That's really cool!!!

  9. In other words... by Anonymous Coward · · Score: 2, Insightful

    ...doing your design on the fly? Which is what everyone does anyway? Why is this something new? If you read any coding manual, they try to impress on you that you should plan your design from the start, then code it. Reason being that in the long run, less time is used. Well they'd only mention this if the "wrong" way was to just hash it out as you code. So if planning your design is the opposite of just figuring it out as you go along, then isn't "Extreme" programming the opposite of planning it beforehand? Which is what everyone does anyway? And this guy thinks he came up with something new?

    When I hear about "extreme" programming, I envision some guy coding while skiing down a steep mountain (which has no snow, BTW).

    1. Re:In other words... by abiogenesis · · Score: 1

      Which is what everyone does anyway?

      Everyone does it but doesn't admit. That's the innovation of XP. XP insists that this is a better way to attack *some* type of problems. You (unwillingly) force yourself to assign more and more time for design in every next project, while XP sets you free.

      --

      Donate free food to the hungry at The Hunger site.
  10. Broken OOP Model by Titusdot+Groan · · Score: 5, Insightful
    I might be a bit more inclined to believe the article if the example given wasn't one of the standard OOP pitfalls -- implementing object properties using inheritance.

    A real shape library would have methods like isConvex() and numberOfSides() instead of implementing the number of sides as an infinite number of subclasses (triangle, quadrilateral, etc.)

    Perhaps these guys should have read Antipatterns or Pitfalls of Object Oriented Development instead of wasting their time with this article.

    1. Re:Broken OOP Model by zipwow · · Score: 2, Insightful

      Amen!

      This very example tends to lend credibility to the group describedin the article as "craft" programmers.

      Showing that slate isn't the proper material by building a wall and seeing it fall sounds like a good proof until the stonemason comes and says, "don't stack it against the grain... see?" and builds one that stands just fine.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    2. Re:Broken OOP Model by daVinci1980 · · Score: 1

      You beat me to it. (By a few hours). The "Spaghetti picture" linked from the short version of the article is an example of BAD OO Design, not a reason why OOP is bad itself.

      And relationships in the "Real World(tm)" don't necessarily hold in OOD, either. For instance, in mathematics, a square is a kind of rectangle. However, in OOD, a square that was a rectangle would cause endless headaches and unnecessary complication.

      Similarly, an Ostrich is a Bird, but in OOD, an strich that is a Bird is "a bad thing."

      --
      I currently have no clever signature witicism to add here.
    3. Re:Broken OOP Model by cpparm · · Score: 1

      You can not talk about what's a "good" interface outside of context. A good Shape interface in a CAD tool is very differnt from a good Shape interface in a graphic game.

    4. Re:Broken OOP Model by Anonymous+Brave+Guy · · Score: 1
      And relationships in the "Real World(tm)" don't necessarily hold in OOD, either. For instance, in mathematics, a square is a kind of rectangle.

      The problem, of course, is that in their urge to hype the new toy, OO evangelists coined the term "is a" when it's not really an appropriate (or rather, complete) description of the concept.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    5. Re:Broken OOP Model by timotten · · Score: 1

      ...one of the standard OOP pitfalls -- implementing object properties using inheritance...

      No. That is not some accidental pitfall that clutzes randomly walk into. Ascribing special properties to the special class in a generalization relation is part of the plan. It's intended usage.

      I might be a bit more inclined to believe the article if the example given wasn't one of the standard OOP pitfalls...

      The OO literature tells us that we can leverage our vast body of thinking about objects, classes, relations, and such to solve programming problems. That's some pretty complex knowledge, and it's reasonable to expect that an OOP would support that complexity. But most OOP's don't. So we have a problem in theory.

      And _lots_ of people run into this problem. They run into it when they're first learning to program; when they're starting a project; when they're maintaining a project. So we have a problem in practice.

      Problems beg for solutions. The article cites the problem, and then discuses several solutions. Your post describes a solution. How, exactly, does this make it hard "to believe the article"?

    6. Re:Broken OOP Model by Titusdot+Groan · · Score: 1
      No. That is not some accidental pitfall that clutzes randomly walk into. Ascribing special properties to the special class in a generalization relation is part of the plan. It's intended usage.

      True, but in the sense of Manager is a specialized class of Employee and PointyHairedBoss is an instance of Manager; not in the sense that PointyHairedBoss is a specialized class of the classes EmployedByMyCompany, Person, HasManagerReponsibilities, and FunnyHair.

      And _lots_ of people run into this problem. They run into it when they're first learning to program; when they're starting a project; when they're maintaining a project. So we have a problem in practice.

      Agreed, in every craft new craftsman make mistakes. This is why the standard training of OOP should include an understanding of why these types of object hierarchies don't work.

      In woodworking my "solution" to this problem is the same level as "measure twice, cut once".

      Problems beg for solutions. The article cites the problem, and then discuses several solutions. Your post describes a solution. How, exactly, does this make it hard "to believe the article"?

      Because the example given is a tyro's mistake. As a journeyman programmer why should I listen to experts who can't come up with a real example of a problem with object oriented approaches that they then purport to solve? If this is the problem they wish to solve ... well I stopped doing dumb things like this about 10 years ago.

    7. Re:Broken OOP Model by pmz · · Score: 1

      This very example tends to lend credibility to the group describedin the article as "craft" programmers.

      The only reason programming can still be considered a craft is that the languages and tools we have at are disposal have yet to really deal with the complexity of programming.

      Some analogies that may predict the future of programmers:

      What happened to tailors and weavers after the maturation of the textile industry? Machines now automate much of the "art" of producing clothing.

      What happened to master ironworkers and carpenters after the maturation of the metalworking and furniture industries? Machines now automate much of the "art" of forging, turning, carving, etc.

      Once the tools get to the point of satisfying the market demands for a particular class of products, then the craftsmen are left as niche producers or historians.

      For programmers, there will one day be a language that finally deals with the issues we see with structured programming, OOP programming, P-OOP programming, Extreme (to the max!) programming, etc. The tools we have will continue to mature, albeit for decades more, until the fundamental problems discussed/whined-about in this Slashdot discussion will be history. Only then will "software engineering" become Software Engineering, and programming will be looked at as no better than assembly-line work at a factory.

    8. Re:Broken OOP Model by Daniel+Serodio · · Score: 1
      ...one of the standard OOP pitfalls -- implementing object properties using inheritance...

      No. That is not some accidental pitfall that clutzes randomly walk into. Ascribing special properties to the special class in a generalization relation is part of the plan. It's intended usage.

      No! Good inheritance is behaviour inheritance, not structural inheritance. Structural inheritance only saves typing, but won't guarantee maintainability. That's what polymorphism is for, and you only get polymorphism with behaviour inheritance.
  11. Faulty assumption by PD · · Score: 5, Interesting

    The example that is brought up with all the shapes turns out to have a fault. Inheritence might not be a good way to model those relationships.

    So, all this article has done is show that the P-OOP thing is better than a octopus inheritance tree. Of course it is. Inheritence tends to get used way too much anyway.

    Consider the famous example that we have all seen: an employee class is derived from a person class. That example appears in countless books, and probably countless systems in actual production today. But is it correct? The challenge of designing a system is to make it flexible enough to stand in the future.

    Suppose we have a person who is an employee and a student at the same time. Should we use multiple inheritence? That would be screwy, and also not natural to implement in a language like Java. It turns out that breaking the problem apart into an inheritence type arrangement isn't the best or most flexible way to approach the problem.

    In short, the article has made a good case why inheritence is sometimes not the right tool to use. But remember that OOP is three things: 1) inheritence 2) encapsulation and 3) polymorphism. And a language like C++ (and Java soon) has the notion of *generic programming* which the article didn't talk about.

    1. Re:Faulty assumption by Glock27 · · Score: 1
      Suppose we have a person who is an employee and a student at the same time. Should we use multiple inheritence? That would be screwy, and also not natural to implement in a language like Java.

      It is very natural to do in Java. Implement it using interfaces, and then use composition to supply the implementation for each particular interface. Each part satisfies the is-a test, the person is an employee, and the person is a student.

      Eiffel-like multiple inheritance might be better, but Java interfaces are a very usable approach to the problem.

      --
      Galileo: "The Earth revolves around the Sun!"
      Score: -1 100% Flamebait
    2. Re:Faulty assumption by Webmonger · · Score: 1

      The article did indeed talk about generic programming:
      "If Fortran can be compiled into machine code, then why not transform some higher-level description or specification directly into a ready-to-run program? This is an old dream. It lives on under names such as generative programming, metaprogramming and intentional programming."

      Generic programming is a form of metaprogramming; in fact, they've got a lot of stuff about template-based metaprogramming at the C/C++ Users' Journal these days.

    3. Re:Faulty assumption by pHDNgell · · Score: 1

      I disagree with this. Java interfaces really get in the way of reusability. An interface is an abstract class that can't have any implementation. This definition means that for really common things like JDBC's ResultSet, every implementation has to do the exact same thing each time.

      I've got an API I've developed for persisting hierarchies of objects transactionally. There are many methods that should have default implementations, but I end up with two or three identical implementations before they're deployed. Sometimes, an object has to be a subclass of SomeThing (not Savable), but it needs to be Savable. I can't subclass SavableImpl and change the one method that needs to be treated differenly. Instead I've got to implement six or so methods (which are basically pasted out of SavableIml).

      The Eiffel model is definitely better here. I was an Eiffel programmer before I got into Java and it was a frustrating transition for things like this.

      --
      -- The world is watching America, and America is watching TV.
    4. Re:Faulty assumption by Ben+Hutchings · · Score: 1

      So what happens when an Employee becomes a Student too? Do you destroy the Employee and create a new EmployeeStudent, and then hunt down and replace the Employee references? What happens when you add more roles; do you create 2^n-1 sub-classes of Person?!

      If you really need to model various roles of a person in a single system, then the identity should be separated from the roles and role-specific properties - Student and Employee can be concrete classes whose instances each refer to a Person.

  12. So XP is simply coding modularly? by Anonymous Coward · · Score: 0

    With tests thrown in?

    What about run time efficiency? Wouldn't 100% modular code result in inefficient CPU usage?

  13. Aspect complements OOP by SideshowBob · · Score: 4, Informative

    Of the 3 'paradigms' mentioned as alternatives to OOP, only aspect oriented programming is even on the same order as OOP. Patterns are a design methodology and XP is a workflow.

    Aspect is best used in conjunction with OOP. In fact I would say that anyone that uses Objective-C's categories has been doing aspect all along.

    1. Re:Aspect complements OOP by johannesg · · Score: 1
      If you look at the historical development of programming, you can see a general trend towards ever greater organizational structures. Initially programs were structureless; then we got functions, then objects, and now groups of objects working together: patterns.

      Based on this description I would say patterns are definitely an alternative (or extension) to OO. What we really need is languages that let us express pattern relationships more directly.

      For example, right now in C++ I can express that part of a class is visible to every other class (i.e. public), or that another class may see everything from one class (i.e. friendship). Why is there no "specific class may see specific part of another class" access qualifier? This IMHO is vital in expressing the special relationships the various classes in a pattern have.

    2. Re:Aspect complements OOP by AtATaddict · · Score: 2, Insightful

      There is a language which allows for this kind of "access qualifier". It's called Eiffel. In the classic example, only the TELLER and BANK classes have access to the balance feature of the ACCOUNT class.

      class ACCOUNT
      feature { TELLER }
      balance: INTEGER
      end

      -- this causes problems:

      class ROBBER
      feature
      stash: INTEGER
      do_something(acc: ACCOUNT) is
      do
      stash := stash + acc.balance
      end
      end

  14. Frame-Oriented Programming by Anonymous Coward · · Score: 0

    A few years back I did an undergrad thesis on what I liked to call "Framework-Oriented Programming." It tried to distinguish that as distinctly different from (and better than!) OOP, though these days what the OOP people are doing is not as distinguishible as it was back then. (It was written when C++ was still dominant, not Java.) Nonetheless, it is still possible to build non-OO frameworks using the definition in that paper in languages like C. Though I don't really know why anyone would want to, heh heh. HTML available here, though be warned: it was unfortunately created using "Save as HTML" in evil MS Word so may look funky in some browsers. Certainly not a perfect paper, but perhaps some may find it an interesting approach. If it perhaps is not worthy of the name "paradigm" or is seen as an offshoot of OOP rather than a replacement paradigm, it nonetheless is now a fairly prominent approach in the OOP crowd these days.

  15. I agree. by Cthefuture · · Score: 2, Interesting

    I would even argue that you don't really need inheritance. In theory it's good, but as with over-OO'ing everything it quickly becomes complicated. And the more complicated it is the more spaghetti-like it feels and the less likely a programmer will reuse the code.

    I've seen some very complex software written in functional languages that was very easy to follow even though the had no real OO concepts (usually some sort of module system and the equivalent of C's structs).

    Sometimes the most straightforward approach is the clearest and OO is anything but straightforward when you think about all the layers that go into it. Now, I'm not saying OO is all bad, it has good features. I feel a powerful programming language should strike a balance between the different programming methodologies.

    In the past I have made some comments on what I think plain old C could become if it incorporated some modulization features.

    --
    The ratio of people to cake is too big
    1. Re:I agree. by johannesg · · Score: 2, Insightful
      You don't really need a compiler either, but it is bloody convenient not having to write your own hex codes...

      The truth is of course that crap programmers will write crap programs in any language, while good programmers will do a good job no matter what tools he has available. In the end it always comes down to people.

    2. Re:I agree. by Anonymous Coward · · Score: 0

      > (usually some sort of module system and the equivalent of C's structs).

      Umm... this pretty much describes good OO programing. OO is a style of programming. Different languages just have various levels of support for that style of programming.

      For the right problem domain OO is very straightforward. For the wrong problem domain it sucks. What else is new?

    3. Re:I agree. by Arandir · · Score: 3, Interesting

      I would even argue that you don't really need inheritance.

      Consider a simple GUI. In this GUI you have a button, a checkbox, a label and an edit box. All of these things are widgets. Does it not make sense to use a base widget class instead of rewriting all the common related functionality they all have? Now add a radio button. It's related to a checkbox. Perhaps it also makes sense to have the checkbox and radio button share a common ancestor as well.

      I can hear people say "that's what functions are for!". True, that is what they are for. But if a function is only useful for a widget related structure, doesn't it make sense to encapsulate that function with that structure?

      No, you don't need inheritance. But sometimes it's damned useful.

      I've seen some very complex software written in functional languages that was very easy to follow even though the had no real OO concepts

      So have I. But no one here is arguing that OOP is the only appropriate paradigm for all problem domains.

      In the past I have made some comments on what I think plain old C could become if it incorporated some modulization features.

      Be careful with this. If you don't watch yourself it could end up becoming Objective C :-)

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    4. Re:I agree. by Tablizer · · Score: 1

      I can hear people say "that's what functions are for!". True, that is what they are for. But if a function is only useful for a widget related structure, doesn't it make sense to encapsulate that function with that structure?

      But you don't know ahead of time whether the state (data) and functions (methods) will *only* be used with each other in the future. What if you later need to share the state with other applications? (I don't know if this would happen with GUI's, but it does for other areas.)

      It can be a lot of work to overhaul or remove your state management when you need to move state into a database to be shared by other apps and languages.

    5. Re:I agree. by Arandir · · Score: 1

      It can be a lot of work to overhaul or remove your state management when you need to move state into a database to be shared by other apps and languages.

      If your data is inappropriate for a database, then it doesn't matter if it's in a C struct or a C++ class, they'll both be a bitch to convert. And if it is appropriate for a database, it's not going to be harder to port the OOP C++ version over the Structured C version.

      Here's a OOP C++ member function:

      void MyClass::doSomething()
      {
      m_var = somethingElse();
      }

      Here's the exact same function in non-OO C:

      void doSomething(MyStruct *m)
      {
      m->var = somethingElse();
      }

      In terms of data, the only difference between them is encapsulation.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    6. Re:I agree. by Tablizer · · Score: 1

      If your data is inappropriate for a database

      To me, almost every non-trivial structure is appropriate for a database. I used to use languages/tools that had no arrays because tablizing everything was a snap. Nor was it "too slow" in most cases even on a 286. (Of course the trend has been toward bulky "big-iron" RDBMS instead, but bad fashion is not the paradigm's fault.)

      The only exception I notice may be communications protocols where a "handle" has to be kept open. OOP offers more opportunity for compile-time detection of certain errors for staticly-typed languages. But, I like dynamic languages anyhow, so that is not much of a selling point in my mind.

    7. Re:I agree. by Arandir · · Score: 1

      To me, almost every non-trivial structure is appropriate for a database.

      You know all those posts that say OOP programmers go overboard and use OO for everything, and how they're so stupid for thinking everything can be an object in an inheritence tree? Welcome to the looking glass.

      Every programming paradigm can be abused, and the database paradigm is no exception. For many problems, it is the appropriate solution. But for many others it is gross overkill. Our company builds an embedded UNIX system. One database programmer implemented "uname" with MySQL. Huh?

      Databases work well for data that is numerous and uniform. It does not work well for data that is few and varied. Customer accounts? A database of course! A web browser? Not really, because an XML DOM tree is much simpler to model HTML with.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    8. Re:I agree. by Tablizer · · Score: 1

      You know all those posts that say OOP programmers go overboard and use OO for everything, and how they're so stupid for thinking everything can be an object in an inheritence tree? Welcome to the looking glass.

      How about this: My getting carried away is just as valid (or invalid) as their getting carried away.

      I don't think that the interface to collections needs to be different accept for maybe the vary simplest of stuff (like a single associative array). "Types" of collections is an artificial, forced taxonomy IMO.

      Databases work well for data that is numerous and uniform. It does not work well for data that is few and varied. Customer accounts? A database of course! A web browser? Not really, because an XML DOM tree is much simpler to model HTML with.

      Well, often HTML is the wrong tool also. I run into HTML's limits all the time. But, that is another fun debate for another day.

      One database programmer implemented "uname" with MySQL. Huh?

      It worked for him/her (I presume, not having seen it). Is it objectively "bad" or just foriegn to you? I think Perl is a mess, but Perl fans dig it and can read other Perler's code, so who am I to complain as long as they don't impose it on the whole world.

    9. Re:I agree. by Arandir · · Score: 1

      "One database programmer implemented "uname" with MySQL. Huh?"

      It worked for him/her (I presume, not having seen it).


      It's a single record of three static unchanging fields! This goes beyond overkill and into the realm of "shock and awe".

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    10. Re:I agree. by Tablizer · · Score: 1

      It's a single record of three static unchanging fields! This goes beyond overkill and into the realm of "shock and awe".

      I would have to see it in action. Perhaps they were just "experimenting". People experiment with all paradigms and toosl from time to time, for good or bad.

  16. Thanks a bunch, a-holes by stratjakt · · Score: 4, Funny

    I told my manager in a design meeting that we should do all new development using POOP techniques and POOP tools and POOP constructs. Now I'm unemployed like the rest of you.

    --
    I don't need no instructions to know how to rock!!!!
    1. Re:Thanks a bunch, a-holes by glwtta · · Score: 1

      Hey, don't pooh pooh POOP, I use it every day!

      --
      sic transit gloria mundi
    2. Re:Thanks a bunch, a-holes by Anonymous Coward · · Score: 0

      Your boss probably saw how obsessed you were with the idea and mentally labelled you as a POOPhead.

      I don't really have a point. I just like saying "poophead".

  17. Obligatory OOP is dead post by Limburgher · · Score: 1
    Soon Extreme Programming, along with all interpreted scripting and compiled coding will follow.

    Shell scripts and .bat files are the wave of the future. . .

    --

    You are not the customer.

    1. Re:Obligatory OOP is dead post by Anonymous Coward · · Score: 0

      Dontcha know? MS-DOS scripts are the pennacle of software development. They just look horrible if you "just don't get it".

  18. Declarative languages by TummyX · · Score: 1

    The future will be in declarative languages such as haskell or prolog.

    The "flow chart model" of computing is and will always be error prone.

    1. Re:Declarative languages by TheRaven64 · · Score: 1
      The future will be in declarative languages such as haskell or prolog.

      I'm not sure if this is intended as a joke, but it may actually be true.

      I like programming in Prolog, since SLD derivation mirrors better the way I think than an imperative language, but I doubt it will be fast enough for mainstream use for quite a few years (by which time we'll have found more complicated things to do, which will slow it down...).

      Functional languages, on the other hand, are different. A program in a functional language, like Haskell is naturally suited to parallel execution and can easily be parallelised by the compiler. In an era where SMP and other parallel computing devices are becomming more popular, this makes such languages very attractive.

      DISCLAIMER: Programming in either of the languages mentioned in this post can damage your sanity.

      --
      I am TheRaven on Soylent News
    2. Re:Declarative languages by iggymanz · · Score: 3, Insightful

      well, I heard this 20 years ago (about Prolog, Haskell, Smalltalk, LISP, etc). I really don't think in the commercial world any well designed language is going to be popular. Sorry (and I truly am). The future will continue to be half baked, bug generating, hard to maintain semi-OO languages such as C++ and Java and Microsoft's VB

    3. Re:Declarative languages by TummyX · · Score: 1

      It *wasn't* intended as a joke!

      I find delcaraive languages much easier to understand -- once you overcome that initial paradigm shift.

      Declarative languages not only mirror the way I think better, I find it models the problem better (much more directly) :).

      Things like OOP are formalisations which make imperative languages more declaractive. Design patterns like MVC are examples of this.

    4. Re:Declarative languages by Anonymous Coward · · Score: 0

      NOOOOOOOOoooooooooooooo........... not Haskell!

    5. Re:Declarative languages by Anonymous Coward · · Score: 0

      Declarative languages are great for programming tasks that are primarily about computation, i.e. seeking information in order to produce an answer to a question. But not all programming tasks are about that.

      Some programming tasks are about interacting with things or people. Like for instance, I just wrote a GUI widget that is somewhat like a scrollbar (b/c a regular scrollbar would be insufficient). The main difficulty of doing such a task well isn't in getting a correct implementation, because that's pretty easy to do. The main difficulty is in doing it so that it has a good feel. I need to be able to ensure that certain parts of the display are redrawn before others, that the pointing device's position is read at just the right time and frequency, etc. Functional programming, for example, would make actually make that task really painful. One day it might become as easy to do that task in a functional language as it is in an imperative, but I don't see how a declarative approach is ever going to offer any advantage for such a task.

      So, I guess my point is that declarative might be the future of computation, but not of programming in general.

    6. Re:Re:Declarative languages by Anonymous Coward · · Score: 0
      I find delcaraive languages much easier to understand -- once you overcome that initial paradigm shift.

      That great for you. Seriously, if it's easier for you , more power to you. At my current gig, I have to explain declarative languages to VB guys and it's not easy. Unfortunately, a significant percentage of the programmers today think procedurally. Trying to get them to think in high level abstractions like declarative languages is very hard. In fact it takes 6 months or more. Many people (not unique to programmers) have a hard time thinking in abstractions. In my own experience, those with training in philosophy tend to be better at high level abstractions.

    7. Re:Declarative languages by TummyX · · Score: 1


      Declarative languages are great for programming tasks that are primarily about computation, i.e. seeking information in order to produce an answer to a question. But not all programming tasks are about that.


      That may be somewhat true for Haskell but it isn't true for all delcarative languages. Prolog is more suited to AI and databases for example.


      Some programming tasks are about interacting with things or people. Like for instance, I just wrote a GUI widget that is somewhat like a scrollbar (b/c a regular scrollbar would be insufficient). The main difficulty of doing such a task well isn't in getting a correct implementation, because that's pretty easy to do. The main difficulty is in doing it so that it has a good feel. I need to be able to ensure that certain parts of the display are redrawn before others, that the pointing device's position is read at just the right time and frequency, etc


      You shouldn't be worrying about what the order of drawing. You should just declare "object a overlaps object b" and "object a doubles in size when the mouse is over it" etc etc.

      XSL is a declarative language and you can use it to generate some quite nice looking HTML UIs (even though its primary purpose is to transform XML not generate UIs).

      So, I guess my point is that declarative might be the future of computation, but not of programming in general.


      I think that's a common misunderstanding because (for now) declarative languages are mostly academic languages without much "commercial" use. OO progamming and design (UML!) coupled with certain design patterns (like the Model-View-Controller pattern) can be considered to be partially declarative.

    8. Re:Re:Declarative languages by TummyX · · Score: 1


      I have to explain declarative languages to VB guys and it's not easy


      Well there's your problem right there. I doubt many VB programmers have computer science degrees ;P.

      Seriously though, the only reason people find declartive languages hard to understand is because they're so used to the "set this, do this, set that" model of programming. Software Engineers who do design already think in high level abstractions.

    9. Re:Declarative languages by WetCat · · Score: 1

      Yep. Especially if you have to change your program constantly to meet specifications.
      For example in most procedural languages you may see
      the construct
      if (a) {
      if (b) { ...
      if (c) { ...
      } else { ...
      }

      } else {
      }
      and if you need to put conditions in different order, you are usually out of luck to make it without a lot of mistakes. In Prolog it's extremely easy to do.
      By the way, XSLT is actually a Prolog in disguise, but with worse graphical representation and limited functionality...

    10. Re:Declarative languages by Anonymous+Brave+Guy · · Score: 1
      You shouldn't be worrying about what the order of drawing. You should just declare "object a overlaps object b" and "object a doubles in size when the mouse is over it" etc etc.

      But the point is that, when you're interacting with the world outside your program, you have to worry about ordering, timing, interfaces and protocols, etc. This side of programming is where most of today's functional languages really fall down, and probably the single biggest reason they haven't been used more for mainstream applications, IMHO.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    11. Re:Declarative languages by TummyX · · Score: 1


      But the point is that, when you're interacting with the world outside your program, you have to worry about ordering, timing, interfaces and protocols, etc.


      Can you give examples -- specifically examples where Java can do it but declarative langauges can't (or can't easily)?

      If you're talking about low level embedded systems then you should be using embedded C. We're talking about writing *applications* right?

    12. Re:Declarative languages by Frans+Faase · · Score: 1
      Declarative languages are great for programming tasks that are primarily about computation, i.e. seeking information in order to produce an answer to a question. But not all programming tasks are about that.

      That says more about the lack of declarative languages than about them not being useful.

      User-interfaces and the model/view/command could also be specified in a declarative way.

    13. Re:Declarative languages by Anonymous Coward · · Score: 0

      IMO, the problem with functional and logic programming is that they solve the non-pressing problems. Sure, it's less laborious to do list processing in ML than in Java, but list processing isn't very hard anyway.

      The hard problems now are things like writing code that works in heterogeneous environments, writing huge middleware systems to integrate multiple huge legacy systems, optimizing timing and power consumption for embedded systems, ensuring semantic correctness in large systems. I just don't see how FP helps that much.

      I would like to see more domain-specific languages. The GUI example is a good one. It would be great if I could just specify some rules for layout and interaction among controls, and then a compiler would check that my rules made sense and turn them into efficient code. But I think it really needs to be a domain-specific language, not Prolog.

    14. Re:Declarative languages by Anonymous+Brave+Guy · · Score: 1
      Can you give examples -- specifically examples where Java can do it but declarative langauges can't (or can't easily)?

      Try writing some real time instrument control software in a declarative language. :-)

      Not saying it can't be done, or even potentially be done well, but I know of no declarative language that provides even close to the same level of control over sequences of events, and synchronisation between parallel sequences, as would be routine in a typical procedural or OO program.

      (Apparently some such languages do actually exist. Another poster referred me to two quite old language families I hadn't previously encountered, and I'll look into them when time allows. Certainly none of the mainstream variations of things like ML, Haskell or LISP are up to the job as far as I've seen, though.)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  19. True of most fresh programmers by Gorimek · · Score: 4, Insightful

    There is some truth to that, I'm sure, but I'm not aware that programmers schooled in any other methodology are perfect programmers straight out of school. It's a tough craft, and it takes a few years of being an idiot until you start producing really good code, regardless of methodology.

  20. An�lisis by Anonymous Coward · · Score: 0

    Cómo podían el aspecto, el patrón, y la programación extrema substituir OOP? Eso es absurdo. La programación del aspecto no tiene herencia (esa yo está enterada de) así que es un modelo más débil que OO. Aunque "... herencia excesiva de la composición del favor ", él no significamos debemos eliminarlo! También, dónde el comportamiento polimórfico del método del aspecto? Los basar de la fundación del diseño del patrón en OO. quitan OO y el patrón no puede existir. La programación extrema no tiene nada hacer con cualquiera del antedicho. No es uniforme una arquitectura. Vive bajo noción equivocada que puesto que el equipo-ana'lisis trabaja bien, equipo-programando debe trabajar bien también; -)

  21. Silver bullets by p3d0 · · Score: 3, Interesting
    I agree with Fred Brookes' comment that better languages can only help with accidental complexity, but can't remove the essential complexity of the problems we're trying to solve.

    Where I disagree is on the relative proportions of these two things. I firmly believe that we're still at the point where well over half of what a programmer does fight with tools, rather than solve new problems. I'd go so far as to say I think it's about 90% accidental complexity, which implies that the ideal programming language could allow a given development team to produce systems that are ten times more elaborate/powerful/complex/etc than today's.

    So I think the language designers still have a lot of work ahead of them.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
    1. Re:Silver bullets by Anonymous Coward · · Score: 0

      "half of what a programmer does fight with tools". So true, thus I don't think the problem is for language designers but tool writers.
      I work with C++ code and I think a huge percentage of bugs could be solved by very good compiler/IDE tools that actually help rather than hinder. For instance how well does your IDE help you reuse code? Can you drag a small function, (medium sized) class defn or even an entire 'helper' sub-program into a 'bank' that helps you find/share and re-use code?

  22. Well, sorta... by Anonymous Coward · · Score: 0

    With tests thrown in?
    Yes. That's a big part of the XP rules. This was a heavily graded principle in my class. XP says that you don't move past the new features that you have added until they past the tests. This ensures that they work right, and that you don't have to come back to them later on.

    What about run time efficiency? Wouldn't 100% modular code result in inefficient CPU usage?
    No modular in the sense you're thinking. What I mean't in the parent to your post was: modular in the sense that you program in "chunks". These chunks are integrated features into the program. Take for example, you want to program a simple little thing to read in numbers, compute them, and then display them.

    Well, first you would program the interface to read in numbers. You'd test that, and be sure it worked (past the tests) before you moved on, say, a readInValues(); kinda function.

    Then you would go to the next feature, computing the numbers, where computeNums() went something like A + B + C / D = answer. You'd test that, and make sure it passes before you leave this.

    Then you want to print them out, so you write and test printResults().

    That's what I mean by programming modularly, sorry for the misunderstanding. Actually, the individual modules, or steps could be a combination of several functions/features, or other stuff. Like a mod step to revise a current implementation you have already made if needed. You see, it isn't modular in the sense that you were thinking, but more like basic object oriented programming structure. Should you need to add features as you go, or later, the cost of change isn't that much, naturally.

  23. You mean by Anonymous Coward · · Score: 0

    interface inheritance (bad) vs. implementation inheritance.(good)

    This is, of course addressed by both the Bridge and Strategy patterns.

  24. Offtopic post about terminology by ergo98 · · Score: 3, Insightful
    What's with the sheep like herding when someone coins a term and everyone rushes to look enlightened?

    Everywhere I turn right now someone is yapping about "Patterns": No longer is it simply standard best practices, but rather now it's the new age "Patterns". No longer do you do code maintenance: Now you "Refactor". No longer do you wing it, now you do "Agile Development". It almost makes the speaker sound ridiculously naive hanging onto whatever terminology they hear, as if it's something new when it's merely renaming existing techniques and standards.

    I need to get back to working on my dinner heating patterns.
    • Put Boston Market chicken in microwave.
    • Turn on on "Reheat" mode
    • Remove and eat
    1. Re:Offtopic post about terminology by PD · · Score: 1

      sheep-like herding is rather cumbersome to say. I propose what we come up with a nifty term that means sheep-like herding so we can talk about it and sound smart.

    2. Re:Offtopic post about terminology by outsider007 · · Score: 2, Funny

      sheep-like herding is rather cumbersome to say. I propose what we come up with a nifty term that means sheep-like herding so we can talk about it and sound smart.

      something like about shepherding?

      --
      If you mod me down the terrorists will have won
    3. Re:Offtopic post about terminology by Anonymous Coward · · Score: 0

      The problem is the US Government. They are one of the biggest employers in the United States(the birthplace of buzzwords). When in development, The government shits a brick when they hear the words 'code maintenance' beacuse that that comes out of another budget category and they don't want you wasting their development dollars on 'code maintenance'. Likewise they hate the word 'redesign', beacuse that make their supervisors think there was something wrong with the original design. So we are forced to come up with new words. Words that they have never heard before. Words that they can't misconstrue because they don't know what they mean.

      Just wait a few years, 'refactoring' will be added to the list of bad words and we will be forced to come up with a new term to describe what we do every day. I propose something like 'patern extraction' or 'pattern refinement'. Both terms have a certain elegance to them.....

    4. Re:Offtopic post about terminology by Blakis · · Score: 4, Informative

      Refactoring is not the same thing as code maintenance. It's actually more akin to code meddling, but done in well-defined, discrete steps, coupled with unit tests so as to minimize the risk.

    5. Re:Offtopic post about terminology by Andy_w715 · · Score: 1

      "Agile Technology for the Agile Business" = "ad hoc developement for businesses without a plan" funny

    6. Re:Offtopic post about terminology by nicodaemos · · Score: 1

      One of my favorite terms is "Parotting". It refers to the behavior of most marketing/sales people who spit out acronyms and words that they have heard someone else say, but that they know nothing about. However, it can and is often used to describe technical people who jump on new buzzwords. Often times the people I see most passionate about patterns are the ones who are clueless to good programming. You see, the language of patterns lets them at least "talk the talk", even if they can't "walk the walk".

    7. Re:Offtopic post about terminology by chthon · · Score: 1

      Hmm, I seem to remember that the book about patterns was published ten years ago. Some people need time to catch up with the times.

    8. Re:Offtopic post about terminology by ergo98 · · Score: 1

      Why are you italicizing your own post? Yeah, seamstresses have used "patterns" for centuries my wayward friend, and patterns in software is an analogy of the same. However the widespread and common use of patterns is very new: Perhaps the last year, if that. Suddenly everyone and anyone is yapping about patterns as if the software engineering field has revolutionized.

  25. Re:15min and its down? by Anonymous Coward · · Score: 0

    Maybe ./ should have a feature like creating a snapshot of a website.

    When posting some new thing you should first link to the snapshot and _then_ link to the real site.

    This would (maybe) push some of the load to the ./ servers !!

  26. Interesting Acronyms by rherbert · · Score: 1

    Did anyone else notice that an article about pOOP mentioned a conference named PLoP? Is Beavis coming up with these names or something?

  27. Don't believe the hype by MeerCat · · Score: 3, Insightful

    First: yeah, right because XP (et al) re-writes OO: pair programming, early delivery, RAD, iterative development etc are different ways of running a life cycle, not different ways of structuring your model of a domain.

    Second: this reminds of when the K boys did a big rant about "I prove OO is flawed because if you have a class Person and derive from it Customer and Staff classes then you break stuff when a staff member quits his job and walks into the shop and buys stuff as you need to get the object to mutate classes". They claimed to instead invent "OO++" (they called it that). The correct OO answer is that you've got a poor design, you need to revisit it (and aspects or attributes or roles as concepts may help you think about this), but that doesn't break or replace OO (ie straw man argument).

    Now meta-programming, such as the (now rather old but still a head-fuck for those who program in one language only) Meta Object Protocol is the direction that I see code structure moving: more Lisp-like structures and flexibility to change your object protocol on the fly, losing strong typing as a fundamental mechanism for OO, these are ways to let you manipulate the larger level structure of your code whilst keeping the lowest level of syntax constant . You let people write their OO code as they like, but as an over-coordinator you can suddenly change the way inheritance works, or the way method-dispatch works to get different effects. It's what I like about Perl (which is making me realise what all those Lisp hackers were raving about for so long, but I prefer the pragmatic approach of perl over the rather purist lisp).

    --
    T

    --
    I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
    1. Re:Don't believe the hype by smcdow · · Score: 1
      ...flexibility to change your object protocol on the fly, losing strong typing as a fundamental mechanism for OO, these are ways to let you manipulate the larger level structure of your code whilst keeping the lowest level of syntax constant . You let people write their OO code as they like, but as an over-coordinator you can suddenly change the way inheritance works, or the way method-dispatch works to get different effects. It's what I like about Perl...

      hear, hear!!

      Gotta love a language that lets you mess with your program's symbol table at run time. It makes certain things very possible:

      • Don't like the class an object belongs to? Just bless() it into another class!! Spiffy for mutating objects or chained object creation.
      • Notice that a method your object needs to call doesn't exist? Well, just create it!! Handy-dandy with AUTOLOAD .
      • Don't like a method you've inherited? Just replace it!! (No, I mean "replace", not "override". Remeber, you are manipulating your symbol table at runtime.)
      • Lamda functions? Sure.
      • Closures? No problem.
      • Define your own method dispatch at runtime? No problem.
      • and more, but I'm getting tired of typing
      perl is probably the most versatile languate I've ever used.
      --
      In the course of every project, it will become necessary to shoot the scientists and begin production.
    2. Re:Don't believe the hype by Anonymous Coward · · Score: 0

      >>>> "perl is probably the most versatile languate I've ever used."

      How do you compare the newer updates of Perl to Python in O-O-P regards, and in terms of programming in the large? Python is very flexible also and is claimed to be more scaleable.

      I like Python, but keep going back and reviewing the Perl updates for some strange reason. Also, any comments on Perl6. I think Parrot is going to kick .NET butt. I think parts of C# are brain dead in terms of programmer features, and this will follow over to Mono as well.

      Thanks,

      John D.

    3. Re:Don't believe the hype by Circuit+Breaker · · Score: 1

      The Kx guys? Promoting OO++? I'd like to see where. The Kx guys are as anti-OO as any professional can be these days without risking being laughed at by the uninformed community (that thinks OO is a silver bullet).

      Are you sure you're not mistaking them with the AOP guys or something?

    4. Re:Don't believe the hype by MeerCat · · Score: 2, Interesting

      The Kx guys? Promoting OO++? I'd like to see where. The Kx guys are as anti-OO as any professional can be these days without risking being laughed at by the uninformed community (that thinks OO is a silver bullet).

      This was back when Arthur was working at UBS in New York - maybe 6 or 7 years ago, and had a core K development team of a dozen or so. They were very anti-OO, but lost quite a lot of credibility through putting up straw man OO arguments and knocking them down - such as the example I gave above, and claiming these proved the "fundamental flaws of the OO approach". It was one of the core team who then showed another solution, and claimed this as his new technique to be called "OO++".

      Don't get me wrong, I quite like some features of K, and I had quite a bit of respect for Arthur and some of the K internals... it was just some of the hype and deliberate obfuscation of arguments from the crowd that was sour.

      --
      T

      --
      I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
  28. Spaghetti by pyrrho · · Score: 1

    ... we programmers are logicians.

    No good language or paradigm is going to limit logic so that it cannot be complex, or by extension over complex.

    To wish otherwise is to hope for a fire that cannot burn. You can protect yourself from burns, but having a type of fire that does not burn is not the way, you give up it's main benefit.

    So with logical systems, to prohibit spaghetti is also to prohibit the use of logic, as such, itself.

    Hey... guys... stop hoping for magic and just STOP SHOOTING YOURSELF IN THE FOOT... it's not the gun's fault.

    --

    -pyrrho

    1. Re:Spaghetti by Anonymous Coward · · Score: 0

      Yeah that's telling em. If it was hard to write, it should be hard to read! tsk tsk tsk.

      Perl:
      The only programming language known to man where the shortest possible solution to any problem is the hardest to understand.

    2. Re:Spaghetti by pyrrho · · Score: 1

      thanks for the support, now "fek off, cup"

      actually, I'm not for the "cat > a.out" method of programming or any other Klingon techniques, I want it easier too... but it's like this: looking for a fountain of youth didn't really give anyone long life, mundane improvements in health care did. A good class system in C++ can abate one's fear of pointer's... or no... we need a paradigm shift (wooowhooooo) -- scary wailing sound

      We need to focus on real improvements, the real world, and lose a few of the holy grail searches... eh?

      --

      -pyrrho

  29. Re: Give them a hammer and.... by Anonymous Coward · · Score: 0

    suddenly everything looks like a nail.

    This sums up the behaviour of most OO newbies.

  30. Re:i hate ceeplusplus by Anonymous Coward · · Score: 0

    My dog++ sucks too!

  31. Re:15min and its down? by mhesseltine · · Score: 1

    Ok, look at how Mozilla's Bugzilla usually handles the /. effect (eg. a separate page for /. referals). Setup a simple static page giving people permission to mirror when refered from a /. page. Maybe even have a static copy of your site available as a .torrent and encourage people to use that and start the mirroring process.

    True it would be nice if the editors gave these sites some warning, but maybe the webmasters should make some preparations ahead of time.

    --
    Overrated / Underrated : Moderation :: Anonymous Coward : Posting
  32. Score -1 (Redundant) by Anonymous Coward · · Score: 0

    where the hell does XP come in to this?

    what crack monkey thought up XP anyway?

    christ. why are idiots successful? .. because
    other idiots pay them.

  33. Re: Give them a hammer and.... by pyrrho · · Score: 1

    hammer.pound( static_cast(screw));

    --

    -pyrrho

  34. Re: Give them a hammer and.... by pyrrho · · Score: 1

    oops, should have previewed... should have been...

    hammer.pound( static_cast< Nail >(screw)) ;

    --

    -pyrrho

  35. Naive Article; Ignorant Writeup by avdi · · Score: 1

    A real summary of the article: a behind-the-times coder reads up on the current industry literature, and announces: "Gee, you guys really think hard about this stuff, don't you? That programming stuff sure is confusing! After a cuple weeks of reading, I'm really confused, therefore it must be over-complicated and redundant. Okay, I'm gonna go back to making clay pots now."

    --

    --
    CPAN rules. - Guido van Rossum
  36. you are completely wrong by Anonymous Coward · · Score: 0, Insightful

    An inscrutable, unmaintainable, architecturally weak procedural design that saves 100 lines of code is *NEVER* preferable to a strong OOP design. I would gather you have never seen what good OOP looks like and have only been exposed to garbage like MFC or worked with poorly written Java code. Good OOP design has a negligble effect on performance and memory usage (note: MFC is not a good OOP design). If you really have something process intensive, like a 3d rendering engine with lots of inline code or even assembly code, those algorithms can still be encapsulated within an OO framework without harming anything.

    Most people with your opinion are those who write crappy procedural code that never has to be maintained by anyone else (including yourself, 2 years later), and have no clue whatsoever on how to do OOP, and their early attempts (as well as the attempts of their coworkers) worked like crap. Nothing wrong with that, but its annoying when someone ignorant attempts to speak authoritatively.

    1. Re:you are completely wrong by Anonymous Coward · · Score: 0

      I sure haven't - every time I get close to seeing what these hugely elegant 'poetic' systems would look like, the project gets canned because it is late....

      seriously - I've seen so many examples of clean, easy to read procedural C code, and so many of the opposite of C++ that it really makes me wonder what the signal/noise ratio is.

    2. Re:you are completely wrong by Anonymous Coward · · Score: 0

      Maybe there's something wrong with your processes and not OOP itself if you can't make a project fly?

    3. Re:you are completely wrong by Anonymous Coward · · Score: 0

      No, he's right. OOP isn't the solution to everything, for some things it is a good methodology, for others it isn't.

      Most programmers who use OOP haven't ever written significant amounts of code in functional languages, so they don't know what kind of power they're missing.

      Functional features also don't mean that OOP isn't possible - e.g. OCaml provides functional, imperative and OO features.

      Some of the popular Java "design patterns" are workarounds for weaknesses in the OOP methodology - in some cases, using them is an indication that perhaps you should've done something else.

      When I get to choose a language, I'd much rather give up OO features than functional features. OO can be simulated via functional interfaces, but the opposite is very cumbersome.

  37. POST-object oriented programming?? by Anonymous Coward · · Score: 0

    First you're making the grand assumption that the ideal of OOP has been accomplished. It hasn't. Go re-read what Alan Kay has to say on the subject.

    If you think C++/Java are the "pinnacle" of OOP then you're sadly mistaken.

  38. trends of methodologies vs. that of social idiocy by Anonymous Coward · · Score: 0
    I think I can admit that I find it very hard to take "Extreme Programming" seriously simply because of the name. I for one was tired of the "Extreme" crap label prefixing everything from skiing and mountain biking, to music and on through to everyday living. Everything was "EXTREME" and thus was seen as nothing but jargon/buzz compliant. Then again, I grew tired of 1337 speak rather quickly as well and now we have the current stupi^H^H^H^H^Hversion of it regardless of what fools want to call it. I really think that humans would eat their own feces if enough people made it a trend.

    Therefore I can't help but look at the programming aspect of Extreme Programming and just say, "Oh, now here's a winner! I wonder if I have to wear cool jeans and say officially hip nonsense for this to work?"

  39. Embarassing by Tomster · · Score: 4, Interesting

    There are so many obvious glaring problems with this article I'm surprised it got published. XP as a "replacement" for OOP? Goodness, one is a methodology for building software, the other is a programming mechanism. Patterns? They are applicable in areas other than OOP. Like... architecture for instance . AOP? That's just a fancy way of inserting code into a class. Same principle as using #define in C or C++, though certainly more powerful.

    Most of the 'problems' of OOP are the same as the 'problems' with older languages and practices. Simply put, once you weed out the people who aren't very good at design or programming, the lazy, the stress-cases under schedule pressure, etc. etc., you have a small group of people left who are building "good" software. (Measured by the quality of the code itself, not the success of the product.)

    One of the biggest impediments to good software IMO is that the current crop of languages and tools don't punish laziness up-front. Using a magic number (or string) in a dozen places? No compiler will complain. Got a method that is calling myFoo.getList().calculateMarbleSize().insertInto( table )? No problem! Got a class that's importing classes from two dozen packages? Hey, it compiles, it must be good.

    All of these examples are well-understood problems which can be avoided or fixed with very little effort. But until we have languages and tools that actively encourage good practices, we'll keep writing crap.

    (Insert a rant about methodologies here -- I'm not going to go on anymore.)

    -Thomas

    1. Re:Embarassing by blakduk · · Score: 1

      Rather than thinking about competing methodologies, maybe the article is talking about competing fashion. Back in the late 80s and early 90s, "Object Oriented" became very fashionable, and, consequently, a marketing buzzword. Back in the elder days, NextStep was advertised as an "Object Oriented Operating System", i.e. you should buy it because it used OOP. Sheesh. What are the buzzwords today? "Extreme Programming" is definitely a contender. XP is very popular amongst undergrads - in part because of the "extreme" in the name. Were it called "Sensible Programming", then I imagine that its appeal would be much less. So, in the sense of fashion, AOP and XP replace OOP.

    2. Re:Embarassing by julesh · · Score: 1

      AOP? That's just a fancy way of inserting code into a class.

      OOP? That's just a fancy way of calling functions through pointers.

      (disclaimer: I've never used any AOP tools, but have read a little about them & think I understand the idea).

      Basically, both OOP and AOP are syntactic niceties for something that you could do in C (if you were willing to jump through hoops to do it).

      Got a method that is calling myFoo.getList().calculateMarbleSize().insertInto( table )? No problem!

      Other than the fact that the variable and method names seem totally irrelevant, what is the problem?

      Got a class that's importing classes from two dozen packages? Hey, it compiles, it must be good.

      Maybe that's what needs to be done to solve the particular problem that it solves. Sure, I'd say its a prime target for taking a lot at and maybe refactoring if on analysis it seems to be a real problem. But I don't want my compiler to complain about it, because compilers second guessing programmers is a BAD THING.

      (as an aside, maybe there is a case for a warning that can be disabled with an option in the source code here, but there are issues: where do you put the limit for maximum usefulness? Too low and people will just get used to switching it off. Too high and almost nobody will ever see it).

    3. Re:Embarassing by Tomster · · Score: 1
      Basically, both OOP and AOP are syntactic niceties for something that you could do in C (if you were willing to jump through hoops to do it).

      They are not just syntactic niceties. They are abstractions. (So is C for that matter.) They hide complexity, which lets you think at a higher level. Do not underestimate the power of abstractions. (Insert snide Star Wars comment.)

      Regarding

      myFoo.getList().calculateMarbleSize().insertInto( table )
      , do a Google search on "law of Demeter". The basic rule is only talk to your friends. You know about low coupling, right? LoD is perhaps the most well-known idiom exemplifying this rule.

      Finally... I can believe, just barely, that it is possible to have a class that has a valid reason for importing from two dozen packages, but I definitely want a tool to point it out to me and ask me if I'm sure that's really what I want. I can choose to ignore it, just like I ignore deprecation warnings. That's not second guessing, that's giving advice.

      -Thomas

    4. Re:Embarassing by julesh · · Score: 1

      They are not just syntactic niceties. They are abstractions. (So is C for that matter.)

      OK, I take your point. That doesn't stop the fact that I can implement code in C that is object oriented. And with a little work, I can also probably do something that is aspect oriented. The point is that when you say "AOP? That's just a fancy way of inserting code into a class" it concentrates on the mechanism of what it does rather than the benefits. Similarly to the fact that OOP is usually implemented (at a basic level) using a table of function pointers associated with each object. Both are things that could be done using a language that doesn't support the paradigm. Both are things that are made easier by tools that do. And both are things that are generally useful to be able to do.

      I definitely want a tool to point it out to me and ask me if I'm sure that's really what I want. I can choose to ignore it, just like I ignore deprecation warnings.

      Maybe you can. Many companies (and some open source projects) operate 'no warning' policies - no code that produces a compiler warning is allowed to be checked into the official source tree for any product.

      Java's deprecation warnings, at least, can be switched off by a directive in the source file (although I must admit I can't remember how to do it now...). Anything else like this must also have a similar way around it. There must be a way of saying to the compiler - yes, I know what I'm doing.

  40. The revolution: Generic Programming by Anonymous Coward · · Score: 1, Informative

    Yes, OOP is about to be not replaced, but seriously eclipsed. It will become just another tool in a (good) programmer's bag. A quiet revolution is happening as we speak (write), and it will rock the software world.

    Sadly, the article is completely missing it: I am talking about Generic Programming and templates.

    The constructs possible using it are truly staggering. It is changing the way we THINK about our programs. And the tools it is producing are breath-taking.

    Developers who used Loki, Boost, STL or WTL know what I am talking about. Read the Andrei Alexandrescu's book and prepare to be amazed.

    Sadly, Java will miss it entirely as well. No, the added support for generics in 1.5 does NOT count. It can't hold a candle to CPP's templates and it too much of an aftertought.

    But it's not for everybody. Not all developers are ready for the revolution. The one-language code monkeys for example, will be left behind (they're the guys with the "Java/C++/C rocks! and everything else sux"). Also the scripters (aka sysadmins) won't care: they are not even the target audience.

    But the real programmers, the ones of us who see the language as a tool for the task at hand, not a religion, are ready.

    Viva la revolucion!

    1. Re:The revolution: Generic Programming by Anonymous Coward · · Score: 0

      >>It can't hold a candle to CPP's templates and it too much of an aftertought.

      You mean like most of C++?

    2. Re:The revolution: Generic Programming by AtATaddict · · Score: 1

      I'm going to have to shill for Eiffel again. Eiffel allows for generics in a much cleaner way than C++, and it also allows for constrained genericity, whereby one can explicitly state that the class T(just because everyone uses T) must inherit (or "implement")some other class or interface.

      For instance, in the DICTIONARY class, the KEY class must inherit from the deferred class HASHABLE. If it doesn't, then the class might not have the proper routine to generate a hashcode, which is essential to the DICTIONARY class, and trouble could result.

      class DICTIONARY[V, K -> HASHABLE]
    3. Re:The revolution: Generic Programming by jacobm · · Score: 1
      --
      -jacob
  41. Amusing. by SatanicPuppy · · Score: 0

    Most of the programmers I end up working behind can't even master OOP. Ever see 10000 lines of code in a main method?

    --
    ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    1. Re:Amusing. by geekoid · · Score: 1

      yes, yes I have.

      I have the misfortune of writing in VB. One function has 1600 lines, not counting whitespace and comments, 12 goto/gosubs, and uses optimistic locking exclusivly.
      They won't let me re-write it, but then always complain about the dirty reads. I look at some of the forms and my fist clinch as I imagine pummling the original programer to death. To make matter worse, he gets 1000 dollar per installation.

      TANJ!!!!

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    2. Re:Amusing. by vadim_t · · Score: 1

      Yuck. Who uses gosub in VB these days? Goto is used as in "On Error Goto Somewhere" of course, but I can't think of anything that'd require using gosub.

  42. Booring by Webmonger · · Score: 1

    Sheesh, what a dull article. First, it goes over the history of programming languages yet again, and then lists a few methodologies and ideas that everyone's already heard of.

    There's no revolution here, folks. Move along.

  43. Modern ideas... by William+Baric · · Score: 0

    In the '70s, example programs tend to have a sausage-grinder structure: Inputs enter at one end, and outputs emerge at the other. Programs written in this style have not disappeared, but they are no longer the center of attention.

    This idea that modern programing is not about input one one side and output on the other is probably why it is still near impossible to write programs without bugs.

    The last real revolution in programming was not OOP but programs like Visual Basic which let people design interfaces without a single line of code.

    The next real revolution will be when code will be used only to create small modules which focus on ONE thing (following the model : input on one side and output on the other) and when the "linking" of these modules will be done with a CAD-like GUI.

  44. I disagree. by SatanicPuppy · · Score: 3, Interesting

    What you're saying is that "Bad OOP (pOOP) is not the answer" which I agree with.

    However, the idea behind object oriented programming is to break repeated tasks down to a general algorythm that can be reused at 1000 different places in the code without having to write 1000 different, but similar, pieces of code. This is always a good idea.

    Bad OOP is when some jackass writes a 600 line "Swiss-Army Object" and insists on including it everywhere instead of doing any new coding.

    --
    ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    1. Re:I disagree. by Anonymous Coward · · Score: 0

      > the idea behind object oriented programming is to break repeated tasks down to a general algorythm that can be reused at 1000 different places in the code without having to write 1000 different, but similar, pieces of code

      that is not specific to oo programming, just common sense good coding. actually, with inheritance and encapsulation, it is very easy to duplicate code because of overly rigid confines of oo coding.

    2. Re:I disagree. by rkischuk · · Score: 1
      What you're saying is that "Bad OOP (pOOP) is not the answer" which I agree with.

      Perhaps it should be "Poor Object Oriented Programming"?
      --
      Seen any BadMarketing lately?
    3. Re:I disagree. by sipy · · Score: 1

      But you miss one thing - Lacking documentation, no code, no matter how "perfectly OO" it is - can be reused. The potential reusers are afraid of "artifacts", and unknown behaviors, and - since programmers never document their API's unless threatened to burn in hell - they have no way of knowing what the code will do. Logical conclusion? Roll your own, and 0wn it. Why is Java even on anyone's radar scope? Because Sun put up the entire API - every single method, package, inheritance tree, etc - on the Web. NO WAY IN HELL would I even consider using their Buffered-this-and-that classes (much less URL and XML classes!) if there were no doc's available.

      Unless and until programmers are forced at gunpoint to document their code will there be even anything near 40% or more code reuse. If you're lucky, and YOU wrote the code, even YOU might be able to reuse, maybe 20% of your own code on another project.

      Let's hear it for making a language that STARTS with documentation (akin to Java's Interface specs) and THEN AND ONLY then allows you to attach code to it. What say you?

  45. matches, flares and spontaneous combustion by Anonymous Coward · · Score: 0
    these items all have to do with fire but have different uses, causes and safeguards (uhhh, spontaneous combustion is just there because it is an interesting concept... sorry) The saying of "ones mans trash is another's treasure" is useful here as we can all relate to how the wrong paradigms have been mindlessly applied to the wrong solutions often. I think having a fire that you can choose how it burns is important. I think that a fire with safegaurds you yourself have control over is VERY important.

    I recall seeing a very flame filled debate recently in which people argued vehemently that languages such as Java do not every NEED the ability to manipulate memory. What I didn't understand was why it always seems to be extremes that are practiced. "Why should I always have to bother with pointers?" is just as good a question as "Why should I be restricted from every tweaking the memory usage?" I think that eventually a paradigm will be implemented that better portrays the human method of communication, representation of the abstract and humans' use of patterns in general.

    I do think it is silly when people use bad design and bad programming then blame the language. However, I think there should be an easier method to quickly represent contructs, logic and flow of data that can when needed be easily drilled down to accomidate whatever level of detail or granularity I require. Sure you can do a bit of that if you use scripting languages, but at what cost to speed? Hmm, so it is optimization you are after then? A good compiler should be able to take a very high level language and well... compile it and create static compile time code of those things you have flagged as being able to be statically optimized and linked (or that you did not flag to be optimized).

    I think behind the actual language, behind the actual official paradigm is a problem of methodology that needs to be addressed. Just like a business that is growing fast, there needs to be a good set of processes in place so that the confusion of new hires is lessened and you are more productive. However, there is no official process of any type of business. You have to adapt and you have to adapt your process, this in of itself requires a methodology that most MBA's lack. Sure they know the literature and phrases inside and out but the underlying spirit is not present.

    1. Re:matches, flares and spontaneous combustion by pyrrho · · Score: 1

      >ever, I think there should be an easier method to quickly represent contructs, logic and flow of data that can when needed be easily drilled down to accomidate whatever level of detail or granularity I require.

      C++ is best as achieving this via it's multiparadigmed approach. imnsho, ymmv.

      Overall I think you make some very good points in your post.

      --

      -pyrrho

  46. Wrong by Anonymous Coward · · Score: 2, Insightful

    And never write OO when procedural programming can do the same trick in less space.

    Half the point of OO programming is so that later on you can change functionality easily, or expand the use in certain directions. One should always program in an object-oriented way (within anything other than a tiny application) for a few reasons.

    Firstly it can save an awful lot of time later on - I make an effort to have a sensible OO design to all programs I write, and although this may increase the time it takes to write the functionality the first time around, the amount of time I frequently save down the track when I need to expand the application more than makes up for it.

    Secondly, it is just good programming practice. If you are writing an OO program, you shouldn't leave chunks of procedural code lying around, because it is neither neat, nor consistant. If you are speaking in French, you don't throw in German verbs because they are faster to say...
    Now obviously there are always exceptions to the rule - although the only two I can think of is when speed is crucial (although with modern compilers the overhead of OOP seems to be extremely small), or when it is an extremely tiny application (but that goes without saying).

    1. Re:Wrong by Viol8 · · Score: 1

      "If you are writing an OO program, you shouldn't leave chunks of procedural code lying around..."

      Rubbish! Objects are PART of a program , they don't dictate the entire design of it! Obviously
      you've been spoon fed OO since you started coding and have no idea of any other paradigm.
      Your above statement is as absurd as saying that no program that uses structures should use any standalone integers , chars etc and using
      human languages as an analogy is flawed because that is equivalent to saying that you shouldn't mix C and Pascal in the same program file
      which everyone would agree with but isn't the point you're trying to make.

  47. Maybe good reason by yuri · · Score: 1

    Maybe the focus on new development techniques (patterns, xp) rather than new languages is because entrenched programming languages are not going to be discarded any more?

    I can't see people suddenly stopping programming in C, C++, or Java. A new language to gain widespread acceptance needs a huge library or backwards compatibility. Microsoft provided the libraries for .NET, It would of struggled without them.

    So maybe the focus over time is going to be in things like AOP, XP and Patterns which don't replace the current languages, but make programmers more efficient and allow them to deal with the continually increasing complexity of these systems.

    Then again maybe the next big jump was web services. They make the programming language an implementation detail.

  48. Strong typing and OO by dna_(c)(tm)(r) · · Score: 1

    "strong typing as a fundamental mechanism for OO" Strong typing (compilation time type checking) exists in C/C++ Java,... but has nothing to do with OO as such. The first 'real' OO language (Smalltalk) has runtime type checking. No casting, no template/generics mechanisms necessary. Takes a lot of overhead out of programming... Not really new. Still, I agree with your conclusion about strong typing.

    1. Re:Strong typing and OO by MeerCat · · Score: 1

      Strong typing (compilation time type checking) exists in C/C++ Java,... but has nothing to do with OO as such. The first 'real' OO language (Smalltalk) has runtime type checking. No casting, no template/generics mechanisms necessary. Takes a lot of overhead out of programming... Not really new. Still, I agree with your conclusion about strong typing.

      Yeah, I didn't mean to imply that dropping strong typing was new, or that it was fundamental to OO (more that it was taken as given in so many OO systems) - more that it was coming back into vogue.

      I've argued for some time that of the oft-quoted 3 fundamentals of OO (polymorphism, encapsulation, and inheritance) then inheritance is often mis-understood (if not redundant) as a fundamental. "Inheritance" meaning the way that you can re-use functionality by "Coding by Differences" sure, whereas "Inheritance as the only way to do Polymorphism" isn't wrong, but it's a feature of some OO implementations - others (such as SmallTalk) can choose to polymorphism in other ways.

      --
      T

      --
      I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
  49. The near future of real world programming by LoveMe2Times · · Score: 1

    If you want to see what the future of real world programming looks like, like no further than Boost. I say this because Boost demonstrates the programming techniques of the future that work on compilers available now. In theory, Boost techniques work on any standards compliant C++ compiler. Given that most compilers these days are still pretty weak on their standards compliance, the friendly Boosters have already coded a great number of work arounds so you can still use the libraries.

    Something that you might find surprising, though, is that the future is the past. Sort of. The future is shaping up to be a synthesis of great ideas from the past. Functional programming and metaprogramming are making a resurgence, except this time in moderation. You see, in the melting pot that is C++, you're not forced into any particular paradigm, and you get to use what works best for each subproblem. The real beauty, though, is that only library writers really need to be experts in this multi-paradigm thing; application writers can go about their merry business relatively unaffected, except with libraries so powerful you can't understand until you've tried them.

    For a sample of libraries to really blow your mind, check out

    1) Boost Lambda Library, which adds lambda function capabilities to C++. This is a staggering because C++ doesn't have lambda functions (like Lisp does).

    2) Spirit Parser Framework lets you write parsers in a natural EBNF type notation, without the need to run a seperate pre-processing tool like Lex/Yacc (Flex/Bison).

    3) Meta Programming Library. This ones a little tougher to wrap your head around if you've never tried writing generically reusable libraries. This is a library designed for other library writers, so #1 and #2 above make extensive use of this.

    4) Preprocessor Library. This is a library to help you do meta programming with the C/C++ preprocessor. See, not all inovation is coming from those new fangled template things. You'll just have to look at the examples to get why it's cool.

    The best part is that, unlike Perl 6, you can use this stuff now. Play around with, see how it works. You will be stunned, amazed, awed, etc by what these people have done. And you don't have to "get it" to use it.

    1. Re:The near future of real world programming by Anonymous Coward · · Score: 0

      You forgot one library: Loki. AFAIK, it's the only library that actually implements some of the design patterns made famous by the GoF (Gang Of Four) using generative programming using templates. It was so flexible that I was able to write a complete implementation of the Abstract Factory pattern in less than 20 lines of code (i.e. Both the AbstractFactory base class, and its ConcreteFactory counterpart). Not bad for a bunch of templates that I thought were only good for containers!

  50. yacc is back by Shamanin · · Score: 1

    Woohoo... and I thought that four years ago when I was instructed to use lexx and yacc that I was using antiquated technology. But the whole time using it I kept hearing my professor from ten years back saying "someday you will need to know this."

    --
    come on fhqwhgads
  51. on the definition of *need* by zipwow · · Score: 3, Insightful

    Some people using OO incorrectly does not mean that the entire concept is in error (insert baby_bathwater.comment).

    The statment "... OO is anything but straightforward when you think about all the layers that go into it." is a hint at the underlying problem, I think. If you have to think about the layers, your model has some problems.

    The functional system you describe with the module system sounds like it is building some very nice layers. I'm not saying it can't be done without OO.

    What I am saying is that OO (and OO languages like Java) encourage you to do it "the right way". You can write spaghetti code in Java, but it takes some doing. You have to sprinkle a lot of static keywords around, and make a lot of classes that don't make sense.

    Coversely, to write clean, modularized code in most fuctional languages, you have to be more "disciplined" and stay out of things that you shouldn't be in.

    I suppose, in conclusion, I would say that OO leads to very clean, straightforward code when the concepts are well understood and applied. Understanding and applying these concepts is not a simple task, however, and I'll admit that in the time I've been doing it (~7 years) I don't have it cold.

    Just my $.02

    -Zipwow

    --
    I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    1. Re:on the definition of *need* by Anonymous Coward · · Score: 2, Insightful
      You can write spaghetti code in Java, but it takes some doing.

      This concept is a complete fallacy. No, it does NOT take more effort to write bad code. In any language. Including the hallowed Java. Yes, even Java makes it extremely easy for you to write something so fucked up, no one will be willing to touch it with a 10 foot pole. The level of skill involved in writing well designed code in ANY language is roughly the same; ie. you have to operate at a level where the language used makes little difference. IOW, it's all in the design, stupid.

    2. Re:on the definition of *need* by Cthefuture · · Score: 1

      Well, the functional systems I mention use modules at a very high level (very much like C++ namespaces). So there is only ever one layer. I guess that's what I was getting at, one layer seems good enough to make things easy yet not overly complex. I don't find that you need to be any more displined in a functional language than say Java or C++. However, while I do realize the benefits of functional language, I don't think they are the end-all be-all of languages. My perfect language (at this point) would be less OO than Java/C#/C++ and friends, but more OO than C or Haskell.

      And sure, you can program pretty much any way you want to create different results, but most OO languages promote a system that I feel is too layered and complex. It may make things harder than they could be. But you're right, no matter what language, it depends on the skill of the programmers involved.

      --
      The ratio of people to cake is too big
  52. OOP Spaghetti and Object Taxonomies by RoninM · · Score: 2, Insightful
    What's the appeal of the OOP Spaghetti diagram? It illustrates a design problem, not a limitation of the model. The problems that diagram shows can be solved quite admirably in current OO languages. A few immediate solutions:

    #1. Observe that there's no benefit in Convex and Simple inheriting from Polygon. They are abstract classes of polygons classes for which instances cannot reasonably be constructed (because polygons need a number of sides) and, presumably, cannot implement many of the base operations of Polygon that they're inheriting. Thus, the hierarchy can be simplified by making Convex and Simple interfaces.

    #2. Another solution to the above observation is to make Convex and Simple mix-ins (if your OOP language supports them).

    #3. Don't try to account for two separate properties in a single taxonomy. Make either the number of sides or the type of polygon an instance attribute, rather than part of its type. For instance, we might decide that all polygons, regardless of number of sides, have the same basic set of operations, and so only work with Convex and Simple classes.

    Another distinct problem with the diagram is that it mixes what we assume to be instances (a star) with what we assume are classes (Pentagon). From what I've seen, the article deals with class-based OOP, so this is an odd confusion. In fact, the problem it illustrates is perhaps mitigated, if not eliminated, in moving to a prototype-based system.

    --
    If a corporation is a personhood, is owning stock slavery?
    1. Re:OOP Spaghetti and Object Taxonomies by Twylite · · Score: 2, Insightful

      Correct answer: #4: There is no absolute taxonomy. Every class hierarchy must be designed with due consideration for the application, that is, the manner in which it is to be used. Speculating about possibly representations is meaningless without such a context.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    2. Re:OOP Spaghetti and Object Taxonomies by Tablizer · · Score: 1

      Correct answer: #4: There is no absolute taxonomy. Every class hierarchy must be designed with due consideration for the application, that is, the manner in which it is to be used. Speculating about possibly representations is meaningless without such a context.

      I agree that taxonomies are relative. However, the granularity of the difference is often smaller than the application level. It is often different on a "task" level. However, if we take this observation to its logical conclusion, then we get nested IF statements and/or switch/case[1] statements, which are often considered a no-no in the OO world. The if/case's are essentially "local taxonomies".

      [1] The "break" statement is an evil construct left over from the C family, and is not needed in many other procedural languages. Thus, to judge case statements bad because of the dangers of "break" is misleading. That is a language-specific flaw that should be burried once and for all.

    3. Re:OOP Spaghetti and Object Taxonomies by RoninM · · Score: 1
      That's begging the question. The spaghetti diagram claims to be an example of a fundamental flaw in the model. We cannot begin refuting this claim by throwing out the example on the grounds of a design principle, no matter how good it is.

      Looking at it from a different angle, we may reasonably posit that the spaghetti diagram tacitly assumes that the illustrated design is the one arrived at for some application. It's not claimed to be an absolute taxonomy, after all. And while it's worthwhile to say, "This captures the mathematical concepts, but those probably have little relevance to the computational problem that the application is trying to solve; this design is probably flawed," that's not an answer to the claim. Best design practices can still lead you to a situation where you end up with (effectively) the same set of classes. How then do we create the class hierarchy to take advantage of the (probable) roles of these classes in the application, but without the complexity the diagram implies is fundamental? That's the question I was answering.

      --
      If a corporation is a personhood, is owning stock slavery?
  53. They did? by zipwow · · Score: 1

    The word I see there is "generative", which I interpreted to be something quite different from the generics and templates discussions that happen with C/C++ and soon Java.

    -Zipwow

    --
    I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    1. Re:They did? by Webmonger · · Score: 1

      Well, I would say they coverage was pretty limp, but it was covered.
      template <typename T>
      T square(T x)
      {
      return x*x;
      }

      The template function above isn't actually a function. It's a recipe for generating functions. It's a way of making the compiler write the function for you when you invoke square(myFloat).

      Before I posted, I thought they'd said "generic" where they actually said "generative". So I searched on "generic" and didn't find it. Then I searched on "metaprogramming" and found it. But generic programming is definitely metaprogramming.

      I didn't like the article-- it didn't say anything new or anything deep. But they did cover generic programming in their half-assed way.

  54. XP as a way of programming by ctrimble · · Score: 5, Informative
    There are a fair number of posts talking about how XP is a methodology or a workflow, and not actually a programming paradigm. To a large degree I agree with these posters, and it could very well be the case that it was the intent of the writer of the article to present XP as such. However, there are aspects of XP that are nearly "paradigmatic".

    XP is heavily influenced by TDD -- Test Driven Development. The idea is that you only write code when you have a failing test. You write the test, it fails, you write the code to make the test pass. Then you go back to the requirements, write another test specified by the requirements, run it, it fails, so you write the code to fix it. Repeat until all tests (unit and functional) pass. When all your functional tests pass, you've met the requirements for the app (because the functional tests represent the use cases) and you're done.

    Coding in this fashion does two things. It ensures that you've got a safety net at all times, and it forces your code to be loosely coupled and modular. Because you have 100% coverage, you're not afraid to change the code, because if you break something, you'll get a failing test. If you make a change and all your tests pass, you have the confidence that you didn't inadvertently break something in your code.

    Additionally, your code needs to be modular and loosely coupled because it's tough to test if it isn't. If you have a God Class with lots of dependencies, you won't be able to unit test it because of all the dependencies. That's to say, you won't be able to test it as a unit. If you have a method that's doing lots of things, you'll have to write lots of tests to verify every path of execution. So instead, you're strongly encouraged to write simple methods that do one thing well for ease of testing.

    A real OO guru knows all sorts of things about coupling and cohesion and patterns and when to use composition and when to use inheritance. They always obey the Law of Demeter and consistently separate the implementation from the interface. And to be able to do this, they've got a dog's life of OO experience under their belt. Here's the kicker. The XP evangelists say that using XP and TDD, in particular, gives you the benefits of all this experience as an emergent property of the methodology.

    You obey the Law of Demeter because testing a class that breaks it isn't a unit test -- it's a subsystem test. You use interfaces because it allows you to substitute mock objects for the objects that your object under test interacts with. You use composition and inheritance appropriately because your tests will fail if you don't. Oh, and by the way, if you start with inheritance and move to composition, it's not a problem because all your tests will insure you don't leave something broken.

    The point is that a programmer really only needs to learn how to write good tests in order to be a good programmer. TDD gives you all the stuff that you would normally have to have gained through experience.

    So, that's why I think it's similar to AOP. They both produce higher quality and more maintainable software. However, TDD is a social solution, while AOP is a technical one. And, as long as I'm on my soapbox, I'll just mention that many patterns are compensations for things that more powerful languages do easily. For example, lisp's map procedure is an example of Visitor. Generally, languages that support higher order functions, or that treat functions as first class types, don't require as much pattern silly-walking. Also, AOP is old. Lisp has had it for a long time. In fact, the main architect of AspectJ, Gregor Kiczales, worked on the Common Lisp Object System (CLOS) with Richard Gabriel. Plus ca change, plus ca meme chose, innit. Here's a link to some thoughtful writings on the subject.

    One other point -- for those inclined towards genetic programming. I think that the XP TDD way of programming suffers from the same problems as the hill climbing algorithm. It tends to produce quality, but I think it's easy to get stuck at a local minimum.

    1. Re:XP as a way of programming by russh347 · · Score: 3, Insightful

      The point is that a programmer really only needs to learn how to write good tests in order to be a good programmer. TDD gives you all the stuff that you would normally have to have gained through experience.


      I have to disagree. It's unlikely that a programmer who can write good test won't write good code. TDD isn't about traditional testing. Its about expressing design through testing. In that environment, if you are writing good tests it means that you have correctly and completely expressed the design in a way that can be automatically validated. Also, implementation of the tests depends on virtually all the skills required to write good code. If you can write good tests for TDD, then you can also write good code.

      All of the skills for writing good tests and writing good code are gained through experience. TDD is not a substitute for experience, it is a method for exploiting experience.


      One other point -- for those inclined towards genetic programming. I think that the XP TDD way of programming suffers from the same problems as the hill climbing algorithm. It tends to produce quality, but I think it's easy to get stuck at a local minimum.


      Every development methodology has a tendency to get stuck at a local optimum.

      There are techniques in evolutionary computation to get out of a local optimum (adaptive mutation rates, forking, migration, restarts, ...).

      XP provides a low risk way to do the same. Sweeping design changes that would ordinarily force a project manager to mainline prozac can be handled with very little risk. I've seen it done... I've done it myself.
  55. stupid managers and stupid HR by f00zbll · · Score: 2, Interesting
    That is the biggest cause of spaghetti code. how many good teams have been ruined because the management thinks "We need 30 bodies!". Or HR's "that person doesn't exist, so just hire this guy. He only wants half the salary of the other guy."

    Until management and HR get it through their head that programming is about hiring the "right people", building software will still be spaghetti. Crappy programmers who can't think beyond the line they are currently typing is the main cause of a lot of problems. In the worse cases, it's programmers who refuse to listen and understand the functional requirements before they code. Not enough programmers take a humble approach and take time to listen closely and think ahead.

    Not everyone can and even the best programmers can't think of everything. It's all about finding the right balance to build a team that compliments each other.

    1. Re:stupid managers and stupid HR by jjohnson · · Score: 3, Interesting

      As a manager at a manufacturer, I'll let you in on a little secret: This is true in all areas of business, not just IT. A good inventory manager is worth his weight in gold (and ours is quite fat...); a lousy inventory manager will drag the whole damn company down.

      I have to say that, after a few years of reading Slashdot, it seems like programmers have a perpetual thirtysomething syndrome going on--the perception that our problems are somehow unique. They're not. Reread the Hacker FAQ for Managers, and every time the word "hacker", "coder", or "programmer" appears, mentally substitute "employee" and see if you don't get a general management guide that makes sense.

      --
      Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
    2. Re:Re:stupid managers and stupid HR by f00zbll · · Score: 2, Insightful

      exactly, the problem isn't unique. Just people with Phd's think some stupid concept will solve a human problem.

  56. Who needs Aspect Programming? by cdemon6 · · Score: 1

    The problem of multiple inheritance he mentiones to justify the use of Aspect Programming is solved by interfaces in Java. That does imho not need a new software design but a good design of an OOP language.

  57. Programs don't change, only languages by TheEnigma · · Score: 2, Interesting
    Has anybody mentioned that all of this talk of languages and programming models is purely for the sake of forcing programmings to adopt good practices, mostly by restricting their freedom to screw themselves?

    Let's remember that, once you compile a program, you are left with the same thing no matter what language you used: instructions and data. Because all you really have to work with is memory and processors (and I/O, but you can treat that like the other two).

    I am far more interested in the progress of automating the development of programs than in the formalization of How Not to Do Stupid Things (TM). I choose languages and tools which save me time and repetition, because tedious (and mindless) repetition is a sure way to increase the probability of human error. Silly ideas of aesthetics and tradition are of no use to me.

    Perhaps the new frontier of programming is not the language, but the development environment. Then again, that's really what a language is: an environment for managing the production of machine code. But environments are more than languages now, so why not exert some serious effort, and do some serious studies, of the impact of the whole environment?

    --

    My blog: The Bored Astronaut

    --

    Stand back. I've got a brain and I'm not afraid to use it.

  58. POOP: Who gives a shit? by EmbeddedJanitor · · Score: 1

    The nice thing about a new paradigm is that you know it will be obsoleted by the next one before it has to prove its worth.

    --
    Engineering is the art of compromise.
  59. MOD PARENT UP! by frank_adrian314159 · · Score: 1

    This is SO true. I believe that the majority of languages out there today are being designed by morons, for morons. Anyone who is too lazy to learn a new programming paradigm from the roots up is too lazy to program well.

    --
    That is all.
  60. Not so embarassing? by zipwow · · Score: 1
    The article didn't represent XP as a "replacement" for OOP, unless you only skimmed it. From the article:

    Most of the post-OOP initiatives do not aim to supplant object-oriented programming; they seek to refine or improve or reinvigorate it.


    And your comment that OOP problems are the same everywhere and mostly people oriented is also addressed in the part of the article about 'pattern programmers':

    The pattern movement [...] suggests instead that programmers are [...] stewards of a body of knowledge gained by experience and passed along by tradition and apprenticeship.


    Your comments that compilers should complain about magic numbers sounds good, as well as the "don't take others' toys" comment (myFoo.getList().calculateMarbleSize().insertInto( table)).

    Your next sentence mentions tools though, and at least in Java, there are tools to detect those for the meantime,
    PMD looks like a good one.

    I've had some success with using tools like these and some peer review, which is mostly peers running the tool on the whole codebase and saying, "Why is this like this" when you write something that breaks it.

    -Zipwow
    --
    I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    1. Re:Not so embarassing? by Tomster · · Score: 1

      PMD looks interesting. I'll take a look, thanks. (And if I get real ambitious I'll see about integrating it into Eclipse, assuming it hasn't already been done. But don't hold your breath :).)

      Maybe it was just my reading, but I did get a sense that they were at least implying that OOP was being supplanted or perhaps deprecated in favor of XP, patterns, AOP. And I also kept getting a sense of "gee, that's hardly news". Still, I was in a bit of a mood yesterday and so I was more critical than I ought to have been.

      -Thomas

    2. Re:Not so embarassing? by zipwow · · Score: 1

      You know, in thinking about it more, you're right in saying that at least the title suggested that there was some approach beyond additions to OOP. Probably the author looking for more views.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
  61. This is where XP can help... by Anonymous Coward · · Score: 0

    """
    However most OOP programmers try to over-OO everything. ... This leads to situations where you've got horribly bloated code that runs slow as hell.
    """

    Note that you're much more likely to avoid this problem if you're required to have somebody who's bored out of their skull sitting beside you nagging you to get back to programming the actual features so you can both go home.

    That's how I've seen pair-programming work -- you're either doing something interesting or you're trying to come up with something interesting to avoid doing something that's too dang boring (rather than just plowing through and being miserable with your job) because the person who's not on the keyboard has to be entertained as well.

    Heck, I'd be gladly pair-program with a Business Analyst (because I've got l33t communicaiton skillz) if my company could afford to get somebody local and focused on features. "Here's the proof for feature XYZ, based on your F-Spec. Now we're implementing feature XYZ. Here's steps 1 and 2 and 3. Good? Done, Check. Moving on."

    Wish wish wish wish wish.

  62. AOP...I dunno by the_2nd_coming · · Score: 0, Redundant

    what are the benifits over OOP?

    is it like building a a room rather than building a thing? if so, why not build a room and fill it with things? so you get aspect object oriented programming.

    the two seem complimentary to me.

    --



    I am the Alpha and the Omega-3
  63. Evolved OOP by LionKimbro · · Score: 2, Interesting

    There is plenty of room for OOP to evolve.

    Go in the pattern direction, and add language support to make good practice easy.

    C# has already started this process, by including event schemes and automatic get/setters.

    Now what we need is language support to be able to remap functions from member objects.
    That frees you up from having to inherit when you don't want to, and allows you to make really good
    cuts of functionality cheaply.

    There are so many good object structures that are just totally impractical to write, because 99% of your code would look like:

    ThisObject::MethodA(all-the-params) { return mySubObject::MethodA( all-the-params ); }

    If you could remap quickly and easily, we'd be in the Haranya Loka of design.

    1. Re:Evolved OOP by yarisbandit · · Score: 1
      Right. Time for some off-the-wall theory here. It should be possible to remap to functions of member classes automatically using reflecion.

      You could pull out a list of functions in the member class using Type and getMethods() and then use 1. System.Reflection.Emit.MethodBuilder to create a method dynamically and 2. MethodRental to point the body of the newly created method to the existing method in the member class. Whew.

      Type t = typeof(System.Int32);
      MemberInfo[] m = t.GetMethods();
      foreach(MemberInfo m1 in m)
      {
      //Do some reflection
      }
      See the msdn docs for System.Reflection.Emit here. Have a look at this too.

      You'd probably have to create a dynamic class to add the methods to, if so you could reflect everything in the main class and reference the new class after you jit compile it.

      Dunno how the VS compiler likes calling methods that are created at run time though.

      Ok maybe it's time to leave it as a nice theory :P Food for thought though, might help ye.
    2. Re:Evolved OOP by yarisbandit · · Score: 1

      No, wait, I can't tell you this kinda stuff, it breaks the rules of OOP ;)

  64. Why OOP isn't a big deal by Dub+Kat · · Score: 1

    There's a good and quick article, written by Paul Graham on why his new 100 year language isn't obect-oriented. I think those LISP designers were on to something...

  65. OOP objectivity? by xot · · Score: 1

    ain't it all objective anyway? or should i use the word relative to be more precise? :)

    --
    Lord of the Binges.
  66. generic programming by Anonymous Coward · · Score: 0

    Why would the article mention generic programming? For one thing, generic programming has been around since the stone age of computing. (Think LISP.) It's definitely not post-OOP. The fact that Java and C++ are just now adding it is just an artifact of the way Java and C++ are engineered to run.

    1. Re:generic programming by PD · · Score: 1

      I know that LISP introduced it, but we're looking for things that might take off after OOP. Generic progamming might be one of those things.

  67. No silver f-ing bullet, people! by Xenophon+Fenderson, · · Score: 5, Interesting

    It pisses me off every time somebody comes along and thinks they can shoe-horn all possible solutions to all possible problems into a single programming style. So for everybody who's a newbie, let me impart a little wisdom to you so you don't have to learn it the hard way.

    There is no silver bullet, no magical solution, no instantaneous makes-my-problem-go-away widget that is all things to all problems.

    Use the right tool for the right job. Sometimes, a functional style is useful (especially when one's teaching programming language concepts and higher-order mathematics). Sometimes, procedural tools with abstract data types are useful. And sometimes, functional, procedural, and object-oriented styles can work together to solve a problem (such as the machine simulator I'm writing in Lisp).

    Rant mode off.

    --
    I'm proud of my Northern Tibetian Heritage
    1. Re:No silver f-ing bullet, people! by Anonymous+Brave+Guy · · Score: 2, Funny
      There is no silver bullet, no magical solution, no instantaneous makes-my-problem-go-away widget that is all things to all problems.

      Of course there is. In fact, a new entry for the JCP to create a class AnythingDoer is being worked on as I write. From J2SE 1.6 onwards, you will be able to write a program to do anything you want as follows.

      public class WholeProgram
      {
      public static void main(String[] args)
      {
      AnythingDoer omnipotent = new AnthingDoer();
      System.exit(omnipotent.doEverythingINeed()); }
      }

      At that point, functional programmers will be feeling small and insignificant, finally realising the underwhelming lack of power that their tools really don't possess, and the need for any sort of formal training for pogrammers will be resolved once and for all.

      For example, if you had no idea how to get /. to indent your sample code sensibly, you could just call that method and it would cause some helpful soul to reply and end months of frustration. :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    2. Re:No silver f-ing bullet, people! by esap · · Score: 1

      There is no silver bullet, no magical solution, no instantaneous makes-my-problem-go-away widget that is all things to all problems.

      But silver bullets do exist. Or what do you think they used to kill all those werewolves? But granted, it was a magical solution to a non-existent problem. I guess many solutions in the software industry follow this pattern. On the other hand, this is exactly what many people expect software to do.

      It's much easier to sell magical solutions than those that actually work. Not many people get excited about software that just silently performs all the work. You need those small problems to ensure that the people in charge find out your product exists, so you can also sell them the next version. :-)

      --
      -- Esa Pulkkinen
    3. Re:No silver f-ing bullet, people! by Twylite · · Score: 0, Redundant

      There is no silver bullet, but there are many golden hammers.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    4. Re:No silver f-ing bullet, people! by Anonymous Coward · · Score: 0

      Actually you can have a silver bullet - theoretically. If R&D in adaptive software is sufficiently successful, then the variability and complexity of programmatic problems can be 'captured' in the models of the adaptive software. In that case, there will be only one right tool for the job - a tool that is sufficiently modifiable to cover all or at least several of the programming tools abilities ... the proverbial swiss army knife.
      The silver bullet is all things to all problems because it is flexable, modifiable. That's how it would be done. Apparently AOP is considered part of this field.
      Of course all this is still on the drawing board. But hey, you never know.

  68. Re:15min and its down? by Anonymous Coward · · Score: 0

    Somebody should do something, but is it Slashdot's fault that the model on which the web is built is fundamentally bad at this kind of thing?

    Mirrors of web sites are a giant, gross hack. There is a namespace of documents, and suddenly I'm supposed to think of a document as existing in another part of the namespace just because of some vagaries of how heavily loaded some server happens to be right now? That's the kind of thing that indicates that a software system really isn't doing everything it could / should to make humans' lives easier.

  69. The future -- take the best of declarative but... by Anonymous+Brave+Guy · · Score: 1
    I really don't think in the commercial world any well designed language is going to be popular.

    In the commercial world, theoretically sound languages will become popular if and when the tools, user base and code base reach critical mass. These are the things that make the best practical tools of today (Java, C++, VB, etc.) popular, in spite of their well-known flaws.

    I have high hopes for programming by specification, as in functional languages and such, but they, too, have their flaws. In particular, while they're dead neat for modelling calculations that just need to give you the right answer by whatever means necessary, they suck for modelling the concept of interaction with the outside world because they have problems repesenting the flow of time. Unfortunately, the benefits and problems are inherently tied together in a specification approach; the very things that give one also give the other.

    What's needed, and my take on the next big thing in programming, is a language (textual or otherwise) that can represent both the flow of time to deal with interactions and pure specifications of the calculations and data manipulation to be done as a result, preferably with both being conceptually independent of the underlying machine. For example, I'd like things like threading and synchronisation to be mostly implicit, and I/O to be defined in terms of sequences of interactions and how they relate, much as in a specification language you can write a complex mathematical expression and only care that you get the right answer, without knowing where the calculation was performed, whether it used multiple threads/processors, etc. Of course, there will always be a certain need to understand the underlying model, just as when doing floating point maths you have to understand basic numerical analysis to avoid nasty surprises.

    Some languages are heading in this direction already, but I don't know of any that's close to my ideal goal. When one comes along that reaches a critical mass of interest, the industry will start to change, slowly but surely, to adopt the theoretically superior approach. I'm not sure that language actually exists yet, though, nor what might act as the catalyst to get it to critical mass -- maybe the power of the Internet and enough geeks in senior developer positions taking a liking to the idea when it comes along?

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  70. How often is code actually re-used? by Benm78 · · Score: 2, Interesting

    Often, I wonder how often code is actually re-used, and adapted later on.

    Both conditions will have to be met to make the big idea behing OOP work. I'm sort-of an P/R fan and programmer, and I see no reason to assume that OO as a whole has been a good thing.

    Lets just get rid of it, never speak the words or acronym again, and revert to P/R programming. If someone could think up a great acronym for this process, I am convinced corporate management is quite willing to accept it.

    1. Re:How often is code actually re-used? by johnnyb · · Score: 1

      Actually, re-use is not the big idea that OOP gives. At least _code_ reuse isn't. _Interface_ re-use is the biggy. The ability for multiple, disparate objects to be operated on through similar facilities _is_ the big breakthrough, which makes life a lot easier.

  71. Thanks for the definition of POOP by jonskerr · · Score: 0

    So often people assume everyone knows every acronym, and those of us who browse this site to learn about stuff often feel left out. So thanks for defining POOP!

    --
    O~ Him that studies revenge keeps his own wounds green. -- Francis Bacon
  72. Why bother by Anonymous Coward · · Score: 0

    The article's title indicates that there would be a successor the the OOP paradigm. I read through all the boring stuff that even a beginning programmer knows about hoping to finally be presented with what the successor paradigm to OOP could be. But the article ended before addressing the topic mentioned in it's headline.
    What a waste of time.

  73. Re:True of most fresh programmers by smallstepforman · · Score: 1
    It's a tough craft, and it takes a few years of being an idiot until you start producing really good code, regardless of methodology.

    This is the most intelligent thing I've read all week. Well said.

    --
    Revolution = Evolution
  74. Aspects of inheritance by Skapare · · Score: 1

    If all the various classes of objects that have a rotate method need to send a message to the update display method, why can't the inheritance mechanism provide for that by having an inherited rotate method that, instead of being replaced by a rotate method included in the inheriting class, just invoke them both? What would be needed is a special primitive to be used in the superior rotate method that indicates where the inferior rotate method is applied. Suppose that mechanism is an "inferior" statement. The superior rotate method might be as small as having code to first do "inferior" followed by "update display" and that's all. This would be more mechanical than AOP promises, but at least it would avoid having the display updated before the rotation.

    --
    now we need to go OSS in diesel cars
  75. Better amalgam of current techniques by akuzi · · Score: 1

    I think the author makes a good point that different programming paradigms are suited to particular problem domains. I think it is not well understood when different models are the most suitable, and even when we do it is too hard to mix paradigms within the same program, or the language of choice doesn't support the best option.

    Modelling a GUI interface is done very naturally with OOP because is easy to isolate separate independent components, but OOPs seem less well suited to problems involving relationships across many types of data where structured, relational or functional paradigms are more suited. (I think the average database backed website is a good example - or a mathemetical engineering application)

    Perhaps in the future programmers will better understand better which mixtures of paradigms to use and languages will allow this better. Progress will probably also be made in bridging the gulf between programming models so they may be more easily used together. An example of this is EJB-QL (part of the EJB 2.1 spec), a relational-like query language that works on top of EJB objects.

  76. Fad? Whos is Fad? by Anonymous Coward · · Score: 0

    Just let programmers program! The recommended protocol is to work in pairs, two programmers huddling over a single keyboard, checking their own work as they go along. Is it a fad? A cult?

    When I read this I can stop to laugth when I see my Boss, who propose Extreme Programming and he hate gay .. ;)

  77. Boost falls to Greenspun's Tenth Law by Anonymous Coward · · Score: 2, Insightful

    Greenspun's Tenth Rule of Programming: "Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp."

  78. OOP considered harmful... by Anonymous Coward · · Score: 0
    The weaknesses that led to the decline of CODASYL network databases and the rise of relational technology are glaringly apparent in OOP:
    • lack of a adequate mathematical model
    • brittle behavior in the face of change

    Declarative languages do not display these flaws and for that reason will eventually dominate. Although declarative languages are somewhat more difficult to learn, programs written in such languages are much more amenable to change than are other programming languages. They are also highly expressive, requiring a minimum of code to perform a task.
    SQL and other relational database languages are a very limited subset of declarative languages, yet relational databases dominate the database niche and far outnumber object-oriented databases.
  79. Re: Give them a hammer and.... by glenebob · · Score: 2, Interesting

    Hammers pound? I don't think so. Hammers don't do anything.
    You soon learn that it should be:

    Worker.UseTool(Hammer, Nail);

    Then you realize that OOP is just a nice way to organize things, and that it's all just a prettier procedural anyway.

  80. Congratulations! by geekoid · · Score: 1

    In your effort to be pendantic, you have picked apart an example while missing the point entirely!

    Good for you, cause you might have had to think about there point otherwise.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  81. I lost my job do to buzzword confusion. by geekoid · · Score: 1

    " I told my manager in a design meeting that we should do all new development using SHIT techniques and SHIT tools and SHIT constructs. Now I'm unemployed like the rest of you."

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  82. Holy Shit by Weenis-X · · Score: 0

    Man, you got totally ownx0red by that PD guy. I recommend you go cut off your dick immediately and bury it in the backyard. On second thought, cut off your dick and mail it to PD, so he can put it on his wall like a trophy. YOU HAVE FAILED IT.

  83. Re: Give them a hammer and.... by pyrrho · · Score: 1

    and inside Worker...

    void Worker::UseTool(Hammer ham, Nail nail)
    {
    ham.pound(nail);
    }

    assuming you have an assortment of tools and nails, surely you don't want all the tool and part logic in the Worker itself... whats the point of that?

    We don't want to simulate the real world, we are abstracting the logic needed to implement an algorithm.

    --

    -pyrrho

  84. Revolution = coming around again by Anonymous+Brave+Guy · · Score: 2, Informative

    At the risk of stating the obvious, the ability to do generic programming (in the sense of working with arbitrary interfaces without needing the inheritance/OOP angle to specify that they're met) has been around for decades in many languages.

    There's nothing inherently special about generic code. From a certain point of view, the very fact that generic algorithms and data structures are regarded as anything but the obvious default is just indicative of a flaw in the underlying models of languages that need templates etc.

    I appreciate your enthusiasm, and generic programming is a fine idea, but if you think things like the STL and expression templates are original, you need to read up on things like functional programming, where vastly more powerful versions of the same concepts are routine. These libraries are very useful tools for languages that don't support the concepts natively, without a doubt, but magical they ain't.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  85. Re: Give them a hammer and.... by glenebob · · Score: 1

    >> you don't want all the tool and part logic in the Worker...

    Uh... We don't?

    >> We don't want to simulate the real world

    On the contrary, that is precisely what OOP is trying to do.

    Besides, my example is not bases on the assumption that OOP models the real world. It's based on experience. Hammer.Pound() becomes restrictive and hard to maintain. As it turns out, the real world approach is just better.

    So why does Hammer.Pound() make more sense than Nail.GetPounded()? Or Board.GetNailed()? None of them make sense, yet that's what OOP classes teach.

    Generic programming has the right approach, such as the STL. You don't List.Sort(), you Sort(List). If you want pure OOP, Perhaps it would be better to have an Organizer class, and do Organizer::Sort(List) (you'd have to do that in Java or C#). It becomes more obvious when like objects have to interact. Which object does the work? How do you decide? You don't! You create another class to do the work: Copier::Append(List1.Begin(), List1.End(), List2), or even Comparer::CompareNoCase(String1, String2). This helps eliminate the SwissArmyKnife approach (like a string class that knows how to write itself to a socket or grep itself). It keeps things simple, modular, and flexible.

    I think what this shows is that the procedural approach is just as valid as it ever was, and that it sure is nicer to work with once we have OOP to help us organize things logically.

  86. SQL by mparaz · · Score: 1

    Any "enteprise" programmer has dealt with SQL, so we've all done declarative programming. But mixing SQL with procedural code highlights the impedance mismatch between objects and database tables.

    1. Re:SQL by Tablizer · · Score: 1

      Any "enteprise" programmer has dealt with SQL, so we've all done declarative programming.

      As a relational language, SQL stinks. There are better alternative relational languages. We have a jillion procedural and OO languages floating around, yet only one relational language with any measurable implementations. Why is this? (Some suggest that SQL does not even qualify as "relational".)

      But mixing SQL with procedural code highlights the impedance mismatch between objects and database tables

      This sentence does not make sense to me. It is objects and relational that have the mismatch, not procedural and relational. Procedural and relational get along quite well IMO because they generally don't compete for the "noun model", unlike OO and relational.

  87. type inference from Haskell by axxackall · · Score: 2, Interesting
    Also a pretty picture of OOP Spaghetti

    The "spaghetti" problem of multiple inheritance or of even multiple taxonomies is not really a problem in languages supporting type inference (I am sure about Haskell, perhaps OCAML as well).

    I don't think OOP is a problem. In fact, OOP is a useful paradigm. The problem is that OOP should not be the only useful paradigm to be used. Type constructors, recursion, constraint programming, pattern matching, and of course type inference are other useful ones.

    But what's even more important, OOP paradigm should be mixed with very dangerous paradigms, such as distructive assignment. Do you want your code being capable to change itself in an arbitrary way? No one loves buffer overflow. But why most of programmers are ok with destructive assignment? Variable value is a part of the (run-time) program code, it should not be modified - only created.

    Interestingly, while mathematically educated programmers do already (how many decades) know that the future is for FP, programmers without good math background keep re-inventing the wheel involving structured programming, OOP, AOP (what next? TOP as taxonomy-oriented programming?) - all what was already existed in FP (and/or LP). How many more billions they will flush to toilet before realizing that?

    --

    Less is more !
  88. Why? by Anonymous Coward · · Score: 0

    Explain. I think he hit the nail on the head.

  89. Mozart-Oz-Beyond OO by randall_burns · · Score: 1

    Mozart-Oz is an example of a language that goes way beyond a simple OO paradign(and incorporates features of Functional, Logic and Constraint programming. The thing that most language designers (including the Mozart-Oz folks) miss is that much of business programming is built around _relational_ semantics(i.e. the basis of SQL).

  90. Don't forget processes by Anonymous Coward · · Score: 0

    I think languages are not everything in order to reduce complexity and make things run smoothly.

    For example, a process in which even a trivial thing takes a week or two at best to approve and in which iterations take a very short time is broken. This is because if you get stuck in the approval part and it takes longer than the iteration, it means that component and all components which depend on it will be delayed.

    That kind of model is just a big bad waterfall in disguise even if it's aiming to be an evolutionary process.

  91. In Defense of VB by Anonymous Coward · · Score: 0

    Sometimes you need to use the best tool for the job at hand, and strangely enough, VB is sometimes that tool.

    No, I'm not a VB programmer. But I understand the need for VB programmers.

    Not all projects need C++ or Java's overhead. The overhead being the need for a C++ or Java programmer when all you need is a part time programmer, someone who does other tasks, but knows a little VB.

    I like to think of VB as the glue that ties more complex apps together for a custom job.

    1. Re:In Defense of VB by HBPiper · · Score: 2, Informative

      There is a need for VB. VB is a great way to prototype a new product interface or set one up for a one shot tool. If you want the project to be truly useful however, you need to consider OOP or structured programming techniques during the design. I don't know how many times I have been handed somebody's little "VB" tool that has become indispensable to company operations, but needs "one more feature" and found out that code reuse to this person means yet another copy of the same 20 lines of code attached to every frickin object in the project. There in lies the inherent danger of VB. Anyone can learn enough to be dangerous. But when they start drowning, they call for the software guys to bail them out, and then the finger pointing begins.

      --
      "I went on a diet, swore off drinking and heavy eating. And in fourteen days, I had lost exactly two weeks. Joe E. Lewis
  92. Mother of all OOP criticism websites by Anonymous Coward · · Score: 0

    Mother of all OOP criticism websites. This author lives to bash OO up down and all around.

  93. Does OOP lack math? by Tablizer · · Score: 1

    The weaknesses that led to the decline of CODASYL network databases and the rise of relational technology are glaringly apparent in OOP: lack of a adequate mathematical model...

    These webpages describes the lack of "math" in a bit more detail:

    http://www.geocities.com/tablizer/core1.htm

    http://www.c2.com/cgi/wiki?OoLacksMathArgument

  94. New Technolgies Encompass old by some+guy+I+know · · Score: 1

    Spot-on, archeopterix!

    The Bronze Age didn't replace the Iron Age; iron was still used.
    The Information Age didn't replace the Industrial Age/Atomic Age/Space Age; the things that named those ages are still used.
    A newer age and newer technologies build on and/or encompass the old.

    Parts of the older technologies are abandoned or relegated to the "little-used" catagory as they become obsolete (animal-driven wooden plows, self-modifying code, slide rules), but many other things remain (planting in rows, satellites, nuclear power plants, mostly sequential program execution, octal/hexidecimal notation).

    Similarly, the post-OO world will probably encompass OO and use many aspects of it.
    So the useful concepts of OO will not "go away", any more than have the useful concepts of structured programming, assembly-language programming, or even machine-language programming, when something new came along.

    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
    1. Re:New Technolgies Encompass old by Anonymous Coward · · Score: 0

      Hate to break it to ya, but the Bronze Age didn't replace the Iron Age because it came before the Iron Age. If anything, the Iron Age replaced the Bronze Age.

    2. Re:New Technolgies Encompass old by some+guy+I+know · · Score: 1

      Hate to break it to ya, but the Bronze Age didn't replace the Iron Age because it came before the Iron Age. If anything, the Iron Age replaced the Bronze Age.

      Sorry, I was thinking, er, uh, steel age.
      Yeah, that's it, steel age.
      The steel age replaced the iron age.

      ...

      No, wait, wait, I meant stone age.
      The Bronze Age replaced the Stone Age.
      There, that's better.
      Yes, the Bronze Age replaced the Stone Age, but stone was still used.

      (Save!)

      --
      Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  95. Re: Give them a hammer and.... by Twylite · · Score: 1

    I'm glad someone said this :)

    Unfortunately real-world practice is usually quite diffenent, even when correctly modeled:

    final HAMMER_WORKER_NAME = "worker.hammer";
    try {
    Worker w = Worker.getInstance(Messages.getInstance().getByNam e(HAMMER_WORKER_NAME));
    Hammer h = Hammer.getFromPool();
    Nail n = NailStore.getInstance().createNail();
    h.setNail(n);
    w.setHammer(h);
    Thread t = new Thread(w);
    t.start();
    } catch (WorkerException e) { //
    } catch (HammerException e) { //
    } catch (NailException e) { //
    }

    Sad but true.

    --
    i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
  96. Separating Declaration and Implementation by Frans+Faase · · Score: 1
    The great problem with OOP is that it is both used in a declarative sense and as an implementation method.

    What we really need is a separation of concerns. A combination of declarative languages (possibly visual as well) and language for specifying how to implement the declared functionality. This should be a language like the imperative languages we use now to implement programs, but a transformation language.

    We do declarative language for each aspect of an application, not only restricted to the data model, but also including the Model/View/Command and the user-interface.

  97. Not aspect, not extreme, not pattern, but... by master_p · · Score: 1

    Meta programming!!! it is the future(!!!). The main functionality of a computer is to run an algorithm over some data in order to compute some results needed. So, what is the next step in programming ? My opinion is that it should be meta-programming. That is, separation of algorithm coding and of the implementation details.

    Today's programmers have a hard task to perform: they must think about the algorithm along with memory management, types, the side effects and they must remember the APIs in 100% detail, even to the smallest flag which can make or break their application. Wouldn't it be more efficient if a programmer could concetrate on the algorithm only, and then apply the implementation details ? I know I would be much more productive. In other words, programming should become more abstract than it is right now. Of course, this should be complementary to the current available techniques.

    On the other hand, some algorithms depend on the implementation details. That's a problem for the language designers to solve though.

    C++ templates are quite close to this, but they are quite complicated. ML and Haskel have some similar functionality.

    1. Re:Not aspect, not extreme, not pattern, but... by Laplace · · Score: 1

      The Lisp community had this figured out years ago.

      --
      The middle mind speaks!
  98. Re:The future -- take the best of declarative but. by Anonymous Coward · · Score: 1, Informative

    There are two language groups that cover what you want, and have been around since at least the early seventies; you should look at Lucid and its derivatives (GLu and Lustre being the most interesting), and derivatives of CSP such as newsqueak and limbo

  99. OO == easier code changing? by Tablizer · · Score: 0, Troll

    Half the point of OO programming is so that later on you can change functionality easily, or expand the use in certain directions. One should always program in an object-oriented way (within anything other than a tiny application) for a few reasons....

    Do you have a specific semi-realistic example? Most examples and claims I have seen of OO making software easier to change make some rather odd assumptions about the likelyhood of certain changes occuring. I don't know whether the change scenarios suggested are purposely rigged or the author has been warped by too many unrealistic textbook shape, animal, and device driver examples.

    1. Re:OO == easier code changing? by arkanes · · Score: 1

      Go read the change logs of any OO toolkit, like Qt or wxWindows. Porting to a new platform is an obvious example. Optimizing a back end algorithm without changing the interface - you can do this in C or other non-OO languages too, of course, but OO lends itself to this kind of thing.

    2. Re:OO == easier code changing? by Anonymous Coward · · Score: 0

      Go read the change logs of any OO toolkit, like Qt or wxWindows. Porting to a new platform is an obvious example. Optimizing a back end algorithm without changing the interface - you can do this in C or other non-OO languages too, of course, but OO lends itself to this kind of thing.

      In my opinion, most GUI toolkits should be based on meta-data anyhow, not code calls. Besides, my domain is custom business applications. I don't write device drivers for a living. I see a lot of OO examples with device drivers or driver-like organization, but not good business examples. The simpler ones try to make taxonomies of entities, such as "employee", which does not work well as described in another message. The more complex approaches use tangled "patterns" which to me look like re-inventing a bad database from scratch.

  100. Yo man, feel the algo-rythm! by Xner · · Score: 1
    break repeated tasks down to a general algorythm

    Yo man ... feel the algo-rythm!

    --
    Pathman, Free (as in GPL) 3D Pac Man
  101. Objects and relational by mparaz · · Score: 1

    Yes, that's right... I was confused back there.

  102. Post OO? Try real OO and macros by Anonymous Coward · · Score: 0

    As in Common Lisp CLOS, the most powerful OO system on earth.

    Don't mistake C++ or Java for OO - they lack the dynamism originally envisaged as part of OO, and are crippled by single-dispatch, poor typing systems, and in Java, single-inheritance.

    Java-OO + "component-based programming" (e.g. JavaBeans or C++&Qt) == what was originally though of as OO in Smalltalk and Lisp.

    Paradoxically, of course, Lisp is so powerful anyway you seldom have to bother with the OO constructs.

  103. Quality: Zen and the Art of Motorcycle Maintenance by Burb · · Score: 1
    The talk of the "quality without a name" is strangely reminiscent of Pirsig's "Zen and the Art of Motorcycle Maintenance".

    Are we descending into Taoism here, or is it just me?

    --

  104. Stop talking out of your ..... by oliverthered · · Score: 1

    OO is about encapsulation and modularisation, you should never write code that isn't encapsualted or modular(well maybe extream protoryping) other wise I will call you monkey boy.

    If you want to write buggy, hard to maintain, poorly designed code then sure, ignore OO.

    e.g.

    piss poor code

    myfunction (larlar){
    static int imAFool;
    }

    better code

    struct thisisanobject{
    int imnotafool;
    }

    myfunction (thisisanobject* , larlar){

    }

    hey, and the better code has no threading problems.

    --
    thank God the internet isn't a human right.
    1. Re:Stop talking out of your ..... by NoOneInParticular · · Score: 1
      Indeed, see subject

      Apart from the multithreading, why on earth is example 1 piss poor code and example 2 good code? Number 1 has excellent data hiding, so good that noone can access the local data without changing the function code. No 1. has much less maintainance problems as the maintainer does not have to worry about people sending it all kinds of foolish objects with arbitrary values. All it has is local data: the use of the static is confined to the single function, problems with it are confined to the function.

      No. 2 however has some arbitrary structure that needs to be known to the user of your code. It needs to know how to initialize it, how it is used in your function, and whether or not it can touch it. The data you send through it is probably only relevant for this one function, so why on earth should anyone else care about it, much less be forced to you it? If you have a problem with some code using this function, you will have to wade through hundreds of different functions to figure out where in the macaroni (OO's spaghetti substitute) the data is modified. Piss poor programming indeed.

      With thread local storage (a C(++) extension that some compilers have for you), the no. 1 example can even be made thread safe by inserting a single keyword.

  105. Why FP isn't much used in reality by Anonymous+Brave+Guy · · Score: 2, Insightful
    But why most of programmers are ok with destructive assignment? Variable value is a part of the (run-time) program code, it should not be modified - only created.

    I'm all for a more declarative programming style where it's appropriate, but some data structures and algorithms are simply much more efficient if you change them in-place.

    #include <std_iteration_vs_recursion_arguments.h>

    Interestingly, while mathematically educated programmers do already (how many decades) know that the future is for FP ...

    Lots of pretentious academics who like to think they're clever because it justifies their existence will tell the journeyman programmers of the world that the tools they use suck, functional programming is technically superior, etc. But while theory is all very well if you live in an ivory tower, in the real world, we have to write the code that gets the job done.

    If functional programming and such were so much better than procedural, OO, etc. in practice then the professional development industry would be using them as a matter of routine. As it stands, there are at least two very good reasons this is not the case: FP doesn't have critical mass (small installed base, small code base of libraries, limited number of programmers familiar with it) and the FP model has its own problems, which don't much show up in theory labs (hence most academics' ignorance of them, or willingness to overlook them) but bite you in seconds in the real world (hence many informed and highly mathematically educated programmers still reject FP for their work).

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Why FP isn't much used in reality by Laplace · · Score: 1

      The first demonstration of the chaotic nature of the solar system was done using Lisp. A link. Look for the paper titled "Chaotic evolution of the solar system."

      --
      The middle mind speaks!
  106. Concurrency oriented programming by Anonymous Coward · · Score: 0

    An interesting approach that should be investigated is concurrency oriented programming.

    More details here: http://ll2.ai.mit.edu/talks/armstrong.pdf

    Joe Armstrong explains in the conference why and how it can overcome conceptions problems when designing concurrent applications.

    --
    Mickaël Rémond
    http://www.erlang-projects.org/

  107. Pentagram != Pentagon !! by dbretton · · Score: 1

    Since when is a pentagram (five-star) a pentagon (five sides)?

    I count 10 distinct sides on the pentagon... does anyone else?

    1. Re:Pentagram != Pentagon !! by dbretton · · Score: 1

      LOL!! Coffee hasn't hit me yet!

      How about this:

      I count 10 distinct sides on the pentagram... does anyone else?

    2. Re:Pentagram != Pentagon !! by dash2 · · Score: 1

      I asked the same question. The clue is in the description below. It is a "self-intersecting" pentagon. I.e., it can be drawn as five long lines which cross themselves.

      I never thought that something like that could count as a pentagon, but I can see why it might be reasonable to treat it like that for some purposes. For example, it would be difficult to calculate the area, but quite easy to move the pentagon around by moving its five points and redrawing.

  108. multiple inheritence... except different by Anonymous Coward · · Score: 1, Interesting
    looking at the provided diagram of OO spaghetti I am reminded of why the rule of not allowing multiple inheritence was perhaps a mistake. Instead there should have been an appropriate replacement of that functionality that was not as sloppy and unmanageable.

    Fuzzy membership seems to be a component that could be expanded upon and refined to help solve this problem. BTW, this problem happens all the time not just in software but I am sure everyone here knows of that. Fuzzy sets can be a bitch unless you setup either heavy restrictions (ouch) or setup a very robust system of processes and procedures that can be adopted and they themselves be combined, inherited and abstracted. Otherwise you get such a wide variety of classifications and categories that you might as well have never even used any paradigm. Seems to me we should focus on the meta aspects of the paradigms, methods, processes and encapsulations (categorization and classification). Instead of saying, "Hmmm, OOP has some flaws... lets just start all over with something incompatable" you should treat it as EVOLUTIONARY.

  109. Re: Give them a hammer and.... by arkanes · · Score: 1
    Simple enough. It's hammer.pound(), because hammers can pound things besides nails. It's not worked.useTool(), because we don't have a worker concept in this design. It's possible that you might need a really flexible design, and then you'd want worker.useTool(). Depending on your API, you might actually have nail.getPounded(), which would be called by hammer.pound(), although I suspect that'd be a case of over-design.

    OOP should NOT be used to model the real world - that's an easy path to an overly complicated model. In this case, we're deciding that the hammer class is where (most of) the work gets implemented, and then we define things in terms of that hammer. We could have decided to implement everything in terms of the nail instead, and that might make sense for some problems.

  110. OO-Programming can fade away, OO-Modelling won't by DollyTheSheep · · Score: 1

    There are many programming paradigms and all have their own reason and justification. There are functional, declarative, logical, object-oriented and generative techniques. Some programming languages incorporate more than one of them. All these paradigms serve a certain purpose and object-orientiation

    Modelling however is a different beast. There is only one truly natural way of modelling and it is object-oriented. Is is simply due to the fact, that we think of the world as consisting of objects having properties, behavior and eventually state.

    So, object-orientiation, as we know it today, will eventually replaced, or more probably enhanced, by something different, but not modelling.

  111. Perpetual thirtysomethign syndrome? by Axiom_1 · · Score: 1
    Most programmers today are thirtysomething. Or younger, if we were lucky enough to find a job.

    Give us another decade or so, and we'll grow up.

  112. Where OO works and does not work by Anonymous Coward · · Score: 0

    I might be a bit more inclined to believe the article if the example given wasn't one of the standard OOP pitfalls -- implementing object properties using inheritance.

    OO is stuck between a rock and a hard-place. Inheritance is what makes OO unique and "intuitive" to some people. If you don't use inheritance for domain modeling, then you are essentially creating a "network database" sort of thing, and these were discredited in the 70's.

    Thus, you either have disco or trees.

    Note that for communication and infrastructure components, I don't have a real problem with OO. It is when it tries model domains that OO has failed. Thus, OO works well for GUI API's, FTP API's, etc., but used to model the entities and behavior of the particular organization at hand, OO has some really unpleasent flaws.

  113. Re:True of most fresh programmers by Anonymous Coward · · Score: 0

    Perhaps under *ideal* conditions, OO is wonderful. However, many "average" programmers seem to get OO really wrong. Should paradigms be chosen for what the best programmers do with it or what the average programmer does with it?

    OO might be like trying to use quantum mechanics and relativity when plain ol Newtonian physics might be more appropriate. Teach them Newton well instead of quantum poorly.

  114. Order and Chaos by taradfong · · Score: 1

    When I read about these attempts to come up with the perfect language to handle variations of pentagons, it reminds me of the classic 'Bert and Ernie' skit where Bert assigns Ernie the task of cleaning a pile of toys in their apartment.

    After Bert's departure, Ernie decides he must first come up with a taxonomy system - first, he'll pick up the red things. Hmmm, the only red toy is a fire truck. So he puts it down. Ok, pick up the toys with wheels. Same result - only a fire truck. What about the toys with ladders? Still one toy, a fire truck.

    By this time Bert, enraged, returns to find that Ernie has accomplished nothing. We can learn many things from this, but mainly...

    Getting the job done is what counts, not how cleanly you do it. Devise mechanisms when it really helps get the job done, else risk making the mechanism a job in and of itself.

    --matt

    --
    Does it hurt to hear them lying? Was this the only world you had?
  115. Re: Give them a hammer and.... by pyrrho · · Score: 1

    >> you don't want all the tool and part logic in the Worker...

    >Uh... We don't?

    yeah, we don't. For example, one time I was working on an online-role playing game. If we added a new item to the world, we just want to download the logic and art for that new item. We want to download a hammer and a nail... not new player code. The player of course has something akin to player::UseObject(Article, Article), but the logic to execute the interaction is in the hammer and/or nail classes where it belongs. All the player knows is that it's useable, and that useing something potentially includes a target (what it's used on). The logic in the player, or worker, is minimal.

    >> We don't want to simulate the real world

    >On the contrary, that is precisely what OOP is trying to do.

    no. OOP is fundamentally the encapsulation of structures of data with the functions that work on that data. How you model things is up to you.

    I know a lot of people get into "noun and verb" nonsense (total nonsense!) and into simulating real things, as if a Window is an abstraction of a Window. However, that's just their mistake.

    Programs are machines made of logic. Objects are logical entities, they should abstract logical relationships, not real things, they should not directly model their metaphor! Objects model various kinds of coupling (from rigid to loose), various types of structuring data, etc.

    Of course this is just my humble opinion (which happens to be right in this case). :)

    PS: btw, I LOVE the STL approach... and I don't think there is anything that violates OOP, although it uses some paradigms outside the OOP paradigm, that IS C++ OOP... multiparadigmed OOP. Of course I know this is an OOP defined a little differently than an "OOP purists" would. But the purists can get back to me when they agree among themselves on some defintions, any definition of just about anything. Purists are notorious for never quite deciding the nature of the Pure... oh yeah, because there is no purity, just engineering.

    --

    -pyrrho

  116. Re: Give them a hammer and.... by Anonymous Coward · · Score: 0

    > You don't List.Sort(), you Sort(List).

    Actually, if you're using the standard library's linked list class (std::list), you do use the List.Sort() form...

  117. OT e:No silver f-ing bullet, people! by msouth · · Score: 1

    nested blockquotes?

    --
    Liberty uber alles.
  118. Re:OO-Programming can fade away, OO-Modelling won' by Anonymous Coward · · Score: 0

    Modelling however is a different beast. There is only one truly natural way of modelling and it is object-oriented. Is is simply due to the fact, that we think of the world as consisting of objects having properties, behavior and eventually state.

    You are so full of shit. Stop dictating to me how to "think naturally".