[Edu-sig] Accessibility to non CS types?

Andre Roberge andre.roberge at gmail.com
Sun May 28 16:43:48 CEST 2006


On 5/26/06, kirby urner <kirby.urner at gmail.com> wrote:
>
>
> So you're saying Python is sufficiently accessible because we may
> still assume scientists and engineers are learning C++ and Java?
>
> The fact remains:  many academics are throwing up their hands when
> encountering Python, because they can't make the leap from what they
> knew before.
>

If I may, I'd like to start with a brief personal history to introduce what
I see as two barriers to learning Python for "scientists/academics".

I learned FORTRAN in 1977 in a College-level course (pre-University in
Quebec).  I then went to University to study Physics.  During my
undergraduate degree, I wrote perhaps 3 (short) computer programs.  Still,
FORTRAN was easily understood as the stuff I did was mostly numerical work.
*The concepts and language I had learned in Physics were easily adaptable in
FORTRAN.*

While in graduate school, I bought a PC and learned some basic C
programming, mostly for fun.  Again, I didn't write many programs, and they
weren't very long.  It did prepare me for what was to come.  *The transition
from FORTRAN and C was fairly easy, as I could write FORTRAN-style programs
in C ;-).

As a Physics prof, I wanted to introduce visual tools to my students.  After
learning about Java Applets, I decided that they were an ideal tool.  So, I
set up to learn enough Java to write my own applets for physics demo.  I
wrote a grand total of perhaps 10 applets over the course of 3 years, in
between teaching and doing research.  This was around 1995.

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.

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.

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.

==
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é
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/edu-sig/attachments/20060528/854e5ff3/attachment.html 


More information about the Edu-sig mailing list