Slashdot Mirror


What's wrong with HelloWorld.Java

prostoalex writes: "Daniel H. Steinberg posted an article on O'Reailly's OnJava.com discussing the difficulties and current problems with introductory Java in the classroom. The textbooks used in colleges are mostly the rewrites of C/C++ textbooks and thus start with HelloWorld program without really dwelling on object-oriented nature of Java and why it is important. In a nutshell, OOP even nowadays is treated as somewhat innovative concept in the classroom, mainly because of educators, who were taught C. Hence links and description of Rethinking CS101 Project."

173 comments

  1. Java != OOP, C++ != OOP by BalkanBoy · · Score: 5, Insightful

    People can never get this through their heads. OOP is _not_ about what language you use or what tool you use that more or less will or can facilitate OO programming. OOA&D (e.g. object oriented analysis and design) is not about mastering Java or C++, it is about mastering a new style, a new paradigm of thinking. This is precisely when Java or C++ is taught by "old skool" K&R C people who hate the thought of anything resembling OO (and I wont mention how many are of those out there... too many, rest assured) it looks like Java or C++ is C wrapped in objects. The usefulness of the paradigm is reduced and de-emphasized if the proper train of thought is not employed when analyzing solutions in an object oriented fashion.

    One has to be able to perceive problems in terms of objects. This may at a glance seem easy - our world is composed of objects, but when you start getting into more abstract concepts, e.g. trying to write OS's in a fully OO manner (akin to what BeOS was) , or other more complex applications like the entire JFC (for instance), then OOA&D does not seem so easy!

    Designing, or better yet, THINKING in OO terms is not something that happens overnight. This is precisely also the reason as to why 90% of large, pure OO projects either fail or start to degenerate into something that needs revamping every so often, only because the programmers who built the application did not take the time to properly analyze the problem and come up with the most natural solution possible. A natural solution is possible, but only at the hands of professionals, who understand what OO is all about (and it is least about WHAT LANGUAGE you use), who have experience in 'seeing' the world, or higher concepts through OO eyes and who are able to delimit, with crisp boundaries every concept/object available to them or as stated in the specifications by the customer and MOST importantly establish the PROPER relationships between those objects!

    Design patterns and such go a LONG way toward getting this objective, but one cannot fathom using or applying design patterns if he doesn't understand what OO design and analysis means, and without a shitload of experience to use toward this goal. True OO thinking is almost like a lithmus test of how good a programmer, or better said, an ANALYST, an ANALYTICAL person, or your ANALYTICAL skills are... In OO, 80% of the time or thereabouts is spend on analysis and design, 20% on the mechanics of writing the code. Then, and only then, will you be able to pull OO projects successfully through completion.

    And no, I'm not talking about your school/academic projects, I'm talking about large scale projects with possibly millions of lines of code where understanding the ESSENCE of the OO paradigm will either make or break a project and make it usable and extendable for a long time or make it a piece of crap that will never see the light of day...

    Most people shy away from OO or misunderstand it because they've never even read a book about OO either, such as the OO 'bible' by Rumbaugh/Premerlani "OO modeling and design using OMT", or some of Fowler's books on analysis, patterns, or Gamma's book on design patterns...

    Someone once said - pimpin' ain't E-Z! Well, neither is OO!

    --
    'A lie if repeated often enough, becomes the truth.' - Goebbels
    1. Re:Java != OOP, C++ != OOP by PS3117 · · Score: 2, Insightful

      The generation of code is the small (critically important, but small) part of development. The "game" is in the head, or more precisely the mind of the developer. Teaching someone to write code effectively is not a terribly daunting prospect. However, teaching someone to think, much much more complicated. In contribution to this difficulty the education system here in the USA is not geared towards excellence, it is geared towards the average, the everyday. Just an opinion, feel free to flame away, but the so termed fuzzy subjects such as art and music teach students to see not what is there, but what isn't, and more importantly what could be. There are a great many technicians out there who generate code, but virtuosity in any endeavor is art as much as science or technology, it is seeing, feeling. I had the privalege of speaking at my daughter's school on career day and when asked what I did, my response was, I build models. I build models of business process or at the moment engineering processes. In short what we do as developers is model behavior. I have maintained for years that the only way to get good at development is not education, it's scars, scars earned in the trenches getting beaten on by cranky code, twitchy servers and managers who haven't got a clue. The same is true for OO, get into it up to your neck, get it into your pores think it breathe it read it discuss it beat it to death. Then you can become a prophet in the wilderness of software development and have managers look at you like you're something to the left of a cultist. Balkanboy is right it's not easy, but "It's the hard that makes it great. If it was easy anyone could do it." (paraphrased from "A League of Their Own"

    2. Re:Java != OOP, C++ != OOP by Tablizer · · Score: 5, Interesting
      Designing, or better yet, THINKING in OO terms is not something that happens overnight. This is precisely also the reason as to why 90% of large, pure OO projects either fail or start to degenerate into something that needs revamping every so often, only because the programmers who built the application did not take the time to properly analyze the problem and come up with the most natural solution possible. A natural solution is possible, but only at the hands of professionals, who understand what OO is all about

      A fitting excerpt from my anti-OO webpage:

      OOP technology has generated more confusion than almost any other computer technology. For example, many OOP "experts" claim that most companies are either not using OOP properly, or are not taking advantage of OOP. Experts also say that there is a long learning curve before many people grasp the power of OOP; that its benefits can't really be taught, at least not understood, from a book. It has almost become like Particle Physics, in which only a small elite group appears to understand it properly, and everybody else needs years of meditation and practice.....

      Ironically, OOP is sometimes billed as "better fitting the way people think". Years of meditation and study to learn how to "think naturally"? I am thinking of setting up a $60-per-hour consultancy to teach sports fans to drink beer and belch in order to "optimize their recreational satisfaction".

      ....Further, there is a lack of consistency in modeling techniques by OOP celebrities. Methodology-of-the-week is commonplace. The lack of consistency makes it tough to make any generalizations about how OOP goes about modeling useful business applications. An OOP consultant may have to be well-versed in dozens of OO methodologies to be able to walk into a shop and perform any useful work any time soon.

      (oop.ismad.com)

    3. Re:Java != OOP, C++ != OOP by oliverthered · · Score: 2

      'is not geared towards excellence, it is geared towards the average'

      Well in my experiances the average is deamed to be excellence, if you in any different, off the wall or excel but not in a way that fits the average is is not usualy considered to be 'constructive' in the education system.

      Just a bit on OOP so as not to be off topic,

      You can write C in and object orientated way even though there is no real language support for objects in C.

      the old jpeg library was written like this, and I believe GTK is written this way (why they don't use C++ i'll never know?)

      One way to teach OOP is to get some spagettie and get the 'class' to refactor the code(aided and abbeted by the teacher!) not only does this teach OOP but it teaches the reasons why OOP is good.

      If i wanted a spelling critique I would have posted this comment on /.

      --
      thank God the internet isn't a human right.
    4. Re:Java != OOP, C++ != OOP by scrytch · · Score: 4, Insightful

      Go see that page, oop.ismad.com and you'll mod the parent up to +5 funny. Just ignore the gross misunderstanding of OO, the selective process of argument where he flips between implementation and concept, the plug for some vague "table driven programming" thing (that basically is OOP without inheritance), and the entire fallacy of division (google for it) that is promulgated throughout... probably a good fifth of the material is dedicated to red baiting, to the point of displaying a hammer and sickle flag. My congratulations on a masterful troll. It had me going for a bit. Love the "beat up spock" visual analogy for "abuse of logic" too.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    5. Re:Java != OOP, C++ != OOP by Anonymous Coward · · Score: 0

      It takes "years of meditation and study" to unlearn improper methods of "thinking naturally".

      If you have spent 20 years doing things in a non-OO fashion, changing your mindset is not going to happen over night.

      If you are taught OO principles from the beginning, it will indeed be natural.

      God I hate idiots.

      I don't care what side of which argument they're on.

      Idiots should be put to death.

    6. Re:Java != OOP, C++ != OOP by Tablizer · · Score: 2

      (* Go see that page, oop.ismad.com and you'll mod the parent up to +5 funny. Just ignore the gross misunderstanding of OO *)

      Let's cut to chase.

      Where is this grand evidence that OOP is objectively better?

      The evidence on my webpage is as strong as ANYTHING used to justify OOP.

      Where is your evidience, Mr. GlassHouse?

      Ignore the fact that you don't like me and think I am a troll. Just produce the evidence for the world to see. Good evidence is orthogonal to any alleged troll.

      (I was often told that good evidence existed in Meyer's famous work. So, I purchased a copy. However, I found tons of reasoning holes in it. A review of it can be found on my website.)

    7. Re:Java != OOP, C++ != OOP by Tablizer · · Score: 2

      (* If you have spent 20 years doing things in a non-OO fashion, changing your mindset is not going to happen over night.....If you are taught OO principles from the beginning, it will indeed be natural. *)

      In that case *anything* can be "natural" if you simply do it first and early.

      That is not the issue. The issue is what to force students into and why.

      (* God I hate idiots. *)

      Me too. They often skip a step or two in science: "Evidence? We don't need no stinkin' evidence because we voted ourselves 'experts'."

    8. Re:Java != OOP, C++ != OOP by Anonymous Coward · · Score: 0

      Watching this discussion, the real issue seems to be consistency in training.

      If we taught people how to properly recognize and apply different methodologies in clear-cut examples then it would highlight the strengths and weaknesses of all of them.

      It's not whether procedural, functional, object oriented, etc. don't all have a place or that they can't all be used for any given problem set. It's just that different developers have different ways of thinking and coding. The fact that OOP makes sense to me doesn't mean that it works for everyone. The fact that it doesn't work for everyone does not invalidate the fact that it works for me either.

    9. Re:Java != OOP, C++ != OOP by Anonymous Coward · · Score: 0

      This guy's website reminds of Creation Science. It is meticulous and relatively carefully written, but he seems to miss the big picture of OOP. Just like Darwinian evolution, OOP is hard to properly grasp just by reading a few examples, and some people never seem to grasp it. Even some well-educated and high-scoring scientists never seem to grasp evolution.

      Granted, OOP is tough to correctly teach. I don't know of any easy solution. Perhaps his hint that "OOP is too hard to do right, and therefore we should look for simpler alternatives" (rough paraphrase) does have a certain appeal to it.

      OOP is at risk of becoming an "elitist" technology if educators don't do a better job of properly teaching and justifying OOP.

      It needs a better fence or else more such "trolls" are eventually going to kill its acceptance with superficial, but catchy attacks.

    10. Re:Java != OOP, C++ != OOP by scrytch · · Score: 2

      OOP is at risk of becoming an "elitist" technology if educators don't do a better job of properly teaching and justifying OOP.

      I doubt this. OO is as mainstream as structured programming became when it was the rage. It is in fact so entrenched now that it's a bit of a *problem* to do even minor tweaks to enhance OOP itself, such as method(object,arg,arg) instead of object.method(arg,arg) in order to better support multiple dispatch, since it looks too much like non-OO code, regardless of the scoping of the actual implementations of method.

      In fact, it's hard to convince people to write things in functional styles when OO is always the rage. Probably because functional's disdain for variables has made it hard to know where to put state, but there's a good amount of herd mentality too.

      It needs a better fence or else more such "trolls" are eventually going to kill its acceptance with superficial, but catchy attacks.

      Actually, I take the opposite view: it's kooks like Tablizer that make honest criticisms of OOP look bad.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    11. Re:Java != OOP, C++ != OOP by Anonymous+Brave+Guy · · Score: 3, Interesting
      Where is this grand evidence that OOP is objectively better?

      As I've pointed out before, it's in the collective experience of legions of software developers. If they didn't -- at least subjectively -- feel that the OO approach suited them better, they wouldn't use/adovcate it. And what feels better to you is often the best approach for you to take. There are an awful lot of people putting their money where their mouth is on this one, and they're still doing it decades later. It's hard to believe that they're all wrong on everything after all this time.

      You may not personally have seen any benefits from OO, and you may personally have seen benefits from a relational approach. As I've also pointed out before, and by your own admission, your experience comes from a very narrow field of programming, to which one approach seems much better suited. It's not surprising that you find that approach superior. OTOH, you are yourself falling for the "too wide a brush" problem of which you accuse others elsewhere in this thread. Those of us who work in diverse areas of programming have often found OO to be at least as natural as, or more natural than, a purely procedural approach. We also acknowledge that it has its flaws -- and there are plenty -- but many of these can be avoided if you use a tool that doesn't insist on a purely OO approach (and frequently one that ignores half of OO as well, such as certain popular mainstream programming languages today).

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    12. Re:Java != OOP, C++ != OOP by ProfKyne · · Score: 1

      We also acknowledge that it has its flaws -- and there are plenty -- but many of these can be avoided if you use a tool that doesn't insist on a purely OO approach (and frequently one that ignores half of OO as well, such as certain popular mainstream programming languages today).

      Sounds like Python.

      --
      "First you gotta do the truffle shuffle."
    13. Re:Java != OOP, C++ != OOP by ProfKyne · · Score: 1

      It is in fact so entrenched now that it's a bit of a *problem* to do even minor tweaks to enhance OOP itself, such as method(object,arg,arg) instead of object.method(arg,arg) in order to better support multiple dispatch, since it looks too much like non-OO code, regardless of the scoping of the actual implementations of method.

      I realize this is totally off topic, but I was wondering if you could point to a resource that discusses this "method(object,arg,arg)" concept. I've never seen it before.

      Thanks.

      --
      "First you gotta do the truffle shuffle."
    14. Re:Java != OOP, C++ != OOP by Tablizer · · Score: 2

      Actually, I take the opposite view: it's kooks like Tablizer that make honest criticisms of OOP look bad.

      I realize that some of you personally don't like me, but I am not getting specifics here about technical issues.

      Vaguery is for PHB's. Be a *real* geek and give specifics, people. Example template: "Tablizer says on page X that 2 + 2 is 5. Clearly that is wrong based on the following reasoning....."

      Instead you just call me names. What is up with that?

      It is in fact so entrenched now that it's a bit of a *problem* to do even minor tweaks to enhance OOP itself, such as method(object,arg,arg) instead of object.method(arg,arg) in order to better support multiple dispatch, since it looks too much like non-OO code

      OOP makes the faulty assumption that each verb has only one primary noun. English is actually the opposite in that there is only one primary verb (or verb clause) but up to many nouns. I find the "only one primary noun" aspect of OOP "unatural". In the real world, multiple "players" (nouns) participate in something and their "ranking" may change over time. It is hard to model that in OOP without funky girations.

    15. Re:Java != OOP, C++ != OOP by scrytch · · Score: 2

      Actually the "multiple nouns" thing is taken care of by multiple dispatch. When you need things like dynamically defined ranking for your dispatch, you probably need something like a production system -- and even CLIPS code tends to be rather object-oriented. That or you can use a MOP, ala CLOS. You don't even mention the existence of such things in your anti OOP rants, and it leads me to believe you read a few C++ and Java books before going off on your extended tear.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    16. Re:Java != OOP, C++ != OOP by Tablizer · · Score: 2

      Actually the "multiple nouns" thing is taken care of by multiple dispatch. When you need things like dynamically defined ranking for your dispatch, you probably need something like a production system -- and even CLIPS code tends to be rather object-oriented. That or you can use a MOP, ala CLOS. You don't even mention the existence of such things in your anti OOP rants, and it leads me to believe you read a few C++ and Java books before going off on your extended tear.

      Any OOP "multiple dispatch" I have seen was a fricken tangled mess. Also, some OO languages that do support it built-in are not considered "OOP" by some.

      Anyhow, if you have a specific example you would like to explore, please present it. Preferably a custom biz example instead of say device drivers. I will admit that device driver examples make a fairly strong case for OOP [1], but I don't write device drivers for a living, and neither do most programmers.

      [1] An OO fan who actually did write device drivers once said that such examples are often too simplistic. However, without both debate parties being experts at DD's, it is hard to evaluate and scrutinize their real effectiveness. The examples I propose on my webpage tend to be things that any programmer can relate to (student enrollment and class scheduling, for example).

    17. Re:Java != OOP, C++ != OOP by scrytch · · Score: 2

      Actually, device drivers make a great case for monad-based functional programming, which you can think of as "narrowly targeted OO" since it has a sort of object scope (actually type containment), but doesn't require reifying everything. Using the monad to represent the state of the device such as registers, it becomes easy to tell where the state of the device affects computation, because, it's mandatory to taint anything that depends the state with the type of the monad.

      It's operating systems in general that make a good case for OOP, and indeed if you look at any modern OS, you'll see objects everywhere (it's harder to see in linux, check out the virtual memory stuff in freebsd for a good example).

      As for production uses for OOP ... heck, I'm posting this with mozilla, which can switch out the text widget I'm posting this with at runtime (XBL). If that's not an example of components, I don't know what is.

      I find your example somewhat disingenuous -- you compare a table-driven design (for a data-driven problem that has a well-defined fixed schema, unlike say, a web browser or operating system) and compare it with a bad OO design fit only for a first-year student. Stuff like "isa-mania" simply does not happen in well-designed OO systems. Anyway, I'm willing to take back calling you a kook, based on your posts, but that web page is still screaming it (c'mon, red baiting?). I really suggest you take a look at production systems like CLIPS and LISA, which I think will appeal to your affinity with table-driven logic.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    18. Re:Java != OOP, C++ != OOP by scrytch · · Score: 2

      Sorry for the delay, but you can learn more about the object-as-argument syntax by looking up "generic programming" on google.

      Try this this for starters. It's part of a dylan tutorial that explains multiple dispatch (which should clue you in as to why you'd pass the object as an arg)

      OOP is not about a foo.bar syntax, it's about defining the bar method as "belonging to" foo in some fashion such that it access the object scope of foo. /me looks up and sees all the apologists for the trolls attacking him. now that's irony

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    19. Re:Java != OOP, C++ != OOP by Tablizer · · Score: 2

      (* It's operating systems in general that make a good case for OOP, and indeed if you look at any modern OS, you'll see objects everywhere *)

      Well, I see tables everywhere when I kick around ideas for "how I would build an OS". You have process tables, event tables, registered device drivers tables, etc. (This excludes the file system, which I would definitely make relational instead of hierarchical. Tree directories almost always grow to a mess in my experience, both mine and the shop's.)

      OOP would try to "encapsulate" these tables (structures) by binding them to the operations (methods) that act on them. However, this is too restrictive IMO. I want to be able to query all those tables and join and filter them how I see fit, not how the class-builders tried to anticipate.

      If you want to keep out hackers or what-not, then ACL's are the most open-ended security technique for that, and not accessors. Accessors are one-size-fits-all, which is the down-side of "self-handling-nouns" of OOP. Think relative. One interface does not fit all in practice, yet that is exactly what is class does.

      (* I find your example somewhat disingenuous -- you compare a table-driven design (for a data-driven problem that has a well-defined fixed schema, unlike say, a web browser or operating system) and compare it with a bad OO design fit only for a first-year student. Stuff like "isa-mania" simply does not happen in well-designed OO systems. *)

      I am not sure what you mean by your web browser reference.

      Anyhow, if one removes heavy IS-A from OOP, then it tends to do one or both of these:

      1. Becomes a tangled mess because the "noun model" is handled via a hand-made "database" where all the HAS-A references are hand-managed in code. IOW, manual indexing between all the references between noun instances.

      2. Grows rather procedural in design

      (* I really suggest you take a look at production systems like CLIPS and LISA, which I think will appeal to your affinity with table-driven logic.*)

      Thanks, I will put them on my "to look into" list.

    20. Re:Java != OOP, C++ != OOP by bigjocker · · Score: 2

      OOP technology has generated more confusion than almost any other computer technology. For example, many OOP "experts" claim that most companies are either not using OOP properly, or are not taking advantage of OOP. Experts also say that there is a long learning curve before many people grasp the power of OOP; that its benefits can't really be taught, at least not understood, from a book. It has almost become like Particle Physics, in which only a small elite group appears to understand it properly, and everybody else needs years of meditation and practice.....

      Ironically, OOP is sometimes billed as "better fitting the way people think". Years of meditation and study to learn how to "think naturally"? I am thinking of setting up a $60-per-hour consultancy to teach sports fans to drink beer and belch in order to "optimize their recreational satisfaction".


      This is lame ... you are answering a question you posted yourself using it as an argument (the question+answer) against OOP. I can answer your question: no, OOP does not take "years of meditation and study". It takes common sense.

      That's one of the problems about computing and programming, you think that if you know computing you must be a good programmer. If it takes "years of meditation" for you to understand OOP then you should quit programming.

      ....Further, there is a lack of consistency in modeling techniques by OOP celebrities. Methodology-of-the-week is commonplace. The lack of consistency makes it tough to make any generalizations about how OOP goes about modeling useful business applications. An OOP consultant may have to be well-versed in dozens of OO methodologies to be able to walk into a shop and perform any useful work any time soon.

      I believe you are a few years behind, it's understandable from your previous comments. UML has been around for years now and is a standard. It's not a method, it's a modelling language. Whatever method you use is irrelevant, what you need a standard for is modelling.

      You see, english for instance. It's a modelling standard: it uses the a-z, 0-9 and punctuation signs. What method should you use? that's up to you, you can make poems, songs, sonets, novels, etc. I bet no matter what the method you use, the people will understand your message if they know the model and you use it right.

      --
      Life isn't like a box of chocolates. It's more like a jar of jalapenos. What you do today, might burn your ass tomorrow.
  2. OOD101 or CS101? by one9nine · · Score: 5, Insightful

    Are we talking about a beginning OOD class or a beginning CS/Programming class? When you first teach someone how to program, the last think you want to do is start with OOD. One must learn about variables, arrays, assignment vs. comparison, loops and conditional statements. Then one must learn about functions and how to separate code into them. Simple algorithms need to be introduced as well. Also, how to break down a problem into several steps and then code it. Finally you can start to teach about classes as well as one of my personal favorites, data structures.

    Just because Java is focused on objects doesn't mean you have to teach OOD right off the bad. You have to start with the basics. True, you going to have kids ask "What does static mean?". You just tell them to ignore it for now. Why is that looked upon as a bad thing? The same thing happens when you teach C++. You tell your beginners to ignore stdio. Later, when it's time, you can teach about includes and classes.

    This is why I didn't learn jack shit in college. Everything is focused on OOD. Object this and class that. I am not saying there anything wrong with OOD, but colleges don't focus enough on the fundamentals. That's why there are so many people who overengineer everything and who can't even tell you the difference between a Mergesort and a QuickSort or even know what a Red Black tree is!

    1. Re:OOD101 or CS101? by Mr.+Shiny+And+New · · Score: 2, Insightful
      I agree that a distinction has to be made between OOD and algorithms and basic programming fundamentals. I would say that a good way to learn software development would be as follows:

      • First, learn basics like arrays, data types, operators, functions, pointers, structures. Learn one or two languages.
      • Second, learn about algorithms and data structures. Learn about sorting and merging lists, learn about heaps, stacks, trees, etc. Learn about algorithm complexity. Make sure to emphasize modularization; that is, if you are learning about trees, make sure the code you write to manipulate the tree is cohesive.
      • Learn about objects and OOA/OOD. Learn how data structures lead to classes and objects. Learn about data hiding, iheritence and polymorphism.
      • Learn design patterns. Show how solutions to certain families of problems can be re-used. Show how algorithms can be made more generic by using polymorphism.


      • Somewhere along the line you should learn more about algorithm complexity, various programing paradigms (like functional programing), low-level languages like assembly, operating system and networking concepts, and any advanced topics like databases and distributed programming and real-time programming. But these are all extras. I still think that a programmer needs to learn what a loop is before he should be concerned about what an object is.
    2. Re:OOD101 or CS101? by Tablizer · · Score: 2

      One must learn about variables, arrays, assignment vs. comparison, loops and conditional statements. Then one must learn about functions and how to separate code into them. Simple algorithms need to be introduced as well. Also, how to break down a problem into several steps and then code it. Finally you can start to teach about classes as well as one of my personal favorites, data structures.

      And don't forget relational databases. I think relational concepts are some of the greatest ideas of computer science. You can reduce complex GOF-like "patterns" into skinney little formulas, for example. GOF looks like the old-fashioned hard-wired "noun-structure in the code" way of "doing patterns" IMO. Relational transcends most of GOF.

      I don't know why database vendors don't spend more effort to point this out. I suppose because in OO projects you often end up noun-modeling twice anyhow: one in code and one in the database. Thus, it has not taken their sales. If dumb developers want to have roughly duplicate structures, why should they care?

      (Note that the current vendor offerings of RDBMS are not the ideal, IMO, but good enough for now.)

      oop.ismad.com

    3. Re:OOD101 or CS101? by platypus · · Score: 2

      Indeed. You also don't teach tensor algebra before people have learned how to add two variables.

      Tensor algebra & mathematics is actually a very nice analogy to OOP&programming.

      One professor I had said when he introduced us to tensors that you don't understand them, you get used to them.

      And that is exactly what my expierence is with OOP. At first it "feels" strange and new, and you have a problem wrapping your mind around it. But the more you try, the more natural it feels.

      Another good example is languages. You can learn the rules and vocabulary of a foreign language as long as you want, if you don't speak and write ("get used to it") and with it learn to "think" the language, you'll never really be able to use it as a tool.

    4. Re:OOD101 or CS101? by bay43270 · · Score: 2

      Your right. That point, in fact, negates the entire article. He skips back and forth between intro classes and more advanced classes as his arguments require.

      And I certainly hope this was just a thoughtless mistake:
      "If you were highly charitable, you might give HelloWorld OO points because the println() method of the out class in the System package is being invoked."

      System is a class
      out is a field (a PrintStream instance)

  3. Introduce JUnit as a means of grading by jefflinwood · · Score: 4, Interesting

    In my intro to CS class, we used a test harness to determine whether or not our code worked correctly. This was a C++ class on the Mac, though.

    JUnit could be used to create a test harness that "plugs" into the code the students write. The professor or TA could define an interface that the students have to implement.

    I think beginning computer science for majors is backwards, anyway. Intro to engineering classes at CMU for freshmen were all taught as practical, hands-on, applied courses that focused on real problems. My civil engineering class built bridges, visited dams, and visited construction sites. My chemical engineering class analyzed actual plant failures (things that go boom!) to determine what mistakes the engineers made. My intro to cs class was all theory, with one interesting project where we added AI into a 2D simulation. There wasn't a lot of practical information to take away from the class at the end of the year beyond a "Learning C++" book.

    1. Re:Introduce JUnit as a means of grading by HaiLHaiL · · Score: 2, Interesting

      Computer Science is not about finding solutions to real world problems. Well, at least not like engineering is.

      It is a science which studies the possibilities of computing--not a field of engineering. (Though strangely at Marquette, almost all the computer engineering classes are taken from the comp sci dept.)

      The idea of comp sci 101 is to give you the building blocks on which to build theory. This usually involves basic computer architecture and programming in whatever language is currently seen as standard or best (or paid to be taught).

      --


      reech bee-yond ur clip-0n
    2. Re:Introduce JUnit as a means of grading by jefflinwood · · Score: 2
      Computer Science is not about finding solutions to real world problems. Well, at least not like engineering is.

      I agree with you. I think undergraduate degrees in software engineering should be more readily available (and accredited by ABET). Sort of like the difference between chemistry and chemical engineering. Degrees in IS/MIS are available, but those are really focused on becoming a systems analyst or a corporate IT programmer, and not very heavy on actual programming or design.

    3. Re:Introduce JUnit as a means of grading by Orthanc_duo · · Score: 2, Informative

      JUnit could be used to create a test harn...

      I'm currently at Uni and we've had several large projects with automated test as part of the assesment (some using JUnit).

      Last time I checked no-one writes completly bug free code, we had problems with bugs in the tests. I believe this will happen to some extent with any automated tests being used to mark an assignment.
      Anyway to use something like JUnit to define tests you also need to define all the class's and public methods for the students. This may work fine for comsci101 but at any higher level assignments need to have some design flexibility.

      Orthanc

  4. Hello World not OO? Hello MCFLY! by PD · · Score: 5, Insightful

    There really is no good OO way to print in Java. How are you going to make a hello world program print? System.out.println ("foo") isn't any better than the old BASIC

    10 PRINT "FOO"

    It does little good to make a version of hello world that has some objects in it when in the end there will be a System.out.println call.

    I think you're really arguing for a language that will let you write hello world like this:

    "hello, world".print

    1. Re:Hello World not OO? Hello MCFLY! by Anonymous Coward · · Score: 0
      "hello, world".print
      reads like FRENCH!
    2. Re:Hello World not OO? Hello MCFLY! by Arandir · · Score: 2

      I've always like the C++ iostreams way of printing. It's not pure OO, but it's intuitive. It just needs another set of operators.

      I think where Java gets it wrong, and why "System.out.println()" looks so silly to you, is that Java students are taught that everything is an object. But not everything is an object, especially when you're printing.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    3. Re:Hello World not OO? Hello MCFLY! by davidmccabe · · Score: 1

      "hello, world".print

      Ruby does a lot of things like that.

      5.*(5)
      > 25

    4. Re:Hello World not OO? Hello MCFLY! by PD · · Score: 1

      Very cool, I didn't know that.

    5. Re:Hello World not OO? Hello MCFLY! by Narchie+Troll · · Score: 1

      No, the argument is that "Hello, World" (gasp) isn't an appropriate first program for learning Java. I don't think it's an appropriate first program for anything, personally.

    6. Re:Hello World not OO? Hello MCFLY! by Xavier+Shirin · · Score: 2, Insightful

      Everything IS an object, but most computer people don't think about things that way, because they learned to code procedurally. To many programmers, objects are auxiliary to functions, used only when it is necessary to organize.

      If you teach a student to think in an object oriented way from day one, they will think of everything as objects, just like most coders think in procedures now.

      But that's just my two cents.

      --
      We do not cater to idiots.
    7. Re:Hello World not OO? Hello MCFLY! by davidmccabe · · Score: 1

      Yes, Ruby is cool, and by the way:

      What about 'System.out' isn't OO? There is an object called 'out', which is of type 'PrintWriter', and a member of the class 'System', and we are calling its method 'println', passing it an object of type 'String'.

    8. Re:Hello World not OO? Hello MCFLY! by PD · · Score: 2

      It's OO, but it's the wrong abstraction, in my opinion. These things are sometimes a matter of taste, but instead of telling the system to print a string, the string should be told to print itself.

      The string properly knows how to print itself. Am I null terminated or not? Am I a date string?

      The system will know how to print a string, but it can't be expected to know how to print an inventory, a window, or a report.

    9. Re:Hello World not OO? Hello MCFLY! by Tablizer · · Score: 2

      (* If you teach a student to think in an object oriented way from day one, they will think of everything as objects, just like most coders think in procedures now. *)

      First, it should be demonstrated that OOP is objectively better *before* making students think in such ways without giving them much alternatives.

      I will agree that OOP seems effective in physical modeling, where it was born (Simula 67), but IMO the benefits there do not extrapolate to modern business systems.

      The main reason is that modern systems need "relativistic abstraction", which OOP does not provide without making tangled messes. OOP is obtimized for hierarchical IS-A abstraction, which is the antithesis of relativism, where sets and "view formulas" do better IMO.

    10. Re:Hello World not OO? Hello MCFLY! by Nicopa · · Score: 1
      The system will know how to print a string, but it can't be expected to know how to print an inventory, a window, or a report.
      Yes, you just need to tell objects how to print themselves by overriding the toString() method.
    11. Re:Hello World not OO? Hello MCFLY! by Arandir · · Score: 4, Insightful

      Sometimes you have to live in the real world, and you discover that not everything follows a single paradigm. Languages that follow a single paradigm have serious drawbacks. Java is one. There's a reason why Java isn't used for systems programming. There's a reason why Corel has yet to finish it's Java office suite.

      An int is four bytes on my CPU. Why should I have the overhead of an object wrapped around it? Why do I need runtime polymorphism on ints? For OO educational purposes, it makes sense to teach that an int is an object. But often in the real world it's far better to make an int simply four bytes in memory.

      Rule of thumb: if polymorphism doesn't make sense for an object, maybe it shouldn't be an object. What can you possibly derive from a bool that wouldn't still be a primitive bool?

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    12. Re:Hello World not OO? Hello MCFLY! by TeeWee · · Score: 1
      What about 'System.out' isn't OO? There is an object called 'out', which is of type 'PrintWriter', and a member of the class 'System', and we are calling its method 'println', passing it an object of type 'String'.

      Arguably, this is the wrong abstraction. It's the choice between:
      OutputMedium.print(Object.toString());
      and
      Object.printOn(OutputMedium);
      In most cases, the Object being printed is the more imortant of the two and the one which knows in which form it wants to be printed, so it might be a better abstraction to put the printing functionality in the Object ot be printed.

      The "System.out.println(...)" way may induce a more procedural way to code things than putting the printing methods in the Object itself.
    13. Re:Hello World not OO? Hello MCFLY! by Mr.+Shiny+And+New · · Score: 2, Insightful

      Well, in Java, and int is 4 bytes. An Integer is an object wrapped around an int, as you put it. This object is useful for many things. Math isn't really one of them. For plain math, use plain ints.

      C#, however, has automatic wrapping of primitive types with objects. This is supposedly done on an as-needed basis. I've never tried it, but I'd assume that the wrapping happens only when it's required, otherwise the VM will preserve the basic types for performance reasons.

      As to reasons for why there is a Boolean object, it's really just a question of convenience. The Boolean class contains methods for manipulating booleans, like making Strings out of them, or making new booleans from strings. What's the harm in extending this helper class to also represent a boolean value? It's still an object. Maybe you never need to subclass it? That doesn't mean it shouldn't be an object.

    14. Re:Hello World not OO? Hello MCFLY! by Anonymous Coward · · Score: 0
      I agree. Why is system.out.println(Object) more oo than puts(const char *). To me, it procedural, but 4x the typing.


      Object.println(stream out = cout) seems more oo than me. If I'm not mistaken, NextStep/OpenStep/GnuStep is more like that. OF course, They use Objective C, a real oop language :)

    15. Re:Hello World not OO? Hello MCFLY! by davidmccabe · · Score: 1

      You also have to think about implementation.

      Using the o.printOn(OM) method, every object must know how to print itself to an output medium. With the method that Java uses, only the print writer needs to know how to print any object.

      Furthermore, what if we want to implement some new and different printing mechanism. You see that with your method, every object needs to know something about how output streams work. With the Java method, they don't. Streams, or any other kind of output, is actually more encapsulated.

    16. Re:Hello World not OO? Hello MCFLY! by angel'o'sphere · · Score: 2


      First, it should be demonstrated that OOP is objectively better *before* making students think in such ways without giving them much alternatives


      this is allready shown ...
      as well as it is shown that functional programmng languages are better than procedural ones ...
      as well as relational languages are shown to be better than procedural ones ...
      as well as it is shown that logic languages are better thanprocedural ones ...

      But: procedural languages are (arguable) the easyst ones and thats why they survided still now.

      I only know one language wich is still procedural only: Fortran. All other languages have made a hybrid oo evolution.

      OOP is obtimized for hierarchical IS-A abstraction

      How do you come to that opinion?

      The main reason is that modern systems need "relativistic abstraction"

      I dont't think so! Today systems need to interact. Ineract with DBs, business logic, and millions of concurrent users. They need to be maintaneable, evolveable and should be reuseable. They need to scale and you like to abstract away technical concerns as often as possible.

      The DB you use below such a system, is just a replaceable technical concern.

      In 90% of the cases a standard relational DB is not the best choice. Its only the cheapest in terms of available support and existing infrastructure. OO databases are in general far faster than relational ones in typical ussage scenarios.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    17. Re:Hello World not OO? Hello MCFLY! by scrytch · · Score: 2

      > "hello, world".print

      You want to get finicky, that's still not great OO design. Unless you're designing a class hierarchy where every object has a print method, chances are you want to tell some output stream to print something, at which the output stream requests some format it prefers from the object being printed. With a .print method on objects, you have to have some print object in scope somewhere, on the object, the class, or globally. Should each possible scope really be deciding on its own what the default output stream is?

      Thus

      stdout.print(hellomsg)

      Or in more familiar syntax ...

      cout hellomsg;

      (Note that I have issues with C++ iostreams, but they did get this part right).

      In in a language that supports multiple dispatch, the issue is a bit moot, but what you put on the left side of the dot (or arrow or whatever) in most OO languages can make a big difference in design down the road.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    18. Re:Hello World not OO? Hello MCFLY! by Tablizer · · Score: 2

      (* this is allready shown ... *)

      Bull! Where's it?

      (* I only know one language wich is still procedural only: Fortran. All other languages have made a hybrid oo evolution. *)

      I thought they were adding OO extensions to Fortran. (Not that it proves anything except that OOP is in style right now.)

      (* The DB you use below such a system, is just a replaceable technical concern. *)

      Not any more than OOP is.

      (* OO databases are in general far faster than relational ones in typical ussage scenarios. *)

      Bull!

      It is moot anyhow because OO DB's have been selling like Edsels.

      I will agree that in *some* domains OODBMS perform better, such as CAD perhaps.

    19. Re:Hello World not OO? Hello MCFLY! by Arandir · · Score: 2

      For plain math, use plain ints.

      But then it's not an object! I thought everything was supposed to be an object.

      The Boolean class contains methods for manipulating booleans

      Sounds like an adaptor class to me. The bool itself is still a non-object. If you make a string of bools, that string is not a bool, it's a string of bools. Adaptor classes are handy for such cases, but don't confuse the wrapper with the contents.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    20. Re:Hello World not OO? Hello MCFLY! by Hast · · Score: 2

      For plain math, use plain ints.

      But then it's not an object! I thought everything was supposed to be an object.

      I think he was talking about "the real world". The one with a screen and a keyboard and a mouse and a computer.

      In the "real world" mapping things to objects is often easy. It is also often easy to see trivial ways to interact with said object.

      Wether or not you're dealing with an instanciated object (Java object that is) when you do an addition is both irrelevant and uninteresting. (Unless you happen to be a computer scientist focusing on virtual machines or compilers.)
    21. Re:Hello World not OO? Hello MCFLY! by Arandir · · Score: 1

      Wether or not you're dealing with an instanciated object (Java object that is) when you do an addition is both irrelevant and uninteresting. (Unless you happen to be a computer scientist focusing on virtual machines or compilers.)

      That was my whole point. Some things that look really good in the academic world, don't always work the way you want in the real world.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    22. Re:Hello World not OO? Hello MCFLY! by Anonymous Coward · · Score: 0
      What about 'System.out' isn't OO? There is an object called 'out', which is of type 'PrintWriter', and a member of the class 'System', and we are calling its method 'println', passing it an object of type 'String'.


      System.out is a PrintStream object, not a PrintWriter object.

    23. Re:Hello World not OO? Hello MCFLY! by Mr.+Shiny+And+New · · Score: 1

      My point wasn't to disagree with your points, just to illustrate that Integer and Boolean objects can be useful. I'll admit that Java doesn't really use these to the fullest extent that they can; this was a conscious decision made for performance reasons. You don't do math with an Integer object because it's too much overhead. However, you can store an int in an Integer object, which is handy if you want to store primitive types in collections that only store Objects.

      Yes the "pure OO" paradigm falls apart a little here in the Java world. But it's intentional, because in 1995 the extra overhead of doing all the conversion between objects and primitives wasn't worth it. It's just an example of an engineering tradeoff between "correctness" (from an academic perspective) and "efficiency" (from a performance perspective, and possibly other perspectives).

      My main gripe with your original comment was that you are picking on the primitive type wrappers, when they do not really illustrate your point as well as some other Java flaws, like the weird array objects. Now THOSE break up the paradigm; if I make an array of ints (primitive types), it (the array itself) suddenly is also an object... even experienced java programmers find it confusing. I'm not really sure how it could be cleaned up and made nicer though.

  5. teaching OOP first may not be the way to go by Anonymous Coward · · Score: 2, Interesting

    A lot of texts on OOP say that people new to programming learn OOP very quickly and naturally, and that teaching them OOP first is the way to go.

    This may not be true.

    I have recently taught programming to a few people. They were new to programming, and were honestly interested in it.

    I have tried the approach of teaching OOP first. They didn't get it. Then I tried to avoid the OO part, and teach them some programming, but using objects. This also didn't work very well.

    After this, I switched from Java to a simpler, structured language: PHP. Things worked a lot better, they seemed to understand the procedural paradigm naturally and very quickly.

    After a few months of teaching PHP, I tried to teach Java again. This also worked a lot better than my first attempt, as they groked objects more easily.

    After this experience, I belive that "teach OOP first" is not the way to go.

    I think the proper way to teach programming is:

    - Teach them a structured/procedural language. Drill into them the loops, if, switch, functions, parameter passing, etc. Teach very basic algorithms.

    - Make them do some real work using the new language.

    - Teach them OOP, using an OO language.

    If the first thing you teach is OOP programming, people won't understand the need for classes and objects. They will seem like useless abstractions.

    Also, people who are not accustomed to the way computers work don't understand a lot of things in OOP, as they miss a lot of context.

    If you teach them the much simpler structured programming, they will grok OOP easily.

    There is a third path: teach structured programming first, but in an OO language. I belive this can be done, but not in Java. In Java, everything in the library is an object, so you can't avoid lots of objects and object syntax.

    Another issue is that it is important (IMHO) to teach people a productive programming language, so they can see real, useful results quickly. PHP is good for this purpose.

    1. Re:teaching OOP first may not be the way to go by PythonOrRuby · · Score: 2

      I like Eiffel for this purpose. Clean syntax, and straightforward, relatively simple rules.

      Most importantly though, nothing takes place outside of a class. Consistency is good, as people tend to get confused when explaining exceptions to the rules.

      If you're going to teach OOP, in my humble opinion, you need to stress thinking about problems in terms of classes and objects from the very first day.

      The other approach I've given serious thought to is using a language like Perl to start out by showing how things can be done in a quick and dirty way, but then expand the "hello, world"(output) script to saying "hello" to a person(input), and so on and so on, and show how modules and classes can make expanding a small program much easier. At the same time, as you construct a class, you can demonstrate arrays, associative arrays, looping, conditionals, etc.

      I'm still debating which is the better approach.

    2. Re:teaching OOP first may not be the way to go by Jersiais · · Score: 1

      I'm mostly replying to the one above because I can't find a 'reply' for it. "Hello World".print sounds the hell of a lot like SmallTalk. If you like a language where CASE and ELSE-IF are impossible because a program statement is an object and an object must have finite limitations, where every dimension of array needs a separate definition, then ST for you! Personlly, I suspect *all* these Ultimate Solutions of faddism. There are occasions where 'goto' is useful - even if disguised as 'break' or 'continue' or even 'throw', which is the worst example of unstructured programming I can think of. OK, I have a bias here: my favourite for personal hacking has been Algol-68 for about 15 years. None of that having to remember that C(++) can't tell that one part of a CASE ends when the next begins, no worries about one form for IF that doesn't assign, another if it does, no incomprehensible near-assembler loops or syntactic distinctions between test before/test after. And, if you really want it, yes a Procedure has as much right to be part of a Structure as anything else. Are the complexities of 'black boxing' objects (a sure way to make using them 100 times more difficult as there's no knowing what's going on) really necessary once precompiled libraries can be called or read-only modules inserted? I suspect here a certain amount of gimmickry because C is such a lousy Fortran-inspired mess.

    3. Re:teaching OOP first may not be the way to go by Anonymous Coward · · Score: 0

      Teaching OOP first to beginners may not work for Java, the syntax of which is enough of a problem all by itself. I'd have to say the full SmallTalk system is good for this purpose, since you can dig down inside and see how things work, and modify it as it runs to see what happens. The quick feedback of interactivity on this level is hard to duplicate in other environments. I think there is no substitute for being able to explore something yourself.

  6. Teach libraries first by Anonymous Coward · · Score: 2, Interesting
    To really understand a language, one should learn the standard libraries first. The book Accelerated C++ takes this approach. Stroustrup advocates this method of teaching a language. The wrong way to teach a language is to exhaustively teach syntax.

    Of course syntax is important, but one should not be forced to become a language lawyer before useful tasks can be accomplished. By emphasizing a language's standard libraries, you learn the "philosophy" of the language as well as its syntax. And in the end you can do useful things with the language, and do it correctly within the philosophical context of the language. You avoid the such common problems as using a C++ compiler to write what in reality amount to C programs.

  7. How do you learn C, how do you learn Java? by angel'o'sphere · · Score: 2

    A quote from the articel:


    As we learned more and more about programming in Java, we found that C was not the right way to approach Java.


    To learn C you need to know assembler(it was invented to be a portable assembler).

    To learn C++ you need to know C (otherwise you better skip directly to Java/OO Pascal or well SmalTalk ... if not Eiffel).

    Unfortunatly you can not teach a starter in CS assembler, hm ... why not, sure you could! I learned assembler when I was 16 ....

    Unfortunatly CS emphasizes learnig of a beginners language. Instead of teaching higher level concepts. OTOH, thats what the students want and expect ...

    And if a course is directly put into touch with higher level concepts, you can bet its not only functional like Miranda or Ml, no you have Lisp .... arguable the ugliest language existinge besides fortrana nd JCL.

    I for my part only teach UML .... and wait for CASE systems wich skip from diagramming to code directly.

    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    1. Re:How do you learn C, how do you learn Java? by scrytch · · Score: 2

      > To learn C++ you need to know C

      A certain Mr. Stroustrup disagrees with you. In fact, C will teach you all kinds of things you need to unlearn in C++, such as pointer usage, arrays, and imperative design, that can be superseded with references, containers, and predicates, all to be found in the C++ standard library. To say nothing of generic programming with templates (you can actually write entire programs in nothing but templates, they're turing complete).

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    2. Re:How do you learn C, how do you learn Java? by kelnos · · Score: 1
      To learn C you need to know assembler(it was invented to be a portable assembler).

      are you on crack? C was designed so people didn't have to learn and use assembly, as well as for portability reasons.

      i've been programming in C for a relatively short time, but i definitely learned C programming back when all assembly was to me was "a scary arcane low-level language that no one really wants to have to understand anymore" ^_~. sure, knowing how assembly works has probably helped me to use C more efficiently, as i know what is going on behind the scenes, but by no means is a knowledge of assembly necessary for effective C programming.

      --
      Xfce: Lighter than some, heavier than others. Just right.
  8. OO is for wankers by Anonymous Coward · · Score: 1, Interesting

    Computers don't "think" in objects.
    Why should the program or programmer do ?
    I've seen enormous amounts of crap code created under the banner of OO.
    Those who cannot think in simple procedures shouldn't be programmers at all.

    1. Re:OO is for wankers by PythonOrRuby · · Score: 2

      Computers don't think at all. Does that mean programmers shouldn't?

      Because even Assembly is an abstraction, and once you start down that road, you might as well go all the way.

      The third line pretends that their are strict lines drawn between procedural, functional, and OO programming paradigms.

      And how are methods anything other than functions or procedures which operate on an encapsulated set of variables?

    2. Re:OO is for wankers by Orthanc_duo · · Score: 1

      Agreed. Though like all programming tools/consepts/languages OO is a good choice is some situations (most in my opinion). A lot of the crap OO is generated by people using OO where it's not appropriate or by using it badly (eg bad abstrations).

      "A place for everything and everthing in it's place"

      Orthanc

    3. Re:OO is for wankers by Tablizer · · Score: 2

      Agreed. Though like all programming tools/consepts/languages OO is a good choice is some situations (most in my opinion). A lot of the crap OO is generated by people using OO where it's not appropriate or by using it badly (eg bad abstrations).

      I have tried to get useful descriptions of when and when not to use OOP by asking OO fans.

      But, I get a different answer from every OO fan I ask.

      OOP has shot consistency between the eyes.

      I find procedural/relational design more consistent: tasks go into code structures, and noun modeling goes into the database and relational algebra (as opposed to also going into code structures such as classes).

      Sure, there are differences from one p/r programmer to another, but not NEAR as much between as from one OO practitioner and another. They will bash each other's OO design, but cannot articulate exactly why one is bad. It is a doctrine fight usually. "But you are violating the Wesly-Demeter Principle blah blah".

      I usually justify my designs in terms of how they will handle the most likely changes and change patterns. Using this metric, I can match or beat most OO designs. (Although the doctrine sometimes blinds OO fans to actual change patterns by hiliting only certain change patterns. It is hard to get beyond such points because it is one's world view in a given domain that you are up against. "Brainwashing" is what comes to mind. Indoctrinate not only the solution, but the problem as well by focusing only on a narrow subset of reality.)

      oop.ismad.com

    4. Re:OO is for wankers by Orthanc_duo · · Score: 1

      I don't think there is a simple rule to say when you should use OO, or procedural (or functional programming for that matter). Often it is simply a matter of preferance. However for many situations OOP just seems to fit. There are of course situations where using OO is a really bad idea (acursed JSP's for example).

      OO has been around for a while but it only caught on relativly recently. This goes a long way to explaining the lack of consistancy.

      But you are violating the Wesly-Demeter Principle blah blah
      Sounds more like a professor than a programmer.

      Orthanc

    5. Re:OO is for wankers by javahacker · · Score: 1

      Structured programming is a methodology. OOP is a methodology.

      A methodology is generated by looking at what good developers are doing, and producing a description (or set of rules) that tells you how they did it.

      OOP is what the best structured programming people were using, at least in some set of problems. Structured programming was what the best programmers were doing before anyone ever created the structured programming methodology.

      Some programs do not benefit much from OOP. Many OOP based programs were generated without accounting for all of the requirements, either known or unknown, of the problem. They would have been bad regardless of the language or methodology used. OOP doesn't mean the code is good, it is merely a method that some very good coders use. Bad code can be generated no matter what methodology the programmer says they are using.

    6. Re:OO is for wankers by Tablizer · · Score: 2

      (* A methodology is generated by looking at what good developers are doing, and producing a description (or set of rules) that tells you how they did it. *)

      How does one judge "good developers"? If you judge it by articulation skills, then most OO fans I know really suck. "It is good because I have experience and I just say so" is commonplace. Is science and western-style reductionism really dead in software eng.?

      (* Many OOP based programs were generated without accounting for all of the requirements, either known or unknown, of the problem. *)

      This is a weakness of OOP IMO. The "noun modeling" is in code instead of via relational formulas (as described elsewhere). Formulas are less disruptive to change than code structure (named units, etc.). GOF is the old-fashioned way.

      (* Structured programming is a methodology. OOP is a methodology. *)

      Structured programming + Databases is also a methodology, although it is not documented very well. Databases are what gives procedural programming its real power, not mere functional decomposition by itself. It makes structures/patterns virtual and formula-based instead of something you build by hand.

      Would you rather order a bunch of bricks into place, or lay them yourself brick by brick?

    7. Re:OO is for wankers by javahacker · · Score: 1

      How does one judge "good developers"?

      They are judged by their peers, the people who have to deal with the code they produced. They are judged by the results they produce, not by how well they advertise themselves. Either you, or the people you are talking about, are talking trash. I don't know enough to tell which for sure, but you talk like you didn't keep up with the last 10-15 years of software engineering, and don't care to learn it. I know your experiences with OOP are very different than mine, either because you aren't open to seeing the benefit of OOP, or because you worked with some really bad developers who said they knew (and used) OOP.

      Databases are what gives procedural programming its real power, not mere functional decomposition by itself.

      Believe it or not, OOP programmers use Databases! All you are saying is flexible software (whatever design methodology you use) is better than inflexible software. What an amazing observation! Tell us something we don't know. So you saw some bad OOP designs, probably created by people who didn't understand either OOP, or the problem domain they were trying to solve. Confusion processed by crap is crap, there is no other possible result. That says nothing about OOP, and everything about the people and processes involved.

      Would you rather order a bunch of bricks into place, or lay them yourself brick by brick?

      If I want a house, I'd rather have the house than the parts of a house (bricks), and I'd rather have bricks than the components of a brick. If you have to solve a problem, the solution takes about the same amount of work to develop, no matter what system you use.

      The "noun modeling" is in code instead of via relational formulas

      What on earth are you talking about? If the code has to perform certain operations, they need to be coded somewhere, don't they? Someone has to write them, in whatever form they may be in. Somewhere, either in your "formula", or in code, they need to be implemented. A bad implementation is just that, a bad implementation.

    8. Re:OO is for wankers by Tablizer · · Score: 2

      (* They are judged by their peers *)

      OOP opinions are currently clouded by an Emporer's New Clothes syndrom. Anybody who speaks out is called a Luddite or the likes.

      (* Believe it or not, OOP programmers use Databases! *)

      But OO and databases tend to fight over the same territory. If you want to properly factor responsibilities and roles of the various technologies to reduce duplication and/or overlap, then one or the other must go.

      Even Bertrand Meyer questions the wisdom of databases with OOP.

      (* So you saw some bad OOP designs, probably created by people who didn't understand either OOP *)

      Perhaps. I have asked for some good designs that show clear benefits and never receive any that stand up to scrutiny.

      Besides, if only 2 percent know how to do OOP "properly", then there may be a huge problem with OOP. Ed Yourdon's surveys find no higher manager-level satisfaction with OOP projects, I would note. So either OO sucks or its too hard to "do right".

      (* If you have to solve a problem, the solution takes about the same amount of work to develop, no matter what system you use. *)

      I disagree. I found formula-based structuring/patterning to be quicker, more change-friendly, and less verbose.

      (* What on earth are you talking about? If the code has to perform certain operations, they need to be coded somewhere, don't they? *)

      I see a lot of OOP code or API's that *reinvents* database-like operations (find, join, get, set, insert, delete, save, filter, etc.)

      I would rather *use* a database than make one.

      (* Somewhere, either in your "formula", or in code, they need to be implemented. *)

      I find the formula approach more compact, less intrusive to the global code structure, and more change-friendly.

    9. Re:OO is for wankers by javahacker · · Score: 1

      But OO and databases tend to fight over the same territory. If you want to properly factor responsibilities and roles of the various technologies to reduce duplication and/or overlap, then one or the other must go.

      OO is good for working with database items on an item at a time basis. If you need a database join, then you should do one. I know no good developers who want to waste time coding something that they can do with a SQL statement.

      I'm obviously not going to convince you that OOP is a good thing, and that is not my purpose. You are saying many things about OOP that I feel are incorrect or undeserved, and my purpose here was to say that what you have seen is not necessariy the whole story.

      You aren't going to convince me that it is bad, because I have seen otherwise. Like every system for accomplishing something, it can be misapplied, misunderstood, and just generally not applicable to some problems. I think that point has been made.

    10. Re:OO is for wankers by angel'o'sphere · · Score: 2


      GOF is the old-fashioned way.


      Please stop ranting against GOF, Ganng of Four, Design Patterns, Elements of Reusable Object Oriented Software.

      In every sentence where you write: GOF == "bad term" you only show your bloudy ignorance.

      Justifying that OO is 'bad' by claming all your friends who are OO fans are bad programmers ... thats so silly.

      BTW: can someone please explain me how to put one on the ignore list?

      tabelzier, stick to your tables .... whats arelational formular anyhow? That term does not exist in CS!

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    11. Re:OO is for wankers by Tablizer · · Score: 2

      Your complaints against me here are as vague as most OOP evidence.

    12. Re:OO is for wankers by Anonymous Coward · · Score: 0
      I would rather *use* a database than make one.

      So, you'd rather take an existing solution to a problem and reuse it, without reinventing the wheel. Your database is a black box that you know well, and you know how to use it.

      This is one of the problem domains that OOP is trying to solve - reuse. A programmer doesn't need implementation details, and doesn't need to implement functionality him/herself. With a well designed object, the programmer just needs to know how to use it (in your case, SQL syntax, views, triggers, etc).

      Your argument is for OO as much as against it...

  9. Whatever. by Lukey+Boy · · Score: 1

    Is it just me or is that the biggest troll ever on the O'Reilly site?

  10. OOP is "cool" != It's the foundation of CS by SyniK · · Score: 1

    Basic -> C -> ASM -> C++ -> Java

    Where's the problem? OOP without the background does not make very good programmers. It makes Visual Basic programmers with VM's.

    "Let's abstract everything! Let's not worry about memory size, program speed, and code reuse!"

    --
    -Tom
  11. Java is just the tip of the iceburg by Dr.+Bent · · Score: 5, Insightful

    The real problem here is software development has moved beyond what a scientific discipline can handle. Much like modern electrical engineering evolved from the findings of early 20th century experiments with electricity, the need for real software engineering is starting to become apparent.

    But, as always, acedemia is behind the curve. Not that they should be on the bleeding edge, but now it's time to catch up. Computer Science programs across the country have started to straddle the fence when it comes to coursework. Do we teach theoretical science, or applied science? This is a mistake; Nothing done half-assed is ever worthwhile. Do not make Computer Science more like an engineering discipline. Instead, make Software Engineering an undergrad degree unto itself.

    You should be able to teach CS101 in any language. If you can't, then you're trying to teach engineering in a science class. A stack is a stack regardless of what langauge it's written in. Don't pollute computer science by trying to make it something it isn't. Instead, make a new Class (pun!)...Software Engineering 101. There you can teach design methodologies (Like OOP), proper use of the latest tools, automated testing methods, and other applied theory that has no business in a computer science class.

    This is not to say they there wouldn't be a great deal of overlap between a C.S. and S.E. degree. After all, you have to learn physics before you can be a Civil Engineer. But it's just not possible to teach you everything there is to know in 4 years. I've learned so many formalisms and techniques since I recieved my B.S. in C.S. that I wondered why I hadn't heard anything about them while I was in school. The answer, I realized, is the days of the computer Renaisannce man are ending. Developing an algorithm and developing a software system are two completely different tasks. Just as a physicst can't build a bridge and a Civil Engineer didn't invent Superstring thoery, you can't ask a computer scientist to build a software system or ask a software engineer to develop a new compression algorithm...it's just the wrong skillset for the job.

    1. Re:Java is just the tip of the iceburg by budalite · · Score: 1

      I find it interesting that ther term "Computer Science" is really an oxymoron. Computer Science is not a Natural Science. Our chosen field does not discover the laws of Computer Science; we make them up. These "laws" are often contradictory. (Poor HAL.) Compliance with the laws is not always compulsory. Indeed, if one has the power, one may even change the law(s), thereby changing the basic structure of the universe that Computer Science purports to study. Even Psychology, the least coherent of Sciences, has a natural model to study. It is also interesting to study the behavior of those that are given the opportunity to act like a god.

    2. Re:Java is just the tip of the iceburg by g1zmo · · Score: 1

      I am a Software Engineering major.

      My school offers 3 degrees in the Computer Science Engineering department: CSE, CS, and SE. There's a comparison of each degree here. I think these programs are well-balanced, and a good separation of the fields that you are talking about. I chose the SE path because I enjoy the design process of thinking, planning, and adjusting based on project requirements much more than I enjoy cranking out code (although I've lost much sleep and a couple of girlfriends due to late night coding frenzies). I'm still young, and in school, but I would love to be able to work on a large software project in a team environment with capable peers. In fact, I'd love to be able to work on a project with gods, so I can soak up as much as possible. I love this stuff!

      --
      I have found there are just two ways to go.
      It all comes down to livin' fast or dyin' slow.
      -REK, Jr.
    3. Re:Java is just the tip of the iceburg by Tablizer · · Score: 2

      I find it interesting that ther term "Computer Science" is really an oxymoron.

      About half of it belongs in the same category as "engineering" and the other half in psychology. The psychology part is key to software engineering (SE). SE is mostly about humans communicating with *other* humans (programmers). The computer is secondary.

      Many early SE experts tried to apply math, but it did not work very well. It comes down to the human brain, which still ranks among the biggest mysteries of science.

      Thus, anything in SE that deals with "is X better than Y" is going to have to get neck-deep in psychology.

      The only known semi-objective metrics outside of psychology that have any merit are code size (quantity of lines of code or tokens) and scenario-based change-impact-analysis.

    4. Re:Java is just the tip of the iceburg by Hast · · Score: 2

      It's my experience that CS is mostly related to math. People working with pure CS tend to work on algorithms. (No psychology or engineering involved really.) Your metrics are ordo notation by algorithm analysis.

      SE is another thing. Often a CS department teaches SE as well as CS, but that's just administartion.

      I wouldn't use LOC (lines of code) as a metric. It doesn't work when you compare across architectures or even languages. How well it can be changed (Which I assume is what, "scenario-based change-impact-analysis" means.) is also hard. Generally if you can forsee the change then it's probably part of the original problem domain.

      Besides, pshychology only enter into the first part of the design. The specification. After that you know what you are trying to do, and the engineering can start. (Naturally there may be some misunderstandings regarding what the specification mean, but that's not part of the engineering problem per se.)

      But I'll agree with you that SE is for from being a solid engineering branch yet. We just haven't been building systems long enough yet. And for a lot of that time it wasn't even aknowledged that it should be engineered to begin with.

    5. Re:Java is just the tip of the iceburg by Tablizer · · Score: 2

      (* Generally if you can forsee the change then it's probably part of the original problem domain. *)

      In reality, you can't except for hindsight in case studies. However, you can guess at typical changes in many cases.

      (* The specification. After that you know what you are trying to do, and the engineering can start. *)

      Time and time again, being "change-friendly" has been shown to be more critical than initial design. Fitting a clear spec is a sinch in comparison.

    6. Re:Java is just the tip of the iceburg by Hast · · Score: 2

      And that is why refactoring is becoming popular. If you have a solid design to begin with then changing it should be fairly easy.

      Refactoring is still a bit away from mainstream perhaps, but it's coming. Along with a bunch of other new ideas waiting to get accepted. Such as XP, which also support the "short release cycle" which is really the core of "change-friendly". All of these are becoming integrated into SE in order to make it a more solid field.

      We're still at the early stages of SE after all, so bumps in the road are expected. Don't exepct CS to come to the rescue though, that's not it's job. It's like blaming the people dealing with mathematics when your engine doesn't work. Sure the fields are related, but they are not the same.

    7. Re:Java is just the tip of the iceburg by Tablizer · · Score: 2

      (* And that is why refactoring is becoming popular. *)

      That is becuase OOP has failed to be "change-friendly" as advertized. Rather than admit this, the industry has created the euphemism "refactor" rather than say, "it is not standing up to change, so we have to rework it and make a career out of reworking it".

      Refactoring is a symptom, not a solution.

      (* Along with a bunch of other new ideas waiting to get accepted. Such as XP, which also support the "short release cycle" which is really the core of "change-friendly". All of these are becoming integrated into SE in order to make it a more solid field. *)

      XP is contraversial, and generally orthogonal to paradigm issues. XP seems to be in response to high project failure rates. If I am allowed to use sound p/r techniques, my projects *don't* have a high failure rate. Thus, I feel no need to fix something with extreme approaches that is not broken to begin with. Perhaps use XP for managers/people who have a high failure rate rather than everybody.

    8. Re:Java is just the tip of the iceburg by Hast · · Score: 2
      That is becuase OOP has failed to be "change-friendly" as advertized.

      Yes of course, OOP is not as good at good at making reuseable code and things like that. It's generally good for making reusable designs though. So if you have to add new features you can often use the old design as is. There is nothing magical about OOP which makes everything reusable. This wasn't the issue at hand though.

      XP is contraversial, and generally orthogonal to paradigm issues. Thus, I feel no need to fix something with extreme approaches that is not broken to begin with.

      Now you're really starting to sound like an old gheezer refusing to learn new ideas. Sure there's a lot in XP that is not for everyone. There are also a lot of things which sucessful people have been doing for a long time. Just as OOP and design patterns were made to help everyone and not just those who discovered them XP is a bumdle of good ideas and methods. (Not all may apply to your projects.)

      WYI the university I go to have now picked up XP and use it in the education. They used to follow the more strict RUP (Rational Unified Process) before. So while it's still pretty "radical" it's becoming more mainstream.
    9. Re:Java is just the tip of the iceburg by Anonymous Coward · · Score: 0

      > find it interesting that ther term "Computer Science" is really an oxymoron

      As opposed to you, who is just a plain moron.

      > Computer Science is not a Natural Science.

      Do you have even the foggiest idea what computer science is? Do you think its sitting at home writing the odd Java crapplet and configuring a Cisco router?

      >Our chosen field does not discover the laws of Computer Science; we make them up.

      This is flat-out wrong. The only thing "made up" here is your "understanding" of what computer science is.

      Here are some fundamental results in computer science that I strongly recommend you at least become *passingly* familiar with before shooting your mouth off about what is, and what isn't science:

      The Church-Turing Thesis.

      Goedel's Incompleteness Theorem.

      The Kleene-Schutzenberger Theorem.

      Savitch's Theorem.

      Hell, the entire fields of Automata Theory, Formal Language theory, Complexity Theory, Semantics...

      All of these are Computer Science and all of them study real hard laws about what the limits of computation are. These are certainly no more "made up" than quantum field theory or superstring theory.

      >These "laws" are often contradictory. (Poor HAL.) Compliance with the laws is not always compulsory.

      It is at this point that we truely see the stunning depth of your ignorance. For shame.

      The results in the above mentioned fields come complete with mathematical proofs that they are true (minus the Church-Turing thesis, which by its nature can never be proven... but I defy you, go build a machine to prove that compliance with the Church-Turing Thesis is "not compulsory").

      >Even Psychology, the least coherent of Sciences, has a natural model to study.

      How is computation *not* a natural process? The Church-Turing thesis is as much about the *physical* limits of computation in our universe as it as about abstract notions of computation.

      Not only does computer science have a natural model to study... we have a *very nice* model that lends itself beautifully to the application of mathematical methods.

      But I waste my breath. It is apparent from your statements that you have no more clue what computer science is than a mule would know what general relativity is.

      Might I suggest that for your shocking display of ignorance you author a comment about how astronomers aren't real scientists because they just "build telescopes all day".

  12. Fundamental CS FIRST by Anonymous Coward · · Score: 0
    Goals for first time CS students (not those with any programming exp.) should be:
    • Learn what a text file is and what code is
    • Learn what machine language is (not learn machine language, just what it is... like: French is the language spoken in France)
    • Learn that text is compiled into machine language
    • Learn how to create a text file, put some code in it... and then compile it into French... er machine language ie: HelloWorld
    • Now we learn variables, control statements, loops, functions, and simple data structures including objects if you like

    You can't introduce Objects first. To do that would be like introducing a child to touch typing before they know the alphabet. You can do it but damn it makes so much more sense to build up from the basics.

    *lol* Now some hair-brain is going to teach his kid to touch type before the A-B-Cs and we'll read about it next year on Slashdot!

    -- Zarf
  13. Use this program in classes by doc+modulo · · Score: 2, Interesting
    If you want to teach students how to program in an OO way in Java. You can use this program:

    BlueJ

    Teachers can start teaching objects and classes from the beginning. They don't have to tell students:

    "Just write down: public static void main (String args[]) { } And don't ask me about it until later".

    it wouldn't run some of my home-made classes, but then I didn't read the manual :P

    --
    - -- Truth addict for life.
  14. OO overrated - Lisp beats Java any day, too. by Anonymous Coward · · Score: 1, Insightful

    Bleurgh. OO isn't everything, and Java OO is deeply crippled and sucky anyway. Common Lisp, perhaps closely followed by Smalltalk, has the best OO programming (and is the _only_ language that can fully satisfy every feature on the OMG description of OOP!) - but, paradoxically, Lisp is a language where one seldom resorts to huge baroque OO stuff anyway.

    N.B. One should be teaching general principles, not language-of-the-day, anyway - I am not suggesting Lisp is the one-true-language, anymore than Java is - Lisp would suck for teaching manual memory management techniques, for example.

    1. Re:OO overrated - Lisp beats Java any day, too. by Anonymous Coward · · Score: 0

      Mod this up. Why the hell is Java being used for introductory courses?

    2. Re:OO overrated - Lisp beats Java any day, too. by Tablizer · · Score: 2

      Mod this up. Why the hell is Java being used for introductory courses?

      Because the outside world often does not share the same ideologies as universities, and graduates need jobs so that they can pay off their student loans.

      I am just the messenger.

  15. You break the abstraction going the other way... by Jayson · · Score: 2

    Telling the string to print itself may sound fine, but then the String object needs to be aware of how the mechanics of printing work. At some deeper level you will have function that takes ar argument that finanlly delivers it to an outbound stream, just as the PrintWriter object does. You can't win either way.

    This is a good example of one of the many lose-lose situations you have in OO design.

  16. huh? not higher level concepts? by Jayson · · Score: 2
    Unfortunatly CS emphasizes learnig of a beginners language. Instead of teaching higher level concepts.
    At Cal the first class you have is SICP. It is nothing but high-level languages and concepts.
  17. Python by tdelaney · · Score: 2, Insightful

    print 'Hello, world!'

    It does exactly what it needs to, without anything extra. Each piece can be discussed separated, and picked apart or expanded as desired.

    1. Re:Python by zero_offset · · Score: 1

      The use of apostrophes is an obvious improvement over the quotes used by BASIC: PRINT "Hello, Python." Now THAT's what I call unacceptable syntax. (Of course I know the difference, it just struck me as amusing.)

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

    2. Re:Python by ameoba · · Score: 3, Funny

      actually, python is a -very- dynamic language. You can do hello world as:

      print 'hello world'

      or:

      print "hello world"

      or even:

      exec(__import__('zlib').decompress(__import__(
      'binascii').a2b_base64("eNqNkuFqgzAUhV/lUhi5m"
      "T HoxvZDqtC1b+FE7BQWMCqaMfb2S6LVxcra/MnlcL5zr"
      "95g XchzWcCBQRenQcbgzVyPz4E5DI4Qw2Q5aUvHQEoGZ"
      "wER4A mKpgTEkwYgjoHsiVWaVmknz/OhUkJVMs8xYNh12"
      "uaH9OHp 5ZVC28OMJTcxbwvzFkxKB7MMkzK1haEd0L8X9"
      "FcgW8A8F7 Jre6UhMvwMhPJBle2X4t+9zsJdAjv6f5e2L"
      "3EzRTS8r4qy Fk2FVDupOwS/e4iPzx7nb6F0nOcs9L7CK"
      "Pu7TLdBSqa9jq NP/AzzoauFQpIRFtI0dINsEl5DpqMLB"
      "qsJZudqtDEynK4I jngYLfql6uc5gjd+BHlvCKV6Kd7lp"
      "PtLlfjZnieObCSPTx I3BU/9LPGuTHwJnCNd3YpWMim+P"
      "dOli+1U223J5Tv6C+uY BZc=")))

      Python also has the added bennefit of being an all-around much simpler language to learn than Java, as the last example demonstrates.

      --
      my sig's at the bottom of the page.
    3. Re:Python by Anonymous Coward · · Score: 0
      More cute would be to show that strings are actually objects in python2. The following prints "HELLO WORLD", but without using the built-in syntax "print" just to be different. The module "sys" has an object "stdout" which knows how to do "write":

      import sys
      sys.stdout.write("hello world\n".swapcase())
    4. Re:Python by Anonymous Coward · · Score: 0

      A nice python textbook can be found here.

  18. It's different for some. by Anonymous Coward · · Score: 0

    In a nutshell, OOP even nowadays is treated as somewhat innovative concept in the classroom, mainly because of educators, who were taught C.

    I post this as a first year Computer Systems Engineering/Computer Science University student.

    At my Uni (Perth, Western Australia), a students first introduction to programming is in Java. The fundamental concept that is pushed through that first introductory course is the Object Orientated approach to program developement.

    For me, it is not taught as a 'somewhat innovative concept'. It is taught from the beginning as valuable concept that we should openly embrace. In fact, it's required of us.

  19. Why use Java for CS101? by TeeWee · · Score: 1

    So many languages to choose from, why use Java. You're unlikely to be able to explain the uses and benefits of OO in the first classes, better stick to the easier to explain benefits of good structured programming and progress from there.

    Use good strict languages to enforce good behaviour (I was taught using Modula-2) before letting students tackle something as loose as C. It doesn't matter that the language for teaching programming skill is not your fanciest and hottest language, if creating a good programmer is the goal, learning a new language within the same paradigm should be easy!

    Progress from one paradigm to another. Put things like OO, functional, logic, procedural in relation to each other. What are the benefits, what are the drawbacks, etc. Also a historical overview is important. Much more important than simply using the fashionable language and paradigm in a 101 course.

    1. Re:Why use Java for CS101? by Anonymous Coward · · Score: 0

      Put things like OO, functional, logic, procedural in relation to each other. What are the benefits, what are the drawbacks, etc.

      That, my friend, is the Billion Dollar Question around here.

      Perhaps a course in comparing and metrics may be helpful. Good critical thinking is probably harder than programming.

  20. A First Language that wasn't BASIC by Anonymous Coward · · Score: 0

    I miss Pascal. Siiiiiigh.........

  21. To be or not To Be... by zaqattack911 · · Score: 1
    I agree with the initial question: "Why not just start off with OOP instead of going through the linear hello world approach first".

    But oddly all the best programmers I know started off learning something like C , and then later became seasoned and excellent OOP programmers in C++/python/java.

    I remember feeling lightyears ahead of my "Intro to programming (using java)" class because I had already tackled some basic C coding in High School."

    Is it so hard to beleive that perhaps it's important to learn howto walk before learning how to run ?

    --Me

  22. What is an object? What is function? by angel'o'sphere · · Score: 4, Insightful

    I think one problem is the structure of a language.

    I mean: what is a first class citizen? In C everything can be degenerated down to a pointer, except a preprocessor macro.

    So the only true first class citizen is a pointer, or in other words a memory address. Structs and functions seem to be something utterly different. Even besides the fact that you can take the adress of both.

    In C++ suddenly we have similarities: structs are similar to classes and similar to unions. With operator overloading you can manage to get a class behaving like a function, a functor.

    But: wouldn't it make more sence to say we only have *one* thing? And wouldn't it make sence to make far more stuff optional? Like return types, access modifiers, linkage modifiers ... void as return type, how silly. I have to write: "HELLO HERE IS NOTHING" instead of writing nothing.

    {
    int i =1;
    }

    Whats that? Data? A thing with a 1 inside stored in a thing with name i? Or is it a function with no name and a local variable i with value 1?

    lets give it a name:

    thing {
    int i = 1;
    }

    Why can't a language creator understand that OO and functional paradigms are just the two sides of the same medal? The thing above serves pretty well as function and as class.

    thing a = new thing;

    Create an instance of thing ... if (a.i == 1) is true!

    if (ting().i == 1) is true also, call thing like a function.

    There is no need to have functions and structs to be different kinds of language constructs and thus it makes no sence that a modern our day language forces one to distinguish it.

    In short: System Architects get a language wich allows to express the world they like to modell in terms of Objects/things and assign behaviour/functions to objects. Unfortunatly the language designers are mostly BAD OO designers and are not able to apply the first principles of OO correctly to the languages they invent: everything is an object.

    Even a for(;;) statement is not a statement. Its an object. Its an instance of the class for, the constructor accepts 3 arguments of type expression, you could say Expression(.boolean.) for the second one. Well, for the compiler it DEFINITLY is only an object: java.AST.statement.ForStatement ... or something. Why the heck can't it be a class available to the ordinary programmer? At least for the teacher and the student it should be viewable as a for object and not a for statement.

    Sample:

    for (Expression init; Expression(.boolean.) test; Expression reinit) { Block block }

    Hm? a function or a class with name for.
    Two parameter sections, one in () parenthesis and one in {} braces.

    What you pass in () is stored in init, test and reinit. What you pass in {} is stored in block.

    The compiler crafter puts a for class into the lirary:

    class for (Expression init; Expression(.boolean.) test; Expression reinit) { Block block } {
    init();
    loop {
    test() ? block() : return;
    reinit();
    }
    }

    Wow, suddenly everything is a class. Hm, a meta class in the case above probably. A language would be easy to use if I told my student:

    Ok, lets store an addressbook! What do you like to be in an adressbook? Name, first name, birthdate, phone number? Ok, then you do something like this:

    { Name, FirstName, Birthdate, PhoneNumber }

    We group it. That thing has an anonymous type.

    How to create objects?

    new { Name="Cool", FirstName="John", Birthdate="12/27/66", PhoneNumber="080012345" }

    Wow ... and now we need two of them, so lets give them a name:

    cool = new { ... }
    bad = new { ... }

    And we need to compare them and search them and suddenly we need to put "methods" aka "behavioural" objects into them. Oh, yes and the anonymous thing above needs a name, so it becomes a class.

    What I describe above is Lisp, but with a more C/Java/C++ like syntax.

    And a radicaly reduced language design. The best would be to put the language design into the runtime libraries.

    Yes: every typed language should be able to work typeless as long as you are in a "skteching" phase.

    Regards,
    angel'o'sphere

    Note, for template arguments I used (. and .) instead of what you expect ... /. eats the less and greater signs.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    1. Re:What is an object? What is function? by scrytch · · Score: 2

      > What I describe above is Lisp, but with a more C/Java/C++ like syntax.

      Actually it reminded me of nothing so much as the ML line of languages, which includes SML/NJ, Ocaml, and Haskell. All of those give you "anonymous types" like that, with named fields. They even infer types for you, so you can pass an anonymously constructed struct into a field that expected an AddressBookEntry for example, and so long as it had all the same fields, it would accept it. In fact, you don't typically tell functions what type to expect, you just write the code, and the compiler will infer it all for you (sometimes it needs help, so they support type constraints, but those are still inferred, you don't need to declare your anonymous struct as such a type).

      I strongly suggest you check out ocaml

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  23. Smalltalk by booch · · Score: 3, Interesting

    Thinking that OO is hard is just plain wrong. The main problem with the way OOP is taught is that the commonly used languages mix both OOP and non-OOP procedural elements. Constantly switching between the 2 doesn't allow the student to "get" the OOP part very easily.

    The answer is to use something like Smalltalk, where everything is OO. In early testing, the Smalltalk developers found that it was *easier* to teach Smalltalk to beginners than procedural languages, because people are already familiar with doing things to objects in the real world. Whereas it takes a certain way of thinking to come up with step-by-step manipulations of abstract data structures.

    --
    Software sucks. Open Source sucks less.
    1. Re:Smalltalk by Tablizer · · Score: 2

      (* The answer is to use something like Smalltalk, where everything is OO. In early testing, the Smalltalk developers found that it was *easier* to teach Smalltalk to beginners than procedural languages, because people are already familiar with doing things to objects in the real world. *)

      I have heard this claim from Smalltalk fans before, but the "experiment" has never been repeated in a proper research setting. Thus, it is an ancient legend that just keeps getting propagated over and over.

      I would note that people think *differently* than each other. Just because thinking X way is natural for person A does *not* necessarily mean X is natural for person B.

      Don't paint with too wide a brush.

      If OO and Smalltalk model *your* head well, that is fine. Just don't extrapolate that all over the planet without real research first.

      Personally, I think it is more important to focus on making software change-friendly rather than making it easy to learn to program. Although, both are important factors.

    2. Re:Smalltalk by Hast · · Score: 2

      Well perhaps the "acecdotal evidence" is because that's the experience of a lot of teachers at universeties? Many of them used to teach smalltalk at one point, and they can compare to how it is now when they use Java or (heaven forbid) C++.

      It's not like you're going to put 10 people in one room and teach them Java/C++/whatnot and 10 in a different room and teach them Smalltalk and then see which group are best able to solve some random experiment. There's just not much of a point.

      And while people think differently I think that's besides the point. The issue was to compare languages which teach OO. If a person is more "apt" at procedural or functional programming is besides the point. It would seem as if the hypothesis that "If you want to teach something, try to teach it with as few distractions as possible." would be valid. And that would be the point of teaching Smalltalk.

      (Note: I haven't learned Smalltalk and have only studied it a little "for historical reasons".)

  24. C++ inventors on how to teach C++ by devphil · · Score: 2
    Do we teach theoretical science, or applied science?

    You teach by example, and do both. Andrew Koenig and Barbara Moo, two of the prime movers behind C++, wrote a book called Accelerated C++: Pratical Programming by Example , as a new approach to teaching C++.

    It absolutely kicks ass. Somebody else on this page commented that you need to learn C before learning C++. Most C++ people disagree; this book proves them correct. It starts with

    #include <iostream>

    // something went here

    int main()
    {
    std::cout << "Hello, World!" << std::endl;
    }
    and the first lesson was, "the most important line in this program is the second one," i.e., the comment. How refreshing is that? It does not then follow up by diving into the guts of the IOstream library; they simply say, "when you want to send stuff to the screen, use this; when you want to get stuff from the keyboard, use this," and leave the details for later. Even though the IOstream library involves OOP, they don't shove the user's nose in it.

    The people I know who have started using this book, and the approach that they advocate, to teach beginning programmers, have all found their students not only picking up the language faster, but being less frustrated with programming in general (admit it, we've all been there), and having a better understanding of what's happening in their code.

    (Pointers aren't even introduced until chapter 9 or 10, which means anything that visibly uses pointers isn't needed until then, either. Very nice.)

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  25. Reread GOF tehn. Re:OOD101 or CS101? by angel'o'sphere · · Score: 2


    And don't forget relational databases. I think relational concepts are some of the greatest ideas of computer science. You can reduce complex GOF-like "patterns" into skinney little formulas, for example. GOF looks like the old-fashioned hard-wired "noun-structure in the code" way of "doing patterns" IMO. Relational transcends most of GOF.


    You are far off topic.

    a) a relational data base is not a programming language

    b) the relational paradigm has nothing in common with the oo paradigm or the procedural paradigm

    c) in a relational data base you store DATA, not code (except for stored procedures)

    d) GOF is about structure and behaviour, further: you can't express anything you can express with GOF design patterns in relatinal terms, you are plain wrong.

    e) in another post yu critics the need to meditate for thinking right: and? is it not necessary to meditate and think right to apply relational paradigms correctly? I asume you learned all ways of joins in a day? You also learned allways of normalizing data bases in a day?

    The thread was about the question how to teach a language. Further more it was about the question how to teach an oo language and how to teach Java.

    Its definitly not abpout tabelizers fight against OO paradigms ... you should defintly start to understand your enemy (oo) more in depth before ranting constantly about your superiour procedureal and relational approaches.

    In the world I live, procedural is dead ... and in the future I move into oo is allready left behind us, as there are far more efficient ways: aspect oriented and subject oriented programming for instance.

    Regards,
    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    1. Re:Reread GOF tehn. Re:OOD101 or CS101? by Hobophile · · Score: 1
      In the world I live, procedural is dead ... and in the future I move into oo is allready left behind us, as there are far more efficient ways: aspect oriented and subject oriented programming for instance.

      Personally, I'm holding out for Programmer Oriented Programming, in which I sit back drinking coffee whilst the IDE orders me a pizza, plays a random selection of my favorite music and monitors Slashdot for new articles.

      POP -- not efficient, not maintainable, but very good for morale.

    2. Re:Reread GOF tehn. Re:OOD101 or CS101? by Tablizer · · Score: 2

      (* a relational data base is not a programming language *)

      It does not matter. If it replaces GOF it replaces GOF, whether itsa gerbal or a language.

      (* in a relational data base you store DATA, not code (except for stored procedures) *)

      Yes it can and I have done it before. However, it is not necessary to compete with most of GOF.

      (* GOF is about structure and behaviour, further: you can't express anything you can express with GOF design patterns in relatinal terms, you are plain wrong. *)

      The relational part replaces *most* of it. It does *not* have to replace *all* to be an effective alternative.

      (* in another post yu critics the need to meditate for thinking right *)

      No! I pointed out a contradiction of claims. I don't dispute that relational takes training.

      (* The thread was about the question how to teach a language. *)

      Yes, but "why" and "when" is a prerequisite to "how".

      (* you should defintly start to understand your enemy (oo) more in depth before ranting *)

      Red herring insult. I personally think you don't understand how to effectively use relational technology.

      (* In the world I live, procedural is dead *)

      In practice it is very much alive, even in OOP languages (it is just more bloated in them).

    3. Re:Reread GOF tehn. Re:OOD101 or CS101? by Tablizer · · Score: 2
      In my reply I forgot to mention:

      and in the future I move into oo is allready left behind us, as there are far more efficient ways: aspect oriented and subject oriented programming for instance.


      These technologies are currently only at the "lab" stage and are yet more convoluted patches on top of already convoluted OO to "fix" the sins of OO.

      They are at least a realization that OOP cannot handle relativism very well. Even IBM more or less agrees that OO has relativism problems in its introduction to such technologies.

      Are you gonna call IBM a "troll" also?
    4. Re:Reread GOF tehn. Re:OOD101 or CS101? by AMNESIACX · · Score: 0

      >> The thread was about the question how to teach a language. Further more it was about the question how to teach an oo language and how to teach Java. >> Its definitly not abpout tabelizers fight against OO paradigms ... you should defintly start to understand your enemy (oo) more in depth before ranting constantly about your superiour procedureal and relational approaches. You seem to be overlooking the important points some people are making..... Lets get to topic people.

      --
      "It's not just what you say, no it's mostly how you feel it." - Tim Buckley.
  26. Java, OOP, & CS by Anonymous Coward · · Score: 0

    I have tutored a lot of people who were taking CS101 type classes at a local community college. The only problem I can see about using Java, or any object oriented language is this.

    First of all CS101 is usually counts as an elective in other programs and it is and should be simply an introductory course to programming in general focusing on OOP is being too specialized. Most of the Profs I have talked to average a 50% drop rate during the course of the semester as it is. (Don't worry I'll come back to this point)

    Second CS101 is mainly to get people used to programming. It is used to get one to think about all of the details. Forgetting a ';' will come back to bite you in the ass. In a non-language specific class you have to do one of two things then; teache a little of every language any one might use, not likely in the course of 1 semester, or teach the entire intro class using pseudocode. Now ask yourselves honestly, has anyone written an application in pseudocode and gotten it to compile?

    Third many people who I tutored for the CS101 class did not learn how to approach programming a problem. The used the plug & chug method, and copied example verbatum out of the text book and had been doing this instead of thinking. So when the instructor gave them an assignment which was a combination of things(eg. read from file, sort alpha betically, sort in new entries, save to file) they could not do it. They saw a sort program in Chapter 4 and a file load program in another and could not figure out how to combine them into a program using functions.

    There seems to be a trend of using the cookie cutter approach when teaching CS 'do this because it works don't as why!' if more basic theory was taught in the intro classes I think people would not have a hard time adapting to OOP when it is presented in CS201 or the Data structures course.

    And thanks to DR. Krauss who did teach theory.

  27. MOD PARENT UP by Anonymous Coward · · Score: 0

    This is exactly what I'm talking about. I'm tired of people saying "OO is more like what people think and how they're used to interacting"

    NO IT ISN'T. When I want something done, I take a series of steps, a procedure mind-you and guess what paradigm most closely resembles that? Huh, the procedural. Imagine that. When someone is learning progrmming it's much easier to teach them something like C where it does what you tell it to (and nothing else). The student gets to go "I want to do this, then this, then this, then I'm done." Instead of, if I do this it'll send a message to these two other objects and they'll handle it in different ways and send off more messages.

    You teach in procedural because that's how people get things done. You don't think in OO, you think in procedural. You say, I open the door to my car, get in and start it. You don't say, I'm going to send a message to my arm to open the dorr, the door is going to catch that message and respond appropriately, then I send another message to a my body to get in, and that goes through the inheritance tree to all my muscles to tell them what to do, etc. See how long and convoluted it gets? Sure, when you really break things down the world goes OO -- and that's what happens in a program, you kinda break things down. But it's much easier to teach someone to program by using how they do things, and then go OO and really get into the details. I really like OO and after using C++ and getting used to the OO design, I'm not sure I ever want to go back to C. But having learned C first really gives me an appreciation for C++ and for the wide variety of ways to get things done in each programming paradigm. It was also, quick easy and fun to learn. It simply did what I told it to do, no ifs ands or buts about it. I liked that a lot when I was a n00b. I use each according to what the best tool for the job is.

    1. Re:MOD PARENT UP by Tablizer · · Score: 2

      You teach in procedural because that's how people get things done. You don't think in OO, you think in procedural.

      I have learned to stop declaring "how people think". There is too much variation from person to person. Thus, basing any assumption about IT on "how people think" is a can of worms. I can tell you how I think, but not much about others.

      I'm not sure I ever want to go back to C. But having learned C first really gives me an appreciation for C++ and for the wide variety of ways to get things done in each programming paradigm.

      I am bothered by comparisons between C and C++ as a microcosm for paradigm comparisons. I don't like OOP, but I also don't like C.

      C and Pascal are *not* the pennacle of procedural. It would be like using a model T car to compare cars to trains.

      (Some people swear by C, but it is just not for me. Nothing personal to C fans.)

    2. Re:MOD PARENT UP by Hast · · Score: 2

      The fallcy here is that you don't seem to have problems that are large enough to be modeled. When you have problems that are medium to large you need to model them. If you don't you'll have a hell of a job to get people working at the same time.

      Modelling a problem is often easier in OO than procedural. The actual flow of information crosscuts the object design, which has spawned ideas such as aspect oriented programming.

      So yes, things happen procedurally. ("You open the door to the car.") But the design "You" and "car" are object oriented.

    3. Re:MOD PARENT UP by shd99004 · · Score: 2

      When a problem gets bigger, OO will be more helpful. If we're talking about how people tend to think, I can right now admit that I hate recursion becuase I simply do not think like that. I *can't* think like that. I avoid recursive solutions whenever I can. Yes I know, it's offtopic :)

      --
      Will work for bandwidth
  28. re: OOP and consistency by Tablizer · · Score: 2

    (* OO has been around for a while but it only caught on relativly recently. This goes a long way to explaining the lack of consistancy.*)

    Shouldn't they solve the consistency problems *before* taking it mainstream?

    It may turn out that consistency is a fault of the paradigm and not just the learning curve.

    Besides, well-known OO practicioners who have been doing OOP for 15+ years show few signs of converging with each other.

  29. Computation-as-interaction is a bad idea by p3d0 · · Score: 3, Interesting
    I don't like the idea they present of computation as interaction, rather than computation as calculation. Computation-as-calculation views a program as having a specific, well-defined job to do, with a beginning and an end. This makes it much easier to reason about what the program does, and whether it does it properly: you can inspect the outputs for a given set of inputs and make sure the calculation produced the right result.

    Clearly not everything can be done this way, but I think the idea to throw in the towel and model everything as interacting processes is a huge mistake. This is especially true of concurrency, which is thrown into programs in a haphazard way these days with no particular benefit.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  30. Calling for Balance by Tablizer · · Score: 2

    It's not whether procedural, functional, object oriented, etc. don't all have a place or that they can't all be used for any given problem set. It's just that different developers have different ways of thinking and coding. The fact that OOP makes sense to me doesn't mean that it works for everyone. The fact that it doesn't work for everyone does not invalidate the fact that it works for me either.

    I agree that much of it is subjective.

    However, the "trend" seems to be to rank OOP as more sophisticated or "better" than other methodologies.

    And, all the research and tools flow in the direction of OOP. How many NON-OO pattern books/articles do you know about? Why so few? How many non-OO software engineering books do you know about? (Besides those written in the 70's before relational databases were readily available.)

    OOP is stealling far more spotlight than it's evidence (zilch) justifies.

    Until one is proven objectively better, teach *all* paradigms equally: Procedural, Relational, Functional, OOP, etc........

    Balance

    1. Re:Calling for Balance by Hast · · Score: 2

      Until one is proven objectively better, teach *all* paradigms equally: Procedural, Relational, Functional, OOP, etc........

      The right tool for the job!

      For most jobs OOP is suitable. Naturally you'll have some procedural stuff thrown in as well, but that goes with the territory.

      First off, you have to start somewhere. It seems like OOP would be a good place to start, since you'll get a feel for procedural languages as well, and it's usable. If you want to learn other types of languages later that's possible at most larger schools. But you can't introduce all types at first. And some like functional programming is pretty hard to wrap your brain around, quite a lot harder than OOP I'd say.


      How many NON-OO pattern books/articles do you know about? Why so few?

      Well an idea would be to consider why books are printed and articles written. Generally to get sold, or in the case of articles to sell a magazine. You can't walk into a normal bookstore and expect to find books on exotic computer topics. I bet it's hard to find books on Verilog nad VHDL as well, that doesn't mean that the languages are insignificant, just that the books don't sell through those chanells. Likewise with articles in magazines. Most computer magazines are aimed at gamers or at people who can't find the on switch. Don't expect to find cool stuff here.

      If you want the fun stuff look at academic papers. They tend to do stuff "because they can" and often you'll find new ideas years before even advanced magazines. For functional programming eg look at AI research, they use Lisp all the time.

      OOP might not be the best tool for a lot of stuff that it's used for. (Although I think it is in most cases.) But it is a good "common denominator" as it can be succesfully applied to most problems.

      And if you want to get all Zen about it you just need to realize that in the end it all comes down to pretty much the same thing. Mapping your thoughts to some bits. How you do it is irrelevant, but you have to do it in some way.
    2. Re:Calling for Balance by Tablizer · · Score: 2

      (* If you want to learn other types of languages later that's possible at most larger schools. But you can't introduce all types at first. *)

      I am sure everybody will put their personal favorate at the top of the list.

      (* And some like functional programming is pretty hard to wrap your brain around, quite a lot harder than OOP I'd say. *)

      Some people found it a "natural fit". It seems to greatly depend on the person. What fscks-up person A may be a joy to person B.

      (* Well an idea would be to consider why books are printed and articles written. Generally to get sold, or in the case of articles to sell a magazine. *)

      Are you agreeing that OOP is a "fad"? Or at least "in style" right now, and that is why it gets most of the SE attention?

      (* But it is a good "common denominator" as it can be succesfully applied to most problems. *)

      Turing equivalency pretty much guarentees that with all the common paradigms (except relational by itself perhaps).

      Thus, I question that claim. My fav paradigms can be used in just about anything also. The only exception I know of may be suitations where microsecond timing is critical and can't be "farmed off" to custom drivers or hardware via API calls. Anything with auto garbage collection or auto-buffering is probably gonna have such problems anyhow.

  31. Teaching Java as an OO language by merigold77 · · Score: 1
    Eight years ago I started teaching introductory OO programming classes, first in Smalltalk, then in Java. The classes I taught (which I didn't completely design myself, but mostly taught classes designed by my employers, though I had a bit of free reign to actual instructional technique) did not start with Hello World because that is not the best place to start when teaching object oriented programming.

    I saw people ask "well how else can you print" and the answer is: don't start by teaching people how to print. Start by teaching them what objects are, then how to create objects, then how to interact with objects (send messages), then have them create an object and interact with it. If you need to, write a simple "print" object and preload it for them in a JAR so they don't have to think about how to print, they can send a string to the print object and it prints it for them. This is how you get new programmers' heads aimed in the right direction for OO.

    Smalltalk is better for this because it always comes with a print object: the Transcript. But it is not so hard to do in Java really.

    --
    Writing is the only socially acceptable form of schizophrenia. (E. L. Doctorow)
  32. like the old joke... by dhclab49 · · Score: 1

    iceburg, goldburg, whatever...

  33. Take A Step Back First by Mackoid · · Score: 0

    HelloWorld.java is a good enough example of OO programming from the Java perspective but only if it is presented properly. The biggest problem isn't the example, it's the approach used to explain the example.

    To present this example an non-OO:

    public class HelloWorld {
    public static void main( String [] args) {
    System.out.println("Hello, world.");
    }
    }

    where clearly from a Java standpoint we have several objects and methods staring back at us is totally incorrect. Perhaps the approach should be to explain from day one why this is considered non-OO and then present an improved example of "good" OO as a contrast. Then, I think the instructors/writers are getting somewhere.

  34. HelloWorld.java isn't about OOP by skSlashDot · · Score: 1

    The real purpose of a "Hello, World" program, in any language, is to ensure that you can compile and execute a program (or run a script). It doesn't have anything to do with OOP at all, and shouldn't.

  35. big fOOt by Tablizer · · Score: 2

    (* I know no good developers who want to waste time coding something that they can do with a SQL statement. *)

    Then how do you explain most of the GOF patterns, which can be tablized? Perhaps they are targeting systems software instead of business applications, but shouldn't that be stated somewhere? (I think someday relational technology will be used in S.S. also.)

    (* You are saying many things about OOP that I feel are incorrect or undeserved, *)

    The lack of consistency in the OO community makes it such that *no matter* what I say/show about OO, at least one OO fan will object to my characterization of OO. IOW, it is probably impossible to please them all.

    (* You aren't going to convince me that it is bad, because I have seen otherwise. *)

    Well, either the benefits are subjective (OO better fits your mind), or are like Bigfoot: every OO fan has seen them, but never captures them on film.

    When I see a side-by-side comparision of good OOP shining compared to good procedural/relational, then I will believe you.

    Until then, I only have bigfoot stories from OO fans.

    Equal or unknown until proven otherwise.

  36. the way I learned (still am) by cpex · · Score: 1

    I am transferring to UCSD as a CE major this fall. UCSD intro programming course is java, however at my community college java was the last in a long line of pre-reqs(not really pre-reqs because they were more usefull) first we started with a CS survey class, things like turring machines, pusedo code, a fictional machine language that we had to write on paper ugh, then a C class that focused mainly on syntax and the such and just learning how to solve problems and use the tools provided (MS visual studio) from there we got an intro to data structures class learning about sorting methods, stacks, list, dynamicly linked list, binary trees, has algorithims. then assembly(could have taken that before data structures, probably should have but hey) didnt do anything to spetacular hear but got use to machine code. A C++ class was next. here we got introduced to object oriented design the course seemed to focus on how things are done in C++ we reviwed basic syntax then got introduced to classes, and all the fun that comes with them like inheritance, polymorphism, we did function overloading and stuff. the thing i think we missed the most in this class(it was an online summer session) was the standard libaries in C++ didnt touch them too much but now if i got a reference book i could pick it up pretty quick i am sure (nevver bought the book for the class, but we had some really good online notes that i failed to save after the class damn it). Finally we got to java where we were expected to know OOP already and we learned about the tools of java how to build windows and place buttons and text boxes and stuff, threads, streams and all that fun stuff. For our final project we had to write a client app and a server app that was basicly a really limited Instant messging program. The thing i liked the most about java was how easy it was to build applications in a windowing enviroment. never learned how to do that with C/C++ but from the templates MS visual studio spits out it looks a bit more complicated than java. Of course there is always gtk and good stuff like that. when i transfer i think i got an advanced data structures class to look foward to as well as OS design and compiler design classes. those will be fun. along with all the ee courses I am pretty happy with my progession overall but i got a hell of a lot more to learn

  37. Alternatives and labs by Anonymous+Brave+Guy · · Score: 2

    Some of the major alternative paradigms are well out of the lab stage. Popular functional programming languages have been used for real world projects for years, and some of those languages have well researched and documented advantages over current mainstream approaches (much faster development, formal proofs of correctness, much more concise code to solve the same problems, etc). Why doesn't the programming world move to them en masse? The same reason so many ex-procedural types don't "get" OO: momentum. It's really as simple as that.

    BTW, what do you mean by "OOP cannot handle relativism very well"?

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Alternatives and labs by Tablizer · · Score: 2

      (* Some of the major alternative paradigms are well out of the lab stage. *)

      I never suggested otherwise. I never said all alternatives are in the lab. I am not sure how you interpreted what I said. Aspect Oriented Programming is still in the "research stage". How that allegedly relates to functional programming, I don't know what you mean.

      (* Why doesn't the programming world move to them en masse? The same reason so many ex-procedural types don't "get" OO: momentum. It's really as simple as that. *)

      I am not sure what you mean here. Could you please elaborate?

      BTW, IMO many OO fans don't "get" databases. They often see them as a mere persistence tool.

      (* BTW, what do you mean by "OOP cannot handle relativism very well"? *)

      Well, in a nutshell, OOP is optimized for IS-A relationships. IOW, a *single* primary "view" of something.

      Now, it can indeed handle HAS-A kind of relationships via cross-referencing other classes and multiple inheritance. However, managing all those cross-references and sets is a pain in the ass using programming code.

      What is the best way to manage several hundreds of cross-references?

      A. Programming Code
      B. Database

      I vote for B. Fancy IDE's can help with A, but often they are simply reinventing a database without knowing/admitting it. Plus, they are usually language-specific and additional cost.

      Further, if similar classes become so numerous that you want to turn them into data instead of code (sometimes called "paramerization"), you have a lot of rework to do. If you start out with all that stuff as data (a DB), then you don't have the translation step to worry about.

      Given a choice, I would put GUI models in databases instead of code, for example. One advantage of this is that just about any language can read and modify the GUI items instead of the one that the GUI attributes were defined/written in.

      Plus, one could browse around in all that info to get all kinds of views and searches that are tough if you put boat-loads of attributes in code.

      The ad-hoc influence of relational queries applies also to getting new views that one did not anticipate up-front. You don't have to build new physical models to get new unanticipated views, you just apply a relational equation and the database builds the new view for you.

    2. Re:Alternatives and labs by Anonymous+Brave+Guy · · Score: 2
      Why doesn't the programming world move to them en masse? The same reason so many ex-procedural types don't "get" OO: momentum. It's really as simple as that.
      I am not sure what you mean here. Could you please elaborate?

      My point is simply that whenever you have a large body of skilled people, and they are choosing the tools or techniques to work their craft, there will be an inherent bias towards those they already know.

      In the programming world, many people learned procedural first, whether it was C, FORTRAN, assembler, or whatever. Consider that it took the mainstream decades just to move beyond random-seeming gotos to structured programming (and more systematic gotos such as exceptions and labelled loops). Progress in the industry at large is years (decades?) behind what's known to be possible from an academic perspective.

      Many OO programmers today started out in procedural code, and unfortunately one of the biggest paths into OO was from C (purely procedural) to C++ (very much not purely OO). Now, if you take advantage of C++'s multi-paradigm support, you can do some very clever things, but unfortunately, those who make the jump without reading around their subject tend not to "get" OO first. As a result, you don't get a cohesive design with influences from both procedural and OO complementing each other, you get a C-like procedural design with some OO tools forced on top and looking out of place.

      It's notable, BTW, that programmers with backgrounds in established purely-OO languages such as Eiffel or Smalltalk tend to "get it" much more than those who program C++, or bastardised offshoots like Java. (I don't have a problem with Java; this comment refers only to the model underlying the language and the way it is presented). It's just unfortunate that such people represent only a small proportion of those using "OO" as a whole, and that such a pure OO approach does have some significant flaws that could be overcome using a mixed paradigm approach.

      I'm sure you see the same thing in your efforts to demonstrate the advantages of a relational approach; you just wrote that you thought many OO fans don't "get" databases. It's the same with functional programming as well. The few who have so far made the effort to learn something genuinely different have seen some advantages, and many have liked the alternative approach, but the vast majority don't make the effort to learn. Most programmers are not of that calibre by default, and most teachers, managers, and other guiding influences aren't sufficiently experienced with different approaches themselves to provide an informed and complete picture.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    3. Re:Alternatives and labs by Tablizer · · Score: 2

      (* It's notable, BTW, that programmers with backgrounds in established purely-OO languages such as Eiffel or Smalltalk tend to "get it" much more than those who program C++, or bastardised offshoots [of it] *)

      Well, "getting it" is hard to define/measure, other than maybe "using more OO", ignoring the quality for now. Anyhow, those who gravitated towared and/or stuck with Smalltalk and Eiffel probably have an affinity for OOP. Thus, there is a filtering mechanism perhaps.

      IOW, it is a check-or-egg (cause or effect) type of question. Did the background make the programmer, or did certain kinds of programmers gravitate toward certain stuff?

      (* and that such a pure OO approach does have some significant flaws that could be overcome using a mixed paradigm approach.*)

      As I mentioned elsewhere, the problem is that there seems to be no consensus as when to use what. There are tons of "how" material for OO, but very very little "why".

      Besides, some people, including me, have the opinion that mixing increases the complexity without adding much benefits unless one paradigm is really crippled in one area. I tend to combine procedural and relational because they compliment either other IMO. But, relational and OO tend to fight over territory and duplicate stuff among each other.

      It may be better to focus on becoming the *best* at a given methodology/paradigm rather than mediocre at *multiple* methodologies/paradigms. Very few programmers have the gift to master them all.

      (* Most programmers are not of that calibre by default, and most teachers, managers, and other guiding influences aren't sufficiently experienced with different approaches themselves to provide an informed and complete picture. *)

      Nobody in the entire fricken world seems to have an "informed and complete picture". If they do, they have not documented it. Instead, the books all use the same (misleading) cliches and cliche examples over and over. I guess that is "reuse" for ya :-)

    4. Re:Alternatives and labs by Anonymous+Brave+Guy · · Score: 2
      Well, "getting it" is hard to define/measure, other than maybe "using more OO", ignoring the quality for now.

      No, it's really not. I could talk to a programmer for five minutes and tell you if he understands OO or not. So could anyone else who's been using OO for any significant length of time. It's really not hard.

      As I mentioned elsewhere, the problem is that there seems to be no consensus as when to use what. There are tons of "how" material for OO, but very very little "why".

      The same is true of most science, of course. Or perhaps all mathematicians should be able to give proofs by following some sort of cookbook? Why did Fermat's Last take so long to prove? Because giving concrete, solid proofs is hard. So is knowing when to use which programming technique for best effect, and in each case, there are always many possible options that would give acceptable results. Programming is a skilled task, and knowing what to use when and how to approach a problem comes only with skill and experience. There is no quick fix cookbook, yet you seem to require one before you will give any credit to a method.

      It may be better to focus on becoming the *best* at a given methodology/paradigm rather than mediocre at *multiple* methodologies/paradigms. Very few programmers have the gift to master them all.

      Very few programmers have the gift to master any of them. That's why the best programmers can produce ten times as much code or more over a given period of time than a mediocre code monkey who just got hired and is learning on the job, and do much more than ten times as much useful work with it.

      However, there is much merit to the argument that the best is the enemy of the good. If your only tool is a hammer, everything looks like a nail. If your only tool is procedural/relational programming, or OO, or functional programming, or whatever, then all programming problems must be solved in that framework. Clearly some paradigms are vastly more efficient for solving certain types of problems than others. It's similar to the argument for optimisation: it's much more effective to choose a sound argument in the first place than to pick a worse performing algorithm and try to make up for it with low-level optimisations.

      Nobody in the entire fricken world seems to have an "informed and complete picture". If they do, they have not documented it.

      On the contrary; there are a few people around who do have a broad understanding of the field. I don't know of any books ever written by any of them; they are generally pretty busy running development teams, or in a more senior role. Sadly, the vast majority of academic tuition and low level management decisions are provided by people who are not in this group.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    5. Re:Alternatives and labs by Tablizer · · Score: 2

      (* The same is true of most science, of course. Or perhaps all mathematicians should be able to give proofs by following some sort of cookbook? Why did Fermat's Last take so long to prove? *)

      "Prove" is probably too strong a word. "Evidence" is better for engineering stuff. Comparing bridge designs, rocket brands, or basketball stats is probably a better analogy than math.

      At this point I would like to see *any* evidence applicable to the biz domain. Your best evidence so far.

      (* There is no quick fix cookbook, yet you seem to require one before you will give any credit to a method. *)

      Why should OOP be *exempt* from providing evidence of betterment beyond "I am an expert and I say so".

      (* Clearly some paradigms are vastly more efficient for solving certain types of problems than others. *)

      Well, I have several times asked for areas or demos of where OO shines compared to p/r and where it doesn't, but usually get INconsistent answers from OO practitioners.

      (* It's similar to the argument for optimisation *)

      No, optimization is relatively easy to measure.

      (* On the contrary; there are a few people around who do have a broad understanding of the field. *)

      Often this ends up being "people who think like me". Most die-hard OOP fans think that a very narrow group of people properly "get" OOP, but everyone's group is different.

      I think people mistake subjectivity for objectivity too often in this field. Without decent metrics, this is what happens.

      Many programmers *insist* that semicolons are "clearly superior" for example, yet I don't like them despite lots of PASCAL use, and never will. They are militant about anyone who says semicolons don't work for them. They think that because semi's work fine in their head and fingers, that everybody else is or should be the same way.

    6. Re:Alternatives and labs by Anonymous+Brave+Guy · · Score: 2
      Comparing bridge designs, rocket brands, or basketball stats is probably a better analogy than math.

      I disagree here. Computer science and software development work far closer to the way maths works than to most engineering disciplines.

      At this point I would like to see *any* evidence applicable to the biz domain. Your best evidence so far.

      No, what you would like to see is some magic metric that supports a claim that neither I, nor any other OO supporter I have seen, has ever made. Further, you would like to see it in a published and authoritative reference, and will ignore the legion of anecdotal evidence that is the basis for many of our decisions, because you personally haven't experienced it, and so don't buy it. That's your choice, of course, but the vast amounts of personal and anecdotal evidence that OO can make designs easier than a purely procedural approach is what convinces all those developers around the world (many of whom have moved to OO from a strong procedural background and therefore have plenty of personal experience on which to base their judgement).

      Well, I have several times asked for areas or demos of where OO shines compared to p/r and where it doesn't, ...

      Please show me one single claim by any OO fan that OO shines compared to procedural with relational approaches. Relational is a much higher-level paradigm than purely procedural programming, and has not featured in any comparison I have ever seen made, except for ones you've asked for.

      No, optimization is relatively easy to measure.

      Guess you haven't developed high-performance maths software that has to work on 15 different platforms lately, huh? Optimisation can be measured after you've done it, but predicting in advance what the effects will be of your "optimisations", and indeed whether they will actually improve performance and not actually reduce it, is almost impossible. We use profilers and usually leave micro-optimisations until late for a reason. Unfortunately, when you're talking about the overall design of your system, you obviously don't have that luxury (unless you're from the slanted side of the XP world, when the design phase not only doesn't happen formally, you claim it doesn't happen at all).

      Often this ends up being "people who think like me". Most die-hard OOP fans think that a very narrow group of people properly "get" OOP, but everyone's group is different.

      Well, of course it's somewhat about how you think; OO is just a more formal way of expressing techniques and ideas that many good procedural programmers had been using for years beforehand. But contrary to what you often claim, my experience is that OO developers often have very much the same view of things: they may not put the same responsibilities and relationships in the same places every time -- there are many ways to design and implement a solution to the same problem -- but they all understand the concept of responsibility and the different relationships that classes can have. Your claim that all these OO developers constantly disagree on even basic points just doesn't ring true.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    7. Re:Alternatives and labs by Tablizer · · Score: 2

      (* I disagree here. Computer science and software development work far closer to the way maths works than to most engineering disciplines. *)

      Well, I disagree. I see software like a bunch of little virtual machines. The fact that they happen to be represented with symbols instead of transistors or gears is relatively minor. Cross-references (composition) is a lot like wires. And ER diagrams resemble chips wired up to each other with labeled inputs and outputs.

      (* No, what you would like to see is some magic metric that supports a claim that neither I, nor any other OO supporter I have seen, has ever made. *)

      Are you saying that p/r is *equal* to OOP in terms of productivity and change-friendliness, etc or NOT?

      All the braggings in your message implies that you think OOP is superior and/or some "higher level abstraction" stuff.

      (* Further, you would like to see it in a published and authoritative reference, and will ignore the legion of anecdotal evidence that is the basis for many of our decisions *)

      Anecdotal evidence SUCKS! Anecdotal evidence says that Elvis performs anal probes on farmers in green saucers at 2:00am.

      Plus, it points both ways. The failure rate of actual OOP projects appears to be at least as high as non-OO ones in Ed Yourdon's surveys.

      (* That's your choice, of course, but the vast amounts of personal and anecdotal evidence that OO can make designs easier than a purely procedural approach is what convinces all those developers around the world.... *)

      That is bullsh*t! It is "in style" so people just go with the flow and say what people want to hear. People are like that.

      Again, Yourden's surveys show *no* clearly higher ratings of OO projects by managers.

      How is that for "anecdotal"?

      (* all those developers around the world (many of whom have moved to OO from a strong procedural background *)

      And I have seen some of their sh*tty procedural code. They obviously have had no training or paid very little analysis attention to making it more change-friendly in a good many cases.

      I will agree that OOP has brought some attention to software-engineering issues that lack in p/r training materials, but this is a human/fad issue and NOT the fault of the paradigm. IOW, "training traditions". It is tradition to bundle OO training with software engineering issues, while it was not with procedural. But, that is not the fault of the paradigm.

      (* Relational is a much higher-level paradigm than purely procedural programming, *)

      Exactly, that is why they make a good couple (P and R). They are Yin and Yang. If you use R with OOP, you get *two* Yangs more or less.

      Relational is a *superior* noun modeling tool than OOP in my opinion. I can navigate, filter, change, search, manipulate, and viewify tables and databases much more smoothly than OOP code. That is my own personal experience and you cannot take that away from me.

      Code sucks. It is tooooo static and hard to navigate IMO. The less of the model you put in code and more of it into the database, the better the result.

      You cannot put the noun model in BOTH the database and code (classes). That is too much overlap and re-translation. It is unecessary duplication and unnecessary translation back and forth. Cut out the middle man and pick one or the other.

      (* Well, of course it's somewhat about how you think; OO is just a more formal way of expressing techniques and ideas that many good procedural programmers had been using for years beforehand. *)

      Formal? How are you discerning "formal"?

      (* Your claim that all these OO developers constantly disagree on even basic points just doesn't ring true. *)

      All the OO fans will agree that "classes are good". Beyond that, the agreement is tossed out the window. I have witnessed many intra-OO fights on comp.object, and they agree on VERY LITTLE. Hell, they cannot even agree on a definition of OOP and "type". They go bonkers.

      Thank you for your feedback.

    8. Re:Alternatives and labs by Anonymous+Brave+Guy · · Score: 2
      Are you saying that p/r is *equal* to OOP in terms of productivity and change-friendliness, etc or NOT?

      No, I'm not. All I have ever said is that, for many situations and many programmers, OO is a helpful tool for creating and managing designs compared to a plain procedural approach. I have never claimed OO is outright superior to procedural, and I have certainly acknowledged that a purely OO method has flaws that can be avoided with a mixed-paradigm approach. I make no claim at all about pure OOP vs. a combined procedural+relational approach.

      All the braggings in your message implies that you think OOP is superior and/or some "higher level abstraction" stuff.

      I'm sorry, I don't understand. To which "braggings" are you referring?

      And I have seen some of their [programmers who moved from procedural to OO] sh*tty procedural code. They obviously have had no training or paid very little analysis attention to making it more change-friendly in a good many cases.

      You seem to hold OO programmers to a higher standard, though, expecting all of them to be skilled in their work and not to fall prey to the equivalent problems. Why?

      I will agree that OOP has brought some attention to software-engineering issues that lack in p/r training materials, but this is a human/fad issue and NOT the fault of the paradigm.

      If you start that argument, the whole choice of language is a human/fad issue, yet some languages are clearly more efficient tools for a programmer skilled in their use than others. OO facilitates certain techniques and practices that good procedural programmers had long been using anyway. BTW, when I wrote "formal" I meant that the languages supporting OO provide features to do, for example, polymorphic method calls, whereas previously programmers had to craft the same effects from more basic tools in their language, such as tables of function pointers.

      Code sucks. It is tooooo static and hard to navigate IMO. The less of the model you put in code and more of it into the database, the better the result.

      I do not dispute that code -- in the sense of text files full of functions and data -- is unlikely to be the optimum way for humans to describe a computer program. There is some fascinating research going on at present on other ways to model computations and thus to write programs, but that is a different issue to the one at hand.

      When I look at the procedural/OO debate, I am looking from the point of view of a professional programmer with pragmatic decisions to make every day. Given what I know of the broader software engineering field, and the research I have seen into these issues, I might choose a very different set of tools for my everyday work if I had the liberty to do so, but I do not. The same is presumably true of most of those you look at when you talk of OO programmers, their attitudes and claims.

      All the OO fans will agree that "classes are good". Beyond that, the agreement is tossed out the window. I have witnessed many intra-OO fights on comp.object, and they agree on VERY LITTLE. Hell, they cannot even agree on a definition of OOP and "type".

      I think perhaps they agree on more than you give them credit for. While you can indeed argue on the niceties of what exactly constitutes OO or a "type", such arguments are hardly the everyday conversation of OO programmers. If you're talking about academic modelling of type systems and such for the purpose of, say, comparing OO languages, then of course you have to provide formal definitions for your terms at some point. But on the basic tenets of OO -- encapsulation and breaking systems down by composition, inheritance and polymorphism and the Liskov principle, etc. -- I submit that there is little disagreement, and much effective use of the tools.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    9. Re:Alternatives and labs by Tablizer · · Score: 2

      (* No, I'm not. All I have ever said is that, for many situations and many programmers, OO is a helpful tool for creating and managing designs compared to a plain procedural approach. *)

      I would really like to see an example of such. In the past, OO fans have presented Piles of S__ and said "me code good", but cannot articulate why they think their mess is so great. It is a "feeling" only.

      (* You seem to hold OO programmers to a higher standard, though, expecting all of them to be skilled in their work and not to fall prey to the equivalent problems. Why? *)

      I am only saying that many OO fans compare bad p/r code to "decent" OOP. They talk about "speggity procedural code" and how OO "made it cleaner". I have only seen some of such "speggety" code, and it is usually just bad programmers at work and the OO fan does not know how to fix it because they are poor at p/r organization for some reason.

      (* There is some fascinating research going on at present on other ways to model computations and thus to write programs, but that is a different issue to the one at hand. *)

      No it is not IMO. Table technology can already do it. Why should we wait for the labs when it is already here. (Sure, it can use improvement. I won't question tha.)

      (* BTW, when I wrote "formal" I meant that the languages supporting OO provide features to do, for example, polymorphic method calls, whereas previously programmers had to craft the same effects from more basic tools in their language, such as tables of function pointers.*)

      Well, polymorphism is not very useful for custom biz apps in my observation. It requires dividing things into a bunch of mutually-exclusive subtypes (or subclasses). The granularity of differences in things is too "unstructured" and fine to fit that approach nicely. Mutual-exclusivity, for example is rarely permanent (invariant). Customers sometimes want A *and* B.

      Sets should be built into the paradigm, and not trees. Sets better model "feature management" than trees, and OOP has nothing built-in for sets. IOW, "Instant X gets feature A because it belongs to set S", not because something IS-A something.

      Stepanov, the STL pioneer, has agreed that polymorphism is too one-dimensional. It may work in some natural domains (sciences) where nature does not change the laws of nature very often, but for modeling human endevours, polymorphism really breaks down IMO. IS-A is just too bold and rigid a statement.

      Polymorphism relies on either tree taxonomies or mutual exclusion (ME) based on one trait. This is too rigid to reflect reality. Reality has multiple division candidates (dimensions), non-ME, and is usually non-tree in the longer run.

      Try to divide people into "subtypes", and you will start to see some of the problems.

      (* I might choose a very different set of tools for my everyday work if I had the liberty to do so, but I do not. *)

      This implies that OOP is like the QWERTY keyboard: we use it because everybody else is, not because of raw merit.

      (* But on the basic tenets of OO -- encapsulation and breaking systems down by composition, inheritance and polymorphism and the Liskov principle, etc. -- I submit that there is little disagreement, and much effective use of the tools. *)

      Yes, but beyond that the results will be *vastly* different. I find p/r solutions more consistent. Even bad p/r tends to follow a certain consistent pattern: group code by tasks and model the noun structure via the database. The tasks may be poorly factored and the DB schema a mess, but at least one knows generally where and how the nouns and verbs will be structured. They are less intertwined and over-bound like they get in bad OO.

    10. Re:Alternatives and labs by Anonymous+Brave+Guy · · Score: 2
      I would really like to see an example [where OO is a helpful tool for creating and managing designs compared to a plain procedural approach].

      The usual problem with this, of course, is that any large scale developments -- which tend, IMHO, to be more where OO design helps -- are likely to be proprietary and too unwieldy to show you, making the citing of them mere "anecdotes" that you refuse to accept.

      I could tell you that on the last project I worked on, we took an application that had taken something like 100 man-years to write on one platform, and rewrote it for another in more like 30 man-years using an OO design.

      I could further tell you that we reduced the known bug count by something like 90% in the process, and that while the original code had hundreds of bugs caused by "special cases", the systematic approach employed by the OO design had very few.

      I could even tell you that for another couple of years before I left that project, we maintained the same sort of progress rate, suggesting that our improvement was not based solely on knowledge of what had gone before, but on a design that genuinely did adapt better to change than its predecessor.

      But what good would all this do? It's only an anecdote to you, and I can't show you the code (all 1M+ lines of it in each case) to support my case. You could just argue that the programming team in the latter case was much more skilled, and since you presumably don't know and will never meet those involved, I can't give you any information to refute that claim in an objective way.

      I am only saying that many OO fans compare bad p/r code to "decent" OOP.

      I have still never seen an OO fan compare OO code to procedural+relational code in any context, other than in a discussion when you have been present. Could you cite an example?

      Table technology can already do it. Why should we wait for the labs when it is already here.

      Could you point me at any freely or commercially available development system based on this technology that would let me write a large-scale Windows application that does GUI, near-real-time instrument control and high performance mathematical analysis work, and which could be used with minimal training by a readily available workforce I could hire tomorrow?

      Well, polymorphism is not very useful for custom biz apps in my observation. It requires dividing things into a bunch of mutually-exclusive subtypes (or subclasses). [...] Sets should be built into the paradigm, and not trees. Sets better model "feature management" than trees, and OOP has nothing built-in for sets. IOW, "Instant X gets feature A because it belongs to set S", not because something IS-A something.

      I never understand this emphasis you always put on single inheritance as the only way to introduce features into types in an OO design. You can use inheritance to model features; indeed you can use nested or multiple inheritance to model arbitrary sets of features in a type. Granted, given enough features, this can become cumbersome, but it's not like there aren't alternatives in use every day on OO projects. In practice, I've used all of these approaches successfully in OO designs, and I've never had a problem with moving from one to the other.

      You also always seem to write as if an OO design is set in stone and hard to refactor if the requirements change, which I've never understood either. It's not as though any design, whether it's a database schema or a class hierarchy, is set in stone, or even difficult to rearrange should a sufficiently significant change in requirements arise.

      The thing I really don't understand is your argument about sets, though. What can you do with your set-based approach that can't be modelled easily with an OO approach? Can you give me an example of these terrible problems that you always run into in your business applications, but I've apparently never seen?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    11. Re:Alternatives and labs by Tablizer · · Score: 2

      (* The usual problem with this, of course, is that any large scale developments -- which tend, IMHO, to be more where OO design helps -- are likely to be proprietary and too unwieldy to show you, making the citing of them mere "anecdotes" that you refuse to accept. *)

      There must be a pattern to what goes wrong with the non-OO equivalent. "It is just somehow better" is that the best OO fans can do?????

      Is it that so fricken hard to articulate?

      Software engineering is all about recognizing and studying patterns of things, especially patterns of change. But, I get zilch.

      How are you going to teach good OOP if you cannot articulate what is better about it?

      Have you discovered some magic something that desolves paper if you write about this magical force?

      Bizaar. I just find it so fricken bizaar that describing the benefits beyond brochure-talk is so elusive.

      (* I could further tell you that we reduced the known bug count by something like 90% in the process, and that while the original code had hundreds of bugs caused by "special cases *)

      How does OOP allegedly fix this? Inheritance? I find that the granularity is often too large. You can't override 1/3 of a method for example if only 1/3 is different.

      (* I could further tell you that we reduced the known bug count by something like 90% in the process *)

      The second rewrite is often better simply because you have *hindsight*. IOW, learn from misktakes of the past. Thus, "rewrites" don't make very good comparisons.

      Unless you perhaps feel that the procedural version was the *best possible* that procedural can get. Do you feel that?

      How do you know it is the best possible?

      Besides, if OO is a jillion percent better, how come that did not show up in Ed Yourdon's surveys? The number of "worse" OO projects appeared to be even with the "better" ones.

      (* I have still never seen an OO fan compare OO code to procedural+relational code in any context, other than in a discussion when you have been present. *)

      Most custom biz apps I encounter now use a database of some kind. Sometimes people try to use arrays instead, but that is usually stupid (unless for speed purposes and/or because the DB is lame).

      (* Could you point me at any freely or commercially available development system based on this technology that would let me write a large-scale Windows application that does GUI, near-real-time instrument control and high performance mathematical analysis work *)

      I am sorry, that is not my domain. My webpage limits the domain that I complain about. If OO is good for your niche, that is fine, but does not explain the hype level.

      (* You can use inheritance to model features; indeed you can use nested or multiple inheritance to model arbitrary sets of features in a type. Granted, given enough features, this can become cumbersome, but it's not like there aren't alternatives in use every day on OO projects. *)

      All the "solutions" I have seen are messy.

      (* You also always seem to write as if an OO design is set in stone and hard to refactor if the requirements change, which I've never understood either. *)

      Perhaps, but one has to refactor *less* in p/r because most of the "noun model" is in the database. You just change relational formulas to get different "views" instead of physical code structure. It is like commanding and army instead of moving each and every soldier by yourself.

      ANYTHING can be "fixed" by "refactoring". Refactoring is simply a clever euphemism to describe "code rework". I wish to reduce code rework, not simply "get used to it".

      You are admitting that your solutions have change problems by the very fact that you have to "refactor" often and see it as very normal.

      (* What can you do with your set-based approach that can't be modelled easily with an OO approach? *)

      I am simply saying that there is nothing special in OOP that *helps* with sets. It has built-in polymorphism and inheritance, but nothing inherent to improve upon sets, which are far more needed and useful than trees and poly.

      A shipwrecked person needs a raft, not a motorcyle. "But dear drownee, look at all the clever donut shapes you can make with the motorcycle!"

      The inheritance and polymorphism simply encourage stupid programmers to make more messes because they keep hearing about all the hype on how good they are.

  38. Here's why by Anonymous+Brave+Guy · · Score: 2

    It's harder for a poorly trained lecturer who doesn't really know his own subject to make a fool of himself within five minutes in Java than it is with C or C++.

    I'm sorry, but in my experience, a lot of the time it really is that simple. Java has no inherent CS-based merit over many other languages that have gone before or since, but a lot of people teaching CS don't really know their subject, and it's easier to cover that up without the risk of some smart alec noting that you dereferenced a null pointer in your lecture on linked lists.

    I hasten to add that I don't think all CS lecturers are like this -- just the vast majority, based on my own experiences and what I've read of others'.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  39. re: Reuse by Tablizer · · Score: 2

    (* This is one of the problem domains that OOP is trying to solve - reuse. A programmer doesn't need implementation details, and doesn't need to implement functionality him/herself. With a well designed object, the programmer just needs to know how to use it *)

    Even many "high-level" OO fans believe that "OOP is not about reuse". Here are some excerpts:

    http://www.geocities.com/tablizer/reustalk.htm

    If you disagree with these OO fans, go argue with them, not me. "Reuse" has been falling out of favor as an important "attribute" of OOP over time.

    Show me an actual biz app example of OOP being better reuse, not just talk talk talk.

  40. Do you have any idea what your talking about? by Anonymous Coward · · Score: 0



    >To learn C you need to know assembler

    ummm... I've used C for years and although I've worked with PDP-11 and 80x86 assembly languages I'm 100% sure that I could have learned to function in the C language without a background in assembly language

    Also

    >To learn C you need to know assembler(it was invented to be a portable assembler).

    Wrong again. C was designed to be used to develop the unix operating system. C is most definantly not a "portable assembler" pointers and bit-level operators were added to the language to make it useful for developing system level software

    >Unfortunatly you can not teach a starter in CS assembler

    I cannot begin to point out everything that is wrong with that statement, but I'll try anyway.

    1) The study of computer science involves alot more than "learning to program in _____ ".

    2) An assembler converts a program written in an assembly language to a computers machine language. (an assembler is a program NOT a language) remember that a computers "assembly language" is simply an abstraction from a computers machine language. There are many different machine languages and thus many different assembly langauges

    3) A student should study many things before they are taught a language, including boolean algebra, logic circuits, circuit reduction, algorithm design & analysis & theory, binary arithmatic, base conversion, etc.

    4) What exactly do you know about CS and teaching CS?

    I'm too angry to continue this post...

    recompile.org

  41. CS101 Should not involve a programming language by Anonymous Coward · · Score: 0

    >> You should be able to teach CS101 in any language.

    A computer science 1 course shouldn't involve a programming language at all. That should be reserved for course in programming. CS101 should include algorithm development and testing, boolean logic, logic circut design and reduction, base conversion, binary arithmatic, etc.

    I can not say this enough: COMPUTER SCIENCE IS MORE THAN JUST PROGRAMMING!

    recompile.org

  42. GoF patterns by MillionthMonkey · · Score: 2

    I wrote the following about GoF patterns in some Slashdot thread a few months ago, but it is more relevant to this thread so I'm going to be a lameass and cut/paste it. (In fact, your handle rings a bell. Maybe you were even in that thread and have read this before. I can't remember.)

    Of course those GoF patterns can make life hell for the maintenance developer or app framework user, when people turn it into a contest to see how many design patterns they can fit into a single project. The overall "Design Patterns" philosophy is really "how can I defer as many decisions as possible from compile time to run time?" This makes the code very flexible, but the flexibility is wasted when a consultant writes code using lots of patterns to puff up his ego and then leaves without leaving adequate comments or documentation. Without insight into how the system works, the configurability and flexibility that these patterns offer is lost. The system hardens into an opaque black box.
    Deferring decisions to runtime makes code hard to read. Inheritance trees can get fairly deep, work is delegated off in clever but unintuitive ways to weird generic objects, and finding the code you're looking for is impossible, because when you're looking for the place where stuff actually happens, you eventually come across a polymorphic wonder like

    object.work();

    and the trail ends there. Simply reading the code doesn't tell you what it does; the subtype of object isn't determined until runtime. You basically need a debugger.

    You can take a really simple program and screw it up with aggressive elegance like this. Here is Hello World in Java:


    public class HelloWorld {
    public static void main(String[] args) {
    System.out.println("Hello, world!");
    }
    }


    But this isn't elegant enough. What if we want to print some other string? Or what if we want to do something else with the string, like draw "Hello World" on a canvas in Times Roman? We'd have to recompile. By fanatically applying patterns, we can defer to runtime all the decisions that we don't want to make at compile time, and impress later consultants with all the patterns we managed to cram into our code:


    public interface MessageStrategy {
    public void sendMessage();
    }

    public abstract class AbstractStrategyFactory {
    public abstract MessageStrategy createStrategy(MessageBody mb);
    }

    public class MessageBody {
    Object payload;
    public Object getPayload() {
    return payload;
    }
    public void configure(Object obj) {
    payload = obj;
    }
    public void send(MessageStrategy ms) {
    ms.sendMessage();
    }
    }

    public class DefaultFactory extends AbstractStrategyFactory {
    private DefaultFactory() {;}
    static DefaultFactory instance;
    public static AbstractStrategyFactory getInstance() {
    if (instance==null) instance = new DefaultFactory();
    return instance;
    }

    public MessageStrategy createStrategy(final MessageBody mb) {
    return new MessageStrategy() {
    MessageBody body = mb;
    public void sendMessage() {
    Object obj = body.getPayload();
    System.out.println((String)obj);
    }
    };
    }
    }

    public class HelloWorld {
    public static void main(String[] args) {
    MessageBody mb = new MessageBody();
    mb.configure("Hello World!");
    AbstractStrategyFactory asf = DefaultFactory.getInstance();
    MessageStrategy strategy = asf.createStrategy(mb);
    mb.send(strategy);
    }
    }


    Look at the clean separation of data and logic. By overapplying patterns, I can build my reputation as a fiendishly clever coder, and force clients to hire me back since nobody else knows what all this elegant crap does. Of course, if the specifications were to change, the HelloWorld class itself would require recompilation. But not if we are even more clever and use XML to get our data and to encode the actual implementation of what is to be done with it. XML may not always be a good idea for every project, but everyone agrees that it's definitely cool and and should be used wherever possible to create elegant configuration nightmares.

    1. Re:GoF patterns by Hater's+Leaving,+The · · Score: 2

      I thought I worked on that project, but then I realised mine was better - we used proxies as well. Ner nerny ner ner.

      You can have all my Karma, I will never see a post more deserving of up-modding on /., and therefore have no need to mod again.

      THL.

      --
      Keeping /. cynic density high since the fscking Kwhores/trolls arrived.
    2. Re:GoF patterns by MillionthMonkey · · Score: 2

      Oh you think you're so smart, do you...

      I'm going to improve my Hello World and make it even better than yours. Right now mine only takes advantage of Singleton, Factory and Strategy. I'm going to add even more patterns to it: Composite, Proxy, Bridge, Prototype, Adapter, Decorator, and Builder. Maybe Flyweight, if I can figure out a use for it.

      It will be the most flexible, configurable Hello World anyone ever wrote. Nobody will ever need to write another one. That would be "reinventing the wheel".

  43. OOD Key Concepts by hackus · · Score: 3, Interesting

    This is my rant on the subject. You don't have to agree, but it comes from a guy writing software since he was 10 years old, who is now very old and crusty by comparison. This is what experience has taught me, perhaps your mileage will vary.

    OOD, without risking and sounding like those "experts" is no silver bullet for software design. But it is a sound evolutionary advance in Software Engineering techniques. Yes, I do agree, that the OLDER generation, is more inclined towards Structured Design before implementing OOD/OOP techniques. However, I disagree that it is because that is the only thing we have been taught or have been teaching. Thats complete bonk.

    Everyone in this field advances with the times. I would suggest, if it seems that way, the older generation, simply realizes what OOD/OOP is and what it ISN'T, and use OOD/OOP where appropriate in building software.

    First of all, OOD/OOP builds heavily on Structured Design techniques. (i.e. Building software using ADT definitions and the 4 foundation sequences of computer science: statement, do-while, while-do, if then else, case or selector statement.) That is, a properly built OOD will embody in every one of its object interfaces, methods which are built using sound Structured Design methods. So it is a Myth that OOD/OOP gets rid of Structured Design techniques. In FACT, those who write POOR OOD/OOP's are those that have not mastered the 4 constructs of computer science and the ADT that goes along with Structured Design.

    OOD does not a attempt to do away with Structured Design, it complements it by organizing Data AND Code in such a way that further increases the resulting code abstract properties. (i.e. it allows the resulting algorithms to be expressed in a way that makes said code even more reusable through inheritance for example. OOD is therefore impossible to implement without Structured Design.)

    The resulting code is far more abstract, and therefore generalized to be more reusable, and therefore, theoretically, more reliable. (i.e. Code that is used over and over again becomes more reliable over time, and is an extensible property of the life cycle of software. Although structured design allows you to reuse code through simple function calls, OOD/OOP takes it one step further and allows function calls and data representation to be generalized as a functional unit.)

    It has been pointed out, with good reason, that Java is a language which can help enforce good OO programming. However, it is not required and for example through the use of static methods, one can build Java code without using OOD/OOP techniques of any kind if one decides to do so.

    This is important: OOD because of its abstract properties, (primarily the use of inheritance) can be used to create software patterns that lend themselves to creating certain types of software.

    Certain types of software that benefit greatly from OOD/OOP implementations are for example, User Interfaces. Why? It is obvious. User interfaces are built using repeatable patterns themsleves application after application. (File, Edit, View, Window, etc.), at thier most basic level.

    When an implementation in and of itself such as the building of a GUI, for example, has a clear pattern itself, OOD/OOP methods can get a great deal more mileage out of simplyfying and building code. This creates a better implementation of a GUI than just a Structured Design approach alone can provide.

    With that said. You are probably thinking, what sorts of things is OOD/OOP NOT good at, and in fact SHOULD NOT be used. This is the part that gets controversial and you will decide, without knowing it, which camp you fall into by reading the next paragraph. :-)

    Well, abstraction, which through inheritance in OOD, while it provides excellent reusability in the context of building software, does not always result in the most effective implementation. By an effective implementation, I mean most efficient. :-)

    So what am I saying? Well, I am saying that you sacrifice some efficiency to gain the increased code reliiability that inheritance provides in OOD by compartmentalizing code AND data within an object vs Structured Design, which cannot do this through the use of simply an ADT and function/procedure calls.

    (i.e. You can never directly modify data in context of a classic OOD/OOP, you have to overlap or build a middle man, as it where, to modify any data you declare private through the use of accessor methods.)

    Althouh this enforces and corrects some deficiencies in Structured Design, it makes the program arguably slower to execute.

    In the context of building, say an Operating System, for example, OOD/OOP is not the way to go if you want a highly speedy and effective OS implementation.

    If you want such speed you invariable have to give up inheritance, and the benefits it provides, and resort to Structure Design principles only, to build your OS. (i.e. ALL function calls and procedures DIRECTLY access the data structures of the OS through passing parameters to functions or procedures, there by eliminating the middle man as above.)

    Which, is not so bad, really. OS's and components of OS's such as kernels, etc...are designed to be speedy, as they should be.

    So, my view on the topic is that OOD/OOP is best suited on top of the OS, vs IN the OS design.

    Not everyone agrees with that, and that is fine.

    Why? Well, because many argue that the sacrifice in speed is justified in the complexity of building a OS kernel, and that the reliability gained through the extensive use of OOD/OOP techniques in building the OS kernel for example, yields a better OS.

    Which is not something to be taken likely if your OS is charged with the responsibility to keep systems software on the space shuttle for example working with the fewest number of defects, and human lives riding on what the OS may or may not do next.

    On the other side, like I said, you have me and others who believe that OS should be very small and very fast, and that OOD/OOP shouldn't be used and that the realibility sacrificed is acceptable.

    So, that is just one aspect of when and where and why OOD/OOP should and should not be used. But as you can see, it is far from cut and dried, and primarily is once based on IMPLEMENTATION and engineering REQUIREMENTS, not on methodology.

    Which is how the real world works.

    For the most part, which drives 90% of the disagreements is the fact that many people see OOD/OOP being a generalized approach to solving ALL problems, and not a specialized addition to Structured Design techniques, suitable for SOME problems, not ALL problems.

    I personally, obviously, feel that OOD/OOP is NOT a generalized programming methodology for ALL cases.

    However, some of my friends feel very differently, and we have a good discussion on the topic wherever we go when we start discussing OOD/OOP.

    Things can get pretty heated, and most patrons at the local 3am diner wonder what all the screaming is about, particularly the buzz words. :-)

    Hack

    --
    Got Geometrodynamics? Awe, too hard to figure out? Too bad.
    1. Re:OOD Key Concepts by Tablizer · · Score: 2

      There are a lot of brochure-like claims here, such as "OOP is a higher level of abstraction". Do you have some specific code to demonstrate this?

      I find procedural/relational techniques to be more "abstract" because much of GOF-like patterns can be reduced to mere relational formulas, as described previously. A formula is more abstract than a pattern, for the most part.

      And procedural ADT's only really differ from OOP ADT's when "subtyping" is used. However, subtyping is too gross (large chunk) a granularity of differences IMO. Even Stepanov, the STL guy, realizes this. (And he has enough respect to not get called a "troll", unlike me.)

    2. Re:OOD Key Concepts by hackus · · Score: 2

      OOD/OOP is fragile.

      It can get ugly quite quickly because of so much middle ware in between, which I pointed out.

      Calling constructors for example. Constructors and accessor mthods don't exist in Structured Design. Only procedural or functiona abstractions which directly initialize your ADT for use.

      I could provide two types of examples, but the Slashdot interface for dumping all that in would be painful for me to organize and type, so I won't support the above argument with a direct example.

      Hack

      --
      Got Geometrodynamics? Awe, too hard to figure out? Too bad.
    3. Re:OOD Key Concepts by Tablizer · · Score: 2

      (* Calling constructors for example. Constructors and accessor mthods don't exist in Structured Design. *)

      Generally I use a data structure interface[1], usually a database table, for such. IOW "new" is a new record instead of a language-specific RAM thingy. The "instances" are simply another record or node in the collection/database.

      [1] Note I said "interface", since direct access limits implementation swappability.

      OO philosophically believes that it is good to hook behavior to the entities of the structures. In practice, I don't find this very useful for business modeling. Sometimes there is a permanent fairly tight relationship, but *most* of the time the nouns that participate are multiple and variant WRT importance. There is no "King Noun" that is appropriate and invariant.

      "Every operation should belong to one and only one noun" is an *arbitrary* restriction in my mind. If you can explain what is so magical about that OO rule is biz apps, I would be greatful, because I don't see the appeal. I just don't.

      (* Only procedural or functiona abstractions which directly initialize your ADT for use. *)

      I am not sure what you mean here. Note that ADT's generally are stuck to the "one noun" rule described above. This limits them for biz apps IMO.

      (* I could provide two types of examples, but the Slashdot interface for dumping all that in would be painful for me to organize and type, so I won't support the above argument with a direct example. *)

      Slashdot is shitty for nitty gritty software development discussions. You have hit-and-run superficial moderators, and it does not like programming code characters.

      Perhaps go to deja.com and post on comp.object to post some sample code. BTW, rough psuedocode is fine as long as you are willing to answer questions about it.

      Thanks for your feedback

  44. Religion of language on Slashdot. by aoteoroa · · Score: 1

    Wow. That was the kind of statement you expect from somebody who knows only one computer language well. If the writer had even picked up Java for Dummies he would have learned that Java is not 100% objects and does have native data-types like int, long, char boolean which are totally separate from the similar objects Integer, Character, Boolean.

    Java biggots are equally bad when bashing C++, and everybody here likes to dump on VB.

    Introductory programming books usually start by explaining the benefits of the language, and all too often these books use comparative terms like " Java is better than C++ because Java doesn't use those complicated, ugly, pointer thinggys that are too complicated for anybody to user correctly anyway". So the new Java student goes off into the world telling all his friends that Java is better because it doesn't have pointers. Of course he would be wrong on many counts with that statement. If he really understood pointers he would know they are essential to efficient programming and even Java uses them in an indirect way.

    I would like to suggest that people on Slashdot should only be allowed to criticize a language if they understand it themselves.

  45. Squeak, Meow, Shriek by yerricde · · Score: 2

    Last time I checked no-one writes completly bug free code, we had problems with bugs in the tests.

    Same thing at Rose-Hulman, for Dr. Anderson's classes (UNIX system programming, and programming language concepts). The students discussed the assigned problems in the course's newsgroup, and often, students would find bugs in the public test suites. That's how it is in any decent-size software engineering endeavour: a cat and mouse game between coders and testers.

    --
    Will I retire or break 10K?
  46. Voting the World Flat by Tablizer · · Score: 3, Insightful

    As I've pointed out before, it's in the collective experience of legions of software developers..... It's hard to believe that they're all wrong on everything after all this time.

    1. Collective experience use to be that the world is flat.

    2. It could be subjective (the "mindfit" argument). That is fine, but 99% of the stuff on the shelfs implies that OOP is objectively better. I don't see disclaimers that the benefit list may be subjective.

    3. The "popularity metric" is that Windows is "better". Do you really want to back that?

    4. I have never seen a good survey that said most developers prefer OOP.

    and by your own admission, your experience comes from a very narrow field of programming, to which one approach seems much better suited. It's not surprising that you find that approach superior.

    Narrow, but large, I might point out. Not a single OO book ever limited it's braggings to specific domains, instead strongly implying a "step up in evolution" over procedural.

    Those of us who work in diverse areas of programming have often found OO to be at least as natural as, or more natural than, a purely procedural approach.

    Unless you can define/measure "natural", that appears to be a rather subjective thing.

    Plus, some OO fans here have said that OOP is *not* "natural" nor should that necessarily be the goal of it.

    I believe in the scientific process where you have to openly justify things based on open evidence, and not personal opinion and "feelings". Your "evidence" fails miserably here.

    BTW, who gave that ahole a "4"? It contains almost nothing but personal digs. Damned moderators!

    1. Re:Voting the World Flat by AMNESIACX · · Score: 0

      >> 1. Collective experience use to be that the world is flat.

      This is just not true. It was not widely believed that the earth was flat, however some people did hold this belief, who were regarded as fools, largely. The modern notion that it WAS a collective human belief is an historically incorrect one.

      --
      "It's not just what you say, no it's mostly how you feel it." - Tim Buckley.
    2. Re:Voting the World Flat by Tablizer · · Score: 2

      This is just not true. It was not widely believed that the earth was flat, however some people did hold this belief, who were regarded as fools, largely. The modern notion that it WAS a collective human belief is an historically incorrect one.

      Are you telling me that Joseph Farmer of mideavel times used to believe that the world was round?

      Regardless, there is a kind of herd mentality at work. OO training emphesizes certain "problem" patterns and then presents "solutions" for it. People start recognizing some of these problems in non-OO code where they didn't before. However, there are often roughly zero-sum tradeoffs that the OO materials do not mention the other side of. But, since the downsides are rarely pointed out, people tend not to notice them.

      An analogy is "teeth whitening" toothpaste. The commercials emphasize ugly dark teeth and then present the solution. You watch it and now pay more attention to teeth color. However, the commercials never you tell you that their product uses more *abrasives* than normal, which can ruin teeth in the long run.

  47. Spock Nit by Anonymous Coward · · Score: 0

    Love the "beat up spock" visual analogy for "abuse of logic" too.

    You must not be a Trek fan. Tablizer's page is in reference to "mind melds" (as in melding data and behavior) and not so much about Volcan logic.

  48. Re: Scaling Large by Tablizer · · Score: 2

    (* When a problem gets bigger, OO will be more helpful. *)

    OO fans seem to have divergent opinions on this. It seems split about 50/50 when I ask comp.object. IOW, half say it only really shines on large projects, and the other half say it shines on medium stuff also.

    But, I find that procedural/relational scales better because each task is relatively independent from each other. You don't really have to care about the other 2000 tasks. You simply try to use the relational tables to communicate among tasks instead of huge parameter lists (a common design mistake in bad p/r).

    True, the schema (ER) becomes more complicated as the project scales up, but a relational schema is 100 times simpler to grok and manage to me than a tangled, interweaved mess of 2000 OOP classes. There is too much "protocol coupling" in many OOP designs such that to grok A you have to grok B, and to grok class/protocol B you have to grok C, etc. Making communication "data centric", you can stop these "grok chains".

  49. your turn by Anonymous Coward · · Score: 0

    My congratulations on a masterful troll.

    At least he documented his opinion and reasoning in pretty good detail. Now where is yours?

    1. Re:your turn by Anonymous Coward · · Score: 0

      I agree. scrytch needs to provide more info. Bad graphics alone does not a troll make. And, so what if you can do OO with tables. You can probably also do tables with OO. At some level it is all interchangable probably.

    2. Re:your turn by Tablizer · · Score: 2

      (* I agree. scrytch needs to provide more info. Bad graphics alone does not a troll make. *)

      Lack of specifics is a huuuuuge problem for OOP proponents. They keep quoting OO scripture/cliches, but rarely say *exactly* how such produces benefits using code or tracing the thought process throught the assumed mental steps.

      After years of prodding, the only inkling is that perhaps OOP fans perceive the patterns of change differently than me. IOW, they assume change patterns that favor OOP, yet those change patterns seem unnatural based on my experience and observation. Their perception of change appears affected by their very OOP training (such as "adding new subtypes"). IOW, their perception of the solution is affecting their perception of the problem it appears.

      I am trying to push the industry to document and analyze change patterns. We need to understand *how* things change *before* we start offering sound solutions to being change-friendly.

      The problem is that it is hard to describe the change patterns without using a specific paradigm or language I have found. If somebody can find a more neutral way to describe it, then it would be less biased and reduce flame-wars when discussing patterns of change in general.

      There too many researchers studying (alleged) solutions and too few studying the problems themselves (without the bias of specific solutions).

      Gee, I rambled on again, didn't I? It is a fascinating, but frustrating topic though. At least to me.

  50. Goto's reborn as try/catch? by Tablizer · · Score: 2

    (* Ultimate Solutions of faddism. There are occasions where 'goto' is useful - even if disguised as 'break' *)

    The C "break" statement is unnecessary if you have languages that use "sets" for their case lists instead. Look at VB's case statement, for example. (I am not promoting VB here, but it's case statement is far better than C's.)

    (* or even 'throw', which is the worst example of unstructured programming I can think of. *)

    I don't like try/catches either. They make the exception to the rule take a bigger influence over the code than the regular logic, bloating up the code and the nesting.

    But, this is another one of those "language fights" that never ends once it breaks out.

  51. software ideas versus medical trials by Tablizer · · Score: 2

    (* It's generally good for making reusable designs though. *)

    I don't think I have ever heard that claim before. It is a little vague though. What constitutes the "design" exactly? I have reused procedural and relational "designs" also (with modifications).

    (* Now you're really starting to sound like an old gheezer refusing to learn new ideas. *)

    Perhaps I have seen too many "magic bullets" that turned out to be made out of melting ice.

    I think it is a better use of resources if *volunteers* test "new ideas" FIRST. When and if it turns out to be better, then I will be more open to it.

    In short, there are too many things for one person to test all by themselves. Let willing volunteers test it. When good evidence shows that it is better, then I'll switch.

    If that is not Volcun-wise reasonable use of resources, then shoot me.

    The medical institutions don't test every new cancer drug on EVERY cancer patient. They ask for volunteers, or at least a smaller group first. If it shows success, they then test it on increasingly larger populations. If it fails, then it fades in oblivion without dragging all patients with it.

    Why should software fads be treated any differently?

    Because dead software is less risky than dead humans? Well, maybe. But dead software is still dead software.

  52. The Wankers Strike Back! by fm6 · · Score: 2
    Hey, computers don't "think" in variables and expressions either. Does that mean that C programmers are wankers that can't handle registers and address modes? No, it just means that C adds concepts that make programming easier. And that's all that OOP languages do.

    Sure, there's a lot of crap C++ and Java code that's written by people who don't know what they're doing. That's true for any language. And a powerful language is easier to screw up in, just as it's easier to kill yourself in a Massarati than in a Model T. But that's a problem with the programmer/driver, not the language/car.

    1. Re:The Wankers Strike Back! by Anonymous Coward · · Score: 0

      >..."computers don't "think" in variables and >expressions"

      Um, no. Having majored in ECE with a large focus in computer architecture, they most certainly DO think in variables and expressions. They just call them "registers" and "OPcodes"... This is true not just for big time CPUs like Pentium/Athlon/etc but for really basic stuff like a PIC microcontroller or a BASIC stamp.

      I am a shunned breed of programmer because I jump randomly from OOP to procedural without a second thought. Granted, writing OOP in assembler is damn near impossible anyway, but even when I use Java or C++, a lot of times it really is simpler/faster/better to model state machines and the like rather than go off and develop a bunch of modular objects. And you know what, my code works, it works fast, and it takes me less time to write it. Even the projects I did purely in OOP rarely have reusable code simply because most projects are very dissimilar.

  53. .NET class framework by Latent+Heat · · Score: 1

    Are you sure you are not the architect of the RTTI/attribute system of the .NET class framework in Visual Studio?

  54. Essence of OO is function indirection by Latent+Heat · · Score: 1
    I have read your Web page with some interest. I do my GUI stuff with OO (the alternative is straight Windows API with the big switch statements). I see that it is no silver bullet -- there are the obscure errors relating to callbacks resulting from virtual functions, the blow-up from the null object reference, and the pain and agony of properly allocating and deallocating object references, which does not completely go away with GC.

    Why do we subject ourselves to OO? I think what we are really after is indirection (pointers) in function calls. Objects are an attempt at a structured way of doing function pointers, which are potentially a scarier thing than the GOTO.

    The classic deal is a numerical algorithm to optimize a function. How do we make it generic to allow optimizing different functions with the same algorithm? We could use a C++ template type of generic, and compile time generics is one path to take. Or we could have a polymorphic object with a virtual method EvalFunction(), and we could pass an object reference to the numerical algorithm to pass it different functions.

    The GUI world needs to do gobs of function indirections in order to tie together mouse and widget. But even traditional inheritance OO proved cumbersome and hence the Java anonymous inner class, the even more atomistic C# delegate, or the Qt signal and slot.

    Also the GUI world is hierarchical -- a form contains a widget group which contains a button widget -- which lends itself to the Composite pattern and a tree-graph of objects.

  55. Skills for paying jobs by brlewis · · Score: 2

    If your goal is to have useful acronyms on your resume, don't drop out after your introductory courses. Take some advanced courses that involve the specific languages you want.

  56. Re: Reuse by AMNESIACX · · Score: 0

    The worst thing you can become is a zealot. OOP at least is a broad and friendly enough paradigm to allow for flexibility in design. Just consider how many design patterns are out there. The only real procedural pattern that paid a worthwile salary was Cobol's "spaghetti" pattern.

    --
    "It's not just what you say, no it's mostly how you feel it." - Tim Buckley.
  57. Re: Reuse by Tablizer · · Score: 2

    (* The worst thing you can become is a zealot. OOP at least is a broad and friendly enough paradigm to allow for flexibility in design. *)

    Friendly my ess. Goto's allowed "flexibility" BTW.

    (* Just consider how many design patterns are out there. The only real procedural pattern that paid a worthwile salary was Cobol's "spaghetti" pattern. *)

    So if cutting off your wanker is the paradigm that earns the most money, that is where one should go?

    I would rather program in something that is clean, simple, flexible, and change-friendly and earn less money than go OOP or some other lemming paradigm.