![]() | |
![]() |
| | Thread Tools | Display Modes |
#71
| |||
| |||
|
|
Machine. |
#72
| |||
| |||
|
|
"andrewst" <member14183 (AT) dbforums (DOT) com> wrote in message news:3390102.1063974255 (AT) dbforums (DOT) com"]news:3390102.1063974255@d- bforums.com[/url]... Originally posted by Bob Badour "Steve Rawley" <steve (AT) rawley (DOT) org.invalid> wrote in message news:bkd9pt0ta1 (AT) enews4 (DOT) newsguy.com"]news:bkd9pt0ta1@ene- ws4.newsguy.com[/url]"]> But if and when you've arrived at OO as your development methodology, we can talk about why it might be better to persist your objects as objects (rather than creating tuples from them and pumping them out to an RDB). What objection do you have to combining objects as tuples? Let me guess: something about taking your car apart at night to put it in the garage? Where do you get the taking apart bit from parking two cars in the same garage? Since tuples are transparent, it's actually much more like parking several cars in the same driveway or parking lot. |
#73
| |||
| |||
|
|
"Bob Nemec" <bobn (AT) rogers (DOT) com> wrote in message news:3f62363f (AT) news (DOT) totallyobjects.com... ... The primary reason, IMO, is that most people don't really do 'OO' ... as a Smalltalk programmer I find most C++ & Java examples to be conventional procedural code with some object-like data structures: not OO is the full sense. Well, that's the typical arrogant sanctimony I expect from smalltalk programmers. I find it interesting that I have yet to meet a smalltalk programmer who can articulate what that "full sense" is. |
#74
| |||
| |||
|
|
"Bob Badour" <bbadour (AT) golden (DOT) net> escribió en el mensaje news:UgG8b.242$yZ2.13422648 (AT) mantis (DOT) golden.net... "Bob Nemec" <bobn (AT) rogers (DOT) com> wrote in message news:3f62363f (AT) news (DOT) totallyobjects.com... ... The primary reason, IMO, is that most people don't really do 'OO' ... as a Smalltalk programmer I find most C++ & Java examples to be conventional procedural code with some object-like data structures: not OO is the full sense. Well, that's the typical arrogant sanctimony I expect from smalltalk programmers. I find it interesting that I have yet to meet a smalltalk programmer who can articulate what that "full sense" is. All objects belong to a class. All classes form a hierarchy so that: 1. Most methods are "reused" from the top. 2. No class has spurious methods. 3. The class hierarchy is deep. 4. Most classes have few methods (no more than 10). 5. Most methods are small (no more than 10 lines). 6. Classes are simple and easy to use. Each class represents a single concept and it is almost impossible to use it in a wrong way. 7. When new functionality must be added, most of the functionality can be added using the "template method" pattern. 8. Most of the code follows the DRY principle. Cheers, Guillermo. |
#75
| ||||||||||
| ||||||||||
|
|
"Bob Badour" <bbadour (AT) golden (DOT) net> escribió en el mensaje news:UgG8b.242$yZ2.13422648 (AT) mantis (DOT) golden.net... "Bob Nemec" <bobn (AT) rogers (DOT) com> wrote in message news:3f62363f (AT) news (DOT) totallyobjects.com... ... The primary reason, IMO, is that most people don't really do 'OO' ... as a Smalltalk programmer I find most C++ & Java examples to be conventional procedural code with some object-like data structures: not OO is the full sense. Well, that's the typical arrogant sanctimony I expect from smalltalk programmers. I find it interesting that I have yet to meet a smalltalk programmer who can articulate what that "full sense" is. All objects belong to a class. |
|
All classes form a hierarchy so that: |
|
1. Most methods are "reused" from the top. |
|
2. No class has spurious methods. |
|
3. The class hierarchy is deep. |
|
4. Most classes have few methods (no more than 10). |
|
5. Most methods are small (no more than 10 lines). |
|
6. Classes are simple and easy to use. Each class represents a single concept and it is almost impossible to use it in a wrong way. |
|
7. When new functionality must be added, most of the functionality can be added using the "template method" pattern. |
|
8. Most of the code follows the DRY principle. |
#76
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
|
|
"Guillermo Schwarz" <guillermo_schwarz (AT) hotmail (DOT) com> wrote "Bob Badour" <bbadour (AT) golden (DOT) net> escribió en el mensaje news:UgG8b.242$yZ2.13422648 (AT) mantis (DOT) golden.net... "Bob Nemec" <bobn (AT) rogers (DOT) com> wrote in message news:3f62363f (AT) news (DOT) totallyobjects.com... ... The primary reason, IMO, is that most people don't really do 'OO' ... as a Smalltalk programmer I find most C++ & Java examples to be conventional procedural code with some object-like data structures: not OO is the full sense. Well, that's the typical arrogant sanctimony I expect from smalltalk programmers. I find it interesting that I have yet to meet a smalltalk programmer who can articulate what that "full sense" is. All objects belong to a class. Trivially true (even for C++ and Java not that they have anything to do with data management.) |
| All classes form a hierarchy so that: I respectfully suggest that classes or types naturally form a DAG and |
|
not a hierarchy. (Not that C++ or Java do any better with that than Smalltalk, but I do think it demarks a clear cognitive bias among Smalltalk practitioners who do not use an extended version of the language supporting multiple inheritance.) |
| 1. Most methods are "reused" from the top. Most but not all? Seems arbitrary and thoroughly subjective. Should I note that (even in C++ and Java) reuse always happens from above? |
| 2. No class has spurious methods. How is this property affected by the chosen language? |
|
What makes a method spurious? |
|
How does a spurious method detract from the 'full sense', which you have yet to describe? |
|
(A hodge-podge of arbitrary rules for achieving a sense does not describe what the sense is.) |
| 3. The class hierarchy is deep. I've seen some pretty deep hierarchies in C++ and in Java. How does one know when one has reached the required depth of hierarchy? |
|
Can the hierarchy ever be too deep? |
|
How does one know? After all, naively maximizing depth will only maximize complexity. |
|
Does the 'full sense of OO' equate to 'maximal complexity'? |
| 4. Most classes have few methods (no more than 10). There goes that 'most' again. Why not all classes? |
|
Again, the statement is meaningless due to its arbitrariness and subjectiveness. |
|
Why 10 methods? |
|
Can smalltalk programmers only count using their digits? |
|
What if my amp goes to 11? Does this mean that a mathematics system with a class with methods for addition, subtraction, multiplication, division, exponentiation, logarithm, sine, cosine, tangent, secant, arcsine, arccosine, arctangent and arcsecant fails to achieve OO-ness in its full sense? |
|
That wouldn't make OO-ness in its full sense particularly attractive to me. |
| 5. Most methods are small (no more than 10 lines). Most methods? Not all methods? |
|
How do we know when we have achieved most-ness? |
|
Why 10 lines? |
|
Is this the finger thing again? |
|
If a smalltalk programmer loses a pinkie in a tragic filing accident, does he have to limit his methods to 9 lines? |
| 6. Classes are simple and easy to use. Each class represents a single concept and it is almost impossible to use it in a wrong way. VCR is a single concept, and mine is flashing 12:00am at me as I write this. |
|
Come to think of it, I only use this VCR to elevate my monitor; |
|
although, at one time, I used it as a television tuner by hooking it to an old Commodore-64 monitor. |
|
Infinity is a single concept too. Heck, logic is a single concept and I find it quite easy to use, but lots of folks seem to disagree with me. Does this mean we can only achieve OO-ness in its full sense by ignoring complex or difficult things? |
| 7. When new functionality must be added, most of the functionality can be added using the "template method" pattern. Trivially true for any language supporting polymorphism (including C++ and Java not that they have anything to do with data management per se.) |
| 8. Most of the code follows the DRY principle. Most but not all...? From a data management perspective, the DRY principle argues strongly for logical and physical independence as well as logical identity. |
#77
| ||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||
|
|
"Bob Badour" <bbadour (AT) golden (DOT) net> escribió en el mensaje news:cd3b3cf.0310061723.584e0d59 (AT) posting (DOT) google.com... "Guillermo Schwarz" <guillermo_schwarz (AT) hotmail (DOT) com> wrote in message news:<3f80eb0f$1 (AT) news (DOT) totallyobjects.com>... "Bob Badour" <bbadour (AT) golden (DOT) net> escribió en el mensaje news:UgG8b.242$yZ2.13422648 (AT) mantis (DOT) golden.net... "Bob Nemec" <bobn (AT) rogers (DOT) com> wrote in message news:3f62363f (AT) news (DOT) totallyobjects.com... ... The primary reason, IMO, is that most people don't really do 'OO' ... as a Smalltalk programmer I find most C++ & Java examples to be conventional procedural code with some object-like data structures: not OO is the full sense. Well, that's the typical arrogant sanctimony I expect from smalltalk programmers. I find it interesting that I have yet to meet a smalltalk programmer who can articulate what that "full sense" is. All objects belong to a class. Trivially true (even for C++ and Java not that they have anything to do with data management.) It is important because an object cannot change classes dynamically. At least not yet ;-) |
|
All classes form a hierarchy so that: I respectfully suggest that classes or types naturally form a DAG and DAG == Direct Acyclic Graph? |
|
not a hierarchy. (Not that C++ or Java do any better with that than Smalltalk, but I do think it demarks a clear cognitive bias among Smalltalk practitioners who do not use an extended version of the language supporting multiple inheritance.) C++ has multiple inheritance, so it has multiple path to get from one node to the other, yet none of them have cycles when speaking of hierarchy, but they do have cycles when instance variables and functinality is taken into consideration. |
|
1. Most methods are "reused" from the top. Most but not all? Seems arbitrary and thoroughly subjective. Should I note that (even in C++ and Java) reuse always happens from above? Usually you create applications by adding classes at the bottom (subclasses), rather than by adding classes at the top (superclasses), so it is the subclasses that generally reuse the code from the top. |
|
If I'm missing something, please correct me. |
|
2. No class has spurious methods. How is this property affected by the chosen language? It has nothing to do with the language but with the class hierarchy (or should I rather say the class library?) |
|
What makes a method spurious? An spurious method is one that does not belong to the class, but was added to the wrong class because refactoring the class library would be too burdensome for the project at hand. |
|
Sometimes you realize the methods are spurious long after the method was written. I think XPers call that feature envy or something like that. I might be wrong thought. |
|
How does a spurious method detract from the 'full sense', which you have yet to describe? A non-spurious method is one that actully belong to the class. |
|
(A hodge-podge of arbitrary rules for achieving a sense does not describe what the sense is.) You are right. This is a case of IKWISI (I'll Know It When I See It). To make matters easier to understand, you create a class for one purpose and only one purpose. Then you realize that in that purpose, there are really two orthogonal purposes and the class must be divided in two. Then the methods that belong to the *new* class are spurious, untill you remove them. |
|
3. The class hierarchy is deep. I've seen some pretty deep hierarchies in C++ and in Java. How does one know when one has reached the required depth of hierarchy? I've never keep statistics of this, and I know I should have. IMHO it has to do with the average number of direct subclasses. It should be a number between 1 and 6, or maybe between 1 and 3. If the average is 20, probably you are not reusing much. |
|
Can the hierarchy ever be too deep? |
|
How does one know? After all, naively maximizing depth will only maximize complexity. How come? |
|
Does the 'full sense of OO' equate to 'maximal complexity'? Maybe it does for you. For me, OO means deep hierarchies => each conceptual object is represented by an object in the target languge, finding class is easy because the hierarchy is deep, subclassing is easy because classes are not too fat. |
|
4. Most classes have few methods (no more than 10). There goes that 'most' again. Why not all classes? |
|
Again, the statement is meaningless due to its arbitrariness and subjectiveness. Meaningless? Maybe arbitrary (which is the same as subjective), but I can measure how many methods class has, so I have an objective and a way to measure if I have achieved it, I don't see how it is meaningless. |
|
Why 10 methods? Why not? |
|
You need to establish limits. |
|
Can smalltalk programmers only count using their digits? HA HA What if my amp goes to 11? Does this mean that a mathematics system with a class with methods for addition, subtraction, multiplication, division, exponentiation, logarithm, sine, cosine, tangent, secant, arcsine, arccosine, arctangent and arcsecant fails to achieve OO-ness in its full sense? Only those methods? If you are creating a math system, probably you will add a hundred methods like that. |
|
Also you will add the sqrt method |
|
That wouldn't make OO-ness in its full sense particularly attractive to me. Then what would? |
|
5. Most methods are small (no more than 10 lines). Most methods? Not all methods? Well, maybe the if the Nazis had invented Smalltalk they would hve added that requirement at the VM level, so that no Smalltalk program would have run if they didn't comply. These are guidelines, not strict requirements, relax. |
|
How do we know when we have achieved most-ness? That's a good question. What about "not more that 10% of the system does not comply and the average is not exceeded by more than 10%". |
|
Why 10 lines? Maybe I like the number 10? Is this the finger thing again? Maybe. If a smalltalk programmer loses a pinkie in a tragic filing accident, does he have to limit his methods to 9 lines? What is pinkie? |
|
What is filing accident? |
|
6. Classes are simple and easy to use. Each class represents a single concept and it is almost impossible to use it in a wrong way. VCR is a single concept, and mine is flashing 12:00am at me as I write this. There is a problem between the VCR and the chair. If the VCR is so simple, why doesn't it have a hard drive instead of the VHS tape drive? |
|
Why doesn't it connect to the internet to synchronize the time? |
|
Why doesn't it learn what I like to see and store my favorite programs? |
|
You think the VCR is simple, but actually it is cumbersome and almost useless. |
|
Come to think of it, I only use this VCR to elevate my monitor; I see why. although, at one time, I used it as a television tuner by hooking it to an old Commodore-64 monitor. That's interesting. Infinity is a single concept too. Heck, logic is a single concept and I find it quite easy to use, but lots of folks seem to disagree with me. Does this mean we can only achieve OO-ness in its full sense by ignoring complex or difficult things? I don't think OO is simple. You can get a PhD in OO. If you think OO is a sham, it is probably because you haven't looked at it carefully. |
|
7. When new functionality must be added, most of the functionality can be added using the "template method" pattern. Trivially true for any language supporting polymorphism (including C++ and Java not that they have anything to do with data management per se.) You understand patterns but you don't understand OO. Then you must be manager. |
|
8. Most of the code follows the DRY principle. Most but not all...? From a data management perspective, the DRY principle argues strongly for logical and physical independence as well as logical identity. That statement is too abstract to be argued against. |
|
You can say the same thing about anything, for example: OOP "argues strongly for logical and physical independence as well as logical identity". |
|
Actually the DRY principle is the guiding rule for all the "most"s and "10"s above. |
![]() |
| Thread Tools | |
| Display Modes | |
| |