Setting a variable's value
I don't believe in adding special notation specifically designed for beginner's sake - even though I am dedicated in making Python as easy to learn as possible.
André
Right. Also, math notations which went to the trouble to be self-executing on a machine (like APL), in some sense deserve our respect for their precision and consistency. Maybe it's plain old, non-executing (dead) algebra that should change. Phase in Python notation much earlier and discuss the old pre-Python use of the assignment operator as "from a different namespace" (perhaps deprecated). Just because a bunch of oldies used typography the way they did, doesn't mean we have to warp everything we do in future to be backward compatible. I look at self-executing math notations as defining a cutting edge, not as poor imitators of some obsolote text book way of doing things. In fact, why do we teach "algebra" at all in the old fashioned sense? In my view, tackling this set of topics without a computer language is indefensible except in cases where some invading/conquering power has an agenda of keeping the kids dumb (in which case, the *real* schools have to go underground, as is happening in the USA). Kirby
-Winston
______________________________________________________ winston wolff - (646) 827-2242 - http://www.stratolab.com learning by creating - video game courses for kids in new york
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
How timely! I just finished teaching this exact nuance to my 9th graders an hour ago! We began by assigning strings, floats, and integers to a set of variables to demonstrate how variables different from Algebra to Python. When it came to = vs. ==, it was easy to reference the earlier work and say, "Here's another place where Python and your Algebra notation differ." I heard no complaints and only saw one or two errors in students' code. I have to admit that := seems more confusing as it looks a lot like comparison operators >=, <=, and !=. (Plus, it chills the Pascal in my bone marrow!) Kevin On 5/11/06, kirby urner <kirby.urner@gmail.com> wrote:
I don't believe in adding special notation specifically designed for beginner's sake - even though I am dedicated in making Python as easy to learn as possible.
André
Right.
Also, math notations which went to the trouble to be self-executing on a machine (like APL), in some sense deserve our respect for their precision and consistency.
Maybe it's plain old, non-executing (dead) algebra that should change.
Phase in Python notation much earlier and discuss the old pre-Python use of the assignment operator as "from a different namespace" (perhaps deprecated).
Just because a bunch of oldies used typography the way they did, doesn't mean we have to warp everything we do in future to be backward compatible.
I look at self-executing math notations as defining a cutting edge, not as poor imitators of some obsolote text book way of doing things.
In fact, why do we teach "algebra" at all in the old fashioned sense?
In my view, tackling this set of topics without a computer language is indefensible except in cases where some invading/conquering power has an agenda of keeping the kids dumb (in which case, the *real* schools have to go underground, as is happening in the USA).
Kirby
-Winston
______________________________________________________ winston wolff - (646) 827-2242 - http://www.stratolab.com learning by creating - video game courses for kids in new york
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
On 5/11/06, kirby urner <kirby.urner@gmail.com> wrote:
Maybe it's plain old, non-executing (dead) algebra that should change.
Phase in Python notation much earlier and discuss the old pre-Python use of the assignment operator as "from a different namespace" (perhaps deprecated).
Just because a bunch of oldies used typography the way they did, doesn't mean we have to warp everything we do in future to be backward compatible.
I look at self-executing math notations as defining a cutting edge, not as poor imitators of some obsolote text book way of doing things.
In fact, why do we teach "algebra" at all in the old fashioned sense?
In my view, tackling this set of topics without a computer language is indefensible except in cases where some invading/conquering power has an agenda of keeping the kids dumb (in which case, the *real* schools have to go underground, as is happening in the USA).
Kirby
This is beautifully put, so much so that I had to forward it to my wife (who's not a pythonista, but in Education). So much to think about here in such a short email. I know this is basically the gist of what you've been talking about for some time, Kirby, but this is such a succinct way of putting it that I'm in awe, and inspired. My kids haven't gotten to algebra in school yet, but were introduced to it in the "Reader Rabbit" edutainment software from a very young age. Now I'm thinking how to move that style of teaching into a more interactive, self-directed tool incorporating python. Hmmm. --Dethe
On Thursday 11 May 2006 09:18, kirby urner wrote:
I don't believe in adding special notation specifically designed for beginner's sake - even though I am dedicated in making Python as easy to learn as possible.
André
Right
Agreed. But I personally feel that = for assignment _is_ a bad idea, precisely because it does conflict with an older, equally valid, completely entrenched, and closely related uses of this symbol. One of the most common mistakes I still see (and make) is using = in conditions where == is needed. At least that's a syntax error in Python. The use of = is a poor desgin decision made by earlier languages and then borrowed by Python. I can live with it, but it's still a mistake.
.
Also, math notations which went to the trouble to be self-executing on a machine (like APL), in some sense deserve our respect for their precision and consistency.
Maybe it's plain old, non-executing (dead) algebra that should change.
Give me a break here. If Python had used + to mean subtraction, would you say that's not a design flaw even though + means addition everywhere else in the world? That's just silly. = means equality, always has and always will in mathematics. Why should that change?
Phase in Python notation much earlier and discuss the old pre-Python use of the assignment operator as "from a different namespace" (perhaps deprecated).
Just because a bunch of oldies used typography the way they did, doesn't mean we have to warp everything we do in future to be backward compatible.
I look at self-executing math notations as defining a cutting edge, not as poor imitators of some obsolote text book way of doing things.
But self-executing is not the same as self-manipulating. Algebra is much more a symbolic activity than it is a numeric activity. We should use notations for algebra that best lend themselves to algebraic manipulation, not those that are necessarily best for computing results.
In fact, why do we teach "algebra" at all in the old fashioned sense? Because you need to be able to do algebra to figure out how to write (good) code. It doesn't matter much what system is interpreting that code.
In my view, tackling this set of topics without a computer language is indefensible except in cases where some invading/conquering power has an agenda of keeping the kids dumb (in which case, the *real* schools have to go underground, as is happening in the USA).
I fear the day that my students have no exposure to algebra outside of the sphere of computer programming. I agree with Kirby that teaching with a programming approach can be a great complement to traditional approaches, but I don't think that work on the computer produces the exact same skill set, especially pattern recognition and symbolic thinking, that plain old algebra and geometry do. Good geometry students make good programmers. --John -- John M. Zelle, Ph.D. Wartburg College Professor of Computer Science Waverly, IA john.zelle@wartburg.edu (319) 352-8360
On 5/11/06, John Zelle <john.zelle@wartburg.edu> wrote:
On Thursday 11 May 2006 09:18, kirby urner wrote:
I don't believe in adding special notation specifically designed for beginner's sake - even though I am dedicated in making Python as easy to learn as possible.
André
Right
Agreed. But I personally feel that = for assignment _is_ a bad idea, precisely because it does conflict with an older, equally valid, completely entrenched, and closely related uses of this symbol. One of the most common mistakes I still see (and make) is using = in conditions where == is needed. At least that's a syntax error in Python. The use of = is a poor desgin decision made by earlier languages and then borrowed by Python. I can live with it, but it's still a mistake.
I think = was the most obvious single-character candidate, and in the interests of economy was chosen to keep Python spare, just like we don't need curly braces or semi-colon line endings, and enjoy complaining about some extraneous syntactic sugar colons scattered here and there. Also, let's admit it, mathematicians enjoy a lot of ambiguity in their notations, given the high end hardware they get to take for granted, and have allowed their equal sign to double as an assignment operator when convenient. They say "let x = expression" which 'let' actually made it over into BASIC (I think BASIC is what happens when you let academic committees design your language: a hodge-podge (which *is* a mistake)).
Also, math notations which went to the trouble to be self-executing on a machine (like APL), in some sense deserve our respect for their precision and consistency.
Mathematica too. You'll find lots of literature about how mathematicians get to be sloppy, given the very high end parsers they could take for granted. *We* know from context whether m(q - 1) is q-1 being passed to function m, or a product of two multiplicands, m and (q-1). But Mathematica had to disambiguate within its most dogmatic formalisms -- with an option to output in "sloppy" for the benefit of the computer ignorant..
Maybe it's plain old, non-executing (dead) algebra that should change.
Give me a break here. If Python had used + to mean subtraction, would you say that's not a design flaw even though + means addition everywhere else in the world? That's just silly. = means equality, always has and always will in mathematics. Why should that change?
As I've said, it's polymorphic in mathematics as well. But yes, point granted, some mappings of ASCII to common math operations would have been subgenius, such as using & for division (although J, unlike most languages, does use %, since / was already taken).
Phase in Python notation much earlier and discuss the old pre-Python use of the assignment operator as "from a different namespace" (perhaps deprecated).
Just because a bunch of oldies used typography the way they did, doesn't mean we have to warp everything we do in future to be backward compatible.
I look at self-executing math notations as defining a cutting edge, not as poor imitators of some obsolote text book way of doing things.
But self-executing is not the same as self-manipulating. Algebra is much more a symbolic activity than it is a numeric activity. We should use notations for algebra that best lend themselves to algebraic manipulation, not those that are necessarily best for computing results.
And that would be Mathematica. So we already know: standard text book algebra notation failed the reality check. It wasn't good enough. A more formal, more rigorous notation was needed. Ergo my point: I don't look to mathematicians to tell me how to write math, but to computer scientists such as Kenneth Iverson. Although sure, I'll take suggestions from math PhD peanut gallery. But face it, most of them don't accept dot notation as a valid extension of mathematics (sheesh) and still think propositional calculus and modal logic are more important formalizations than OO -- mainly because they can't take a lot of credit for OO. Very peevish of them, and our kids suffer: no OO in K-12, but still lots of creaky old set theory (but minus its key application in SQL). An ugly situation. I have falling respect for the math teaching guild (well documented).[1]
In fact, why do we teach "algebra" at all in the old fashioned sense? Because you need to be able to do algebra to figure out how to write (good) code. It doesn't matter much what system is interpreting that code.
In my view, tackling this set of topics without a computer language is indefensible except in cases where some invading/conquering power has an agenda of keeping the kids dumb (in which case, the *real* schools have to go underground, as is happening in the USA).
I fear the day that my students have no exposure to algebra outside of the sphere of computer programming. I agree with Kirby that teaching with a
I fear the status quo much more.
programming approach can be a great complement to traditional approaches, but I don't think that work on the computer produces the exact same skill set,
Exactly. The "exact same skill set" is what we *don't* want to propagate. Not useful at this time. Need different skill sets, the sooner the better. Silicon Forest talking.
especially pattern recognition and symbolic thinking, that plain old algebra and geometry do. Good geometry students make good programmers.
--John
Good computer graphics programmers usually end up being competent in geometry as well. Maybe we should try running the pipeline in reverse for a change, and let technology come first (wow, train kids in the power tools of their own culture, what a concept!)? That's what I'm doing, and I'm getting good results. Kirby [1] For example, just earlier today... http://controlroom.blogspot.com/2006/05/memo-to-math-teachers.html
On Thursday 11 May 2006 16:19, you wrote: <<snip>> We're straying a bit from the original thread here, but I couldn't resist this comment.
Ergo my point: I don't look to mathematicians to tell me how to write math, but to computer scientists such as Kenneth Iverson. Although sure, I'll take suggestions from math PhD peanut gallery.
I believe Iverson used = to mean equals (as God intended it) and used <- (an arrow) to mean assignment. He knew enough not to mess with a perfectly good existing notation :-). --John -- John M. Zelle, Ph.D. Wartburg College Professor of Computer Science Waverly, IA john.zelle@wartburg.edu (319) 352-8360
I believe Iverson used = to mean equals (as God intended it) and used <- (an arrow) to mean assignment. He knew enough not to mess with a perfectly good existing notation :-).
--John
Yes, that's true and apropos. Once you've made the decision to stray from ASCII, a whole new world of custom operators opens up, along with the nightmare of custom keyboards (but hey, Princeton had 'em, and APL was the first computer language I really got to know). In J, the assignment operator is =: although =. is also meaningful (local assignment). = is a comparator. For more on J, see: http://www.4dsolutions.net/ocn/Jlang.html (Iverson himself helped me with this essay). Kirby
For more on J, see: http://www.4dsolutions.net/ocn/Jlang.html (Iverson himself helped me with this essay).
Kirby
Here, I'll declassify one from my inbox, from the late Kenneth to myself: From: Ken Iverson [mailto:kei@interlog.com] Sent: Friday, July 26, 2002 8:32 AM To: Kirby Urner Subject: Re: Jforum: New essay on J in K-12 ----- Original Message ----- From: "Kirby Urner" <urnerk@qwest.net> To: "Ken Iverson" <kei@interlog.com> Sent: Friday, July 26, 2002 3:39 AM Subject: Re: Jforum: New essay on J in K-12
Tim Peters over on edu-sig (a Python list), has given me the most informative pointer thus far:
http://www.cs.unb.ca/~alopez-o/math-faq/node40.html#SECTION00530000000000000 000 In the foregoing, it is remarked that "... you need to use a special technique such as L'Hopital's rule to evaluate them." But much insight can be gained by observing patterns produced by the power function, as shown below. (Tables appear distorted if your browser does not use a monofont such as Courier, but will appear more clearly if re-executed in J) 2^ 2 3 4 NB. Each result is 2 times the preceding 4 8 16 2^5 NB. 2^4 multiplied by 2 32 2^1 NB. 2^2 divided by 2 2 2^0 NB. 2^1 divided by 2 1 2^_1 NB. 2^0 divided by 2 0.5 e=:i:3 NB. A systematic list that includes 0 e _3 _2 _1 0 1 2 3 10^e NB. Shows pattern of powers 0.001 0.01 0.1 1 10 100 1000 0.1^e NB. Related pattern for one-tenth 1000 100 10 1 0.1 0.01 0.001 1r10 ^ e NB. Shows more clearly in rational form 1000 100 10 1 1r10 1r100 1r1000 10r1 ^ e NB. 10r1 is ten 1r1000 1r100 1r10 1 10 100 1000 1r100^ e NB. 1r100^0 remains 1 for obvious reasons 1000000 10000 100 1 1r100 1r10000 1r1000000 1 1r10 1r100 1r1000 ^/ e NB. Table shows approach to 0^0 1 1 1 1 1 1 1 1000 100 10 1 1r10 1r100 1r1000 1000000 10000 100 1 1r100 1r10000 1r1000000 1000000000 1000000 1000 1 1r1000 1r1000000 1r1000000000 1 1r10 1r100 1r1000 0 ^/ e NB. 0^0 works as defined in J 1 1 1 1 1 1 1 1000 100 10 1 1r10 1r100 1r1000 1000000 10000 100 1 1r100 1r10000 1r1000000 1000000000 1000000 1000 1 1r1000 1r1000000 1r1000000000 _ _ _ 1 0 0 0 e ^/ e NB. Table of powers shows pattern _0.037037 0.111111 _0.333333 1 _3 9 _27 _0.125 0.25 _0.5 1 _2 4 _8 _1 1 _1 1 _1 1 _1 _ _ _ 1 0 0 0 1 1 1 1 1 1 1 0.125 0.25 0.5 1 2 4 8 0.037037 0.111111 0.333333 1 3 9 27 e ^/ x:e NB. But rational form shows it more clearly _1r27 1r9 _1r3 1 _3 9 _27 _1r8 1r4 _1r2 1 _2 4 _8 _1 1 _1 1 _1 1 _1 _ _ _ 1 0 0 0 1 1 1 1 1 1 1 1r8 1r4 1r2 1 2 4 8 1r27 1r9 1r3 1 3 9 27 NB. Note the column and the row for the argument 0 (_ denotes infinity)
At the moment, it looks to me the balance is tipped in favor of 0^0 = 1, but I'm seeing this more in the "useful convention" category, and less in the "proved, case closed" category.
To see why this might be more than a useful convention, consider the standard form for a polynomial with coefficients c. (If c has four elements, and if i is 3 2 1 0, this would be expressed in J as +/ c*x^i , and in conventonal notation as Sigma c subscript i x superscript i.) Now try to evaluate the polynomial for the case of x=:0, assuming that 0^0 is undefined.
Kirby
PS: wonder if you've heard of John Conway's suggestion that -1 be admitted as a prime number.
No, but the inclusion of either 1 or _1 as primes would destroy the notion of the unique prime decomposition of numbers. For example: a=:q: 12345 a 3 5 823 */a 12345 1 1 1 1,a 1 1 1 1 3 5 823 */1 1 1 1,a 12345 */_1 _1 1 1,a 12345
participants (4)
-
Dethe Elza
-
John Zelle
-
Kevin Driscoll
-
kirby urner