Math + Python: reviewing some themes (long)

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Math + Python: reviewing some themes (long)

kirby urner-4
Greetings edu-sig folks:
 
I've got a somewhat long one here.  I encourage any responders not to quote the whole thing, just go for the gusto and quote the one thing you wanna do a thread on?  I welcome changes to the subject line.  One of my bad habits is to introduce new topics in response to a pre-existing thread.
 
1. PYCON
=========
 
An entreaty that usa.pycon 2010 education track events get some chronicling here, by those lucky enough to attend. 
 
I'll be following remotely.
 
2. OSCON
=========
 
I've just submitted a proposal to OSCON for an education track talk in that Portland venue this summer. 
 
I'll let you know how that goes.  There's no explicit education track in that conference I'm pretty sure.
 
3. MFTDA
=========
 
More thoughts on 'Mathematics for the Digital Age' (MFTDA):
 
This could obviously be used at the college level as a discrete math course offering. 
 
The introduction clearly links it to 'Concrete Mathematics' which we used to discuss on this list.  Tim Peters first brought it to my attention as I recall, whereas most other subscribers likely already knew of it.  CM is used at Stanford (even today?) as a kind of on-ramp to TAOCP by Knuth.  In fact, Knuth is a co-author of CM -- not news to many subscribers here I'm guessing.
 
What I'd forgetten entirely, and what the MFTDA introduction reminds me of, is that 'Concrete Mathematics' is an amalgam of "CONtinuous" and "disCRETE" -- hence CONCRETE.
 
3.a:  DISCRETE AND/OR DIGITAL?
============================
 
In my thread with Gary Litvin, this was one of my chief concerns:  are we boxing ourselves in, by calling it discrete math?
 
In taking Python (or any computer language) into the math classroom, we're *not* wanting to exclude topics simply because they're not traditionally considered "discrete math" topics, right? 
 
Consider calculators.  They're digital devices just as surely as computers are, and they permeate the math curriculum at all levels.  Teachers use those TIs and Casios to study continuous curves in one or more variables, to explore calculus concepts.  Consider Mathematica, likewise digital....
 
Some of us have been hoping to interest local community colleges in serving as venues for these teacher training programs that in some cases equip math teachers already in the field with some of these new skills.  The idea, as I've posted about already, was laid out during a workshop last summer:  lets add a new high school course that satisfies a math requirement, isn't an elective. 
 
As such, this course wouldn't be on the CS AP track.  Trying to prepare students to pass some AP CS test would just take too much time away from the math we want to study. 
 
Or could there be a new test, call it AP something else? 
 
I doubt ETS has much interest in new categories of AP (not that all of us care that much about US tracks in the first place).
 
I've been hyping "digital mathematics" as a kind of niche marketing term, as distinct from "discrete" but is this wise?  
 
Per math-thinking-l (another list), I'd say I'm in the distinct minority in thinking "digital math" is a good term.  It's unexplored, not conservative, whereas discrete math is already accepted and entrenched. 
 
To try going in with some "digital math" is just stacking the deck against one's own efforts, increasing the odds against success.  Still, we need to call it something.   Computer Math?  Computational Math?  Discrete Math?
 
3.b  WHAT LEVEL OF DIFFICULTY?
=============================
 
Back to the Litvin text, which has a lot going for it, I think it might be too difficult for some of the students we're hoping to reach. 
 
Phillips Academy is one of the most prestigious, reminiscent of Catlin Gabel or Oregon Episcopal in our neck of the woods (I could rattle off a few more).  The text comes across as "early college" i.e. college level for high schoolers, or at least as a kind of advanced Algebra 2 (thinking of the chapter on polynomials in particular). 
 
It goes all the way through RSA (public key crypto) as I've typically advocated we do.
 
The good news is MFTDA (Math for the Digital Age) could be like TAOCP or SICP by Abelson, Sussman & Sussman, by forming the nucleus of a genre.  In additional to full blown texts, we'll perhaps see a growing inventory of cyberspace assets contributed directly by teachers and students? 
 
That's hardly a hypothetical question actually, as those materials already exist in abundance (including as Youtubes in some cases), just need to be organized, glued together, and connected into curricula more successfully. 
 
For example, I often circle 'Warriors of the Net' as a great little cartoon about TCP/IP.  But then do we want to get into those guts? 
 
MFTDA takes the more traditional route in diving into CPU / registers / memory, offers 8088 assembler, relates these to byte codes running on a VM ala Java and Python, other so-called interpreted languages.  It's not either / or though:  dig down to the chip on the one hand, dig down to bits over the wire on the other.
 
The way I heard some of the teachers talk at our workshop on Aug 7, was more in terms of serving a refugee population feeling burned out on more traditional fare.  They do Algebra 1, Geometry... and then decide against Algebra 2. 
 
These first two courses haven't been all that successful necessarily, meaning the motivation to continue along the pre-calc/ calculus track may not be present, and yet a 3rd year of math is required for that high school diploma.  A computer science elective wouldn't satisfy that requirement.  A discrete math offering would. 
 
So....  where do we go with this?  What topics?  In what depth?  What solutions are already out there?
 
3.c  WHAT KILLED CODING?
====================
 
 
Some of the advice I get from math teachers on math-teach (a list at the Math Forum) is to just forget about using a computer language.  That was trendy in the 1980s maybe, but went out of fashion for a reason. 
 
I'm not clear on exactly those reasons were myself.  In the 1980s, I was working in computer literacy for McGraw-Hill and it looked like Logo and BASIC would be moving in big time. 
 
A typical linear algebra text of that era, Wayne Bishop a co-author (one of the math-teach mainstays), had these BASIC programs in the back for multiplying and reducing matrices.  That seemed the wave of the future back then, but then subsequent editions of that book have dropped the software component.
 
 
Here's what I think might have happened:  the shift to the object oriented paradigm left a lot of math teachers feeling programming was going off in some new direction and it'd be hopeless to try to keep up. 
 
Computer programming needed to go its own way (or so its seemed) and be strictly its own discipline, leaving mathematics students free to practice their own ways, minus this alien content.
 
But then OO ala Smalltalk was actually supposed to make programming easier, the theory being we already think in terms of objects, of nouns, named things, with attributes and behaviors.  This wasn't about inventing an entirely new paradigm for computer programming, it was about finding ways to express an existing paradigm (that of objects in the world) in computer languages.
 
3.d OBJECTS FIRST?
====================
 
Sorry this is being so long.  Let me just end with another take on the "objects first" approach.
 
In order to make Python more accessible and the mathematics correspondingly easier, we begin with very simple classes based around animals (e.g. the Turtle class).  We encourage thinking about animals, their attributes and behaviors.  Only later on will we try our had at more generic "math objects" such as Rational Numbers. 
 
MFTDA actually includes a Rational number class, but doesn't give it much focus.  It seems to be the only class definition in the entire text.  I think this maybe mirrors an attitude among CS professors that classes and objects are an advanced 2nd year topic.
 
My own view is somewhere in between:  I think a full blown treatment of OO, including abstract classes, metaclasses, multiple inheritance, is indeed advanced and probably not suitable for a one year or half year high school math course. 
 
Or, if suitable, then mostly in the form a really primitive examples of the Foo and Bar class variety, more to communicate the generic design patterns and concepts than to develop full blown computer programs such as one might use in production environments.
 
What examples do teachers wish to contribute?  What would be a good introductory example of multiple inheritance I wonder?  I recall David MacQuigg sharing some examples where __mro__ (method resolution order) made an appearance.
 
http://wikieducator.org/User:Macquigg  (I recommend reading Dr. Macquigg's excellent testimonial here, with a link to his PyWhip).
 
So yes, the CS professors are right.  A full blown intro to classes is too much to start off with.
 
On the other hand, a few simple classes such as Rational Number, Integer Modulo N, Polynomial, Vector, Edge, Polyhedron, could take their place alongside String, List, Set, other primitives. 
 
Note: Rational Number is now a primitive in the Standard Library, thanks to the fractions.Fraction class.
 
>>> from fractions import Fraction
>>> a = Fraction(1, 4)
>>> b = Fraction(2, 5)
>>> c = Fraction(2, 10)
>>> a
Fraction(1, 4)
>>> b
Fraction(2, 5)
>>> c
Fraction(1, 5)
>>> a + b + c
Fraction(17, 20)
>>> a * b * c
Fraction(1, 50)
>>> a ** 2 + b ** 3 - c ** 4
Fraction(1249, 10000)
 
The idea, then, is to build some awareness of classes and objects using familiar analogies relating to every day life.  A class definition is a blueprint (one needs to explain "blueprint" -- design, plan) whereas an instance of the class has it's own place in memory, its own "self" as it were (intro to Python "self" syntax). 
 
Do some animal classes.  Then note how dot notation is what's used to access the attributes and behaviors of a user-defined object. 
 
Then note how Python's primitive objects are likewise instances of various classes (e.g. the List class). 
 
It's dot notation itself that we're hoping to make second nature (familiar, not too arcane).
 
3.e  THE TIME DIMENSION
====================
 
That's the breakthrough in understanding we're seeking:  brief anatomy lessons with user-defined classes provide enough background to anchor an understanding of built-in classes and objects.  It's really "dot notation" itself that we're seeking to anchor here.  noun.verb(args) and noun.adjective provide a primitive grammar or logic.  We also think in terms of a "life cycle" for objects, from birth to garbage collection once no-longer named. 
 
Asking whether two objects are contemporaneous or "partially overlapping" should be a sensible question.  Mathematics tends to be sequential, in terms of definitions and theorems, building on itself, but with no explicit reference to a time dimension.  Focusing on "objects in memory" brings more of a temporal dimension into focus, allowing us to talk about local vs. global, about scope.  MFTDA looks at scope quite a bit, as one needs to in programming.
 
What do others think?  Does adding programming put more emphasis on "time" than we're used to?
 
Having examined a turtle, snake, monkey and dog class in some detail, we're ready to appreciate that lists, dictionaries and strings are likewise instances of classes, as are numbers themselves.  Yes, we've already used primitive data structures to define our Dog and Turtle.  That's OK.  Now we're ready to zoom in on the "guts" of a Snake to see how the stomach (a list) is likewise an object, just like the snake itself.
 
 
This is a great segue to the turtle of Standard Library fame.  We're now ready to think in terms of instantiating a turtle object and controlling it using dot notation.  We've kept the essence of Logo, while creating an "explicit receiver" (to use Smalltalk jargon).
 
Then perhaps we go along our merry way, like in MFTDA, focusing primarily on functions for awhile (maybe generators), taking our time getting back to user-defined classes.  On this second pass, we'll get more into "math objects" such as Polyhedra (my favorite) but we'll still be less advanced than in a true CS course treatment.
 
This is a proposal only, a reiteration of my earlier posts in many ways.  What I'm supposing would work best is if a training team set up these possibilities, but then left it to individual teachers or faculty teams which way to go.  Having some standards in the picture needn't squeeze every degree of freedom out of the picture.  A teacher preferring an "objects first" approach would be free to explore that, whereas a different teacher might consider this way too difficult and inappropriate for his or her students.  Not every teacher wants to use VPython for example, cool though that package may be.
 
Especially when working towards a few pilots, I think it's important to not intimidate, not scare away, by suggesting TOOWTDI ("there's only one way to do it").
 
3.f  MY ROLE
====================
 
Any reader making it this far might be asking whether I have any authority or standing to be suggesting any of this. 
 
Who am I to be setting education policy, in the State of Oregon or anywhere else? 
 
The answer is I'm no one in particular, and I'm not in a position to tell others how to play their hands. 
 
My own approach was to open source most of my materials.  I have not written a text book.  I am not an appointed education czar.
 
My model is one of democratic participation and wanting to foster lots of discussion. 
 
Minus much participation or activism, I don't think there's much chance of much of anything happening, in terms of getting some of these new kinds of math classes going.  The status quo seems the most comfortable option until one day people wake up to the fact they're way behind the curve in some ways.  At that point, the future shock may be severe and result not in creative action, but semi-paralysis.  That seems closer to what's happening in so many communities:  future shock + semi-paralysis.
 
Intel and the Gates Foundation will continue to earmark millions if not billions for education, but none of those funds will go towards beefing up math classes with some industrial grade computer language unless we take a more activist approach. 
 
The opportunity to better integrate topics around computers will simply fall by the wayside, as it has since the 1980s in most cases (with some happy exceptions).
 
Let's get creative then?  Innovate?  I'm hoping the Atlanta conference will help move us along in some promising new directions.  I will be monitoring this list.  Know of good blogs?  Post some links?
 
Kirby
 

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Could there be a new test, call it AP something else?

Litvin-2
At 04:12 AM 1/24/2010, kirby urner wrote:

>Some of us have been hoping to interest local community colleges in
>serving as venues for these teacher training programs that in some
>cases equip math teachers already in the field with some of these
>new skills.  The idea, as I've posted about already, was laid out
>during a workshop last summer:  lets add a new high school course
>that satisfies a math requirement, isn't an elective.
>
>As such, this course wouldn't be on the CS AP track.  Trying to
>prepare students to pass some AP CS test would just take too much
>time away from the math we want to study.
>
>Or could there be a new test, call it AP something else?

Several years ago, Maria (Litvin) asked a high-ranking College Board
person whether AP Discrete Mathematics was a possibility.  The answer
was absolutely no.  The main reason was that the College Board was
looking for ways to reduce gender imbalance and minorities
participation, and another math course wouldn't help.  Hence AP Human
Geography...  When the College Board abruptly cancelled the AP CS AB
exam, part of the rationale given, again, was that cancelling this
exam wouldn't hurt the gender balance and minorities
participation.  What they meant was they could afford to cancel this
small and unprofitable exam.  (They also cancelled AP Italian -- no
gender imbalance there).

Interestingly, recently the College Board has established a
commission to explore a new AP CS course.  Its name, I hope
tentative, is "AP Computer Science - Principles" -- see
http://docs.google.com/present/view?id=dffps2vw_167hdvspwfc.
Apparently, the current CS exam doesn't test any principles.

What might this new exam be like?  CS with no programming and no
math?  We'll see.  My guess is, if it eventually comes about, it will
be a no-specific-programming-language exam, which will simply replace
the current AP CS exam in Java.  I believe two AP CS exams will be untenable.

Gary Litvin
www.skylit.com



_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Math and Python: level of difficulty

Litvin-2
In reply to this post by kirby urner-4
At 04:12 AM 1/24/2010, kirby urner wrote:

>Back to the Litvin text, which has a lot going for it, I think it
>might be too difficult for some of the students we're hoping to reach.
>
>Phillips Academy is one of the most prestigious, reminiscent of
>Catlin Gabel or Oregon Episcopal in our neck of the woods (I could
>rattle off a few more).  The text comes across as "early college"
>i.e. college level for high schoolers, or at least as a kind of
>advanced Algebra 2 (thinking of the chapter on polynomials in particular).
>
>It goes all the way through RSA (public key crypto) as I've
>typically advocated we do.
>
>The good news is MFTDA (Math for the Digital Age) could be like
>TAOCP or SICP by Abelson, Sussman & Sussman, by forming the nucleus
>of a genre.  In additional to full blown texts, we'll perhaps see a
>growing inventory of cyberspace assets contributed directly by
>teachers and students?

First, let me say I am honored to have our book mentioned in the same
paragraph with Knuth and Abelson, Sussman & Sussman. :)

Kirby is right: our book is suitable for students in a typical
first-year discrete math college course.  That doesn't mean, though,
that a bright middle schooler or an open-minded 9th- or 10th-grader
can't handle it.  Unfortunately there is virtually nothing in the
standard K-12 math that prepares students for this kind of math,
Phillips Academy or not.  If anything, younger students are more
enthusiastic and open to actually solving problems.  Maria (Litvin)
recently asked her students Question 2 from Section 1.2: How many
subsets does a set of 3 elements have, including the empty set and
the set itself?  Her students understood what a subset is, but only
one from the whole class could answer the question.  The others had
no clue how to approach a problem -- any problem!  Most of these kids
are currently enrolled in AP Calculus or a more advanced math course,
such as linear algebra...  I suspect if you explain to an interested
and reasonably bright 10-year-old what a subset is and ask the same
question, chances are he/she will quickly list all the subsets and
give you the right answer within a couple of minutes.  It is true, of
course, that the last two chapters, the one on map coloring and the
one on number theory and cryptology, are quite technical.  Only very
bright students -- high school or college -- will be able to handle
them.  But we need to somehow keep these kids busy, too, don't we?

Gary Litvin
www.skylit.com


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Math and Python: level of difficulty

Maria Droujkova
I would very much like to see this efforts expanded to earlier ages and stages in math development. I work with kids as young as three and on, using Scratch with them. They learn so much from programming, from coordinate thinking to increments and "gentle calculus" (e.g. that you program speed as the change in distance). Functions, grid reasoning, co-variation, equations and variables are just a few examples of Early Algebra topics that lend themselves extremely well to the programming approach, and become accessible to five-ten year olds who program.

If any of you are interested in under-ten Math Club crowd (meaning middle and high school "everybody"), please let me know so we can join efforts. It would be nice to write it all up as a coherent resource.

Cheers,
Maria Droujkova
http://www.naturalmath.com

Make math your own, to make your own math.




On Sun, Jan 24, 2010 at 9:59 PM, Litvin <[hidden email]> wrote:
At 04:12 AM 1/24/2010, kirby urner wrote:
Back to the Litvin text, which has a lot going for it, I think it might be too difficult for some of the students we're hoping to reach.

Phillips Academy is one of the most prestigious, reminiscent of Catlin Gabel or Oregon Episcopal in our neck of the woods (I could rattle off a few more).  The text comes across as "early college" i.e. college level for high schoolers, or at least as a kind of advanced Algebra 2 (thinking of the chapter on polynomials in particular).

It goes all the way through RSA (public key crypto) as I've typically advocated we do.

The good news is MFTDA (Math for the Digital Age) could be like TAOCP or SICP by Abelson, Sussman & Sussman, by forming the nucleus of a genre.  In additional to full blown texts, we'll perhaps see a growing inventory of cyberspace assets contributed directly by teachers and students?

First, let me say I am honored to have our book mentioned in the same paragraph with Knuth and Abelson, Sussman & Sussman. :)

Kirby is right: our book is suitable for students in a typical first-year discrete math college course.  That doesn't mean, though, that a bright middle schooler or an open-minded 9th- or 10th-grader can't handle it.  Unfortunately there is virtually nothing in the standard K-12 math that prepares students for this kind of math, Phillips Academy or not.  If anything, younger students are more enthusiastic and open to actually solving problems.  Maria (Litvin) recently asked her students Question 2 from Section 1.2: How many subsets does a set of 3 elements have, including the empty set and the set itself?  Her students understood what a subset is, but only one from the whole class could answer the question.  The others had no clue how to approach a problem -- any problem!  Most of these kids are currently enrolled in AP Calculus or a more advanced math course, such as linear algebra...  I suspect if you explain to an interested and reasonably bright 10-year-old what a subset is and ask the same question, chances are he/she will quickly list all the subsets and give you the right answer within a couple of minutes.  It is true, of course, that the last two chapters, the one on map coloring and the one on number theory and cryptology, are quite technical.  Only very bright students -- high school or college -- will be able to handle them.  But we need to somehow keep these kids busy, too, don't we?

Gary Litvin
www.skylit.com


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

David MacQuigg
In reply to this post by Litvin-2
Litvin wrote:

> What might this new exam be like?  CS with no programming and no
> math?  We'll see.  My guess is, if it eventually comes about, it will
> be a no-specific-programming-language exam, which will simply replace
> the current AP CS exam in Java.  I believe two AP CS exams will be
> untenable.

I can't imagine teaching or testing CS without an actual language.  A
much better alternative would be to have the same test in multiple
languages (perhaps with a "handicap" factor for the students choosing
Python, so they don't have an embarrassing advantage :>).  If you find a
problem that is not easily translated to another language, that is a
clue that the problem is about cruft, not fundamentals.  I would
volunteer to do the Java to Python translations.

-- Dave

************************************************************     *
* David MacQuigg, PhD    email: macquigg at ece.arizona.edu   *  *
* Research Associate                phone: USA 520-721-4583   *  *  *
* ECE Department, University of Arizona                       *  *  *
*                                 9320 East Mikelyn Lane       * * *
* http://purl.net/macquigg        Tucson, Arizona 85710          *
************************************************************     *

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

Andrew Harrington
Sounds good to me, David.  Good luck putting it over.  Maybe after we get 10 million hits on PyWhip?

Andy

On Mon, Jan 25, 2010 at 8:36 AM, David MacQuigg <[hidden email]> wrote:
Litvin wrote:

What might this new exam be like?  CS with no programming and no math?  We'll see.  My guess is, if it eventually comes about, it will be a no-specific-programming-language exam, which will simply replace the current AP CS exam in Java.  I believe two AP CS exams will be untenable.

I can't imagine teaching or testing CS without an actual language.  A much better alternative would be to have the same test in multiple languages (perhaps with a "handicap" factor for the students choosing Python, so they don't have an embarrassing advantage :>).  If you find a problem that is not easily translated to another language, that is a clue that the problem is about cruft, not fundamentals.  I would volunteer to do the Java to Python translations.

-- Dave

************************************************************     *
* David MacQuigg, PhD    email: macquigg at ece.arizona.edu   *  *
* Research Associate                phone: USA 520-721-4583   *  *  *
* ECE Department, University of Arizona                       *  *  *
*                                 9320 East Mikelyn Lane       * * *
* http://purl.net/macquigg        Tucson, Arizona 85710          *
************************************************************     *


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig



--
Andrew N. Harrington
 Director of Academic Programs
 Computer Science Department
 Loyola University Chicago
 512B Lewis Towers (office)
 Snail mail to Lewis Towers 416
 820 North Michigan Avenue
 Chicago, Illinois 60611

http://www.cs.luc.edu/~anh
Phone: 312-915-7982
Fax:    312-915-7998
[hidden email] for graduate administration
[hidden email] for undergrad administration
[hidden email] as professor

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

Litvin-2
In reply to this post by David MacQuigg
At 09:36 AM 1/25/2010, David MacQuigg wrote:
>I can't imagine teaching or testing CS without an actual
>language.  A much better alternative would be to have the same test
>in multiple languages (perhaps with a "handicap" factor for the
>students choosing Python, so they don't have an embarrassing advantage :>).

Sure, for teaching you can use a particular language (or
two).  Testing is another matter.  Currently AP free-response
questions are not just "program this" or "program that" -- they are
stated in a particular language, e.g., here is a class, implement
this particular method.  They also have a "case study," now in Java,
and ask questions about it, e.g., to write a new method or to
implement a new derived class.  The questions never ask students to
write a complete program.  Then ETS brings together 80 or so teachers
and college profs for a week each June to grade AP CS free-response
questions.  These readers would have to be polyglots.  They use an
elaborate rubric to grade a question, with partial credit given for
every little bit remotely related to the right answer.  Supporting
multiple languages would cost the College Board and ETS a lot of
money, and this is a relatively small exam (about 20,000 students).

There are many programming competitions, of course, where they care
only about the program's correct result, such as  ACSL --
http://www.acsl.org/.  That's where Python programmers have a great
advantage.  Unfortunately, few contestants use it now, because it is
not widely taught in schools yet.  Does a contest specifically for
Python programmers exist?  Is it feasible?

Gary Litvin
www.skylit.com

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

Andrew Harrington
Gary,
Interesting site, ACSL.
Curious, there is no mention of specific languages or freedom of language the I find quickly on their site.  The only hint is the list of languages given where solutions are given,  Is that the actual list of restrictions?

On Mon, Jan 25, 2010 at 9:22 AM, Litvin <[hidden email]> wrote:
At 09:36 AM 1/25/2010, David MacQuigg wrote:
I can't imagine teaching or testing CS without an actual language.  A much better alternative would be to have the same test in multiple languages (perhaps with a "handicap" factor for the students choosing Python, so they don't have an embarrassing advantage :>).

Sure, for teaching you can use a particular language (or two).  Testing is another matter.  Currently AP free-response questions are not just "program this" or "program that" -- they are stated in a particular language, e.g., here is a class, implement this particular method.  They also have a "case study," now in Java, and ask questions about it, e.g., to write a new method or to implement a new derived class.  The questions never ask students to write a complete program.  Then ETS brings together 80 or so teachers and college profs for a week each June to grade AP CS free-response questions.  These readers would have to be polyglots.  They use an elaborate rubric to grade a question, with partial credit given for every little bit remotely related to the right answer.  Supporting multiple languages would cost the College Board and ETS a lot of money, and this is a relatively small exam (about 20,000 students).

There are many programming competitions, of course, where they care only about the program's correct result, such as  ACSL -- http://www.acsl.org/.  That's where Python programmers have a great advantage.  Unfortunately, few contestants use it now, because it is not widely taught in schools yet.  Does a contest specifically for Python programmers exist?  Is it feasible?


Gary Litvin
www.skylit.com

_______________________________________________



--
Andrew N. Harrington
 Director of Academic Programs
 Computer Science Department
 Loyola University Chicago
 512B Lewis Towers (office)
 Snail mail to Lewis Towers 416
 820 North Michigan Avenue
 Chicago, Illinois 60611

http://www.cs.luc.edu/~anh
Phone: 312-915-7982
Fax:    312-915-7998
[hidden email] for graduate administration
[hidden email] for undergrad administration
[hidden email] as professor

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

David MacQuigg
In reply to this post by Litvin-2
Litvin wrote:

> At 09:36 AM 1/25/2010, David MacQuigg wrote:
>> I can't imagine teaching or testing CS without an actual language.  A
>> much better alternative would be to have the same test in multiple
>> languages (perhaps with a "handicap" factor for the students choosing
>> Python, so they don't have an embarrassing advantage :>).
>
> Sure, for teaching you can use a particular language (or two).  
> Testing is another matter.  Currently AP free-response questions are
> not just "program this" or "program that" -- they are stated in a
> particular language, e.g., here is a class, implement this particular
> method.  They also have a "case study," now in Java, and ask questions
> about it, e.g., to write a new method or to implement a new derived
> class.  The questions never ask students to write a complete program.  
> Then ETS brings together 80 or so teachers and college profs for a
> week each June to grade AP CS free-response questions.  These readers
> would have to be polyglots.  They use an elaborate rubric to grade a
> question, with partial credit given for every little bit remotely
> related to the right answer.  Supporting multiple languages would cost
> the College Board and ETS a lot of money, and this is a relatively
> small exam (about 20,000 students).

Is there anything in the current AP test that can't be translated to
Python?  I don't mean a word-for-word translation, but rather, re-state
the same fundamental problem in Python.

As for grading the free-response questions, if 20% of the tests are done
in Python, surely ETS can hire 20% of the graders in that category.  In
fact, I think it would be *easier* to hire the Python graders, since a
larger percentage of Python teachers will be "enthusiasts", not just
doing it for the money.   Nobody is expected to be a polyglot.  In fact,
I would require they state a preference to minimize the bias for or
against any language.  Each grader should grade tests only in his/her
preferred language.

Comparing the raw scores might lead to a real awakening.  Bruce Eckel
(Thinking in Java) says he is five times more productive in Python than
in Java.  I hesitate to use that number, because people will think I am
crazy.  I am comfortable saying a factor of two, however.

-- Dave

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

kirby urner-4
In reply to this post by Litvin-2
On Sun, Jan 24, 2010 at 6:40 PM, Litvin <[hidden email]> wrote:
 
 
What might this new exam be like?  CS with no programming and no math?  We'll see.  My guess is, if it eventually comes about, it will be a no-specific-programming-language exam, which will simply replace the current AP CS exam in Java.  I believe two AP CS exams will be untenable.

Gary Litvin
www.skylit.com

In the interim, I think we should use the breathing room.  Here's an opportunity for a local community to synthesize a new mix, without getting into lockstep.
 
Innovation, not conformity, is what we're needing right now. 
 
Let's imagine a math class, one that satisfies a year requirement, that is not AP anything.  Think of Trig or Statistics, or even Algebra 2.
 
I like that MFTDA starts right off the bat with the traditional Algebra topic of functions as mappings, goes over the concepts of domain, range, co-domain, inverse function, many to one.  Clearly this is mathematics.
 
But then, because of our commitment to teaching "how things work", we don't stay in the clouds. We start answering the question "what's this good for?" right away.
 
We talk about reverse lookup phone books, mapping human languages with Unicode, storing and retrieving data in tables (one-to-many, many-to-one, many-to-many).  We make our topic real, concrete, applicable.  We write little functions in Python, we talk about Python dictionaries as mappings.
 
If only our everyday Algebra course were a lot more like this one...  that's what we're after in many cases:  a more fulfulling way to approach a lot of the same topics we already cover, but in ways that haven't been updated in decades.
 
Kirby
 

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

Litvin-2
In reply to this post by David MacQuigg
At 11:39 AM 1/25/2010, David MacQuigg wrote:
>Is there anything in the current AP test that can't be translated to Python?

Of course not.  But AP is driven by colleges.  The AP exam used to be
in C++ until 2003.  The current exam has heavy emphasis on OOP.  It
took a tremendous effort to retrain HS teachers from C++ to
Java/OOP...  If the college board decided that Python is used at most
colleges in intro CS courses, they would eventually move.  This is
very unlikely, though.  College courses are getting more and more
fragmented in terms of the languages used, so it might be easier for
the college board to move to a language-less exam.  The current exam
is too Java specific.

>Comparing the raw scores might lead to a real awakening.

Scores depend  a lot on a particular teacher and textbook, not so
much on the language.  The remaining AP CS exam is not very
demanding, anyway, in terms of writing code that works.

>Bruce Eckel (Thinking in Java) says he is five times more productive
>in Python than in Java.  I hesitate to use that number, because
>people will think I am crazy.  I am comfortable saying a factor of
>two, however.

Me too -- by a factor of two.  At least.  So what?  First language
discussions flare up regularly on the ap-compsci listserve.  In this
forum, Python would win, of course. :)  I am all for Python, but I
don't believe in the "objects first" approach.  The College Board's
CS Development Committee seems to be gradually moving away from heavy
duty OOP back to algorithms.

Gary Litvin
www.skylit.com

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

kirby urner-4
On Mon, Jan 25, 2010 at 9:32 AM, Litvin <[hidden email]> wrote:
>
>
> Me too -- by a factor of two.  At least.  So what?  First language discussions flare up regularly on the ap-compsci listserve.  In this forum, Python would win, of course. :)  I am all for Python, but I don't believe in the "objects first" approach.  The College Board's CS Development Committee seems to be gradually moving away from heavy duty OOP back to algorithms.
>
> Gary Litvin
> www.skylit.com
>

"Heavy duty OOP" sounds somewhat extraneous to Algebra 2, I agree.

However, if you show the 2 + 2 is adding two objects (2 .__add__(2)
the same thing), is that "objects first"?

Teacher projecting:

>>> dir (2)  #   saying:  "2 has internals, is an object with methods"

So many gradations.

Ideally, we start earlier with the computers and then have more than
just the one high school math course in which to develop this
thinking.

MFTDA looks like a compressed version of what we could easily spread
out across a wider time span.  Could be a whole series, more like
Saxon.

Kirby
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

Litvin-2
At 03:52 PM 1/25/2010, kirby urner wrote:
>However, if you show the 2 + 2 is adding two objects (2 .__add__(2)
>the same thing), is that "objects first"?

Yes.

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

kirby urner-4
On Mon, Jan 25, 2010 at 2:23 PM, Litvin <[hidden email]> wrote:
> At 03:52 PM 1/25/2010, kirby urner wrote:
>>
>> However, if you show the 2 + 2 is adding two objects (2 .__add__(2)
>> the same thing), is that "objects first"?
>
> Yes.
>

OK, I agree.  2 .__add__(2)  is pretty esoteric, as is dir (2).

Not everyone does that, or talks about __ribs__.

How about if the teacher says:

"""
1.0 and 1 are two different types of number, floating point and integer.

"A" is a type as well, a string type.

All of these types are types of object. <--- more generic than number.
"""

But we might get to that only after using Python as a calculator for
awhile, getting used to **, assignment operator, parentheses.

Should feel like old hat as I bet a lot of these students were already
used a TI before.

So this'd be "objects second" perhaps?

Other approaches:  objects after awhile;  objects last;  objects never.

Kirby
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

David MacQuigg
In reply to this post by Litvin-2
Litvin wrote:
> AP is driven by colleges.  The AP exam used to be in C++ until 2003.  
> The current exam has heavy emphasis on OOP.  It took a tremendous
> effort to retrain HS teachers from C++ to Java/OOP...  If the college
> board decided that Python is used at most colleges in intro CS
> courses, they would eventually move.

Why does the AP test have to be offered in just one language?  Why do we
need to make a "tremendous effort" to move teachers from one language to
another?  Couldn't every school-district make it's own choice of
language?  Do colleges really expect specific training in a particular
language?  If a student has a thorough understanding of OOP in Python,
then enrolls in a college that teaches in Java, we could have a
one-credit, self-study course, with the final exam being the AP test in
Java.  Students could even take this transition course over the summer
between high school and college.  Goldwasser's text has an excellent
transition to Java.  I expect we will have a section of PyWhip for this
purpose also.

I participated in a team-programming project in our junior-level class
in OOP.  The class was taught in Java, but the project was done in
Python.  The students participating in the project were wary at first,
insisting that they be able to write in Java, and I agreed to do the
translations to Python.  I didn't have to do any translations at all.  
These Java students picked up on Python right away, and got a A on their
project.

Moving the other direction - from Python to Java, might be more
difficult (adding cruft instead of removing it), but certainly do-able
for a student who really understands the fundamental concepts.  Teaching
these concepts using the best tools available should be our focus in
high school.  Learning the specifics of whatever language they need
later should be "on the job" training.  Whatever language we choose for
teaching, we have to assume students will need something else after
graduation.   The cruft will change.  Fundamentals stay the same.

> This is very unlikely, though.  College courses are getting more and
> more fragmented in terms of the languages used, so it might be easier
> for the college board to move to a language-less exam.  The current
> exam is too Java specific.

Beyond college the world is even more fragmented.  At Cadence, our main
language was SKILL (a proprietary variant of LISP).  I've now forgotten
SKILL.  Currently, I need to be familiar, but not proficient in Java and
C.  Soon I may have to learn Perl.  Python will always be my core
language, however.  C also has some nice "down to the metal"
fundamentals you don't get anywhere else.

I don't understand how you get into any depth in CS without a
programming language in which to communicate the fundamental ideas.  Do
you have an example of a "language-less exam" that might sufficiently
test a student's knowledge of CS?

>> Comparing the raw scores might lead to a real awakening.
>
> Scores depend  a lot on a particular teacher and textbook, not so much
> on the language.  The remaining AP CS exam is not very demanding,
> anyway, in terms of writing code that works.

The comparison I would really love to see is an average of the Java
scores vs an average of the Python scores.  These would be averages over
all teachers and all textbooks.  Assuming the choice of problems is
really our best consensus on what is important, this could be a good
measure of which language is more "productive".

-- Dave

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Math + Python: reviewing some themes (long)

David MacQuigg
In reply to this post by kirby urner-4
kirby urner wrote:

> I've been hyping "digital mathematics" as a kind of niche marketing
> term, as distinct from "discrete" but is this wise?  
>  
> Per math-thinking-l (another list), I'd say I'm in the distinct
> minority in thinking "digital math" is a good term.  It's unexplored,
> not conservative, whereas discrete math is already accepted and
> entrenched.
>  
> To try going in with some "digital math" is just stacking the deck
> against one's own efforts, increasing the odds against success.  
> Still, we need to call it something.   Computer Math?  Computational
> Math?  Discrete Math?
I would call it "Computational Thinking".  There have been a series of
articles on revising CS curricula in recent issues of Communications of
the ACM.  I recommend the articles by Chris Stephenson and Peter Denning
(December 2009).

> 3.d OBJECTS FIRST?
> ====================
>  
> Sorry this is being so long.  Let me just end with another take on the
> "objects first" approach.
>  
> In order to make Python more accessible and the mathematics
> correspondingly easier, we begin with very simple classes based around
> animals (e.g. the Turtle class).  We encourage thinking about animals,
> their attributes and behaviors.  Only later on will we try our had at
> more generic "math objects" such as Rational Numbers.
>  
> MFTDA actually includes a Rational number class, but doesn't give it
> much focus.  It seems to be the only class definition in the entire
> text.  I think this maybe mirrors an attitude among CS professors that
> classes and objects are an advanced 2nd year topic.
>  
> My own view is somewhere in between:  I think a full blown treatment
> of OO, including abstract classes, metaclasses, multiple inheritance,
> is indeed advanced and probably not suitable for a one year or half
> year high school math course.
>  
> Or, if suitable, then mostly in the form a really primitive examples
> of the Foo and Bar class variety, more to communicate the generic
> design patterns and concepts than to develop full blown computer
> programs such as one might use in production environments.
>  
> What examples do teachers wish to contribute?  What would be a good
> introductory example of multiple inheritance I wonder?  I recall David
> MacQuigg sharing some examples where __mro__ (method resolution order)
> made an appearance.

MRO was an advanced topic in an advanced chapter on OOP, not anything I
would include in an introductory course.  In fact, I wouldn't even make
OOP a special topic.  It's just the most natural way to solve a lot of
problems.  Students should be *using* objects (lists, etc.) from day 1.  
Then, if there is time later in the course, I would show how to *design*
objects.  Even then, you really don't have to say much about
inheritance, polymorphism, abstract classes, MRO, and all the stuff that
professional programmers will get in later courses.

The thing you want to avoid is having students think "What is this
crap?"  That's sometimes necessary in math.  You can't appreciate the
utility of eigenvectors until you understand them.  It's totally
unnecessary in programming.   Let real-world examples lead the way.  If
you can't start with a simple example where multiple inheritance is
needed, don't even introduce the topic.

> http://wikieducator.org/User:Macquigg  (I recommend reading Dr.
> Macquigg's excellent testimonial here, with a link to his PyWhip).

PyWhip is the tool that is needed by math and science teachers who want
to use computation in their classes, but feel uncomfortable trying to
teach programming.  It will include problems in chemistry, physics,
calculus, whatever someone wants to contribute.  All a teacher has to do
is stay one step ahead of the students.  Anyone capable of teaching
science or math can do that.

Unfortunately, our grand plans have been stalled for lack of a volunteer
web programmer who can finish the hardest part of the job - the last
10%.  We are considering applying for a grant, so we can hire a
professional.  I wish I had more time.  Google App Engine, Django,
Web2py... it all looks very interesting.

> So yes, the CS professors are right.  A full blown intro to classes is
> too much to start off with.

Actually, CS professors, as a group, are more likely to want "full
blown" tailored to the needs of future programmers.  Us industry types
are more likely to say "Screw this.  I can write all the programs I need
in BASIC and C."  That was my attitude from when I first learned about
OOP (1992) until discovering Python (2002).  This was not for lack of
trying.  I read a book on C++, and concluded that a better name would
have been C--.

> The idea, then, is to build some awareness of classes and objects
> using familiar analogies relating to every day life.  A class
> definition is a blueprint (one needs to explain "blueprint" -- design,
> plan) whereas an instance of the class has it's own place in memory,
> its own "self" as it were (intro to Python "self" syntax).
>  
> Do some animal classes.  Then note how dot notation is what's used to
> access the attributes and behaviors of a user-defined object.
>  
> Then note how Python's primitive objects are likewise instances of
> various classes (e.g. the List class).
>  
> It's dot notation itself that we're hoping to make second nature
> (familiar, not too arcane).
>  
> 3.e  THE TIME DIMENSION
> ====================
>  
> That's the breakthrough in understanding we're seeking:  brief anatomy
> lessons with user-defined classes provide enough background to anchor
> an understanding of built-in classes and objects.  It's really "dot
> notation" itself that we're seeking to anchor here.  noun.verb(args)
> and noun.adjective provide a primitive grammar or logic.

I would use built-in objects first, then user-defined.  Students should
be very comfortable with dot notation before we even suggest that you
can do more than just use the built in objects in Python.  To introduce
dot notation, I would just show examples.  It's kind of like learning to
have a simple conversation in Spanish ("Hola, Isabel.  Como esta!!)
before studying the grammar, or even learning the vocabulary.

See the section "Elegant Python" in
http://pywhip.appspot.com/static/help/Using_Python.htm.  A student's
first encounter with dot notation will be the line:

    workset.append(n)    # append n to the workset

Other than that comment, and a prior statement:  "... see if you can
understand how this function works.  Practice using the dir() and help()
functions on list objects and their methods.", there is no explanation
of this grammar.  It's just a convenient way to say something  Later, in
http://pywhip.appspot.com/static/help/Strings.txt we talk a little more
about the grammar, and the equivalence of two different notations:

     >>> len('abcde')     # same as 'abcde'.__len__()

Putting too much emphasis on a topic can actually make it harder to
understand.  I remember struggling with lambda functions for quite a
while, even wasting time in a discussion of lambda calculus, then
realizing it was nothing but a trivial bit of syntax, and I really
wasn't missing something important.

Gary has a good point that we may be still putting too much emphasis on
"objects first".  It's got me thinking whether I need to rewrite that
section in Using_Python where I show that 2 is an object.  The
fundamental point of this section is Python's unique relationship
between variables and objects.  The rest is anecdotal.  Anecdotal
information can distract from the main point.

PyWhip will have the ability for a teacher customize everything -
problem sets, help files, whatever is needed for a particular group of
students.  When a student logs in, he will see exactly what his teacher
intends him to see.  The help files referenced above may be too brief
for high school students.  My target audience is technical professionals
who already know how to write a program, perhaps in BASIC.  I encourage
others to submit alternatives better suited to whatever background your
students may have.

-- Dave
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

Maria Droujkova
In reply to this post by David MacQuigg
On Mon, Jan 25, 2010 at 11:50 PM, David MacQuigg <[hidden email]> wrote:
Litvin wrote:
AP is driven by colleges.  The AP exam used to be in C++ until 2003.  The current exam has heavy emphasis on OOP.  It took a tremendous effort to retrain HS teachers from C++ to Java/OOP...  If the college board decided that Python is used at most colleges in intro CS courses, they would eventually move.

Why does the AP test have to be offered in just one language?  Why do we need to make a "tremendous effort" to move teachers from one language to another?  Couldn't every school-district make it's own choice of language? 

The goal of the whole standardized testing movement is to compare people from different educational backgrounds on the basis of some universal standards. The way this fascinating and potentially creative problem is currently approached mathematically is to create not just universal STANDARDS for the content, but universal CONTENT. This makes it easy to show that the comparison formulas and norms work. For example, in this thread people said Python is two to five times more effective for them than Java. Well, the ancient test-norming math won't have any of that, and to the best of my knowledge, people have not done any concerted theoretical development in that area for the last fifty years at the very least. Why work on that complex task, when the same content for everybody can be mandated through test monopolies, trivializing the norming problem?

Standardized tests as we know them aren't suited for any pluralism within one area, by their very design. Multisubculturalism has happened too recently to be taking seriously, I guess.

At the other end of the spectrum, we have extremely open-ended interviews a-la, "Why are manholes round?" http://en.wikipedia.org/wiki/Manhole_cover#Circular_shape

What we seem to want is something in-between. I hope my note shows some of the conceptual and administrative challenges involved in this, much-needed, change.

Cheers,
Maria Droujkova
http://www.naturalmath.com

Make math your own, to make your own math.


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Could there be a new test, call it AP something else?

Litvin-2
In reply to this post by David MacQuigg
At 11:50 PM 1/25/2010, David MacQuigg wrote:
Why does the AP test have to be offered in just one language?  Why do we need to make a "tremendous effort" to move teachers from one language to another?  Couldn't every school-district make it's own choice of language?  Do colleges really expect specific training in a particular language?

Dave,

The College Board is a huge bureaucracy and operates as such.  I am not associated with them in any way but I do follow closely what they do in CS.  My intention was not to defend their policies or procedures, but simply to state some facts of life.  My wife (and co-author) is a College Board "consultant" for New England, which means she conducts workshops and summer institutes for teachers -- she's taught hundreds of teachers.  She has been grading AP exams for 13 years, and was on the College Board's "ad hoc committee for teacher professional development in Java."  The fact that such a committee was set up speaks for itself.

High school CS teachers -- and I've met many of them, personally and via email -- are not professional programmers.  They don't spend their days studying new languages or programming tools.  Some have experience working in the industry; most have no CS degree and are self-trained.  Many also teach math.  Some take a week-long summer course and that's their whole preparation from scratch for teaching an AP CS class in September.  It is not easy for an average teacher to quickly learn a new programming language or methodology.  The following quote from today's ap-compsci listserv gives a little history:
The first APCS exam was in 1984; Pascal was the language used.  In 1999 the language was switched to C++; in 2004, the language was switched to Java.
My impression is that AP doesn't contemplate language switches lightly; as you can see, Pascal was the language of use for fifteen years.  The process to switch over from Pascal to C++ took a full five years, when you look at the development of the exam, instructional materials and training for teachers, case study, and so on.  In one of those weird little quirks of history, Java blossomed onto the scene in the middle of that transition ... my sense from what I've heard is that APCS would've moved straight to Java if it could have, but the move to C++ was underway too far to attempt to redirect that change.  Gratefully, the transition from C++ to Java wasn't nearly as difficult, with both languages being object-oriented and sharing common syntax.
Jim Huggins, Kettering University, Flint MI
Gary Litvin
www.skylit.com

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Math + Python: reviewing some themes (long)

kirby urner-4
In reply to this post by David MacQuigg
On Tue, Jan 26, 2010 at 2:53 AM, David MacQuigg <[hidden email]> wrote:
> kirby urner wrote:
>>
>> I've been hyping "digital mathematics" as a kind of niche marketing term,
>> as distinct from "discrete" but is this wise?   Per math-thinking-l (another
>> list), I'd say I'm in the distinct minority in thinking "digital math" is a
>> good term.  It's unexplored, not conservative, whereas discrete math is
>> already accepted and entrenched.

...

>
> I would call it "Computational Thinking".  There have been a series of
> articles on revising CS curricula in recent issues of Communications of the
> ACM.  I recommend the articles by Chris Stephenson and Peter Denning
> (December 2009).
>

Thx for the pointer!

INTERNATIONALIZATION
===================

Singapore Math, popular among home schoolers / scholars, has been explicitly IT-friendly for a long time and I'm wondering if something more like MFTDA will be issuing forth from that corner.  Wouldn't surprise me. 

A Japanese equivalent might base itself around Ruby for coding but otherwise seem somewhat similar. 

Phillips Academy is a pace-setter, not unlike West Point, so I'm sure this curriculum is getting eyeballed by education experts overseas (if they're doing their jobs).

I've been sharing it around the Portland for sure, and we're quite the cosmopolitan hub, news spreads...

I just think "digital math" (whatever we call it) is hovering in the global Zeitgeist these days, MFTDA another harbinger, a positive sign on the horizon.

Over on math-teach today, we're getting links like this one:

http://www.dougengelbart.org/home-page/welcome-to-the-bootstrap-alliance.html

It's not like Seymour Papert or Doug Engelbart wree born yesterday or anything.  It's just that NCTM is finally taking more interest in Web 2.0 and such topics.

http://nctmconference.blogspot.com/2009/04/blogs-tweets-and-web-20.html

http://www.slideshare.net/mcleme4419/eclips-nctm-boston-secondary

etc.

>> 3.d OBJECTS FIRST?
>> ====================

....

>>  What examples do teachers wish to contribute?  What would be a good
>> introductory example of multiple inheritance I wonder?  I recall David
>> MacQuigg sharing some examples where __mro__ (method resolution order) made
>> an appearance.
>
> MRO was an advanced topic in an advanced chapter on OOP, not anything I
> would include in an introductory course.  In fact, I wouldn't even make OOP
> a special topic.  It's just the most natural way to solve a lot of problems.

In my view, the promise of OO, starting with Smalltalk, was to mirror a way we already think. 

The word "object" does not belong to computer science originally, but to ordinary language. 

Dot notation is supposed to be expressive because we're *not* trying to inculcate some inner circle knowledge of computer internals, memory management, garbage collection. 

We're just leveraging what's already a feature of ordinary thought patterns.

Lesson plan:

===

Student A comes to the front of the room, writes a few commands on the white board she is willing to obey....

>>> carla.walk(10)

>>> carla.say("Hello")

>>> carla.dance_move(1)

Student B holds a pointer, and in response to requests (raise hands, polling), points to a requested action.  Student A carries out the requested behavior.

Kids who've played Sims already know the drill.  We're talking about puppets.  There's no computer anywhere in this picture, just dot notation and a way of triggering behaviors.

Followup:

Get volunteers A, B, C in front of the room and have a wadded up piece of paper as an argument.  Call that a "message object" and have commands for passing it:

>>> carla.has_message
True

>>> carla.pass_message(jim)

>>> carla.has_message
False

>>> jim.has_message
True

etc.
===

BIOLOGY FIRST
================

>  Students should be *using* objects (lists, etc.) from day 1.  Then, if
> there is time later in the course, I would show how to *design* objects.
>  Even then, you really don't have to say much about inheritance,
> polymorphism, abstract classes, MRO, and all the stuff that professional
> programmers will get in later courses.
>

My preferred technique, described over the years as "cave painting" involves putting something rather simple on the screen.  Walk through a Dog and Monkey class, then show how you might move the digestive tract methods, eat and poop (stomach a list) to the Mammal class and inherit. 

This is just a language game and doesn't have to be that intimidating.  Biology is already cram packed with this inheritance metaphor, is where I'd argue CS got it in the first place. 

If the objective is to teach STEM subjects (the buzz word), then we might as well appeal directly to the biology teachers at this point, suggest they leverage the Python knowledge students are getting down the hall, in their math classes, to reinforce the idea of genetic inheritance and species differentiation.

In sum, I think the best way to teach OO is not make it *not* a strictly computer science topic, but just a science topic more generally. 

Something like full blown UML would be overkill, but if your job is to design an airport, or manage one, it makes perfect sense to ask "what are the objects I need to be dealing with, and what are their attributes and behaviors." 

Runways, airplanes, control tower, concourse, baggage carousels, parking garage, fuel tanks, snack and gift shops.... we don't have to spend a lot of time on any one institution, and we don't have to write even a single line of code if that's not what we're into.

The idea is to have students look at a knowledge domain and start analyzing it in terms of objects, as a prelude to problem solving.  Don't need a computer.


> The thing you want to avoid is having students think "What is this crap?"
>  That's sometimes necessary in math.  You can't appreciate the utility of
> eigenvectors until you understand them.  It's totally unnecessary in
> programming.   Let real-world examples lead the way.  If you can't start
> with a simple example where multiple inheritance is needed, don't even
> introduce the topic.

Yes, let real-world examples lead the way, I fully agree.

Back to "cave paintings" -- you get something simple projected, like 20 lines of Python to implement Dog and Monkey as inheriting from Mammal, and then you talk in a more story-like mode about how today's programming languages come pre-equipped with these "foundation classes" or "libraries" that mirror biological ecosystems.  They're huge and offer vast resources, if you know how to tap them.

You have all these lineages, tree structures, where objects inherit the capabilities of ancestor objects, sometimes more than one.

AROUND THE CAMPFIRE MATH
=========================

Why story-like mode hardly happens in math class today is students get all fidgety if they think this will be on the test.  And if it's not going to be on the test, then why listen?   

This idea of "around the campfire" storytelling, where you're simply explaining how things work, giving as spell-binding an account as possible, maybe showing a movie (like 'Warriors of the Net' re tcp/ip) is just not a feature of most math classes today. 

That's part of what's broken about our K-12 pipeline.  The dry technicalities have taken over at the cost of not teaching anything much about the real world. 

The "stories", insofar as we have any, feature in "story problems" and are typically empty of real content by design. This was one of my topics at us.pycon 2009, co-presented with Steve Holden (PSF chairmain).

In the vocabulary of mathematics, a "cave painting" is a homomorphism more than an isomorphism (a fancy way of saying it's a structure-preserving analogy that drops a lotta details, but suggests them)

>
>> http://wikieducator.org/User:Macquigg  (I recommend reading Dr. Macquigg's
>> excellent testimonial here, with a link to his PyWhip).
>
> PyWhip is the tool that is needed by math and science teachers who want to
> use computation in their classes, but feel uncomfortable trying to teach
> programming.  It will include problems in chemistry, physics, calculus,
> whatever someone wants to contribute.  All a teacher has to do is stay one
> step ahead of the students.  Anyone capable of teaching science or math can
> do that.

This is a grand vision, grander than I'd realized. 

Crunchy is in the same genre perhaps? 

A lot depends on what's in the repository.  Some projects separate framework from content, so you could get help with the framework as open source, yet still have content behind a course-related repository that requires student login? 

PyWhip installations could spread all over the place, but we'd only see the public ones unless we enrolled in the right courses (same model as Python itself -- a lot of it we just don't hear about, because it's too busy making a profitable contribution to some secret government project or some Hollywood movie).

>
> Unfortunately, our grand plans have been stalled for lack of a volunteer web
> programmer who can finish the hardest part of the job - the last 10%.  We
> are considering applying for a grant, so we can hire a professional.  I wish
> I had more time.  Google App Engine, Django, Web2py... it all looks very
> interesting.

You've considered making it an open source project?  Or is it already?

>
>> So yes, the CS professors are right.  A full blown intro to classes is too
>> much to start off with.
>
> Actually, CS professors, as a group, are more likely to want "full blown"
> tailored to the needs of future programmers.  Us industry types are more
> likely to say "Screw this.  I can write all the programs I need in BASIC and
> C."  That was my attitude from when I first learned about OOP (1992) until
> discovering Python (2002).  This was not for lack of trying.  I read a book
> on C++, and concluded that a better name would have been C--.

MORE AUTOBIO
==============

Yeah.  My trajectory was as an xBase programmer, writing code for a multi-warehouse food bank, keeping various membership-based nonprofits happy (my specialty was nonprofits and local government). 

Then Microsoft bought FoxPro to compete with Borland, which bought dBase.  MSFT migrated xBase to Windows, then converted it to an object-oriented language, quite a bit better than Visual Basic IMO.  I ended up in the cardiac operating room about then, coding for heart surgeons.

Some "object oriented" languages give you dot notation and ways to use objects, but precious little syntax for rolling your own. 

xBase, in the form of Visual FoxPro, had inheritance and all the rest of it. 

When I got to Python by way of Java, I was already an experienced OO guy in a practical sense, though Java / Python helped catch me up on the theory (I read a lot of Bruce Eckel's stuff).

> I would use built-in objects first, then user-defined.  Students should be
> very comfortable with dot notation before we even suggest that you can do
> more than just use the built in objects in Python.  To introduce dot
> notation, I would just show examples.  It's kind of like learning to have a
> simple conversation in Spanish ("Hola, Isabel.  Como esta!!) before studying
> the grammar, or even learning the vocabulary.

TEACHER-DEVELOPED CURRICULA
===============================

Yes, back to my demo in front of the room.

Hard to think of a much better intro to dot notation that simply using a turtle. 

In the original Logo, you didn't have a receiver i.e. FORWARD 10 was about "the turtle" and there was only one.  In fact, the very first turtle was an actual robot, more like Lego Mindstorms CRX brick, or whatever they're calling it today.

Today though, our turtles are explicit, easy to have more than one.  OO includes the concepts of birth and death i.e. an object has a life span.  Temporality is important.

In the brainstorming I'm doing, we actually attempt to avoid dictating the best pedagogy. 

Our attitude is teachers know their own students best, and plus won't want to teach what they don't comprehend.  So the teacher trainers run through all these techniques, including Objects First, but then they don't say "you must do this".  It's more like "here's a practice, a style, which some are using, up to you if you wanna."  Teachers actually appreciate getting to make a final judgment for themselves.

Maria Droujkova and Anna Roys have helped me become more attuned to the emerging subcultures of collaboration among teachers.  Once you get cyberspace into the picture, it changes not only course content, but how teachers want to develop that content. 

They chafe and complain if you insist they use just these or those resources. 

Innovating new content becomes part of their responsibility, in collaboration with peers, including internationally.  Like I'm working with this guy in Indonesia...

>
> See the section "Elegant Python" in
> http://pywhip.appspot.com/static/help/Using_Python.htm.  A student's first
> encounter with dot notation will be the line:
>
>   workset.append(n)    # append n to the workset
>
> Other than that comment, and a prior statement:  "... see if you can
> understand how this function works.  Practice using the dir() and help()
> functions on list objects and their methods.", there is no explanation of
> this grammar.  It's just a convenient way to say something  Later, in
> http://pywhip.appspot.com/static/help/Strings.txt we talk a little more
> about the grammar, and the equivalence of two different notations:
>
>    >>> len('abcde')     # same as 'abcde'.__len__()
>
> Putting too much emphasis on a topic can actually make it harder to
> understand.  I remember struggling with lambda functions for quite a while,
> even wasting time in a discussion of lambda calculus, then realizing it was
> nothing but a trivial bit of syntax, and I really wasn't missing something
> important.

Yes, good point. 

We want OO to be intuitive, non-intimidating.

Starting with some "unplugged" approach (per New Zealand), doing OO and dot notation externally to any computer language, might be the way to go in some lesson plans (per above examples, many others we could brainstorm).

Exercise:  script out your day so far, since getting up, in terms of dot notation:

Example:

>>> alarm_clock.ring()
>>> carla.awake
True
>>> carla.needs_coffee
True
>>> coffee_maker.add("grounds")
>>> coffee_maker.add("water")
>>> coffee_maker.start()
>>> coffee_maker.done
False
>>> carla.brush_teeth()
>>> carla.get_dressed()
>>> coffee_maker.done
True
>>> carla.drink("coffee")
....

OK to be loose with the syntax, just getting ideas across.  Looks like Python but there's no computer turned on.

>
> Gary has a good point that we may be still putting too much emphasis on
> "objects first".  It's got me thinking whether I need to rewrite that
> section in Using_Python where I show that 2 is an object.  The fundamental
> point of this section is Python's unique relationship between variables and
> objects.  The rest is anecdotal.  Anecdotal information can distract from
> the main point.
>

My attitude in presenting an "objects first" option (note *option*) would be to emphasize how we already know how to think in terms of objects, including the inheritance part, and we don't want any silly computer language to get in our way, obscuring what we already know. 

Computer languages should be expressive in helping us think more like we do already.  They're here to serve us, not the other way around.

Back to storytelling mode:  no problemo talking about these "different paradigms" and how computer languages have evolved.  If students think they're allowed to just listen to stories, like on Discovery Channel, they'll relax and do so. 

But the climate today (in many schools) is too high anxiety because either

(a) what the teacher is saying is going to be on the next test, or

(b) there's no point listening. 

That's a killer.  Subcultures that box themselves in this way are not likely to have much of a half life. 

Without shared lore, shared stories, there's no glue and no culture.

When I start teaching Python to a new group, I start talking about PEPs, about how the language evolves, about the subculture.  I want them to have this notion of geeks around the world all collaborating, working together. 

Like I go to that Wiki page Carl has been working on and show how we're starting to see code that's very "not Latin-1" in appearance. 

There's a cosmopolitan flavor, right from the start. 

If they haven't seen one Chinese character by the end of the first week, I've done something wrong (by my own lights -- YMMV).

> PyWhip will have the ability for a teacher customize everything - problem
> sets, help files, whatever is needed for a particular group of students.
>  When a student logs in, he will see exactly what his teacher intends him to
> see.  The help files referenced above may be too brief for high school
> students.  My target audience is technical professionals who already know
> how to write a program, perhaps in BASIC.  I encourage others to submit
> alternatives better suited to whatever background your students may have.
>
> -- Dave
>

Noted.

I hope we don't get too hung up on Objects First versus Objects Later, as I think the situation on the ground is always going to be somewhat diverse. 

For example, it's easy for me to imagine MFTDA getting used as a 2nd year course on our Oregon DM track (discrete math track), once we've successfully piloted a course that has no AP objectives, isn't considered early college.  Prep for the new math course might use MFTDA in teacher trainings though, i.e. as the math teacher, you want that on your shelf (along with Zelle's, a few others).

We have many high caliber schools that could go the MFTDA right away, too (it's not either/or).  Just saying:  if DM is about bridging the digital divide, then it has to meet student needs at various levels. 

That's the challenge in a nutshell.  We want to rescue something broken. 

Math content in Oregon is 10-20 years behind the times and we need to administer "future shock therapy" in ways that don't simply exacerbate the currently untenable situation.

That's a focus around here, even as we're talking Python for a language.  We're catering to "math refugees" who are seriously considering dropping out of high school completely.

My work with the Hillsboro Police Department, which had Linux labs for immigrant children, was along these lines.

According to one scenario, students taking the next course in sequence and using the Litvins' text, will already have at least of semester of Python behind them, maybe more. 

This will change the character of the presentation, but not that drastically, as we're already used to a lot of repetition in mathematics i.e. each successive year goes back over some of the fundamentals.

So we might do more with operator overloading then? 

MFTDA is purposely light on that topic, whereas I'm into __ribs__ galore (a veritable snake BBQ seems like).

I like to rush into operator overloading because I want students to start generalizing about addition and multiplication, and what better way than to have these different objects doing those things in their own special ways -- but with commonalities.

You get a more "abstract algebra" sensibility that way.  We do more with group, ring and field, simply because Python makes everything so concrete, so hands-on. 

"Group theory for children" was a movement in the 1960s I think it was.  Perhaps it's time to resurrect that?  We shall see.

One of Maria's from last year:
http://www.mail-archive.com/edu-sig@.../msg05186.html

Kirby


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Math + Python: reviewing some themes (long)

kirby urner-4
On Tue, Jan 26, 2010 at 3:20 PM, kirby urner <[hidden email]> wrote:

In sum, I think the best way to teach OO is not make it *not* a strictly computer science topic, but just a science topic more generally. 


Messed that one up eh?

Make it *not* a strictly computer science topic...

So you've all heard this joke....

Professor:  interestingly, a double negative constitutes a logical positive, as in "not no" or "not not", however we have no expression in English where a double positive denotes a negative.

Student in the back, sarcastically:  Yeah, right.

Kirby

PS:  I'm a huge fan of Java by the way, in the hands of a skilled coder such as Gerald de Jong:

http://www.darwinathome.org/blog/2010/01/26/Tensegrity-Sphere-Movie.html



_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
12