<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div style="font-family:Arial;">Hi Nick,<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">An object is a specific way to define and design a module and a module is a tool for segmenting, modularizing, the source code (what the programmer actually writes, not what the machine executes) for a program. To parse this assertion - and then to explain how and why object modularization is different - a quick aside to discuss a program is in order.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">I use 'program' to mean the source code - the lines of COBOL, java, C++, or Smalltalk that the programmer writes.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">I am sure you have seen BASIC programs. The source code consists of a list, each entry on that list having a sequence number and a BASIC statement. The computer will execute that program one line at a time in sequence: the statement on line 1 then line 2 ... Some of the statements, say the one on line 20 wont tell the computer to do something, instead they tell the computer to GOTO some other line number and resume executing instructions. Several different types of control structures are available. It takes little imagination to realize the larger the program the greater the difficulty in understanding what the computer might be doing at any specific time - especially if you also, simultaneously, need to track the values of numerous variables to see which branches are active.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Hence the desire for modularization - packaging blocks of code lines into identifiable units - to simplify the process of reading a program and the mental modeling of what the program would be doing at any phase of execution.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Now add Dikstra's famous definition, "a program is algorithms plus data structures."<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">The first criteria for defining a module involved grouping lines of code that were related by prodecure, (essentially all lines participating in the same algorithm) - hence procedural programming with four kinds of modules: control, afferent, transform, and efferent.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">For various reasons, procedural modularization was unsatisfactory and, noticing that data structures were more stable over longer periods of time, data oriented modularization became the norm. You defined an entity as a data structure with members called attributes and aggregated all the procedures that operated on that specific data into a module. <br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">A DOS utility is probably written in C or Assembler, neither of which afford much opportunity for modularization, and is small enough that it does not need to be broken up.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">A tool in Matlab is likely a large program and if you could see the source code you would see modularization, probably more procedural in nature than data oriented.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Note that both approaches to defining modules are focused on the program itself and how it can be broken up and the pieces related to each other. The same thing is true of "functional programming," i. e. the focus of design is inward towards the computer.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Then came 'objects'.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">First critical difference: an object is not a way to modularize the program, it is a means for modularizing the World, the problem space.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Second critical difference: one object is differentiated from another solely on the basis of behavior - what it does, what contribution it makes to the overall system, what services it provides to other objects.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">These two characteristics of objects are why Harman borrows the term for his Object-Oriented Ontology.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">The term Object-oriented programming was coined by Alan Kay and the metaphor he used to communicate the idea behind the term was was a biological cell consisting of an encapsulation boundary, inside of which was all the complexity that allowed the cell to do what it did, and outside of which was a protocol that allowed other cells to communicate with and request services from the cell.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Unfortunately, very, very, few in the programming community "got the memo" and understood what an object was supposed to be, or how it could be implemented in a programming language. So, it is extremely rare to find any code, even in Smalltalk, but definitely in Java or C++ that even remotely resembles the object idea. Alan Kay maintains, to this day, that the object revolution has yet to happen.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">BTW all modules, and all executing programs for that matter, are intended to be "black boxes" - you have no idea, and do not care, what is inside of the box, only what outputs the box will provide you in exchange for what inputs.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Long winded, and I hope not remedial, answer.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">davew<br></div>
<div style="font-family:Arial;"><br></div>
<div><br></div>
<div><br></div>
<div>On Tue, Jul 17, 2018, at 8:06 PM, Nick Thompson wrote:<br></div>
<blockquote type="cite"><div><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt">Dave, and anybody else who wants to play.</span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt"> </span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt">I have always been puzzled by the question of how one distinguishes an object in object programming from a utility in DOS or a tool in Matlab.  Or any mathematical function, for that matter.  You give it what it needs, and it gives you what it’s supposed to, and you don’t give a damn how it works.</span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt"> </span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt">Please don’t yell at me.</span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt"> </span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt">Nick</span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt"> </span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt">Nicholas S. Thompson</span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt">Emeritus Professor of Psychology and Biology</span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt">Clark University</span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt"><a style="text-decoration: underline; color: rgb(5, 99, 193);" href="http://home.earthlink.net/~nickthompson/naturaldesigns/">http://home.earthlink.net/~nickthompson/naturaldesigns/</a></span></span><br></p><p style="margin: 0in 0in 0.0001pt;"><span class="font" style="font-family:"Calibri", sans-serif"><span class="size" style="font-size:11pt"> </span></span><br></p></div>
<div>============================================================<br></div>
<div>FRIAM Applied Complexity Group listserv<br></div>
<div>Meets Fridays 9a-11:30 at cafe at St. John's College<br></div>
<div>to unsubscribe <a style="text-decoration: underline; color: rgb(5, 99, 193);" href="http://redfish.com/mailman/listinfo/friam_redfish.com">http://redfish.com/mailman/listinfo/friam_redfish.com</a><br></div>
<div>FRIAM-COMIC <a style="text-decoration: underline; color: rgb(5, 99, 193);" href="http://friam-comic.blogspot.com/">http://friam-comic.blogspot.com/</a> by Dr. Strangelove<br></div>
</blockquote><div style="font-family:Arial;"><br></div>
</body>
</html>