[prev in list] [next in list] [prev in thread] [next in thread]
List: python-edu-sig
Subject: [Edu-sig] Re: Edu-sig digest, Vol 1 #15 - 4 msgs
From: samschul () pacbell ! net (sam schulenburg)
Date: 2000-02-10 4:15:31
Message-ID: 000801bf737d$78f399c0$2018aace () samintel
[Download RAW message or body]
----- Original Message -----
From: <edu-sig-request@python.org>
To: <edu-sig@python.org>
Sent: Wednesday, February 09, 2000 9:00 AM
Subject: Edu-sig digest, Vol 1 #15 - 4 msgs
> Send Edu-sig mailing list submissions to
> edu-sig@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.python.org/mailman/listinfo/edu-sig
> or, via email, send a message with subject or body 'help' to
> edu-sig-request@python.org
>
> You can reach the person managing the list at
> edu-sig-admin@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Edu-sig digest..."
>
>
> Today's Topics:
>
> 1. More re "Python Notation" (Kirby Urner)
> 2. RE: Rational Division (Jeffrey Kunce)
> 3. Re: Rational Division (Frank Stajano)
> 4. Re: Rational Division (Gerrit Holl)
>
> --__--__--
>
> Message: 1
> Date: Tue, 08 Feb 2000 09:15:41 -0800
> To: edu-sig@python.org
> From: Kirby Urner <pdx4d@teleport.com>
> <s89ef61d.093@mail.conservation.state.mo.us>
> <000201bf71ff$ad48ece0$d92d153f@tim>
> Subject: [Edu-sig] More re "Python Notation"
>
>
> I meant to shut up for a week and concentrate exlusively
> on writing Xbase for money, but this edu-sig is just too
> interesting -- can't resist...
>
> Math notations assume human "parcers" -- increasingly
> numerate readers as the training progresses. A lot of
> work goes into getting those humans "programmed" to read
> without stumbling.
>
> Software engineers typically have two "clients" for their
> output, a stupid but extremely fast and efficient machine
> on the one hand, and the "naive user" on the other.
>
> The progammer is the mediator, writing all sorts of error
> checking into the code, trying to anticipate what that
> "naive user" might do (or a malicious hacker) and trying
> to protect the integrity of the application (keep it from
> crashing and/or becoming hopelessly confused).
>
> Some of what I'm doing with Python flies in the face of
> all this "reflex conditioning" on the part of programmers.
> I'm not trying to make robust code that runs on expensive
> computers, where crashes mean big bucks, angry clients,
> loss of jobs.
>
> Rather, I'm going back to the "trained human readers" paradigm
> (not naive). They're reading Python as an alternative way
> to express some ideas, such as:
>
> * how to generate Pascal's Triangle using expressions
> with factorial in them
> * how to spit out the number of spheres in a triangular,
> square, cubic, half-octahedral or cuboctahedral packing
>
> I've posted some code for all of the above in earlier posts,
> except for this last, which I'll give here:
>
> def cubocta(L):
> # L is number of layers in a cuboctahedral packing
> # Returns cumulative number of spheres
> return (10.0/3.0)*L**3 + 5*L**2 + (11.0/3.0)*F + 1
>
> In action:
>
> >>> cubocta(1)
> 13.0
> >>> cubocta(0)
> 1.0
> >>> cubocta(2)
> 55.0
> >>> cubocta(100)
> 3383701.0
>
> Notice: I don't check for negative numbers (which in this
> case would actually work -- but have no geometric interpretation
> in this context -- i.e. are "meaningless"). L is supposed to
> be "the number of layers around a nuclear sphere" and is a whole
> number. In my classroom context, it may be assumed that students
> simply know this. We aren't going to clutter the function with
> a lot of error trapping.
>
> Here's a web page with an animated GIF showing a growing
> cuboctahedron, plus other animations showing how this relates
> to crystallography. I did these GIFs using Java + Povray,
> but could have done them using Python + Povray (I just
> hadn't written oop7.html yet):
>
> http://www.inetarena.com/~pdx4d/ocn/xtals101.html
>
> Although math books include the concept of "domain of a function"
> (as one subscriber pointed out by private email), the economy
> of expressions like n!/k!(n-k)! depend on our _not_ cluttering
> the notation with a lot of redundant "error checking" to make
> sure the archetypal "naive reader" doesn't substitute -10,
> Root(2), or a character string for n or k.
>
> In a "for humans only" text, you've codified the "domain" of
> factorial elsewhere, probably in a different book, at a different
> grade level. Now you just assume all this "context sensitivity"
> on the part of your readers -- something software engineers
> have rarely felt their workaday world allowed them to assume
> (machines don't do context, and the naive users need to have
> their errors trapped).
>
> So, as a classroom-focused math teacher, my bias is different
> from the software engineer's. The Python I write is for human
> readers to scan and comprehend, much as they learn to scan
> and comprehend those "crypto-compressed" math notations we
> already expect them to learn (a lot of geeky greek letters,
> like SIGMA, PHI, PI, THETA).
>
> Plus Python has the added benefit of being machine-interpreted
> out the back -- so you can set up these interactive situations
> with a computer that offer immediate feedback and reinforcement.
> Every time you test an expression or short function definition,
> you get rewarded with a response (kind of like having a text
> book with "answers in the back" -- you can immediately confirm
> your understanding, or lack thereof).
>
> So, now that I've set up all this context, I will conclude by
> appending a real life post to the Association of Mathematics
> Teacher Educators (AMTE) listserv. I don't mention Python by
> name, but you'll see how I'm practicing this very philosophy
> in that context:
>
> ------------------------------------------------
> Archived at the Math Forum
> thread = http://forum.swarthmore.edu/epigone/amte/belgandjy
> ------------------------------------------------
>
> Subject: Re: substitution
> Author: Kirby Urner <pdx4d@teleport.com>
> Date: Sun, 30 Jan 2000 16:36:19 -0800
>
> > = Sally
> = Kirby
>
> > For another example with perhaps makes is clearer,
> > f(x)=x^2, g(x)=x+1, find f°g(x) and g°f(x). (The symbol °
is
> > a degree sign on my keyboard, the closest I can come to the
> > composition symbol, but it might not be that on others'
> > screens.) When this is first introduced at least half of
> > the students will give me f°g(x)=x^2+1 AND g°f(x)=(x+1)^2.
>
> When doing composition of functions, I might have a student
> perform the role of x + 1. "Whenever someone gives you a number,
> your job is to simply add 1 to it and hand it back."
>
> Sally takes that job. We test it out a few times. Looks like
> she's got the hang of it. Sally(x) = x + 1
>
> Frank's job is to multiply a number by itself and return the
> result. We do a little job training to make sure he's got it
> down. Fred(x) = x * x
>
> So let's say I start with 3 and hand it to Sally. I get back 4.
> Now I take my 4 and hand it to Frank. I get back 16. Suppose
> I go in the reverse order. I start with 3 again, get back 9
> from Frank and then 10 from Sally. Different answer. Order
> matters.
>
> Or we could talk about other operations, besides those dealing
> with numbers.
>
> Sally paints anything she's given the color red.
>
> Frank paints green polka dots on whatever he's given.
>
> So if I give this toy horse to Sally first, then Frank, I get
> back a red horse with green polka dots. But what happens if
> I give it to Frank first and then Sally? Again, order matters.
>
> Frank(Sally(horse)) --> red horse w/ green dots
> Sally(Frank(horse)) --> horse is completely red (dots
> painted over)
>
> If my class has access to an interactive command line (as per
> earlier posts re my favored model of a math class), they could
> explore composition of functions by writing two definitions
> and taking g(f(x)) vs f(g(x)) -- no need for the little circle
> symbol I don't think, or we can show them that later (it's
> somewhat redundant). I'd expect students to make up their
> own functions and test the outcomes of composition.
>
> And again (as per my last post), I'd like to *move away*
> from:
>
> (a) the idea that operations are always about numbers (real
> or otherwise) and
> (b) the convention of using single letters for method and
> variable names
>
> On the contrary, I want my students to:
>
> (a) see "operations" as more generic than "number functions"
> (b) get in the habit of using longer strings to name their
> variables and operations
>
> In the example below, I follow my own advice:
>
> >>> 'A'*3
> 'AAA'
>
> [Note: when used with a characters, the operators * and +
> mean 'repeat' and 'concatenate' respectively. This exercise
> presumes students are already quite familiar with this
> behavior.]
>
> >>> def Sally(input):
> return input * 3
>
> >>> def Frank(input):
> return "CA"+input
>
>
> >>> Frank("T")
> 'CAT'
> >>> Sally("T")
> 'TTT'
> >>> Frank(Sally("T"))
> 'CATTT'
> >>> Sally(Frank("T"))
> 'CATCATCAT'
>
> In the exercise given:
>
> f(x)=x^2, g(x)=x+1
>
> f°g(x)= ?
>
> I might write an alternative next to it, such as:
>
> temp = g(x)
> answer = f(temp)
>
> This makes it clearer that the output of the innermost
> function is the input of the enclosing function. Or I might
> use concentric circles, with g inside of f (I've seen text
> books that do this).
>
> I'm sure other list members have tried many of these ideas
> (plus many more), with varying degrees of success.
>
> Sometimes it's just the notation that's confusing, and switching
> to some other notation, while keeping all the ideas intact, clears
> up some conceptual confusions. Then you can go back to the original
> notation, with more confidance that the concepts are well-anchored.
>
> Kirby
>
> =====================
>
> None of this means that I'm "against" using Python in other
> ways (e.g. to teach computer programming). It's a great
> segue into all kinds of other patterns of usage. But I
> just wanted to be clearer about my model, which owes a lot
> to Iverson's APL. APL is the first programming language
> I ever learned, and it was love at first sight. And APL,
> as some of you know, was originally a chalk board notation.
> It was designed for sophisticated human readers, _plus_ it
> had the advantage of being executable in silicon circuits.
> Just amazing.
>
> Kirby
>
>
>
>
> --__--__--
>
> Message: 2
> Date: Tue, 08 Feb 2000 11:52:46 -0600
> From: "Jeffrey Kunce" <kuncej@mail.conservation.state.mo.us>
> To: <edu-sig@python.org>
> Subject: RE: [Edu-sig] Rational Division
>
> [Tim Peters]
>
> > I don't buy into this. Python's closest predecessor (ABC) *was* > designed to
> > be maximally unsurprising (via iterative user testing and redesign), and
> > ended up a self-contained universe, thoroughly isolating its users even
> from
> > their native filesystem ("too quirky"). Python tries to regularize the
> mess
> > that is the "real computing world", but doesn't try to deny or hide its
> > existence. CP4E's goals seem much more in tune with that latter.
>
> I'm not sure that CP4E's goals are that well defined. There were a lot
> of proponents for "Everyone" being virtually everyone. The Alice people
> are proceeding on that premise, and they are the ones who brought up
> the case and division issues.
>
> My opinion is that CP4E should concentrate, initially, on serving those
> who already *want* to learn or teach programming, but who are frustrated
> because of lack of resources and because of the mess you refer to.
> From this POV, I think python is pretty darn good just as it is
>
> --Jeff
>
>
>
>
>
> --__--__--
>
> Message: 3
> Date: Tue, 08 Feb 2000 22:45:27 +0000
> To: gerrit@nl.linux.org, Tim Peters <tim_one@email.msn.com>
> From: Frank Stajano <fstajano@uk.research.att.com>
> Subject: Re: [Edu-sig] Rational Division
> Cc: edu-sig@python.org
> <s89ef61d.093@mail.conservation.state.mo.us>
> <000201bf71ff$ad48ece0$d92d153f@tim>
>
> At 2000-02-08 15:21 +0100, Gerrit Holl wrote:
> >2/3 is 0 rest 1. That's what I learned when I was 7, 8 years old.
>
> I won't question what you learnt when you were little, and indeed
different
> primary schools in different parts of the world may follow very different
> systems; but at mine they would have failed me in arithmetic unless I
> upgraded that answer to 0 rest 2 ;-)
>
> Frank (http://i.am/filologo.disneyano/)
http://www.uk.research.att.com/~fms/
>
>
>
> --__--__--
>
> Message: 4
> Date: Wed, 9 Feb 2000 08:14:09 +0100
> From: Gerrit Holl <gerrit.holl@pobox.com>
> To: Frank Stajano <fstajano@uk.research.att.com>
> Cc: Tim Peters <tim_one@email.msn.com>, edu-sig@python.org
> Subject: Re: [Edu-sig] Rational Division
> Reply-To: Gerrit <gerrit@nl.linux.org>
> Tim Peters <tim_one@email.msn.com>, edu-sig@python.org
>
> Frank Stajano wrote on 950046327:
> > At 2000-02-08 15:21 +0100, Gerrit Holl wrote:
> > >2/3 is 0 rest 1. That's what I learned when I was 7, 8 years old.
> >
> > I won't question what you learnt when you were little, and indeed
different
> > primary schools in different parts of the world may follow very
different
> > systems; but at mine they would have failed me in arithmetic unless I
> > upgraded that answer to 0 rest 2 ;-)
>
> Oops!
> 0 rest 2, of course.
>
> regards,
> Gerrit.
>
> --
> Homepage: http://www.nl.linux.org/~gerrit
> -----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com
> Version: 3.12
> GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O
> !M !V PS+ PE? Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y
> -----END GEEK CODE BLOCK----- moc.edockeeg.www//:ptth
>
>
>
> --__--__--
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig@python.org
> http://www.python.org/mailman/listinfo/edu-sig
>
>
> End of Edu-sig Digest_______________________________________________
> Edu-sig mailing list
> Edu-sig@python.org
> http://www.python.org/mailman/listinfo/edu-sig
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic