[Edu-sig] Accessibility to non CS types?

kirby urner kirby.urner at gmail.com
Sun May 28 19:17:16 CEST 2006


On 5/28/06, Andre Roberge <andre.roberge at gmail.com> wrote:

> The first barrier I encountered was the "dot" notation.  Nowhere did I see
> it explain separately, as a notational convention, shared by many languages.
>  I thought it was something weird about Java that I would have to learn.
>
> Solution: introduce the dot notation totally separately from the other
> programming syntax.  This is something I tried to do in one rur-ple lesson.
>

I very much agree.  I even go so far as to phase dot notation into
standard mathematics, as another way to express such concepts as
mytriangle.A (returns a degree measure).  Use dot notation even
without reference to any specific computer language, but with
reference to the OO paradigm ("math as extensible type system" meme).

> The second barrier I found was the insistance on categorizing relationships
> in terms of "is-a" and "has-a".  The examples that I would find most natural
> to look at were often counterintuitive.  I remember in particular seeing
> that programming examples that use the relationships between a circle and an
> ellipse (or a rectangle and a square) seemed to have the relationship going
> backwards.
>
> Let me give a concrete example explaining inheritance for non-computer
> scientists.
> ===
> class Father(object):
>     def __init__(self):
>         self.eye_colour = "blue"
>     def greets(self):
>          print "Hello there!"
>
> class Mother(object):
>     def __init__(self):
>         self.eye_colour = "brown"
>
> class Child(Mother, Father):
>     pass
>
> Sally = Child()
>  print Sally.eye_colour
> Sally.greets()
> ===
> The computer scientists in the (virtual) room are probably horrified.  A
> Child is not a Mother, nor a Father and you do not have the proper "is-a"
> relationship.  Yet, I would claim that the above example would be very
> appropriate for the average person.  Sally inherit brown eyes for her
> mother, not because brown is the dominant gene (as in biology) in this case,
> but because of the inheritance order.  (Interchange Mother and Father in the
> class Child and Sally will have blue eyes)
>
> Words like "inheritance" have been borrowed and adapted by computer
> scientists for use in their own discipline.  They have been borrowed because
> they were familiar words that conveyed (partly) the concept used in the
> scientific discipline.  They have been adapted because the usual definition
> was not technically correct.  I believe that teaching those concepts should
> go through the same process: start with the familiar (but slightly
> incorrect) use of the word, and refine later on.

Yes.  This is characteristic of many disciplines; they absorb from
ordinary language, but pretty soon stop paying their debt, i.e. stop
building on-ramps.  Instead, they close off and fortify, so that those
not "in the know" sound like fools to the ears of insiders.  It's a
kind of corruption really.  My buddy Ed Applewhite had 'Layman'
printed on his business card, kind of a warning that he was nobody's
fool (yet he often pretended he couldn't quite follow).

> This, btw, is how I use to teach about "work" in physics, so I have some
> idea about the possible use of this approach..  If I ask my son to carry the
> groceries bags from the car to the kitchen (essentially at the same
> horizontal level), he will not believe me if I tell him that he did no work.
>   Yet, he would have done no work (W=0) [against gravity], as every physics
> textbook would tell you.

Yes, "work" is especially problematic, as it only counts if against
the vectors you consider worthy.  Irrelevant vectors, though
resistent, don't bar the way to "getting the job done" (at least not
directly), so you can go down fighting, working like crazy, yet the
physicist will tell you you're doing no work whatsoever (like the
burglar fumbling with the safe combo is doing no work, if the police
come too soon).

> ==
> As a final point about the personal history: after not having done any
> programming for about 8 years (and having never written any significant
> computer program), I decided to learn Python as a hobby with the goal to
> eventually teach my kids.  By then, I had some idea about the dot notation,
> so this barrier was easily overcome.  Python tutorials that I skimmed
> through did not insist on the importance of "is-a" and "has-a" relationship,
> so I didn't feel constrained in how I set up the relationships between the
> classes I wrote.  I was free to explore (and make mistakes!) and it was fun!
>  It still is.
>
> André
>

Useful autobio.  I used to strongly encourage Arthur to switch into
this mode from time to time.  That's related to your earlier remarks
about academic jargons:  we're each a walking namespace (Pythonic
concept), yet sometimes forget that fact (fish unaware of water).
When you go into autobio, people get a better idea of how to factor
out various biases you may never be free of in this life (because they
define you as a person e.g. "fought in 'Nam for eight years").

Your discussion of how is-a versus has-a easily confounds is quite
useful.  And I don't think CS has earned the right to claim it has
this all nailed down, simply because it requires knowledge of specific
knowledge domains to really come up with the most intuitive and simple
designs.  Physicists need to absorb OO and decide for themselves, not
leaving it to CS types to decide how to organize all those bosons and
leptons (although I'm sure CERN welcomes the various proposals -- HTTP
was invented to help keep track of 'em all).

Kirby


More information about the Edu-sig mailing list