From kirby.urner at gmail.com Sat Jun 2 16:13:08 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 2 Jun 2018 13:13:08 -0700 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) Message-ID: One of my screen scraper friends (always reading) just forwarded this link: https://www.1843magazine.com/features/code-to-joy A highly literate middle aged writer tackles programming from zero and winds up in Python after a pilgrimmage through Javascript, and uses the Twitter API. He meditates on what learning to code might mean to a fully developed adult such as himself (connects to Andragogy **). Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is very much a hero in this story, living up to the ideal of a Pythonista as (A) not religiously dogmatic (re "language wars") yet (B) having enthusiasm for sharing Python (without too much proselytizing). Bravo on a stellar performance! Quincy Larson of freeCodeCamp fame is another champion of openness and accessibility (and good advice). I get his emails in my inbox with gratitude, though I don't follow all the links (helpfully labeled with estimated reading times, for my internal scheduler -- thanks for the meta-data!). In the interests of sparking some edu-sig type discussion (this could fork to a new thread), the author Andrew Smith writes: "Variables are best (if imperfectly) understood as the vessels within which pieces of data are contained, ready to be worked on. Of many possible data types, the most straightforward are numbers and strings, string being the name given to text." In my classes I readily acknowledge the "variable as container" metaphor is apt, and agree that Python objects take up memory and so object == container (with id) is OK too. However, the name --> object mapping of a namespace is better imagined as "luggage tag -> suitcase" relationship. It's not like the Python name itself is the container on the heap. The object in memory is a possibly fat heavy suitcase, stuffed with stuff (e.g. an HttpResponse). However the name is more a label, like a luggage tag on a suitcase (and this is the point). Name : Object :: Luggage Tags :: Suitcase One suitcase (object) may have many names (connects to garbage collection discussion). However at any one moment, a name points to only one object (the same name in different modules, both running, still count as different names -- scope matters). So yeah, the object itself is a "container" but what it contains may be tags to other objects. Without this separation of "names" from "objects" there's an inevitable tendency to imagine copies, as how can we have two bowls or boxes with exactly the same content. We don't have a visual metaphor for "two suitcases containing exactly the same clothes at the same time". But we do understand "one suitcase having two or more luggage tags." Surely we have two copies, albeit clones of the same thing. Not so in Python though. Python is biased against making gratuitous copies of anything. Keep is spare! (sparse if possible). Don't clutter memory with excessive redundancy. Kirby ** http://4dsolutions.net/presentations/pycon2013.pdf -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Jun 2 16:17:55 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 2 Jun 2018 13:17:55 -0700 Subject: [Edu-sig] Python in 1843 Magazine (was ... Economist (June/July 2018)) Message-ID: ?I stand corrected. *1843 Magazine* is An Economist Group Publication, same as The Economist. COPYRIGHT ? THE ECONOMIST NEWSPAPER LIMITED 2018 ALL RIGHTS RESERVED AN ECONOMIST GROUP PUBLICATION -------------- next part -------------- An HTML attachment was scrubbed... URL: From naomi.ceder at gmail.com Sat Jun 2 16:25:13 2018 From: naomi.ceder at gmail.com (Naomi Ceder) Date: Sat, 2 Jun 2018 15:25:13 -0500 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: It is a lovely article. Andrew Smith was at PyCon and I had dinner with him and Nicholas one evening and also sat down and chatted with Andrew on a couple of other occasions. He's a smart guy and a likable one, and he is very taken with coding in general, Python in particular, and especially the Python community, and he plans to keep going beyond just that article. I fully expect we'll see and hear more of Andrew Smith's adventures with Python over the coming year or two. But you are totally right, Kirby - we've got to get him off of this notion of variables as containers. "Post-its, not buckets" is the way I put it, but I rather like the luggage tag metaphor as well. And for those of us who are geeks "of a certain age" I can also recommend his book Moondust, which is the story of him tracking down and talking to all of the surviving Apollo astronauts in the early 2000's. Cheers, Naomi On Sat, 2 Jun 2018 at 15:13, kirby urner wrote: > > > One of my screen scraper friends (always reading) just forwarded this link: > > https://www.1843magazine.com/features/code-to-joy > > A highly literate middle aged writer tackles programming from zero and > winds up in Python after a pilgrimmage through Javascript, and uses the > Twitter API. He meditates on what learning to code might mean to a fully > developed adult such as himself (connects to Andragogy **). > > Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is very > much a hero in this story, living up to the ideal of a Pythonista as > > (A) not religiously dogmatic (re "language wars") yet > (B) having enthusiasm for sharing Python (without too much proselytizing). > > Bravo on a stellar performance! > > Quincy Larson of freeCodeCamp fame is another champion of openness and > accessibility (and good advice). I get his emails in my inbox with > gratitude, though I don't follow all the links (helpfully labeled with > estimated reading times, for my internal scheduler -- thanks for the > meta-data!). > > In the interests of sparking some edu-sig type discussion (this could fork > to a new thread), the author Andrew Smith writes: > > "Variables are best (if imperfectly) understood as the vessels within > which pieces of data are contained, ready to be worked on. Of many possible > data types, the most straightforward are numbers and strings, string being > the name given to text." > > In my classes I readily acknowledge the "variable as container" metaphor > is apt, and agree that Python objects take up memory and so object == > container (with id) is OK too. > > However, the name --> object mapping of a namespace is better imagined as > "luggage tag -> suitcase" relationship. It's not like the Python name > itself is the container on the heap. > > The object in memory is a possibly fat heavy suitcase, stuffed with stuff > (e.g. an HttpResponse). However the name is more a label, like a luggage > tag on a suitcase (and this is the point). > > Name : Object :: Luggage Tags :: Suitcase > > One suitcase (object) may have many names (connects to garbage collection > discussion). However at any one moment, a name points to only one object > (the same name in different modules, both running, still count as different > names -- scope matters). > > So yeah, the object itself is a "container" but what it contains may be > tags to other objects. > > Without this separation of "names" from "objects" there's an inevitable > tendency to imagine copies, as how can we have two bowls or boxes with > exactly the same content. > > We don't have a visual metaphor for "two suitcases containing exactly the > same clothes at the same time". > > But we do understand "one suitcase having two or more luggage tags." > > Surely we have two copies, albeit clones of the same thing. Not so in > Python though. Python is biased against making gratuitous copies of > anything. Keep is spare! (sparse if possible). Don't clutter memory with > excessive redundancy. > > > Kirby > > ** > http://4dsolutions.net/presentations/pycon2013.pdf > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -- Naomi Ceder @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ https://www.manning.com/books/the-quick-python-book-third-edition -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Jun 2 22:25:29 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 2 Jun 2018 19:25:29 -0700 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: On Sat, Jun 2, 2018 at 1:13 PM, kirby urner wrote: > > > > Name : Object :: Luggage Tags :: Suitcase > ?Fixing this: Names: Object :: Luggage Tags : Suitcase (a ratio of ratios, would show this way it next books in my era, as in "this is to that :: ("as") that is to this other" and so on). I appreciate the Pycon 2018 account / perspective Naomi. Glad to know Andrew was attending in person and is reaping the benefits of joining a subculture / community, not just learning a computer language [ these go together, as most but not all, science fiction writers failed to predict i.e. that computer languages create tribalism in a positive way ]. Tangential remarks: * I just discovered Pyx this morning: http://pyx.sourceforge.net/ * I've made progress using RhinoScript (rs) a Python module compatible with 2.7 that runs inside a CAD system (proprietary, not unlike ESRI Arc* in that regard). * compiling PostGIS version of postgesql on old OSX Yosemite fails in the homebrew recipe, after about 5 hours doing OK. More in blogs happy to yak off-list. Kirby Kirby Kirby ? > > One suitcase (object) may have many names (connects to garbage collection > discussion). However at any one moment, a name points to only one object > (the same name in different modules, both running, still count as different > names -- scope matters). > > So yeah, the object itself is a "container" but what it contains may be > tags to other objects. > > Without this separation of "names" from "objects" there's an inevitable > tendency to imagine copies, as how can we have two bowls or boxes with > exactly the same content. > > We don't have a visual metaphor for "two suitcases containing exactly the > same clothes at the same time". > > But we do understand "one suitcase having two or more luggage tags." > > Surely we have two copies, albeit clones of the same thing. Not so in > Python though. Python is biased against making gratuitous copies of > anything. Keep is spare! (sparse if possible). Don't clutter memory with > excessive redundancy. > > > Kirby > > ** > http://4dsolutions.net/presentations/pycon2013.pdf > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Jun 2 22:31:26 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 2 Jun 2018 19:31:26 -0700 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: > > > > (a ratio of ratios, would show this way it next books in my era > ?[sic]? textbooks e.g. dog : wolf :: cat : tiger (opinions may vary) Final remark: examples of my 'rear view mirror' Jupyter Notebooks used during recent meet-up (#10 of a 10x 4-hour on-line Python course): https://github.com/4dsolutions/Python5/blob/master/PySummary1.ipynb https://github.com/4dsolutions/Python5/blob/master/PySummary2.ipynb https://github.com/4dsolutions/Python5/blob/master/PySummary3.ipynb These try to pack in a lot of what we covered. In retrospect, I gave the keyword 'nonlocal' short shrift and need to address this more completely in future editions. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at nextdayvideo.com Sun Jun 3 08:55:54 2018 From: carl at nextdayvideo.com (Carl Karsten) Date: Sun, 3 Jun 2018 07:55:54 -0500 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: > But you are totally right, Kirby - we've got to get him off of this notion of variables as containers. "Post-its, not buckets" is the way I put it, but I rather like the luggage tag metaphor as well. You lost me here. What's wrong with bucket? On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder wrote: > It is a lovely article. Andrew Smith was at PyCon and I had dinner with him > and Nicholas one evening and also sat down and chatted with Andrew on a > couple of other occasions. > > He's a smart guy and a likable one, and he is very taken with coding in > general, Python in particular, and especially the Python community, and he > plans to keep going beyond just that article. I fully expect we'll see and > hear more of Andrew Smith's adventures with Python over the coming year or > two. > > But you are totally right, Kirby - we've got to get him off of this notion > of variables as containers. "Post-its, not buckets" is the way I put it, but > I rather like the luggage tag metaphor as well. > > And for those of us who are geeks "of a certain age" I can also recommend > his book Moondust, which is the story of him tracking down and talking to > all of the surviving Apollo astronauts in the early 2000's. > > Cheers, > Naomi > > On Sat, 2 Jun 2018 at 15:13, kirby urner wrote: >> >> >> >> One of my screen scraper friends (always reading) just forwarded this >> link: >> >> https://www.1843magazine.com/features/code-to-joy >> >> A highly literate middle aged writer tackles programming from zero and >> winds up in Python after a pilgrimmage through Javascript, and uses the >> Twitter API. He meditates on what learning to code might mean to a fully >> developed adult such as himself (connects to Andragogy **). >> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is very >> much a hero in this story, living up to the ideal of a Pythonista as >> >> (A) not religiously dogmatic (re "language wars") yet >> (B) having enthusiasm for sharing Python (without too much proselytizing). >> >> Bravo on a stellar performance! >> >> Quincy Larson of freeCodeCamp fame is another champion of openness and >> accessibility (and good advice). I get his emails in my inbox with >> gratitude, though I don't follow all the links (helpfully labeled with >> estimated reading times, for my internal scheduler -- thanks for the >> meta-data!). >> >> In the interests of sparking some edu-sig type discussion (this could fork >> to a new thread), the author Andrew Smith writes: >> >> "Variables are best (if imperfectly) understood as the vessels within >> which pieces of data are contained, ready to be worked on. Of many possible >> data types, the most straightforward are numbers and strings, string being >> the name given to text." >> >> In my classes I readily acknowledge the "variable as container" metaphor >> is apt, and agree that Python objects take up memory and so object == >> container (with id) is OK too. >> >> However, the name --> object mapping of a namespace is better imagined as >> "luggage tag -> suitcase" relationship. It's not like the Python name itself >> is the container on the heap. >> >> The object in memory is a possibly fat heavy suitcase, stuffed with stuff >> (e.g. an HttpResponse). However the name is more a label, like a luggage >> tag on a suitcase (and this is the point). >> >> Name : Object :: Luggage Tags :: Suitcase >> >> One suitcase (object) may have many names (connects to garbage collection >> discussion). However at any one moment, a name points to only one object >> (the same name in different modules, both running, still count as different >> names -- scope matters). >> >> So yeah, the object itself is a "container" but what it contains may be >> tags to other objects. >> >> Without this separation of "names" from "objects" there's an inevitable >> tendency to imagine copies, as how can we have two bowls or boxes with >> exactly the same content. >> >> We don't have a visual metaphor for "two suitcases containing exactly the >> same clothes at the same time". >> >> But we do understand "one suitcase having two or more luggage tags." >> >> Surely we have two copies, albeit clones of the same thing. Not so in >> Python though. Python is biased against making gratuitous copies of >> anything. Keep is spare! (sparse if possible). Don't clutter memory with >> excessive redundancy. >> >> >> Kirby >> >> ** >> http://4dsolutions.net/presentations/pycon2013.pdf >> >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig > > > > -- > Naomi Ceder > > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > https://www.manning.com/books/the-quick-python-book-third-edition > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > From naomi.ceder at gmail.com Sun Jun 3 09:50:09 2018 From: naomi.ceder at gmail.com (Naomi Ceder) Date: Sun, 3 Jun 2018 14:50:09 +0100 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: As Kirby says, of course the data does go somewhere, and that "somewhere" could be thought of as a container. But "creating" a variable name in Python doesn't in itself create a container. A lot of beginners will assume that: a = 1 a = b = c will actually create three objects, (or containers, or buckets). This leads to a flawed mental model of what Python actually does, with unexpected results for mutable types. Cheers, Naomi On Sun, 3 Jun 2018 at 13:56, Carl Karsten wrote: > > But you are totally right, Kirby - we've got to get him off of this > notion of variables as containers. "Post-its, not buckets" is the way I put > it, but I rather like the luggage tag metaphor as well. > > You lost me here. What's wrong with bucket? > > > On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder wrote: > > It is a lovely article. Andrew Smith was at PyCon and I had dinner with > him > > and Nicholas one evening and also sat down and chatted with Andrew on a > > couple of other occasions. > > > > He's a smart guy and a likable one, and he is very taken with coding in > > general, Python in particular, and especially the Python community, and > he > > plans to keep going beyond just that article. I fully expect we'll see > and > > hear more of Andrew Smith's adventures with Python over the coming year > or > > two. > > > > But you are totally right, Kirby - we've got to get him off of this > notion > > of variables as containers. "Post-its, not buckets" is the way I put it, > but > > I rather like the luggage tag metaphor as well. > > > > And for those of us who are geeks "of a certain age" I can also recommend > > his book Moondust, which is the story of him tracking down and talking to > > all of the surviving Apollo astronauts in the early 2000's. > > > > Cheers, > > Naomi > > > > On Sat, 2 Jun 2018 at 15:13, kirby urner wrote: > >> > >> > >> > >> One of my screen scraper friends (always reading) just forwarded this > >> link: > >> > >> https://www.1843magazine.com/features/code-to-joy > >> > >> A highly literate middle aged writer tackles programming from zero and > >> winds up in Python after a pilgrimmage through Javascript, and uses the > >> Twitter API. He meditates on what learning to code might mean to a > fully > >> developed adult such as himself (connects to Andragogy **). > >> > >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is > very > >> much a hero in this story, living up to the ideal of a Pythonista as > >> > >> (A) not religiously dogmatic (re "language wars") yet > >> (B) having enthusiasm for sharing Python (without too much > proselytizing). > >> > >> Bravo on a stellar performance! > >> > >> Quincy Larson of freeCodeCamp fame is another champion of openness and > >> accessibility (and good advice). I get his emails in my inbox with > >> gratitude, though I don't follow all the links (helpfully labeled with > >> estimated reading times, for my internal scheduler -- thanks for the > >> meta-data!). > >> > >> In the interests of sparking some edu-sig type discussion (this could > fork > >> to a new thread), the author Andrew Smith writes: > >> > >> "Variables are best (if imperfectly) understood as the vessels within > >> which pieces of data are contained, ready to be worked on. Of many > possible > >> data types, the most straightforward are numbers and strings, string > being > >> the name given to text." > >> > >> In my classes I readily acknowledge the "variable as container" metaphor > >> is apt, and agree that Python objects take up memory and so object == > >> container (with id) is OK too. > >> > >> However, the name --> object mapping of a namespace is better imagined > as > >> "luggage tag -> suitcase" relationship. It's not like the Python name > itself > >> is the container on the heap. > >> > >> The object in memory is a possibly fat heavy suitcase, stuffed with > stuff > >> (e.g. an HttpResponse). However the name is more a label, like a > luggage > >> tag on a suitcase (and this is the point). > >> > >> Name : Object :: Luggage Tags :: Suitcase > >> > >> One suitcase (object) may have many names (connects to garbage > collection > >> discussion). However at any one moment, a name points to only one > object > >> (the same name in different modules, both running, still count as > different > >> names -- scope matters). > >> > >> So yeah, the object itself is a "container" but what it contains may be > >> tags to other objects. > >> > >> Without this separation of "names" from "objects" there's an inevitable > >> tendency to imagine copies, as how can we have two bowls or boxes with > >> exactly the same content. > >> > >> We don't have a visual metaphor for "two suitcases containing exactly > the > >> same clothes at the same time". > >> > >> But we do understand "one suitcase having two or more luggage tags." > >> > >> Surely we have two copies, albeit clones of the same thing. Not so in > >> Python though. Python is biased against making gratuitous copies of > >> anything. Keep is spare! (sparse if possible). Don't clutter memory > with > >> excessive redundancy. > >> > >> > >> Kirby > >> > >> ** > >> http://4dsolutions.net/presentations/pycon2013.pdf > >> > >> > >> _______________________________________________ > >> Edu-sig mailing list > >> Edu-sig at python.org > >> https://mail.python.org/mailman/listinfo/edu-sig > > > > > > > > -- > > Naomi Ceder > > > > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > > https://www.manning.com/books/the-quick-python-book-third-edition > > > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig at python.org > > https://mail.python.org/mailman/listinfo/edu-sig > > > -- Naomi Ceder @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ https://www.manning.com/books/the-quick-python-book-third-edition -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Sun Jun 3 11:28:25 2018 From: wes.turner at gmail.com (Wes Turner) Date: Sun, 3 Jun 2018 11:28:25 -0400 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: a = 1 print(id(a)) c = 2 a = b = c print(id(a)) assert id(a) == id(b) == id(c) assert a == b == c == 2 s1 = 'str1' s1_id1 = id(s1) s1 = s1 '23' s1_id2 = id(s1) assert s1_id1 != s1_id2 On Sunday, June 3, 2018, Naomi Ceder wrote: > As Kirby says, of course the data does go somewhere, and that "somewhere" > could be thought of as a container. But "creating" a variable name in > Python doesn't in itself create a container. A lot of beginners will > assume that: > a = 1 > a = b = c > will actually create three objects, (or containers, or buckets). This > leads to a flawed mental model of what Python actually does, with > unexpected results for mutable types. > > Cheers, > Naomi > > On Sun, 3 Jun 2018 at 13:56, Carl Karsten wrote: > >> > But you are totally right, Kirby - we've got to get him off of this >> notion of variables as containers. "Post-its, not buckets" is the way I put >> it, but I rather like the luggage tag metaphor as well. >> >> You lost me here. What's wrong with bucket? >> >> >> On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder >> wrote: >> > It is a lovely article. Andrew Smith was at PyCon and I had dinner with >> him >> > and Nicholas one evening and also sat down and chatted with Andrew on a >> > couple of other occasions. >> > >> > He's a smart guy and a likable one, and he is very taken with coding in >> > general, Python in particular, and especially the Python community, and >> he >> > plans to keep going beyond just that article. I fully expect we'll see >> and >> > hear more of Andrew Smith's adventures with Python over the coming year >> or >> > two. >> > >> > But you are totally right, Kirby - we've got to get him off of this >> notion >> > of variables as containers. "Post-its, not buckets" is the way I put >> it, but >> > I rather like the luggage tag metaphor as well. >> > >> > And for those of us who are geeks "of a certain age" I can also >> recommend >> > his book Moondust, which is the story of him tracking down and talking >> to >> > all of the surviving Apollo astronauts in the early 2000's. >> > >> > Cheers, >> > Naomi >> > >> > On Sat, 2 Jun 2018 at 15:13, kirby urner wrote: >> >> >> >> >> >> >> >> One of my screen scraper friends (always reading) just forwarded this >> >> link: >> >> >> >> https://www.1843magazine.com/features/code-to-joy >> >> >> >> A highly literate middle aged writer tackles programming from zero and >> >> winds up in Python after a pilgrimmage through Javascript, and uses the >> >> Twitter API. He meditates on what learning to code might mean to a >> fully >> >> developed adult such as himself (connects to Andragogy **). >> >> >> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is >> very >> >> much a hero in this story, living up to the ideal of a Pythonista as >> >> >> >> (A) not religiously dogmatic (re "language wars") yet >> >> (B) having enthusiasm for sharing Python (without too much >> proselytizing). >> >> >> >> Bravo on a stellar performance! >> >> >> >> Quincy Larson of freeCodeCamp fame is another champion of openness and >> >> accessibility (and good advice). I get his emails in my inbox with >> >> gratitude, though I don't follow all the links (helpfully labeled with >> >> estimated reading times, for my internal scheduler -- thanks for the >> >> meta-data!). >> >> >> >> In the interests of sparking some edu-sig type discussion (this could >> fork >> >> to a new thread), the author Andrew Smith writes: >> >> >> >> "Variables are best (if imperfectly) understood as the vessels within >> >> which pieces of data are contained, ready to be worked on. Of many >> possible >> >> data types, the most straightforward are numbers and strings, string >> being >> >> the name given to text." >> >> >> >> In my classes I readily acknowledge the "variable as container" >> metaphor >> >> is apt, and agree that Python objects take up memory and so object == >> >> container (with id) is OK too. >> >> >> >> However, the name --> object mapping of a namespace is better imagined >> as >> >> "luggage tag -> suitcase" relationship. It's not like the Python name >> itself >> >> is the container on the heap. >> >> >> >> The object in memory is a possibly fat heavy suitcase, stuffed with >> stuff >> >> (e.g. an HttpResponse). However the name is more a label, like a >> luggage >> >> tag on a suitcase (and this is the point). >> >> >> >> Name : Object :: Luggage Tags :: Suitcase >> >> >> >> One suitcase (object) may have many names (connects to garbage >> collection >> >> discussion). However at any one moment, a name points to only one >> object >> >> (the same name in different modules, both running, still count as >> different >> >> names -- scope matters). >> >> >> >> So yeah, the object itself is a "container" but what it contains may be >> >> tags to other objects. >> >> >> >> Without this separation of "names" from "objects" there's an inevitable >> >> tendency to imagine copies, as how can we have two bowls or boxes with >> >> exactly the same content. >> >> >> >> We don't have a visual metaphor for "two suitcases containing exactly >> the >> >> same clothes at the same time". >> >> >> >> But we do understand "one suitcase having two or more luggage tags." >> >> >> >> Surely we have two copies, albeit clones of the same thing. Not so in >> >> Python though. Python is biased against making gratuitous copies of >> >> anything. Keep is spare! (sparse if possible). Don't clutter memory >> with >> >> excessive redundancy. >> >> >> >> >> >> Kirby >> >> >> >> ** >> >> http://4dsolutions.net/presentations/pycon2013.pdf >> >> >> >> >> >> _______________________________________________ >> >> Edu-sig mailing list >> >> Edu-sig at python.org >> >> https://mail.python.org/mailman/listinfo/edu-sig >> > >> > >> > >> > -- >> > Naomi Ceder >> > >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >> > https://www.manning.com/books/the-quick-python-book-third-edition >> > >> > _______________________________________________ >> > Edu-sig mailing list >> > Edu-sig at python.org >> > https://mail.python.org/mailman/listinfo/edu-sig >> > >> > > > -- > Naomi Ceder > > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > https://www.manning.com/books/the-quick-python-book-third-edition > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Sun Jun 3 11:37:23 2018 From: wes.turner at gmail.com (Wes Turner) Date: Sun, 3 Jun 2018 11:37:23 -0400 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: There's probably a notebook that better demonstrates how variables (and GC: garbage collection) work in Python? Looks like when I copied and pasted I got a weird combination of HTML and plaintext. Here's that example again with formatting stripped (by copying and pasting to a plaintext editor and then copying and pasting back: a = 1 print(id(a)) c = 2 a = b = c print(id(a)) assert id(a) == id(b) == id(c) assert a == b == c == 2 s1 = 'str1' s1_id1 = id(s1) s1 = s1 + '23' s1_id2 = id(s1) assert s1_id1 != s1_id2 On Sunday, June 3, 2018, Wes Turner wrote: > a = 1 > print(id(a)) > c = 2 > a = b = c > print(id(a)) > assert id(a) == id(b) == id(c) > assert a == b == c == 2 > > s1 = 'str1' > s1_id1 = id(s1) > s1 = s1 '23' > s1_id2 = id(s1) > assert s1_id1 != s1_id2 > > > On Sunday, June 3, 2018, Naomi Ceder wrote: > >> As Kirby says, of course the data does go somewhere, and that "somewhere" >> could be thought of as a container. But "creating" a variable name in >> Python doesn't in itself create a container. A lot of beginners will >> assume that: >> a = 1 >> a = b = c >> will actually create three objects, (or containers, or buckets). This >> leads to a flawed mental model of what Python actually does, with >> unexpected results for mutable types. >> >> Cheers, >> Naomi >> >> On Sun, 3 Jun 2018 at 13:56, Carl Karsten wrote: >> >>> > But you are totally right, Kirby - we've got to get him off of this >>> notion of variables as containers. "Post-its, not buckets" is the way I put >>> it, but I rather like the luggage tag metaphor as well. >>> >>> You lost me here. What's wrong with bucket? >>> >>> >>> On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder >>> wrote: >>> > It is a lovely article. Andrew Smith was at PyCon and I had dinner >>> with him >>> > and Nicholas one evening and also sat down and chatted with Andrew on a >>> > couple of other occasions. >>> > >>> > He's a smart guy and a likable one, and he is very taken with coding in >>> > general, Python in particular, and especially the Python community, >>> and he >>> > plans to keep going beyond just that article. I fully expect we'll see >>> and >>> > hear more of Andrew Smith's adventures with Python over the coming >>> year or >>> > two. >>> > >>> > But you are totally right, Kirby - we've got to get him off of this >>> notion >>> > of variables as containers. "Post-its, not buckets" is the way I put >>> it, but >>> > I rather like the luggage tag metaphor as well. >>> > >>> > And for those of us who are geeks "of a certain age" I can also >>> recommend >>> > his book Moondust, which is the story of him tracking down and talking >>> to >>> > all of the surviving Apollo astronauts in the early 2000's. >>> > >>> > Cheers, >>> > Naomi >>> > >>> > On Sat, 2 Jun 2018 at 15:13, kirby urner >>> wrote: >>> >> >>> >> >>> >> >>> >> One of my screen scraper friends (always reading) just forwarded this >>> >> link: >>> >> >>> >> https://www.1843magazine.com/features/code-to-joy >>> >> >>> >> A highly literate middle aged writer tackles programming from zero and >>> >> winds up in Python after a pilgrimmage through Javascript, and uses >>> the >>> >> Twitter API. He meditates on what learning to code might mean to a >>> fully >>> >> developed adult such as himself (connects to Andragogy **). >>> >> >>> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is >>> very >>> >> much a hero in this story, living up to the ideal of a Pythonista as >>> >> >>> >> (A) not religiously dogmatic (re "language wars") yet >>> >> (B) having enthusiasm for sharing Python (without too much >>> proselytizing). >>> >> >>> >> Bravo on a stellar performance! >>> >> >>> >> Quincy Larson of freeCodeCamp fame is another champion of openness and >>> >> accessibility (and good advice). I get his emails in my inbox with >>> >> gratitude, though I don't follow all the links (helpfully labeled with >>> >> estimated reading times, for my internal scheduler -- thanks for the >>> >> meta-data!). >>> >> >>> >> In the interests of sparking some edu-sig type discussion (this could >>> fork >>> >> to a new thread), the author Andrew Smith writes: >>> >> >>> >> "Variables are best (if imperfectly) understood as the vessels within >>> >> which pieces of data are contained, ready to be worked on. Of many >>> possible >>> >> data types, the most straightforward are numbers and strings, string >>> being >>> >> the name given to text." >>> >> >>> >> In my classes I readily acknowledge the "variable as container" >>> metaphor >>> >> is apt, and agree that Python objects take up memory and so object == >>> >> container (with id) is OK too. >>> >> >>> >> However, the name --> object mapping of a namespace is better >>> imagined as >>> >> "luggage tag -> suitcase" relationship. It's not like the Python name >>> itself >>> >> is the container on the heap. >>> >> >>> >> The object in memory is a possibly fat heavy suitcase, stuffed with >>> stuff >>> >> (e.g. an HttpResponse). However the name is more a label, like a >>> luggage >>> >> tag on a suitcase (and this is the point). >>> >> >>> >> Name : Object :: Luggage Tags :: Suitcase >>> >> >>> >> One suitcase (object) may have many names (connects to garbage >>> collection >>> >> discussion). However at any one moment, a name points to only one >>> object >>> >> (the same name in different modules, both running, still count as >>> different >>> >> names -- scope matters). >>> >> >>> >> So yeah, the object itself is a "container" but what it contains may >>> be >>> >> tags to other objects. >>> >> >>> >> Without this separation of "names" from "objects" there's an >>> inevitable >>> >> tendency to imagine copies, as how can we have two bowls or boxes with >>> >> exactly the same content. >>> >> >>> >> We don't have a visual metaphor for "two suitcases containing exactly >>> the >>> >> same clothes at the same time". >>> >> >>> >> But we do understand "one suitcase having two or more luggage tags." >>> >> >>> >> Surely we have two copies, albeit clones of the same thing. Not so in >>> >> Python though. Python is biased against making gratuitous copies of >>> >> anything. Keep is spare! (sparse if possible). Don't clutter memory >>> with >>> >> excessive redundancy. >>> >> >>> >> >>> >> Kirby >>> >> >>> >> ** >>> >> http://4dsolutions.net/presentations/pycon2013.pdf >>> >> >>> >> >>> >> _______________________________________________ >>> >> Edu-sig mailing list >>> >> Edu-sig at python.org >>> >> https://mail.python.org/mailman/listinfo/edu-sig >>> > >>> > >>> > >>> > -- >>> > Naomi Ceder >>> > >>> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >>> > https://www.manning.com/books/the-quick-python-book-third-edition >>> > >>> > _______________________________________________ >>> > Edu-sig mailing list >>> > Edu-sig at python.org >>> > https://mail.python.org/mailman/listinfo/edu-sig >>> > >>> >> >> >> -- >> Naomi Ceder >> >> @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >> https://www.manning.com/books/the-quick-python-book-third-edition >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at nextdayvideo.com Sun Jun 3 11:39:15 2018 From: carl at nextdayvideo.com (Carl Karsten) Date: Sun, 3 Jun 2018 10:39:15 -0500 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: That doesn't tell me how postit notes are different from buckets. I get the python side, I don't get how the analogies are different. I am also not sure the target audience comes to the conclusions about implementation you all seem worried about. Hmm, implementation may not be the right word, I think that's not abstract enough. If you are talking to a seasoned C programmer that understands what "int a" does, then sure, tell him how Python is different. If you are talking to someone who wants to use Dreamweaver to edit code, I am sceptical that spending time on this is a good idea. One of the biggest problems I have at Office Hours is spending so much time talking about tangents that we run out of time to finish the original topic. I somewhat expect that the tangents are equally helpful, so I am not too worried about it. But if you are working up a curriculum or lesson plan or whatever, I question what things should be included. On Sun, Jun 3, 2018 at 8:50 AM, Naomi Ceder wrote: > As Kirby says, of course the data does go somewhere, and that "somewhere" > could be thought of as a container. But "creating" a variable name in Python > doesn't in itself create a container. A lot of beginners will assume that: > a = 1 > a = b = c > will actually create three objects, (or containers, or buckets). This leads > to a flawed mental model of what Python actually does, with unexpected > results for mutable types. > > Cheers, > Naomi > > On Sun, 3 Jun 2018 at 13:56, Carl Karsten wrote: >> >> > But you are totally right, Kirby - we've got to get him off of this >> > notion of variables as containers. "Post-its, not buckets" is the way I put >> > it, but I rather like the luggage tag metaphor as well. >> >> You lost me here. What's wrong with bucket? >> >> >> On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder wrote: >> > It is a lovely article. Andrew Smith was at PyCon and I had dinner with >> > him >> > and Nicholas one evening and also sat down and chatted with Andrew on a >> > couple of other occasions. >> > >> > He's a smart guy and a likable one, and he is very taken with coding in >> > general, Python in particular, and especially the Python community, and >> > he >> > plans to keep going beyond just that article. I fully expect we'll see >> > and >> > hear more of Andrew Smith's adventures with Python over the coming year >> > or >> > two. >> > >> > But you are totally right, Kirby - we've got to get him off of this >> > notion >> > of variables as containers. "Post-its, not buckets" is the way I put it, >> > but >> > I rather like the luggage tag metaphor as well. >> > >> > And for those of us who are geeks "of a certain age" I can also >> > recommend >> > his book Moondust, which is the story of him tracking down and talking >> > to >> > all of the surviving Apollo astronauts in the early 2000's. >> > >> > Cheers, >> > Naomi >> > >> > On Sat, 2 Jun 2018 at 15:13, kirby urner wrote: >> >> >> >> >> >> >> >> One of my screen scraper friends (always reading) just forwarded this >> >> link: >> >> >> >> https://www.1843magazine.com/features/code-to-joy >> >> >> >> A highly literate middle aged writer tackles programming from zero and >> >> winds up in Python after a pilgrimmage through Javascript, and uses the >> >> Twitter API. He meditates on what learning to code might mean to a >> >> fully >> >> developed adult such as himself (connects to Andragogy **). >> >> >> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is >> >> very >> >> much a hero in this story, living up to the ideal of a Pythonista as >> >> >> >> (A) not religiously dogmatic (re "language wars") yet >> >> (B) having enthusiasm for sharing Python (without too much >> >> proselytizing). >> >> >> >> Bravo on a stellar performance! >> >> >> >> Quincy Larson of freeCodeCamp fame is another champion of openness and >> >> accessibility (and good advice). I get his emails in my inbox with >> >> gratitude, though I don't follow all the links (helpfully labeled with >> >> estimated reading times, for my internal scheduler -- thanks for the >> >> meta-data!). >> >> >> >> In the interests of sparking some edu-sig type discussion (this could >> >> fork >> >> to a new thread), the author Andrew Smith writes: >> >> >> >> "Variables are best (if imperfectly) understood as the vessels within >> >> which pieces of data are contained, ready to be worked on. Of many >> >> possible >> >> data types, the most straightforward are numbers and strings, string >> >> being >> >> the name given to text." >> >> >> >> In my classes I readily acknowledge the "variable as container" >> >> metaphor >> >> is apt, and agree that Python objects take up memory and so object == >> >> container (with id) is OK too. >> >> >> >> However, the name --> object mapping of a namespace is better imagined >> >> as >> >> "luggage tag -> suitcase" relationship. It's not like the Python name >> >> itself >> >> is the container on the heap. >> >> >> >> The object in memory is a possibly fat heavy suitcase, stuffed with >> >> stuff >> >> (e.g. an HttpResponse). However the name is more a label, like a >> >> luggage >> >> tag on a suitcase (and this is the point). >> >> >> >> Name : Object :: Luggage Tags :: Suitcase >> >> >> >> One suitcase (object) may have many names (connects to garbage >> >> collection >> >> discussion). However at any one moment, a name points to only one >> >> object >> >> (the same name in different modules, both running, still count as >> >> different >> >> names -- scope matters). >> >> >> >> So yeah, the object itself is a "container" but what it contains may be >> >> tags to other objects. >> >> >> >> Without this separation of "names" from "objects" there's an inevitable >> >> tendency to imagine copies, as how can we have two bowls or boxes with >> >> exactly the same content. >> >> >> >> We don't have a visual metaphor for "two suitcases containing exactly >> >> the >> >> same clothes at the same time". >> >> >> >> But we do understand "one suitcase having two or more luggage tags." >> >> >> >> Surely we have two copies, albeit clones of the same thing. Not so in >> >> Python though. Python is biased against making gratuitous copies of >> >> anything. Keep is spare! (sparse if possible). Don't clutter memory >> >> with >> >> excessive redundancy. >> >> >> >> >> >> Kirby >> >> >> >> ** >> >> http://4dsolutions.net/presentations/pycon2013.pdf >> >> >> >> >> >> _______________________________________________ >> >> Edu-sig mailing list >> >> Edu-sig at python.org >> >> https://mail.python.org/mailman/listinfo/edu-sig >> > >> > >> > >> > -- >> > Naomi Ceder >> > >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >> > https://www.manning.com/books/the-quick-python-book-third-edition >> > >> > _______________________________________________ >> > Edu-sig mailing list >> > Edu-sig at python.org >> > https://mail.python.org/mailman/listinfo/edu-sig >> > > > > > -- > Naomi Ceder > > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > https://www.manning.com/books/the-quick-python-book-third-edition From david at handysoftware.com Sun Jun 3 12:29:21 2018 From: david at handysoftware.com (David Handy) Date: Sun, 3 Jun 2018 12:29:21 -0400 (EDT) Subject: [Edu-sig] =?utf-8?q?Code_to_Joy_in_The_Economist_=28June/July_20?= =?utf-8?b?MTgp?= Message-ID: <1528043361.34641032@apps.rackspace.com> If you have two buckets, bucket A and bucket B, and you put a fish into bucket A, a fish does not magically appear in bucket B also. >>> bucket_a = [] >>> bucket_b = [] >>> bucket_a.append('fish') >>> bucket_b [] But, if you have only one bucket with two labels on it, bucket A and bucket B, then when you use label A to put a fish into the bucket, and then use label B to look at the bucket, you will see that same fish. >>> bucket_a = [] >>> bucket_b = bucket_a >>> bucket_a.append('fish') >>> bucket_b ['fish'] This is a crucial conceptual understanding our students must gain or they will experience endless frustration trying to debug their programs, not understanding the behavior. Whether they use DreamWeaver or some other editor, this is relevant. David H ? On Sunday, June 3, 2018 11:39am, "Carl Karsten" said: > That doesn't tell me how postit notes are different from buckets. > > I get the python side, I don't get how the analogies are different. > > I am also not sure the target audience comes to the conclusions about > implementation you all seem worried about. Hmm, implementation may > not be the right word, I think that's not abstract enough. > > If you are talking to a seasoned C programmer that understands what > "int a" does, then sure, tell him how Python is different. > > If you are talking to someone who wants to use Dreamweaver to edit > code, I am sceptical that spending time on this is a good idea. > > One of the biggest problems I have at Office Hours is spending so much > time talking about tangents that we run out of time to finish the > original topic. I somewhat expect that the tangents are equally > helpful, so I am not too worried about it. But if you are working > up a curriculum or lesson plan or whatever, I question what things > should be included. > > > > On Sun, Jun 3, 2018 at 8:50 AM, Naomi Ceder wrote: > > As Kirby says, of course the data does go somewhere, and that "somewhere" > > could be thought of as a container. But "creating" a variable name in Python > > doesn't in itself create a container. A lot of beginners will assume that: > > a = 1 > > a = b = c > > will actually create three objects, (or containers, or buckets). This leads > > to a flawed mental model of what Python actually does, with unexpected > > results for mutable types. > > > > Cheers, > > Naomi > > > > On Sun, 3 Jun 2018 at 13:56, Carl Karsten > wrote: > >> > >> > But you are totally right, Kirby - we've got to get him off of this > >> > notion of variables as containers. "Post-its, not buckets" is the > way I put > >> > it, but I rather like the luggage tag metaphor as well. > >> > >> You lost me here. What's wrong with bucket? > >> > >> > >> On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder > wrote: > >> > It is a lovely article. Andrew Smith was at PyCon and I had dinner > with > >> > him > >> > and Nicholas one evening and also sat down and chatted with Andrew > on a > >> > couple of other occasions. > >> > > >> > He's a smart guy and a likable one, and he is very taken with coding > in > >> > general, Python in particular, and especially the Python community, > and > >> > he > >> > plans to keep going beyond just that article. I fully expect we'll > see > >> > and > >> > hear more of Andrew Smith's adventures with Python over the coming > year > >> > or > >> > two. > >> > > >> > But you are totally right, Kirby - we've got to get him off of this > >> > notion > >> > of variables as containers. "Post-its, not buckets" is the way I put > it, > >> > but > >> > I rather like the luggage tag metaphor as well. > >> > > >> > And for those of us who are geeks "of a certain age" I can also > >> > recommend > >> > his book Moondust, which is the story of him tracking down and > talking > >> > to > >> > all of the surviving Apollo astronauts in the early 2000's. > >> > > >> > Cheers, > >> > Naomi > >> > > >> > On Sat, 2 Jun 2018 at 15:13, kirby urner > wrote: > >> >> > >> >> > >> >> > >> >> One of my screen scraper friends (always reading) just forwarded > this > >> >> link: > >> >> > >> >> https://www.1843magazine.com/features/code-to-joy > >> >> > >> >> A highly literate middle aged writer tackles programming from > zero and > >> >> winds up in Python after a pilgrimmage through Javascript, and > uses the > >> >> Twitter API. He meditates on what learning to code might mean > to a > >> >> fully > >> >> developed adult such as himself (connects to Andragogy **). > >> >> > >> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit > avatar, is > >> >> very > >> >> much a hero in this story, living up to the ideal of a > Pythonista as > >> >> > >> >> (A) not religiously dogmatic (re "language wars") yet > >> >> (B) having enthusiasm for sharing Python (without too much > >> >> proselytizing). > >> >> > >> >> Bravo on a stellar performance! > >> >> > >> >> Quincy Larson of freeCodeCamp fame is another champion of > openness and > >> >> accessibility (and good advice). I get his emails in my inbox > with > >> >> gratitude, though I don't follow all the links (helpfully > labeled with > >> >> estimated reading times, for my internal scheduler -- thanks for > the > >> >> meta-data!). > >> >> > >> >> In the interests of sparking some edu-sig type discussion (this > could > >> >> fork > >> >> to a new thread), the author Andrew Smith writes: > >> >> > >> >> "Variables are best (if imperfectly) understood as the vessels > within > >> >> which pieces of data are contained, ready to be worked on. Of > many > >> >> possible > >> >> data types, the most straightforward are numbers and strings, > string > >> >> being > >> >> the name given to text." > >> >> > >> >> In my classes I readily acknowledge the "variable as container" > >> >> metaphor > >> >> is apt, and agree that Python objects take up memory and so > object == > >> >> container (with id) is OK too. > >> >> > >> >> However, the name --> object mapping of a namespace is better > imagined > >> >> as > >> >> "luggage tag -> suitcase" relationship. It's not like the > Python name > >> >> itself > >> >> is the container on the heap. > >> >> > >> >> The object in memory is a possibly fat heavy suitcase, stuffed > with > >> >> stuff > >> >> (e.g. an HttpResponse). However the name is more a label, like > a > >> >> luggage > >> >> tag on a suitcase (and this is the point). > >> >> > >> >> Name : Object :: Luggage Tags :: Suitcase > >> >> > >> >> One suitcase (object) may have many names (connects to garbage > >> >> collection > >> >> discussion). However at any one moment, a name points to only > one > >> >> object > >> >> (the same name in different modules, both running, still count > as > >> >> different > >> >> names -- scope matters). > >> >> > >> >> So yeah, the object itself is a "container" but what it contains > may be > >> >> tags to other objects. > >> >> > >> >> Without this separation of "names" from "objects" there's an > inevitable > >> >> tendency to imagine copies, as how can we have two bowls or > boxes with > >> >> exactly the same content. > >> >> > >> >> We don't have a visual metaphor for "two suitcases containing > exactly > >> >> the > >> >> same clothes at the same time". > >> >> > >> >> But we do understand "one suitcase having two or more luggage > tags." > >> >> > >> >> Surely we have two copies, albeit clones of the same thing. Not > so in > >> >> Python though. Python is biased against making gratuitous > copies of > >> >> anything. Keep is spare! (sparse if possible). Don't clutter > memory > >> >> with > >> >> excessive redundancy. > >> >> > >> >> > >> >> Kirby > >> >> > >> >> ** > >> >> http://4dsolutions.net/presentations/pycon2013.pdf > >> >> > >> >> > >> >> _______________________________________________ > >> >> Edu-sig mailing list > >> >> Edu-sig at python.org > >> >> https://mail.python.org/mailman/listinfo/edu-sig > >> > > >> > > >> > > >> > -- > >> > Naomi Ceder > >> > > >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > >> > https://www.manning.com/books/the-quick-python-book-third-edition > >> > > >> > _______________________________________________ > >> > Edu-sig mailing list > >> > Edu-sig at python.org > >> > https://mail.python.org/mailman/listinfo/edu-sig > >> > > > > > > > > > -- > > Naomi Ceder > > > > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > > https://www.manning.com/books/the-quick-python-book-third-edition > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > From carl at nextdayvideo.com Sun Jun 3 13:00:37 2018 From: carl at nextdayvideo.com (Carl Karsten) Date: Sun, 3 Jun 2018 12:00:37 -0500 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: <1528043361.34641032@apps.rackspace.com> References: <1528043361.34641032@apps.rackspace.com> Message-ID: Not only does that not answer my question, it contradicts previous statements. >> >> You lost me here. What's wrong with bucket? >> That doesn't tell me how postit notes are different from buckets. and, I assure you, even if one (me) understands all that fish in bucket stuff, I still experience frustration debugging reference/value mix ups. So I totally disagree with "must teach them this" assertion. Every minute spent on that displaces time that could be spent on something else, and I think you will saturate someones attention long before you run out of better things to teach. On Sun, Jun 3, 2018 at 11:29 AM, David Handy wrote: > If you have two buckets, bucket A and bucket B, and you put a fish into bucket A, a fish does not magically appear in bucket B also. > >>>> bucket_a = [] >>>> bucket_b = [] >>>> bucket_a.append('fish') >>>> bucket_b > [] > > But, if you have only one bucket with two labels on it, bucket A and bucket B, then when you use label A to put a fish into the bucket, and then use label B to look at the bucket, you will see that same fish. > >>>> bucket_a = [] >>>> bucket_b = bucket_a >>>> bucket_a.append('fish') >>>> bucket_b > ['fish'] > > This is a crucial conceptual understanding our students must gain or they will experience endless frustration trying to debug their programs, not understanding the behavior. Whether they use DreamWeaver or some other editor, this is relevant. > > David H > > > On Sunday, June 3, 2018 11:39am, "Carl Karsten" said: > > > >> That doesn't tell me how postit notes are different from buckets. >> >> I get the python side, I don't get how the analogies are different. >> >> I am also not sure the target audience comes to the conclusions about >> implementation you all seem worried about. Hmm, implementation may >> not be the right word, I think that's not abstract enough. >> >> If you are talking to a seasoned C programmer that understands what >> "int a" does, then sure, tell him how Python is different. >> >> If you are talking to someone who wants to use Dreamweaver to edit >> code, I am sceptical that spending time on this is a good idea. >> >> One of the biggest problems I have at Office Hours is spending so much >> time talking about tangents that we run out of time to finish the >> original topic. I somewhat expect that the tangents are equally >> helpful, so I am not too worried about it. But if you are working >> up a curriculum or lesson plan or whatever, I question what things >> should be included. >> >> >> >> On Sun, Jun 3, 2018 at 8:50 AM, Naomi Ceder wrote: >> > As Kirby says, of course the data does go somewhere, and that "somewhere" >> > could be thought of as a container. But "creating" a variable name in Python >> > doesn't in itself create a container. A lot of beginners will assume that: >> > a = 1 >> > a = b = c >> > will actually create three objects, (or containers, or buckets). This leads >> > to a flawed mental model of what Python actually does, with unexpected >> > results for mutable types. >> > >> > Cheers, >> > Naomi >> > >> > On Sun, 3 Jun 2018 at 13:56, Carl Karsten >> wrote: >> >> >> >> > But you are totally right, Kirby - we've got to get him off of this >> >> > notion of variables as containers. "Post-its, not buckets" is the >> way I put >> >> > it, but I rather like the luggage tag metaphor as well. >> >> >> >> You lost me here. What's wrong with bucket? >> >> >> >> >> >> On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder >> wrote: >> >> > It is a lovely article. Andrew Smith was at PyCon and I had dinner >> with >> >> > him >> >> > and Nicholas one evening and also sat down and chatted with Andrew >> on a >> >> > couple of other occasions. >> >> > >> >> > He's a smart guy and a likable one, and he is very taken with coding >> in >> >> > general, Python in particular, and especially the Python community, >> and >> >> > he >> >> > plans to keep going beyond just that article. I fully expect we'll >> see >> >> > and >> >> > hear more of Andrew Smith's adventures with Python over the coming >> year >> >> > or >> >> > two. >> >> > >> >> > But you are totally right, Kirby - we've got to get him off of this >> >> > notion >> >> > of variables as containers. "Post-its, not buckets" is the way I put >> it, >> >> > but >> >> > I rather like the luggage tag metaphor as well. >> >> > >> >> > And for those of us who are geeks "of a certain age" I can also >> >> > recommend >> >> > his book Moondust, which is the story of him tracking down and >> talking >> >> > to >> >> > all of the surviving Apollo astronauts in the early 2000's. >> >> > >> >> > Cheers, >> >> > Naomi >> >> > >> >> > On Sat, 2 Jun 2018 at 15:13, kirby urner >> wrote: >> >> >> >> >> >> >> >> >> >> >> >> One of my screen scraper friends (always reading) just forwarded >> this >> >> >> link: >> >> >> >> >> >> https://www.1843magazine.com/features/code-to-joy >> >> >> >> >> >> A highly literate middle aged writer tackles programming from >> zero and >> >> >> winds up in Python after a pilgrimmage through Javascript, and >> uses the >> >> >> Twitter API. He meditates on what learning to code might mean >> to a >> >> >> fully >> >> >> developed adult such as himself (connects to Andragogy **). >> >> >> >> >> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit >> avatar, is >> >> >> very >> >> >> much a hero in this story, living up to the ideal of a >> Pythonista as >> >> >> >> >> >> (A) not religiously dogmatic (re "language wars") yet >> >> >> (B) having enthusiasm for sharing Python (without too much >> >> >> proselytizing). >> >> >> >> >> >> Bravo on a stellar performance! >> >> >> >> >> >> Quincy Larson of freeCodeCamp fame is another champion of >> openness and >> >> >> accessibility (and good advice). I get his emails in my inbox >> with >> >> >> gratitude, though I don't follow all the links (helpfully >> labeled with >> >> >> estimated reading times, for my internal scheduler -- thanks for >> the >> >> >> meta-data!). >> >> >> >> >> >> In the interests of sparking some edu-sig type discussion (this >> could >> >> >> fork >> >> >> to a new thread), the author Andrew Smith writes: >> >> >> >> >> >> "Variables are best (if imperfectly) understood as the vessels >> within >> >> >> which pieces of data are contained, ready to be worked on. Of >> many >> >> >> possible >> >> >> data types, the most straightforward are numbers and strings, >> string >> >> >> being >> >> >> the name given to text." >> >> >> >> >> >> In my classes I readily acknowledge the "variable as container" >> >> >> metaphor >> >> >> is apt, and agree that Python objects take up memory and so >> object == >> >> >> container (with id) is OK too. >> >> >> >> >> >> However, the name --> object mapping of a namespace is better >> imagined >> >> >> as >> >> >> "luggage tag -> suitcase" relationship. It's not like the >> Python name >> >> >> itself >> >> >> is the container on the heap. >> >> >> >> >> >> The object in memory is a possibly fat heavy suitcase, stuffed >> with >> >> >> stuff >> >> >> (e.g. an HttpResponse). However the name is more a label, like >> a >> >> >> luggage >> >> >> tag on a suitcase (and this is the point). >> >> >> >> >> >> Name : Object :: Luggage Tags :: Suitcase >> >> >> >> >> >> One suitcase (object) may have many names (connects to garbage >> >> >> collection >> >> >> discussion). However at any one moment, a name points to only >> one >> >> >> object >> >> >> (the same name in different modules, both running, still count >> as >> >> >> different >> >> >> names -- scope matters). >> >> >> >> >> >> So yeah, the object itself is a "container" but what it contains >> may be >> >> >> tags to other objects. >> >> >> >> >> >> Without this separation of "names" from "objects" there's an >> inevitable >> >> >> tendency to imagine copies, as how can we have two bowls or >> boxes with >> >> >> exactly the same content. >> >> >> >> >> >> We don't have a visual metaphor for "two suitcases containing >> exactly >> >> >> the >> >> >> same clothes at the same time". >> >> >> >> >> >> But we do understand "one suitcase having two or more luggage >> tags." >> >> >> >> >> >> Surely we have two copies, albeit clones of the same thing. Not >> so in >> >> >> Python though. Python is biased against making gratuitous >> copies of >> >> >> anything. Keep is spare! (sparse if possible). Don't clutter >> memory >> >> >> with >> >> >> excessive redundancy. >> >> >> >> >> >> >> >> >> Kirby >> >> >> >> >> >> ** >> >> >> http://4dsolutions.net/presentations/pycon2013.pdf >> >> >> >> >> >> >> >> >> _______________________________________________ >> >> >> Edu-sig mailing list >> >> >> Edu-sig at python.org >> >> >> https://mail.python.org/mailman/listinfo/edu-sig >> >> > >> >> > >> >> > >> >> > -- >> >> > Naomi Ceder >> >> > >> >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >> >> > https://www.manning.com/books/the-quick-python-book-third-edition >> >> > >> >> > _______________________________________________ >> >> > Edu-sig mailing list >> >> > Edu-sig at python.org >> >> > https://mail.python.org/mailman/listinfo/edu-sig >> >> > >> > >> > >> > >> > -- >> > Naomi Ceder >> > >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >> > https://www.manning.com/books/the-quick-python-book-third-edition >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig From ehmatthes at gmail.com Sun Jun 3 13:30:03 2018 From: ehmatthes at gmail.com (Eric Matthes) Date: Sun, 3 Jun 2018 09:30:03 -0800 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: <1528043361.34641032@apps.rackspace.com> Message-ID: I think the key here is to start with an accurate metaphor, that you can build upon later. Consider this brief introduction to variables: "A variable is like a label on a piece of data. That piece of data can be simple, such as a number or a name, or it can be a more complex data structure. Whenever you want to work with that data, you can just use the name of the variable instead." Compare that phrasing to this one: "A variable is like a box, which you can put a piece of data in. That piece of data can be simple, such as a number or a name, or it can be a more complex data structure. Whenever you want to work with that data, you can just use the name of the variable instead." You can move right from either of these phrases into examples using variables. But when you get to the point where you're focusing on "debugging reference/ value mix ups", one of these introductions serves you much better. The first allows you to jump right into clear explanations of how to consider what's happening in your program. The second requires you to go back on your original explanation, reintroduce the variable concept, and then move forward. I started teaching and writing using the "value in a box" model because that's what I was taught. But I have recently switched my teaching and writing over to use the "label on a piece of data" model, because it's more accurate for Python. Eric On Sun, Jun 3, 2018 at 9:00 AM, Carl Karsten wrote: > Not only does that not answer my question, it contradicts previous > statements. > > >> >> You lost me here. What's wrong with bucket? > > >> That doesn't tell me how postit notes are different from buckets. > > and, I assure you, even if one (me) understands all that fish in > bucket stuff, I still experience frustration debugging reference/value > mix ups. > > So I totally disagree with "must teach them this" assertion. Every > minute spent on that displaces time that could be spent on something > else, and I think you will saturate someones attention long before you > run out of better things to teach. > > > On Sun, Jun 3, 2018 at 11:29 AM, David Handy > wrote: > > If you have two buckets, bucket A and bucket B, and you put a fish into > bucket A, a fish does not magically appear in bucket B also. > > > >>>> bucket_a = [] > >>>> bucket_b = [] > >>>> bucket_a.append('fish') > >>>> bucket_b > > [] > > > > But, if you have only one bucket with two labels on it, bucket A and > bucket B, then when you use label A to put a fish into the bucket, and then > use label B to look at the bucket, you will see that same fish. > > > >>>> bucket_a = [] > >>>> bucket_b = bucket_a > >>>> bucket_a.append('fish') > >>>> bucket_b > > ['fish'] > > > > This is a crucial conceptual understanding our students must gain or > they will experience endless frustration trying to debug their programs, > not understanding the behavior. Whether they use DreamWeaver or some other > editor, this is relevant. > > > > David H > > > > > > On Sunday, June 3, 2018 11:39am, "Carl Karsten" > said: > > > > > > > >> That doesn't tell me how postit notes are different from buckets. > >> > >> I get the python side, I don't get how the analogies are different. > >> > >> I am also not sure the target audience comes to the conclusions about > >> implementation you all seem worried about. Hmm, implementation may > >> not be the right word, I think that's not abstract enough. > >> > >> If you are talking to a seasoned C programmer that understands what > >> "int a" does, then sure, tell him how Python is different. > >> > >> If you are talking to someone who wants to use Dreamweaver to edit > >> code, I am sceptical that spending time on this is a good idea. > >> > >> One of the biggest problems I have at Office Hours is spending so much > >> time talking about tangents that we run out of time to finish the > >> original topic. I somewhat expect that the tangents are equally > >> helpful, so I am not too worried about it. But if you are working > >> up a curriculum or lesson plan or whatever, I question what things > >> should be included. > >> > >> > >> > >> On Sun, Jun 3, 2018 at 8:50 AM, Naomi Ceder > wrote: > >> > As Kirby says, of course the data does go somewhere, and that > "somewhere" > >> > could be thought of as a container. But "creating" a variable name in > Python > >> > doesn't in itself create a container. A lot of beginners will assume > that: > >> > a = 1 > >> > a = b = c > >> > will actually create three objects, (or containers, or buckets). This > leads > >> > to a flawed mental model of what Python actually does, with unexpected > >> > results for mutable types. > >> > > >> > Cheers, > >> > Naomi > >> > > >> > On Sun, 3 Jun 2018 at 13:56, Carl Karsten > >> wrote: > >> >> > >> >> > But you are totally right, Kirby - we've got to get him off of this > >> >> > notion of variables as containers. "Post-its, not buckets" is the > >> way I put > >> >> > it, but I rather like the luggage tag metaphor as well. > >> >> > >> >> You lost me here. What's wrong with bucket? > >> >> > >> >> > >> >> On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder > >> wrote: > >> >> > It is a lovely article. Andrew Smith was at PyCon and I had dinner > >> with > >> >> > him > >> >> > and Nicholas one evening and also sat down and chatted with Andrew > >> on a > >> >> > couple of other occasions. > >> >> > > >> >> > He's a smart guy and a likable one, and he is very taken with > coding > >> in > >> >> > general, Python in particular, and especially the Python community, > >> and > >> >> > he > >> >> > plans to keep going beyond just that article. I fully expect we'll > >> see > >> >> > and > >> >> > hear more of Andrew Smith's adventures with Python over the coming > >> year > >> >> > or > >> >> > two. > >> >> > > >> >> > But you are totally right, Kirby - we've got to get him off of this > >> >> > notion > >> >> > of variables as containers. "Post-its, not buckets" is the way I > put > >> it, > >> >> > but > >> >> > I rather like the luggage tag metaphor as well. > >> >> > > >> >> > And for those of us who are geeks "of a certain age" I can also > >> >> > recommend > >> >> > his book Moondust, which is the story of him tracking down and > >> talking > >> >> > to > >> >> > all of the surviving Apollo astronauts in the early 2000's. > >> >> > > >> >> > Cheers, > >> >> > Naomi > >> >> > > >> >> > On Sat, 2 Jun 2018 at 15:13, kirby urner > >> wrote: > >> >> >> > >> >> >> > >> >> >> > >> >> >> One of my screen scraper friends (always reading) just forwarded > >> this > >> >> >> link: > >> >> >> > >> >> >> https://www.1843magazine.com/features/code-to-joy > >> >> >> > >> >> >> A highly literate middle aged writer tackles programming from > >> zero and > >> >> >> winds up in Python after a pilgrimmage through Javascript, and > >> uses the > >> >> >> Twitter API. He meditates on what learning to code might mean > >> to a > >> >> >> fully > >> >> >> developed adult such as himself (connects to Andragogy **). > >> >> >> > >> >> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit > >> avatar, is > >> >> >> very > >> >> >> much a hero in this story, living up to the ideal of a > >> Pythonista as > >> >> >> > >> >> >> (A) not religiously dogmatic (re "language wars") yet > >> >> >> (B) having enthusiasm for sharing Python (without too much > >> >> >> proselytizing). > >> >> >> > >> >> >> Bravo on a stellar performance! > >> >> >> > >> >> >> Quincy Larson of freeCodeCamp fame is another champion of > >> openness and > >> >> >> accessibility (and good advice). I get his emails in my inbox > >> with > >> >> >> gratitude, though I don't follow all the links (helpfully > >> labeled with > >> >> >> estimated reading times, for my internal scheduler -- thanks for > >> the > >> >> >> meta-data!). > >> >> >> > >> >> >> In the interests of sparking some edu-sig type discussion (this > >> could > >> >> >> fork > >> >> >> to a new thread), the author Andrew Smith writes: > >> >> >> > >> >> >> "Variables are best (if imperfectly) understood as the vessels > >> within > >> >> >> which pieces of data are contained, ready to be worked on. Of > >> many > >> >> >> possible > >> >> >> data types, the most straightforward are numbers and strings, > >> string > >> >> >> being > >> >> >> the name given to text." > >> >> >> > >> >> >> In my classes I readily acknowledge the "variable as container" > >> >> >> metaphor > >> >> >> is apt, and agree that Python objects take up memory and so > >> object == > >> >> >> container (with id) is OK too. > >> >> >> > >> >> >> However, the name --> object mapping of a namespace is better > >> imagined > >> >> >> as > >> >> >> "luggage tag -> suitcase" relationship. It's not like the > >> Python name > >> >> >> itself > >> >> >> is the container on the heap. > >> >> >> > >> >> >> The object in memory is a possibly fat heavy suitcase, stuffed > >> with > >> >> >> stuff > >> >> >> (e.g. an HttpResponse). However the name is more a label, like > >> a > >> >> >> luggage > >> >> >> tag on a suitcase (and this is the point). > >> >> >> > >> >> >> Name : Object :: Luggage Tags :: Suitcase > >> >> >> > >> >> >> One suitcase (object) may have many names (connects to garbage > >> >> >> collection > >> >> >> discussion). However at any one moment, a name points to only > >> one > >> >> >> object > >> >> >> (the same name in different modules, both running, still count > >> as > >> >> >> different > >> >> >> names -- scope matters). > >> >> >> > >> >> >> So yeah, the object itself is a "container" but what it contains > >> may be > >> >> >> tags to other objects. > >> >> >> > >> >> >> Without this separation of "names" from "objects" there's an > >> inevitable > >> >> >> tendency to imagine copies, as how can we have two bowls or > >> boxes with > >> >> >> exactly the same content. > >> >> >> > >> >> >> We don't have a visual metaphor for "two suitcases containing > >> exactly > >> >> >> the > >> >> >> same clothes at the same time". > >> >> >> > >> >> >> But we do understand "one suitcase having two or more luggage > >> tags." > >> >> >> > >> >> >> Surely we have two copies, albeit clones of the same thing. Not > >> so in > >> >> >> Python though. Python is biased against making gratuitous > >> copies of > >> >> >> anything. Keep is spare! (sparse if possible). Don't clutter > >> memory > >> >> >> with > >> >> >> excessive redundancy. > >> >> >> > >> >> >> > >> >> >> Kirby > >> >> >> > >> >> >> ** > >> >> >> http://4dsolutions.net/presentations/pycon2013.pdf > >> >> >> > >> >> >> > >> >> >> _______________________________________________ > >> >> >> Edu-sig mailing list > >> >> >> Edu-sig at python.org > >> >> >> https://mail.python.org/mailman/listinfo/edu-sig > >> >> > > >> >> > > >> >> > > >> >> > -- > >> >> > Naomi Ceder > >> >> > > >> >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > >> >> > https://www.manning.com/books/the-quick-python-book-third-edition > >> >> > > >> >> > _______________________________________________ > >> >> > Edu-sig mailing list > >> >> > Edu-sig at python.org > >> >> > https://mail.python.org/mailman/listinfo/edu-sig > >> >> > > >> > > >> > > >> > > >> > -- > >> > Naomi Ceder > >> > > >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ > >> > https://www.manning.com/books/the-quick-python-book-third-edition > >> _______________________________________________ > >> Edu-sig mailing list > >> Edu-sig at python.org > >> https://mail.python.org/mailman/listinfo/edu-sig > >> > > > > > > > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig at python.org > > https://mail.python.org/mailman/listinfo/edu-sig > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at nextdayvideo.com Sun Jun 3 13:50:50 2018 From: carl at nextdayvideo.com (Carl Karsten) Date: Sun, 3 Jun 2018 12:50:50 -0500 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: <1528043361.34641032@apps.rackspace.com> Message-ID: Is the box more like a bucket or a postit? ;) I'd like to point out that an answer to my question should include the words bucket and post-it. but hey, if someone wants to dig up the cpython source code that shows what memory is used for A=1, I'll read that too. On Sun, Jun 3, 2018 at 12:30 PM, Eric Matthes wrote: > I think the key here is to start with an accurate metaphor, that you can > build upon later. Consider this brief introduction to variables: > > "A variable is like a label on a piece of data. That piece of data can be > simple, such as a number or a name, or it can be a more complex data > structure. Whenever you want to work with that data, you can just use the > name of the variable instead." > > Compare that phrasing to this one: > > "A variable is like a box, which you can put a piece of data in. That piece > of data can be simple, such as a number or a name, or it can be a more > complex data structure. Whenever you want to work with that data, you can > just use the name of the variable instead." > > You can move right from either of these phrases into examples using > variables. But when you get to the point where you're focusing on "debugging > reference/ value mix ups", one of these introductions serves you much > better. The first allows you to jump right into clear explanations of how to > consider what's happening in your program. The second requires you to go > back on your original explanation, reintroduce the variable concept, and > then move forward. > > I started teaching and writing using the "value in a box" model because > that's what I was taught. But I have recently switched my teaching and > writing over to use the "label on a piece of data" model, because it's more > accurate for Python. > > Eric > > On Sun, Jun 3, 2018 at 9:00 AM, Carl Karsten wrote: >> >> Not only does that not answer my question, it contradicts previous >> statements. >> >> >> >> You lost me here. What's wrong with bucket? >> >> >> That doesn't tell me how postit notes are different from buckets. >> >> and, I assure you, even if one (me) understands all that fish in >> bucket stuff, I still experience frustration debugging reference/value >> mix ups. >> >> So I totally disagree with "must teach them this" assertion. Every >> minute spent on that displaces time that could be spent on something >> else, and I think you will saturate someones attention long before you >> run out of better things to teach. >> >> >> On Sun, Jun 3, 2018 at 11:29 AM, David Handy >> wrote: >> > If you have two buckets, bucket A and bucket B, and you put a fish into >> > bucket A, a fish does not magically appear in bucket B also. >> > >> >>>> bucket_a = [] >> >>>> bucket_b = [] >> >>>> bucket_a.append('fish') >> >>>> bucket_b >> > [] >> > >> > But, if you have only one bucket with two labels on it, bucket A and >> > bucket B, then when you use label A to put a fish into the bucket, and then >> > use label B to look at the bucket, you will see that same fish. >> > >> >>>> bucket_a = [] >> >>>> bucket_b = bucket_a >> >>>> bucket_a.append('fish') >> >>>> bucket_b >> > ['fish'] >> > >> > This is a crucial conceptual understanding our students must gain or >> > they will experience endless frustration trying to debug their programs, not >> > understanding the behavior. Whether they use DreamWeaver or some other >> > editor, this is relevant. >> > >> > David H >> > >> > >> > On Sunday, June 3, 2018 11:39am, "Carl Karsten" >> > said: >> > >> > >> > >> >> That doesn't tell me how postit notes are different from buckets. >> >> >> >> I get the python side, I don't get how the analogies are different. >> >> >> >> I am also not sure the target audience comes to the conclusions about >> >> implementation you all seem worried about. Hmm, implementation may >> >> not be the right word, I think that's not abstract enough. >> >> >> >> If you are talking to a seasoned C programmer that understands what >> >> "int a" does, then sure, tell him how Python is different. >> >> >> >> If you are talking to someone who wants to use Dreamweaver to edit >> >> code, I am sceptical that spending time on this is a good idea. >> >> >> >> One of the biggest problems I have at Office Hours is spending so much >> >> time talking about tangents that we run out of time to finish the >> >> original topic. I somewhat expect that the tangents are equally >> >> helpful, so I am not too worried about it. But if you are working >> >> up a curriculum or lesson plan or whatever, I question what things >> >> should be included. >> >> >> >> >> >> >> >> On Sun, Jun 3, 2018 at 8:50 AM, Naomi Ceder >> >> wrote: >> >> > As Kirby says, of course the data does go somewhere, and that >> >> > "somewhere" >> >> > could be thought of as a container. But "creating" a variable name in >> >> > Python >> >> > doesn't in itself create a container. A lot of beginners will assume >> >> > that: >> >> > a = 1 >> >> > a = b = c >> >> > will actually create three objects, (or containers, or buckets). This >> >> > leads >> >> > to a flawed mental model of what Python actually does, with >> >> > unexpected >> >> > results for mutable types. >> >> > >> >> > Cheers, >> >> > Naomi >> >> > >> >> > On Sun, 3 Jun 2018 at 13:56, Carl Karsten >> >> wrote: >> >> >> >> >> >> > But you are totally right, Kirby - we've got to get him off of >> >> >> > this >> >> >> > notion of variables as containers. "Post-its, not buckets" is the >> >> way I put >> >> >> > it, but I rather like the luggage tag metaphor as well. >> >> >> >> >> >> You lost me here. What's wrong with bucket? >> >> >> >> >> >> >> >> >> On Sat, Jun 2, 2018 at 3:25 PM, Naomi Ceder >> >> wrote: >> >> >> > It is a lovely article. Andrew Smith was at PyCon and I had dinner >> >> with >> >> >> > him >> >> >> > and Nicholas one evening and also sat down and chatted with Andrew >> >> on a >> >> >> > couple of other occasions. >> >> >> > >> >> >> > He's a smart guy and a likable one, and he is very taken with >> >> >> > coding >> >> in >> >> >> > general, Python in particular, and especially the Python >> >> >> > community, >> >> and >> >> >> > he >> >> >> > plans to keep going beyond just that article. I fully expect we'll >> >> see >> >> >> > and >> >> >> > hear more of Andrew Smith's adventures with Python over the coming >> >> year >> >> >> > or >> >> >> > two. >> >> >> > >> >> >> > But you are totally right, Kirby - we've got to get him off of >> >> >> > this >> >> >> > notion >> >> >> > of variables as containers. "Post-its, not buckets" is the way I >> >> >> > put >> >> it, >> >> >> > but >> >> >> > I rather like the luggage tag metaphor as well. >> >> >> > >> >> >> > And for those of us who are geeks "of a certain age" I can also >> >> >> > recommend >> >> >> > his book Moondust, which is the story of him tracking down and >> >> talking >> >> >> > to >> >> >> > all of the surviving Apollo astronauts in the early 2000's. >> >> >> > >> >> >> > Cheers, >> >> >> > Naomi >> >> >> > >> >> >> > On Sat, 2 Jun 2018 at 15:13, kirby urner >> >> wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> One of my screen scraper friends (always reading) just forwarded >> >> this >> >> >> >> link: >> >> >> >> >> >> >> >> https://www.1843magazine.com/features/code-to-joy >> >> >> >> >> >> >> >> A highly literate middle aged writer tackles programming from >> >> zero and >> >> >> >> winds up in Python after a pilgrimmage through Javascript, and >> >> uses the >> >> >> >> Twitter API. He meditates on what learning to code might mean >> >> to a >> >> >> >> fully >> >> >> >> developed adult such as himself (connects to Andragogy **). >> >> >> >> >> >> >> >> Nicholas Tollervey, sometime edu-sig poster and Micro:bit >> >> avatar, is >> >> >> >> very >> >> >> >> much a hero in this story, living up to the ideal of a >> >> Pythonista as >> >> >> >> >> >> >> >> (A) not religiously dogmatic (re "language wars") yet >> >> >> >> (B) having enthusiasm for sharing Python (without too much >> >> >> >> proselytizing). >> >> >> >> >> >> >> >> Bravo on a stellar performance! >> >> >> >> >> >> >> >> Quincy Larson of freeCodeCamp fame is another champion of >> >> openness and >> >> >> >> accessibility (and good advice). I get his emails in my inbox >> >> with >> >> >> >> gratitude, though I don't follow all the links (helpfully >> >> labeled with >> >> >> >> estimated reading times, for my internal scheduler -- thanks for >> >> the >> >> >> >> meta-data!). >> >> >> >> >> >> >> >> In the interests of sparking some edu-sig type discussion (this >> >> could >> >> >> >> fork >> >> >> >> to a new thread), the author Andrew Smith writes: >> >> >> >> >> >> >> >> "Variables are best (if imperfectly) understood as the vessels >> >> within >> >> >> >> which pieces of data are contained, ready to be worked on. Of >> >> many >> >> >> >> possible >> >> >> >> data types, the most straightforward are numbers and strings, >> >> string >> >> >> >> being >> >> >> >> the name given to text." >> >> >> >> >> >> >> >> In my classes I readily acknowledge the "variable as container" >> >> >> >> metaphor >> >> >> >> is apt, and agree that Python objects take up memory and so >> >> object == >> >> >> >> container (with id) is OK too. >> >> >> >> >> >> >> >> However, the name --> object mapping of a namespace is better >> >> imagined >> >> >> >> as >> >> >> >> "luggage tag -> suitcase" relationship. It's not like the >> >> Python name >> >> >> >> itself >> >> >> >> is the container on the heap. >> >> >> >> >> >> >> >> The object in memory is a possibly fat heavy suitcase, stuffed >> >> with >> >> >> >> stuff >> >> >> >> (e.g. an HttpResponse). However the name is more a label, like >> >> a >> >> >> >> luggage >> >> >> >> tag on a suitcase (and this is the point). >> >> >> >> >> >> >> >> Name : Object :: Luggage Tags :: Suitcase >> >> >> >> >> >> >> >> One suitcase (object) may have many names (connects to garbage >> >> >> >> collection >> >> >> >> discussion). However at any one moment, a name points to only >> >> one >> >> >> >> object >> >> >> >> (the same name in different modules, both running, still count >> >> as >> >> >> >> different >> >> >> >> names -- scope matters). >> >> >> >> >> >> >> >> So yeah, the object itself is a "container" but what it contains >> >> may be >> >> >> >> tags to other objects. >> >> >> >> >> >> >> >> Without this separation of "names" from "objects" there's an >> >> inevitable >> >> >> >> tendency to imagine copies, as how can we have two bowls or >> >> boxes with >> >> >> >> exactly the same content. >> >> >> >> >> >> >> >> We don't have a visual metaphor for "two suitcases containing >> >> exactly >> >> >> >> the >> >> >> >> same clothes at the same time". >> >> >> >> >> >> >> >> But we do understand "one suitcase having two or more luggage >> >> tags." >> >> >> >> >> >> >> >> Surely we have two copies, albeit clones of the same thing. Not >> >> so in >> >> >> >> Python though. Python is biased against making gratuitous >> >> copies of >> >> >> >> anything. Keep is spare! (sparse if possible). Don't clutter >> >> memory >> >> >> >> with >> >> >> >> excessive redundancy. >> >> >> >> >> >> >> >> >> >> >> >> Kirby >> >> >> >> >> >> >> >> ** >> >> >> >> http://4dsolutions.net/presentations/pycon2013.pdf >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> >> >> >> Edu-sig mailing list >> >> >> >> Edu-sig at python.org >> >> >> >> https://mail.python.org/mailman/listinfo/edu-sig >> >> >> > >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > Naomi Ceder >> >> >> > >> >> >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >> >> >> > https://www.manning.com/books/the-quick-python-book-third-edition >> >> >> > >> >> >> > _______________________________________________ >> >> >> > Edu-sig mailing list >> >> >> > Edu-sig at python.org >> >> >> > https://mail.python.org/mailman/listinfo/edu-sig >> >> >> > >> >> > >> >> > >> >> > >> >> > -- >> >> > Naomi Ceder >> >> > >> >> > @NaomiCeder ? https://www.linkedin.com/in/naomiceder/ >> >> > https://www.manning.com/books/the-quick-python-book-third-edition >> >> _______________________________________________ >> >> Edu-sig mailing list >> >> Edu-sig at python.org >> >> https://mail.python.org/mailman/listinfo/edu-sig >> >> >> > >> > >> > >> > _______________________________________________ >> > Edu-sig mailing list >> > Edu-sig at python.org >> > https://mail.python.org/mailman/listinfo/edu-sig >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig > > From kirby.urner at gmail.com Sun Jun 3 17:54:52 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 3 Jun 2018 14:54:52 -0700 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: <1528043361.34641032@apps.rackspace.com> Message-ID: Jake VanderPlas gets into the "bucket" versus "pointer" discussion in his Whirlwind Tour: https://jakevdp.github.io/WhirlwindTourOfPython/03-semantics-variables.html As long as your bucket is allowed to have multiple post-its (labels), and as long as it's easy to unstick a post-it from one bucket and apply it to another, there's no confusion. The problem arises when one has only buckets with their individual names, such as A and B, such that detaching the name (a post-it) from the bucket can't happen. How can changing the contents of bucket A change the contents of bucket B? Answer: they're the same bucket. But if each bucket has a name carved into it, as if in stone... We see that mental picture in lots teaching materials, appropriate for other languages more than for Python: Example: https://www.slideshare.net/PeterAndrews1/variables-13032998 (these slides don't suggest I can detach names from buckets and use them for other buckets) I would emphasize that Python buckets are essentially anonymous in the sense that they have no permanent name assigned to them, and when no names are assigned, they're eligible for garbage collection. Getting clear on all this is not extraneous but essential as when we get to pandas and start slicing in to larger data frames, we often get "views" not "copies". Python is just like that. import pandas as pd import numpy as np data = pd.DataFrame(data = np.random.randint(9,size=9).reshape(3,3), index = ['A','B','C']) view = data.loc["A":"B"] # slice (rows A,B), no copy made print(data) print() view.loc['A'][0] = -1 # assign to slice, row A, column 0 print(data) # underlying DataFrame has changed 0 1 2 A 3 8 5 B 6 4 1 C 7 4 4 0 1 2 A -1 8 5 B 6 4 1 C 7 4 4 Kirby PS: I don't think it necessary to quote an entire thread one adding to it, given the public archive contains the entire conversation. I encourage posters to trim, and keep only what they're directly responding to. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at nextdayvideo.com Sun Jun 3 19:19:50 2018 From: carl at nextdayvideo.com (Carl Karsten) Date: Sun, 3 Jun 2018 18:19:50 -0500 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: <1528043361.34641032@apps.rackspace.com> Message-ID: Oh! the post-its go on the buckets. (thinks for a bit... tick tick tick.. smells smoke..) I still think it is OK to skip all this at the beginning and leave it for much later. -- Carl ps top/mid/bottom posting wars are a thing of the past. we lost. I encourage people to spend less time trimming posts and more time on the response. ;) but as you spent plenty of time responding, I'll trim this one. Now I can't remember how to sign an email :p From wes.turner at gmail.com Sun Jun 3 20:20:39 2018 From: wes.turner at gmail.com (Wes Turner) Date: Sun, 3 Jun 2018 20:20:39 -0400 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: <1528043361.34641032@apps.rackspace.com> Message-ID: From https://gist.github.com/westurner/6f165149df59d697b997d305e9743dee#file-010-variables-ipynb : # coding: utf-8 # # Python variables, references, aliases, garbage collection, scope # - Objective: teach CS variables, references, and aliases # - Objective: identify differences between symbolic/mathematical variables and CS variables # - Objective: teach without using partially-congruent/isomorphic metaphors that may later be confusing or limiting # # - Audience: # # - Concept: https://en.wikipedia.org/wiki/Variable_(computer_science) # - Concept: https://en.wikipedia.org/wiki/Variable_(mathematics) # - Concept: https://en.wikipedia.org/wiki/Variable (disambiguation) # - Concept: https://en.wikipedia.org/wiki/Reference_(computer_science) # # Resources: # # - https://www.google.com/search?q=variables+references+in+python # - https://www.safaribooksonline.com/library/view/python-in-a/0596001886/ch04s03.html # > A Python program accesses data values through references. A reference is a name that refers to the specific location in memory of a value (object). References take the form of **variables, attributes, and items**. In Python, a variable or other reference has no intrinsic type. # - https://www.google.com/search?q=variables+references+in+python+site%3Adocs.python.org # # - https://docs.python.org/3/glossary.html#term-reference-count # - https://docs.python.org/3/glossary.html#term-garbage-collection # # In Python, when you declare a variable ``A``, there is one reference to that allocated section of memory: its reference count is then 1. (When you call ``sys.getrefcount(A)``, ``sys.getrefcount`` is passed a reference to A, so it returns *2*. We'll ignore that one-off for purposes of explanation). # # If the refcount is 0 when the garbage collector runs, the memory will be freed. # # In Python, variable declaration and initialization are done in the same step. This both delcares the variable ``A`` and initializes it to a ``list`` containing the one character ``str`` '``A``': # ```python # A = ['A'] # refcount == 1 # ``` # # Lists are **mutable** in Python. Mutating the list does not change the refcount: # ```python # A = ['A'] # refcount == 1 # A.append('B') # refcount == 1 # ``` # # Referencing ``A`` in another ``list`` increments the refcount: # ```python # B = [A] # refcount(A) == 2 # ``` # # Deleting a variable decrements the refcount by one and removes the variable binding from the scope: # ```python # del A # refcount == 0 # ``` # # In[63]: A = ['A'] B = [A] assert refcount(A) == 2 assert refcount(B[0]) == 2 del A assert B == [['A']] assert refcount(B[0]) == 1 B.append(B) assert refcount(B) == 2 # In[53]: from sys import getrefcount def refcount(obj, msg=None): n = sys.getrefcount(obj) - 3 print((obj, n) if msg is None else (obj, n, msg)) return n A = ['A'] assert refcount(A) == 1 B = ['B'] assert refcount(B) == 1 B = A # refcount(['B']) == 0 assert refcount(A) == refcount(B) == 2 C = A.copy() + A[:] + ['C'] assert refcount(A) == 2 assert C == ['A', 'A', 'C'] D = None assert refcount(D, '!') > 0 # None = 1 def func(): assert A == B == ['A'] a = A assert refcount(a) == 3 # global A # SyntaxError: name 'A' is used prior to global declaration # A = a # (local a).refcount = 1, (global a).refcount = 2 #assert A == 3 assert refcount(C) == 1 c = C assert refcount(C) == refcount(c) == 2 c.append('here') assert c == ['A','A','C', 'here'] assert refcount(C) == 2 E = ['E'] assert refcount(E) == 1 D = [E] assert refcount(E) == 2 assert refcount(D) == 1 E.append(A) assert E == ['E', ['A']] assert refcount(A) == 4 return E e = func() assert refcount(e) == 1 assert refcount(A) == 3 # Memory allocation and garbage collection are orthogonal concepts to variable declaration and initialization. # Variable scope is a tangential concept. # # In C, there is no garbage collector: you must ``free`` declared variables in order to release the memory. In C++, variables are defined in a constructor method (like ``object.__init__()`` in Python) and freed in a destructor method (like ``object.__del__()`` in Python). In Java, there's a garbage collector, too. # # We usually don't ``del(variable)`` in Python because the garbage collector will free that memory anyway whenever it happens to run and the refcount is zero because the variable has fallen out of scope. # # In practice, we name global variables in ``ALL_CAPS`` (and may expect them to be constants). We wrap 'private' variable names with dunder (``__variable__``) so that other code can't modify those object attributes (due to 'name mangling'). Sometimes, we name variables with a single ``_underscore`` in order to avoid a 'variable name collision' with outer scopes (or to indicate, by convention, that a variable is a local variable) # # In practice, we try to avoid using globals because when or if we try to add threads (or port to C/C++), we're never quite sure whether one thread has modified that global; that's called a *race condition*. Some languages -- particularly functional languages like Haskell and Erlang -- only have mostly all immutable variables; which avoids race conditions (and the necessary variable locking that's slowing down Python GIL removal efforts). # # Is it a box or a bucket? # It's a smart pointer to an allocated section of RAM. # # When do we get a new box and throw an old one away? Is there a name for the box and the thing in the bucket? Does the bucket change size when? # # I think the box/bucket metaphor is confusing and limiting; but I've been doing this for a long time: it's a leaky abstraction. # # - https://en.wikipedia.org/wiki/Memory_leak # - https://en.wikipedia.org/wiki/Race_condition # - https://en.wikipedia.org/wiki/Smart_pointer # Commands to build this environment: # ```bash # conda create -n notebooks python==3.6 notebook pip # source activate notebooks # cd notebooks; mkdir -p src/notebooks; cd src/notebooks # jupyter-notebook & # jupyter-nbconvert --to python ./010-variables.ipng # ``` -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sun Jun 3 23:32:32 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 3 Jun 2018 20:32:32 -0700 Subject: [Edu-sig] names versus objects, reference counting etc. (was Code to Joy...) Message-ID: Responding to the most recent by Wes... Excellent & Comprehensive. Thanks for bringing sys.refcount to the table. I think newcomers sometimes grow in confidence when they get these peeks into back stage behind-the-scenes stuff. As long as we express it clearly, we're putting folks on a fast track to becoming "insiders". ? > # We usually don't ``del(variable)`` in Python because the garbage > collector will free that memory anyway whenever it happens to run and the > refcount is zero because the variable has fallen out of scope. > # > A tiny point: del variable is slightly more correct than del(variable) following the rule that "no keyword is a callable". You have it right in your dialog with the interpreter. Remembering that rule saves people treating if and return as callables as well, which I consider an "accent". if(condition): return(object) Still works. You see this when students are coming from other languages. Just the parens aren't doing anything. >>> import keyword >>> keyword.kwlist A list of not-callable names. ? > # In practice, we name global variables in ``ALL_CAPS`` (and may expect > them to be constants). We wrap 'private' variable names with dunder > (``__variable__``) so that other code can't modify those object attributes > (due to 'name mangling'). > ?I believe best practice is to put the double-underlines only on the left e.g. hidden = __variable The two underlines on the left side are sufficient to provoke name mangling. The rule here is: Python provides us with the special names ( __ribs__ ); we don't create them. ? > Sometimes, we name variables with a single ``_underscore`` in order to > avoid a 'variable name collision' with outer scopes (or to indicate, by > convention, that a variable is a local variable) > # > ?Yes. I tell people the _semi_private names are not guaranteed to stay the same from version to version i.e. the coder is telling the code reader "use this at your own risk, I'm not guaranteeing it'll still be there later". I.e. _semi_private names are not part of the official API, are specifically excluded therefrom. Often used for method names internal to classes. The same goes for __super_private, only more so. ? > # In practice, we try to avoid using globals because when or if we try to > add threads (or port to C/C++), we're never quite sure whether one thread > has modified that global; that's called a *race condition*. Some languages > -- particularly functional languages like Haskell and Erlang -- only have > mostly all immutable variables; which avoids race conditions (and the > necessary variable locking that's slowing down Python GIL removal efforts). > ?Yes, in practice best to have globals be immutable type objects, not a place to store state. I think of the django settings.py and other such config files as places to store framework-wide globals. ? > # > # Is it a box or a bucket? > # It's a smart pointer to an allocated section of RAM. > # > ?The allocated section of RAM is the box or bucket. Names and Objects are distinct. Names (pointers) go to the left of the assignment operator, Objects (containers) to the right of same. ? > # When do we get a new box and throw an old one away? Is there a name for > the box and the thing in the bucket? Does the bucket change size when? > # > ?Bucket = Box = Object (on the heap). Name = Post-it = Label = Tag https://flic.kr/p/DQb8t6 Names must take up a little bit of memory too. Very long names take up a little more. ? > # I think the box/bucket metaphor is confusing and limiting; but I've been > doing this for a long time: it's a leaky abstraction. > # > # - https://en.wikipedia.org/wiki/Memory_leak > # - https://en.wikipedia.org/wiki/Race_condition > # - https://en.wikipedia.org/wiki/Smart_pointer > > ?Lets not forget weakref -- worth bringing in right when we're talking about garbage collection and reference counts. https://docs.python.org/3/library/weakref.html ? Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Mon Jun 4 04:02:21 2018 From: wes.turner at gmail.com (Wes Turner) Date: Mon, 4 Jun 2018 04:02:21 -0400 Subject: [Edu-sig] names versus objects, reference counting etc. (was Code to Joy...) In-Reply-To: References: Message-ID: On Sunday, June 3, 2018, kirby urner wrote: > Responding to the most recent by Wes... > > Excellent & Comprehensive. Thanks for bringing sys.refcount to the table. > > I think newcomers sometimes grow in confidence when they get these peeks > into back stage behind-the-scenes stuff. > > As long as we express it clearly, we're putting folks on a fast track to > becoming "insiders". > ? > >> # We usually don't ``del(variable)`` in Python because the garbage >> collector will free that memory anyway whenever it happens to run and the >> refcount is zero because the variable has fallen out of scope. >> # >> > > A tiny point: > > del variable > > is slightly more correct than > > del(variable) > > following the rule that "no keyword is a callable". > > You have it right in your dialog with the interpreter. > > Remembering that rule saves people treating if and return as callables as > well, which I consider an "accent". > > if(condition): > return(object) > > Still works. You see this when students are coming from other languages. > > Just the parens aren't doing anything. > > >>> import keyword > >>> keyword.kwlist > > A list of not-callable names. > ? > >> # In practice, we name global variables in ``ALL_CAPS`` (and may expect >> them to be constants). We wrap 'private' variable names with dunder >> (``__variable__``) so that other code can't modify those object attributes >> (due to 'name mangling'). >> > > > ?I believe best practice is to put the double-underlines only on the left > e.g. hidden = __variable > > The two underlines on the left side are sufficient to provoke name > mangling. > > The rule here is: Python provides us with the special names ( __ribs__ ); > we don't create them. > > ? > >> Sometimes, we name variables with a single ``_underscore`` in order to >> avoid a 'variable name collision' with outer scopes (or to indicate, by >> convention, that a variable is a local variable) >> # >> > > > ?Yes. I tell people the _semi_private names are not guaranteed to stay > the same from version to version i.e. the coder is telling the code reader > "use this at your own risk, I'm not guaranteeing it'll still be there > later". > > I.e. _semi_private names are not part of the official API, are > specifically excluded therefrom. > > Often used for method names internal to classes. > > The same goes for __super_private, only more so. > > ? > >> # In practice, we try to avoid using globals because when or if we try to >> add threads (or port to C/C++), we're never quite sure whether one thread >> has modified that global; that's called a *race condition*. Some languages >> -- particularly functional languages like Haskell and Erlang -- only have >> mostly all immutable variables; which avoids race conditions (and the >> necessary variable locking that's slowing down Python GIL removal efforts). >> > > ?Yes, in practice best to have globals be immutable type objects, not a > place to store state. > > I think of the django settings.py and other such config files as places to > store framework-wide globals. > ? > >> # >> # Is it a box or a bucket? >> # It's a smart pointer to an allocated section of RAM. >> # >> > > ?The allocated section of RAM is the box or bucket. > > Names and Objects are distinct. > > Names (pointers) go to the left of the assignment operator, Objects > (containers) to the right of same. > ? > >> # When do we get a new box and throw an old one away? Is there a name for >> the box and the thing in the bucket? Does the bucket change size when? >> # >> > > ?Bucket = Box = Object (on the heap). > > Name = Post-it = Label = Tag > > https://flic.kr/p/DQb8t6 > > Names must take up a little bit of memory too. Very long names take up a > little more. > ? > >> # I think the box/bucket metaphor is confusing and limiting; but I've >> been doing this for a long time: it's a leaky abstraction. >> # >> # - https://en.wikipedia.org/wiki/Memory_leak >> # - https://en.wikipedia.org/wiki/Race_condition >> # - https://en.wikipedia.org/wiki/Smart_pointer >> >> > ?Lets not forget weakref -- worth bringing in right when we're talking > about garbage collection and reference counts. > > https://docs.python.org/3/library/weakref.html > /search objects values reference site:docs.python.org Here's a better site:docs.python.org query: https://www.google.com/search?q=objects+values+reference+site%3Adocs.python.org - https://docs.python.org/3/reference/datamodel.html - assert id(A) == id(B) - assert hash(A) == hash(B) - https://docs.python.org/3/reference/datamodel.html#objects-values-and-types - https://docs.python.org/3/c-api/intro.html#objects-types-and-reference-counts - https://docs.python.org/3/c-api/allocation.html#allocating-objects-on-the-heap - PyObject_Init - PyObject_Del Python Tutor is a web-based way to step through code examples: http://pythontutor.com/visualize.html#mode=edit > ? > Kirby > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Mon Jun 4 04:10:03 2018 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 4 Jun 2018 09:10:03 +0100 Subject: [Edu-sig] Code to Joy in The Economist (June/July 2018) In-Reply-To: References: Message-ID: Kirby, Thank you for your kind words. Andrew has just signed a book deal to be delivered in about a year's time. His task: to write about what it's like to learn to code. We're regularly in touch via email, he's "up for it" (as we say in Britain) and sponge-like in his desire to learn about coding, Python and the culture that surrounds it. He's also looking at other languages too (perhaps C/C++). My hope is he'll demolish some of the toxic and exclusory stereotypes and behaviours associated with coding. I hope he'll celebrate some of the progress we, in the Python community, have worked so hard to bring about in this respect. I hope he'll hold us to account as "the fifth estate", as he calls us in the Economist piece. He gets that coding is both moral and political in nature. He's clever, funny and writes extraordinarily clear and witty prose. He tells a great story too (I've read both his other books). I'm looking forward to reading what he has to say. Best wishes, N. On 02/06/18 21:13, kirby urner wrote: > > > One of my screen scraper friends (always reading) just forwarded this link: > > https://www.1843magazine.com/features/code-to-joy > > A highly literate middle aged writer tackles programming from zero and > winds up in Python after a pilgrimmage through Javascript, and uses the > Twitter API.? He meditates on what learning to code might mean to a > fully developed adult such as himself (connects to Andragogy **). > > Nicholas Tollervey, sometime edu-sig poster and Micro:bit avatar, is > very much a hero in this story, living up to the ideal of a Pythonista as > > (A) not religiously dogmatic (re "language wars") yet > (B) having enthusiasm for sharing Python (without too much proselytizing). > > Bravo on a stellar performance! > > Quincy Larson of freeCodeCamp fame is another champion of openness and > accessibility (and good advice).? I get his emails in my inbox with > gratitude, though I don't follow all the links (helpfully labeled with > estimated reading times, for my internal scheduler?-- thanks for the > meta-data!). > > In the interests of sparking some edu-sig type discussion (this could > fork to a new thread), the author Andrew Smith writes: > > "Variables are best (if imperfectly) understood as the vessels within > which pieces of data are contained, ready to be worked on. Of many > possible data types, the most straightforward are numbers and strings, > string being the name given to text." > > In my classes I readily acknowledge the "variable as container" metaphor > is apt, and agree that Python objects take up memory and so object == > container (with id) is OK too. > > However, the name --> object mapping of a namespace is better imagined > as "luggage tag -> suitcase" relationship. It's not like the Python name > itself is the container on the heap. > > The object in memory is a possibly fat heavy suitcase, stuffed with > stuff (e.g. an HttpResponse).? However the name is more a label, like a > luggage tag on a suitcase (and this is the point). > > Name : Object :: Luggage Tags :: Suitcase > > One suitcase (object) may have many names (connects to garbage > collection discussion).? However at any one moment, a name points to > only one object (the same name in different modules, both running, still > count as different names -- scope matters). > > So yeah, the object itself is a "container" but what it contains may be > tags to other objects. > > Without this separation of "names" from "objects" there's an inevitable > tendency to imagine copies, as how can we have two bowls or boxes with > exactly the same content. > > We don't have a visual metaphor for "two suitcases containing exactly > the same clothes at the same time". > > But we do understand "one suitcase having two or more luggage tags." > > Surely we have two copies, albeit clones of the same thing.? Not so in > Python though.? Python is biased against making gratuitous?copies of > anything.? Keep is spare! (sparse if possible).? Don't clutter memory > with excessive redundancy. > > > Kirby > > ** > http://4dsolutions.net/presentations/pycon2013.pdf > > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > From kirby.urner at gmail.com Fri Jun 8 18:12:42 2018 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 8 Jun 2018 15:12:42 -0700 Subject: [Edu-sig] another perennial topic... callable functions versus types Message-ID: I enjoyed our discussion of post-its versus buckets, or not versus: objects in memory take up space, and so are bucket-like, but look how many labels (post-its) some of them have! I find it useful to have memory take shape as something finite, even when we're enjoying more of it on contemporary devices. Python is biased against making gratuitous copies, or against copying gratuitously, we maybe could say. Memory is respected. L.sort() is "in place" whereas sorted(L) leaves L untouched. This "inplace" idea carries forward as a keyword argument (named parameter) in many cases. I confess, in my own courses, I could do more with deepcopy, explaining what it is and how to do it. I'll get on it. When is it a copy, when a view? is a discussion in pandas as well. Another topic: Another pair of categories I like to tease apart are function versus type, when it comes to what's a callable. range() used to be a function that returned a list. Now it returns an instance of the range type, a sequence. More like dict(), int() and so on. Not like hex(). enumerate() and zip() are likewise calls to classes, triggers to __init__s (birth methods). We're asking for instances. We're calling types. Functions return objects too, so one should not say the difference is whether they return objects. Both do. The difference is instances of a type live on with the methods of that type, whereas a function does not directly bequeath its methods to any "children". Functions are factories of other than instances of themselves, even if they return other functions. What nuances this view is that FunctionType is a type of object, so calling a function is calling a type. However, the way a function responds to being called is like an instance does when its type has a __call__ method defined. === One of my favorite ways to connect classes and functions is to show how a class might "eat" a function such that the function remains callable, and yet the instances may also multiply, in which case the functions compose to create other functions: @Composable # class def F(x): return x + 2 @Composable # class def G(x): return 2 * x H = F * F * F * G * G (H is now a "pipeline" of F(F(F(G(G(x))))) ) More on REPL.it: https://repl.it/@kurner/Composing-Functions (red X warning flag next to lambda expression is bogus, runs fine, Spyder is smarter) Kirby PS: this morning I saw Guido's talk at Stanford on type annotations, which he recently tweeted about [1]. I definitely include mentioning to be on the lookout for such syntax going forward, and not being thrown by it. I emphasize that standard core Python sees annotations more as a type of documentation, with 3rd party hooks understanding them more as directives. [1] https://twitter.com/gvanrossum/status/1003792557652914177 (June 4) -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Fri Jun 8 22:47:32 2018 From: wes.turner at gmail.com (Wes Turner) Date: Fri, 8 Jun 2018 22:47:32 -0400 Subject: [Edu-sig] another perennial topic... callable functions versus types In-Reply-To: References: Message-ID: Python parameter and return type hints are expressed as function annotations which import and derive types from the typing module and the typeshed. - PEP 3107 -- Function Annotations https://www.python.org/dev/peps/pep-3107/ - PEP 0484 -- Type Hints https://www.python.org/dev/peps/pep-0484/ - https://www.python.org/dev/peps/pep-0484/#function-method-overloading - https://www.python.org/dev/peps/pep-0484/#the-typing-module - https://docs.python.org/3/library/typing.html#classes-functions-and-decorators - https://docs.python.org/3/tutorial/controlflow.html#function-annotations - from typing import List, MutableMapping, Hashable, Iterable, AsyncGenerator https://docs.python.org/3/library/typing.html#classes-functions-and-decorators - https://github.com/python/typeshed - https://github.com/python/typeshed/tree/master/third_party/2and3 - FunctionType, CodeType, MappingProxyType, SimpleNamespace, GeneratorType, AsyncGeneratorType, CoroutineType, MethodType, BuiltinFunctionType, TracebackType, FrameType https://github.com/python/typeshed/blob/master/stdlib/3/types.pyi#L25 https://github.com/python/typeshed/blob/master/stdlib/3/inspect.pyi On Fri, Jun 8, 2018 at 6:37 PM kirby urner wrote: > > I enjoyed our discussion of post-its versus buckets, or not versus: > objects in memory take up space, and so are bucket-like, but look how many > labels (post-its) some of them have! > sys.getrefcount(None) > > I find it useful to have memory take shape as something finite, even when > we're enjoying more of it on contemporary devices. Python is biased > against making gratuitous copies, or against copying gratuitously, we maybe > could say. > > Memory is respected. L.sort() is "in place" whereas sorted(L) leaves L > untouched. This "inplace" idea carries forward as a keyword argument > (named parameter) in many cases. > > I confess, in my own courses, I could do more with deepcopy, explaining > what it is and how to do it. I'll get on it. > https://github.com/python/cpython/blob/master/Lib/copy.py - copy() - deepcopy() https://github.com/python/cpython/blob/master/Objects/dictobject.c#L2520 - PyDict_copy https://docs.python.org/3/library/pprint.html#pprint.PrettyPrinter - pprint(depth=n) a, b = [1,], [2,] a.append(a) pprint.pprint(a) pprint.pprint(a, depth=1) "Why are these methods faster?" - https://pandas.pydata.org/pandas-docs/stable/enhancingperf.html - https://ray.readthedocs.io/en/latest/pandas_on_ray.html - https://github.com/alex/zero_buffer/blob/master/zero_buffer.py > > When is it a copy, when a view? is a discussion in pandas as well. > - https://github.com/apache/arrow - https://arrow.apache.org/ - zero-copy streaming data > Another topic: > > Another pair of categories I like to tease apart are function versus type, > when it comes to what's a callable. > > range() used to be a function that returned a list. Now it returns an > instance of the range type, a sequence. More like dict(), int() and so > on. Not like hex(). > > enumerate() and zip() are likewise calls to classes, triggers to __init__s > (birth methods). We're asking for instances. We're calling types. > > Functions return objects too, so one should not say the difference is > whether they return objects. Both do. > > The difference is instances of a type live on with the methods of that > type, whereas a function does not directly bequeath its methods to any > "children". > class A(): pass def func(): print(1) A.__dict__['func'] = func a = () a.__dict__['here'] = func a.__class__.__dict__['func2'] = func b = A() assert hasattr(b, 'here') == False assert hasattr(a, 'func') == True assert hasattr(a, 'func2') == True # isinstance / MRO > > > Functions are factories of other than instances of themselves, even if > they return other functions. > > What nuances this view is that FunctionType is a type of object, so > calling a function is calling a type. > > However, the way a function responds to being called is like an instance > does when its type has a __call__ method defined. > Is a generator a callable? > > === > > One of my favorite ways to connect classes and functions is to show how a > class might "eat" a function such that the function remains callable, and > yet the instances may also multiply, in which case the functions compose to > create other functions: > > @Composable # class > def F(x): > return x + 2 > > @Composable # class > def G(x): > return 2 * x > > H = F * F * F * G * G > > (H is now a "pipeline" of F(F(F(G(G(x))))) ) > From https://medium.com/@westurner/the-fn-py-fn-monad-optionable-f11ceefb567b : "The fn.py fn.monad.optionable decorator ? @optionable ? makes functional composition with chaining easy, too: https://github.com/kachayev/fn.py/blob/master/README.rst#functional-style-for-error-handling " > > More on REPL.it: > > https://repl.it/@kurner/Composing-Functions > > (red X warning flag next to lambda expression is bogus, runs fine, Spyder > is smarter) > > Kirby > > PS: this morning I saw Guido's talk at Stanford on type annotations, > which he recently tweeted about [1]. I definitely include mentioning to be > on the lookout for such syntax going forward, and not being thrown by it. > I emphasize that standard core Python sees annotations more as a type of > documentation, with 3rd party hooks understanding them more as directives. > Is there anything to do runtime type checking from annotations (just like pycontracts; maybe even with the additional constraints language)? > > [1] > https://twitter.com/gvanrossum/status/1003792557652914177 > (June 4) > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Fri Jun 8 22:58:24 2018 From: wes.turner at gmail.com (Wes Turner) Date: Fri, 8 Jun 2018 22:58:24 -0400 Subject: [Edu-sig] another perennial topic... callable functions versus types In-Reply-To: References: Message-ID: On Fri, Jun 8, 2018 at 10:47 PM Wes Turner wrote: > Python parameter and return type hints are expressed as function > annotations which import and derive types from the typing module and the > typeshed. > > - PEP 3107 -- Function Annotations > https://www.python.org/dev/peps/pep-3107/ > > - PEP 0484 -- Type Hints > https://www.python.org/dev/peps/pep-0484/ > > - https://www.python.org/dev/peps/pep-0484/#function-method-overloading > - https://www.python.org/dev/peps/pep-0484/#the-typing-module > - > https://docs.python.org/3/library/typing.html#classes-functions-and-decorators > > - https://docs.python.org/3/tutorial/controlflow.html#function-annotations > > - from typing import List, MutableMapping, Hashable, Iterable, > AsyncGenerator > > https://docs.python.org/3/library/typing.html#classes-functions-and-decorators > > - https://github.com/python/typeshed > - https://github.com/python/typeshed/tree/master/third_party/2and3 > > - FunctionType, CodeType, > MappingProxyType, SimpleNamespace, > GeneratorType, AsyncGeneratorType, > CoroutineType, > MethodType, BuiltinFunctionType, > TracebackType, FrameType > https://github.com/python/typeshed/blob/master/stdlib/3/types.pyi#L25 > https://github.com/python/typeshed/blob/master/stdlib/3/inspect.pyi > > > > On Fri, Jun 8, 2018 at 6:37 PM kirby urner wrote: > >> >> I enjoyed our discussion of post-its versus buckets, or not versus: >> objects in memory take up space, and so are bucket-like, but look how many >> labels (post-its) some of them have! >> > > sys.getrefcount(None) > > >> >> I find it useful to have memory take shape as something finite, even when >> we're enjoying more of it on contemporary devices. Python is biased >> against making gratuitous copies, or against copying gratuitously, we maybe >> could say. >> >> Memory is respected. L.sort() is "in place" whereas sorted(L) leaves L >> untouched. This "inplace" idea carries forward as a keyword argument >> (named parameter) in many cases. >> >> I confess, in my own courses, I could do more with deepcopy, explaining >> what it is and how to do it. I'll get on it. >> > https://docs.python.org/3/library/copy.html > > https://github.com/python/cpython/blob/master/Lib/copy.py > - copy() > - deepcopy() > > https://github.com/python/cpython/blob/master/Objects/dictobject.c#L2520 > - PyDict_copy > > https://docs.python.org/3/library/pprint.html#pprint.PrettyPrinter > - pprint(depth=n) > a, b = [1,], [2,] > a.append(a) > pprint.pprint(a) > pprint.pprint(a, depth=1) > > > "Why are these methods faster?" > - https://pandas.pydata.org/pandas-docs/stable/enhancingperf.html > - https://ray.readthedocs.io/en/latest/pandas_on_ray.html > - https://github.com/alex/zero_buffer/blob/master/zero_buffer.py > >> >> When is it a copy, when a view? is a discussion in pandas as well. >> > - https://github.com/apache/arrow > - https://arrow.apache.org/ > - zero-copy streaming data > > >> Another topic: >> >> Another pair of categories I like to tease apart are function versus >> type, when it comes to what's a callable. >> >> range() used to be a function that returned a list. Now it returns an >> instance of the range type, a sequence. More like dict(), int() and so >> on. Not like hex(). >> >> enumerate() and zip() are likewise calls to classes, triggers to >> __init__s (birth methods). We're asking for instances. We're calling >> types. >> >> Functions return objects too, so one should not say the difference is >> whether they return objects. Both do. >> >> The difference is instances of a type live on with the methods of that >> type, whereas a function does not directly bequeath its methods to any >> "children". >> > > class A(): pass > def func(): print(1) > A.__dict__['func'] = func > a = () > a.__dict__['here'] = func > a.__class__.__dict__['func2'] = func > b = A() > assert hasattr(b, 'here') == False > assert hasattr(a, 'func') == True > assert hasattr(a, 'func2') == True > # isinstance / MRO > >> >> >> Functions are factories of other than instances of themselves, even if >> they return other functions. >> >> What nuances this view is that FunctionType is a type of object, so >> calling a function is calling a type. >> >> However, the way a function responds to being called is like an instance >> does when its type has a __call__ method defined. >> > > Is a generator a callable? > > >> >> === >> >> One of my favorite ways to connect classes and functions is to show how a >> class might "eat" a function such that the function remains callable, and >> yet the instances may also multiply, in which case the functions compose to >> create other functions: >> >> @Composable # class >> def F(x): >> return x + 2 >> >> @Composable # class >> def G(x): >> return 2 * x >> >> H = F * F * F * G * G >> >> (H is now a "pipeline" of F(F(F(G(G(x))))) ) >> > > From > https://medium.com/@westurner/the-fn-py-fn-monad-optionable-f11ceefb567b > : > "The fn.py fn.monad.optionable decorator ? @optionable ? makes > functional composition with chaining easy, too: > https://github.com/kachayev/fn.py/blob/master/README.rst#functional-style-for-error-handling > " > > >> >> More on REPL.it: >> >> https://repl.it/@kurner/Composing-Functions >> >> (red X warning flag next to lambda expression is bogus, runs fine, Spyder >> is smarter) >> >> Kirby >> >> PS: this morning I saw Guido's talk at Stanford on type annotations, >> which he recently tweeted about [1]. I definitely include mentioning to be >> on the lookout for such syntax going forward, and not being thrown by it. >> I emphasize that standard core Python sees annotations more as a type of >> documentation, with 3rd party hooks understanding them more as directives. >> > > Is there anything to do runtime type checking from annotations (just like > pycontracts; maybe even with the additional constraints language)? > > > >> >> [1] >> https://twitter.com/gvanrossum/status/1003792557652914177 >> (June 4) >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Jun 9 11:45:37 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 9 Jun 2018 08:45:37 -0700 Subject: [Edu-sig] generators in the field... Message-ID: Wes asked (a couple posts back): is a generator a type of callable? Those copy/deepcopy links were helpful, I hope to any Python students trekking through here. edu-sig is a great climb for those into learning curves. Most definitely a generator is a "callable" as, in my Python for Kids (not a trademark [nTM]), a callable is simply "something with a mouth" where "a mouth" is an open-closed paren, with or without arguments. In a course or presentation, one might go into "emoticons" here, as distinct from emoji, coming before emoji in the evolution e.g. :-D and :-( were part of "ascii email" early on (SMTP etc.). In this older emoticon language, :-() shows "()" as a "mouth" i.e. parens are lips, and a callable is "that which may have a mouth" in this sense (albeit a sideways one). The rule "no keyword is a callable" is the same as saying, no keyword has a mouth. There's no True() or if() and print() is not a keyword (used to be, in older Pythons). print is a function, and as such is a callable. Generator function: >>> new_gen = pi() # returns digits of pi [1] >>> next(new_gen) 3 >>> next(new_gen) 1 >>> next(new_gen) 4 >>> next(new_gen) 1 >>> next(new_gen) 9 ... One of my favorite decorators comes from a David Beazely Youtube I watched where he goes something like: def nudge(f): "nudger" def started(): g = f() g.send(None) # or next(g) -- goes to first yield and waits return g return started What this does is take a generator object at define time and replace it with a proxy wherein it has already been "nudged" to the first yield, and is now waiting to be fed to next() or to have send() fire, which will at this point, after nudging, have a corresponding yield queued up to receive whatever. As ya'll recall, a generator on birth has its execution pointer still at the top, no steps taken, and the first next or send(None) takes it to the first yield, where it may output, and then "waits" (actually suspends execution and returns control to the caller thread). next(gen) always means: take steps to the next yield, or: raise a StopIteration if hitting return or falling off the end. In other words, at birth, a generator is not ready for any substantive obj.send(arg) because it's not at a yield yet. nudge (above) takes care of that for us, returning a proxy generator with "its pump already primed" so to speak, g.send(None) having taken g to the first yield already. In action: @nudge def get_mail(): "Get mail!" pickup = "nothing yet..." while True: pickup = (yield "Thank you for sending me {}".format(pickup)) if pickup == "q": break gm = get_mail() # a generator function try: while True: email = input("What to send? (q to quit): ") output = gm.send(email) print(output) except StopIteration: print("We appreciate your business") RUNTIME: What to send? (q to quit): birthday card Thank you for sending me birthday card What to send? (q to quit): postcard Thank you for sending me postcard What to send? (q to quit): q We appreciate your business Note: David Beazely is not in favor of having having a single yield both output and take input, as above, regarding such a double-duty yield as too confusing. My code might count as demented in his book. One of my favorite use of the generator-with-send ability patterns is what I call Tractor in a Farm [nTM]. Farm(ville) is an n x m array of dots or other character, could be numbers, and a Tractor is an iterator following some raster pattern, of row: each column, next row: each column and so on. When it finishes row 0 it jumps to the start of row 1, so not really a tractor -- more like how people read these left-to-right languages (like you're reading now). If the field were a cylinder, with East and West connecting, the tractor would go in a North to South spiral. At the bottom right, a Tractor starts over at the top left (so a donut?). Change in [row][column] (position) is what next() has the tractor do (there's a __next__ method). But then "fuel level" is dropping with each advance in some models, and without the occasional "send" of more fuel, the tractor will come to a grinding halt in the middle of a field somewhere (demented, but good for learning purposes). What's useful about this pattern is it's all "ASCII art" or "Unicode art" at first, but yet gives the idea of "pixels" (row, column) and therefore "pixel depth" (the bits needed to define a character), so the transition to a discussion of binary files, say with R, G, B layers, is pretty easy. The iterator : iterable relationship, between Tractor(s) : Field is pretty intuitive also, owing to the extended metaphor. The tractor is even simpler than the turtle concept deriving from Logo, as the tractor has a fixed and closed path. Finally, said tractors have a "read" and "write" verbs, or "sense" and "plant", meaning they're able to "write" to whatever cell (patch of Field) they're in (over), replacing the current character with another if need be, according to whatever rule. In Pythonic Andragogy slides, a TextWriterTractor (subclass of Tractor) starts writing a user-provided phrase at whatever initially passed-in (x,y) position in the field. Example: Just Use It. A CropCircleTractor (another subclass) reads the Field as complex numbers and plants "@" where z = z * z + current(row, column) doesn't spiral out after n iterations. Result: A Mandelbrot Set. https://flic.kr/p/9AWnC2 (results of plowing) Pythonic Andragogy slides: http://4dsolutions.net/presentations/pycon2013.pdf (not saying "not for kids") An ongoing theme: http://opensourcebridge.org/proposals/1102 Kirby [1] https://github.com/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb (see last code cell for mysterious Pi generator discussed here on edu-sig in chapters past) -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Jun 9 11:55:05 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 9 Jun 2018 08:55:05 -0700 Subject: [Edu-sig] generators in the field... In-Reply-To: References: Message-ID: > > In Pythonic Andragogy slides, a TextWriterTractor (subclass of Tractor) > starts writing a user-provided phrase at whatever initially passed-in (x,y) > position in the field. Example: Just Use It. > > A CropCircleTractor (another subclass) reads the Field as complex numbers > and plants "@" where z = z * z + current(row, column) doesn't spiral out > after n iterations. Result: A Mandelbrot Set. > > https://flic.kr/p/9AWnC2 (results of plowing) > ?My apologies if the above link does not work for you. The Flickr shortcut feature seems to be more problematic that it used to be, don't know why. https://www.flickr.com/photos/kirbyurner/5646223789/sizes/l ?... is another option. Shows some ASCII art made using Tractors in a Field pattern. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergio_r at mail.com Mon Jun 11 09:35:23 2018 From: sergio_r at mail.com (Sergio Rojas) Date: Mon, 11 Jun 2018 15:35:23 +0200 Subject: [Edu-sig] On the Education Summit at Pycon In-Reply-To: References: Message-ID: On 10/05/18 16:15, Jeff Elkner wrote: > Dear edu-sig friends, > > We had an interesting discussion at the Education Summit today at > Pycon about ways to better engage folks between Pycons. > Hi Jeff, Are the documents of the Pycon Education Summit available on the Internet? > As a public school teacher, I have a particular interest in python in > k12 institutions How are you using Python in teaching and learning? I finished a first crude draft of a book devoted mostly to Mathematics (Prealgebra topics ) via Python https://github.com/rojassergio/Prealgebra-via-Python-Programming ) which I want to improve (in content and readability) and perhaps the discussions of the Educational Summit could be of help to better shape the book on the content of topics. Regards, Sergio ? ? ---------------------------------------------------------------------- Message: 1 Date: Thu, 10 May 2018 17:15:28 -0400 From: Jeff Elkner To: "edu-sig at python.org" Subject: [Edu-sig] What do folks think of creating a #python-k12 channel on freenode? Message-ID: Content-Type: text/plain; charset="utf-8" Dear edu-sig friends, We had an interesting discussion at the Education Summit today at Pycon about ways to better engage folks between Pycons. As a public school teacher, I have a particular interest in python in k12 institutions, and in addition to posting more often on this list, I am considering setting up an irc channel on freenode (#python-k12 ?) ? From jeff at elkner.net Mon Jun 11 11:15:36 2018 From: jeff at elkner.net (Jeff Elkner) Date: Mon, 11 Jun 2018 11:15:36 -0400 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. Message-ID: Hi Sergio, I would be delighted to see this mailing list be used for collaboration and discussion around OER learning materials for Python. I'm working on remixing a wonderful textbook written for use with the College Board's AP CS Principles course: http://www.openbookproject.net/books/StudentCSP/ I've got the project on Gitlab at: https://gitlab.com/jelkner/StudentCSP Since students are the final judges of the effectiveness of education resources, I involve my students as testers / reviewers using issues tracking on Gitlab as the way for them to provide feedback. Shushantika Barua (cc'd here) proved an excellent proof reader / editor / tester. Taking a look at the issues she filed shows the process: https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=%E2%9C%93&state=closed I have a friend and colleague, Isaac Zawolo (cc'd here) who teaches math at my school. We have been talking about integrating the learning of math and computer programming for several years. We also have a large community of first language Spanish speakers at our school. So, Sergio, if you are interested, I would be glad to get my students involved in testing and contributing to both https://github.com/rojassergio/Prealgebra-via-Python-Programming and https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador. Let me know when you feel you have something ready for testing. Thanks! Jeff Elkner Arlington Career Center, Arlington, VA ?Let's work together to create a just and sustainable world!? ??????? Original Message ??????? On June 11, 2018 9:35 AM, Sergio Rojas wrote: > ?? > > On 10/05/18 16:15, Jeff Elkner wrote: > > > Dear edu-sig friends, > > > > We had an interesting discussion at the Education Summit today at > > > > Pycon about ways to better engage folks between Pycons. > > Hi Jeff, > > Are the documents of the Pycon Education Summit available on the Internet? > > > As a public school teacher, I have a particular interest in python in > > > > k12 institutions > > How are you using Python in teaching and learning? > > I finished a first crude draft of a book devoted mostly to Mathematics > > (Prealgebra topics ) via Python > > https://github.com/rojassergio/Prealgebra-via-Python-Programming ) > > which I want to improve (in content and readability) > > and perhaps the discussions of the Educational Summit > > could be of help to better shape the book on the content of topics. > > Regards, > > Sergio > > ? > > ? > > > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Message: 1 > > Date: Thu, 10 May 2018 17:15:28 -0400 > > From: Jeff Elkner jeff at elkner.net > > To: "edu-sig at python.org" edu-sig at python.org > > Subject: [Edu-sig] What do folks think of creating a #python-k12 > > channel on freenode? > > Message-ID: > > VZIaifBvT3x43c5hYiGYuuBbco2UUmLN6mSTAcaJvyV50_KvaE9i64p83woqKoK5HY4A0zqNzpiolNsAxlMugEqQzt8I8C45aoT9XFpekS4=@elkner.net > > Content-Type: text/plain; charset="utf-8" > > Dear edu-sig friends, > > We had an interesting discussion at the Education Summit today at > > Pycon about ways to better engage folks between Pycons. > > As a public school teacher, I have a particular interest in python in > > k12 institutions, and in addition to posting more often on this list, > > I am considering setting up an irc channel on freenode (#python-k12 ?) > > Edu-sig mailing list > > Edu-sig at python.org > > https://mail.python.org/mailman/listinfo/edu-sig From sergio_r at mail.com Wed Jun 13 08:30:56 2018 From: sergio_r at mail.com (Sergio Rojas) Date: Wed, 13 Jun 2018 14:30:56 +0200 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From sergio_r at mail.com Wed Jun 13 09:12:06 2018 From: sergio_r at mail.com (Sergio Rojas) Date: Wed, 13 Jun 2018 15:12:06 +0200 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: Hi Jeff, In relation to your call on > I would be delighted to see this mailing list be used for > collaboration and discussion around OER learning materials for Python. > Perhaps we could start making it more formally, in building a learning Python environment in the context on teaching and learning math at the elementary/high school level. It seems that you already have a nice vigorous start up with your colleagues and students which can bring this collaboration to an higher level. revising the CSP openbook project [ http://www.openbookproject.net/books/StudentCSP/index.html ]. I also wrote to Sebastian (cc this email to him) who has good ideas on the same vein. Hopefully he might have some time to share on getting something done in this endeavor. > > Let me know when you feel you have something ready for testing. > It would be nice to hear recommendations for additions and modifications to the content of the book and to the provided codes for each book. At the moment I have not thought about the best way to add suggested modifications to the respective book, directly by everyone, but taken care that the project derive somewhere else. Currently, I am revising the write up of the Prealgebra book and trying to rewrite the codes in a more pythonic fashion, to add a chapter on coding using pure python style to gain speed in code execution. Regards, Sergio ? ? Sent:?Monday, June 11, 2018 at 11:15 AM From:?"Jeff Elkner" To:?"Sergio Rojas" , "edu-sig at python.org" Subject:?Collaboratively developing OER Python textbooks. Hi Sergio, I would be delighted to see this mailing list be used for collaboration and discussion around OER learning materials for Python. I'm working on remixing a wonderful textbook written for use with the College Board's AP CS Principles course: http://www.openbookproject.net/books/StudentCSP/ I've got the project on Gitlab at: https://gitlab.com/jelkner/StudentCSP[https://gitlab.com/jelkner/StudentCSP] Since students are the final judges of the effectiveness of education resources, I involve my students as testers / reviewers using issues tracking on Gitlab as the way for them to provide feedback. Shushantika Barua (cc'd here) proved an excellent proof reader / editor / tester. Taking a look at the issues she filed shows the process: https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=%E2%9C%93&state=closed[https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=%E2%9C%93&state=closed] I have a friend and colleague, Isaac Zawolo (cc'd here) who teaches math at my school. We have been talking about integrating the learning of math and computer programming for several years. We also have a large community of first language Spanish speakers at our school. So, Sergio, if you are interested, I would be glad to get my students involved in testing and contributing to both https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming] and https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador[https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador]. Let me know when you feel you have something ready for testing. Thanks! Jeff Elkner Arlington Career Center, Arlington, VA ?Let's work together to create a just and sustainable world!? ??????? Original Message ??????? On June 11, 2018 9:35 AM, Sergio Rojas wrote: > ?? > > On 10/05/18 16:15, Jeff Elkner wrote: > > > Dear edu-sig friends, > > > > We had an interesting discussion at the Education Summit today at > > > > Pycon about ways to better engage folks between Pycons. > > Hi Jeff, > > Are the documents of the Pycon Education Summit available on the Internet? > > > As a public school teacher, I have a particular interest in python in > > > > k12 institutions > > How are you using Python in teaching and learning? > > I finished a first crude draft of a book devoted mostly to Mathematics > > (Prealgebra topics ) via Python > > https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming] ) > > which I want to improve (in content and readability) > > and perhaps the discussions of the Educational Summit > > could be of help to better shape the book on the content of topics. > > Regards, > > Sergio > > ? > > ? > > > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Message: 1 > > Date: Thu, 10 May 2018 17:15:28 -0400 > > From: Jeff Elkner jeff at elkner.net > > To: "edu-sig at python.org" edu-sig at python.org > > Subject: [Edu-sig] What do folks think of creating a #python-k12 > > channel on freenode? > > Message-ID: > > VZIaifBvT3x43c5hYiGYuuBbco2UUmLN6mSTAcaJvyV50_KvaE9i64p83woqKoK5HY4A0zqNzpiolNsAxlMugEqQzt8I8C45aoT9XFpekS4=@elkner.net > > Content-Type: text/plain; charset="utf-8" > > Dear edu-sig friends, > > We had an interesting discussion at the Education Summit today at > > Pycon about ways to better engage folks between Pycons. > > As a public school teacher, I have a particular interest in python in > > k12 institutions, and in addition to posting more often on this list, > > I am considering setting up an irc channel on freenode (#python-k12 ?) > > Edu-sig mailing list > > Edu-sig at python.org > > https://mail.python.org/mailman/listinfo/edu-sig[https://mail.python.org/mailman/listinfo/edu-sig] ? From kirby.urner at gmail.com Thu Jun 14 15:28:43 2018 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 14 Jun 2018 12:28:43 -0700 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: I notice the worries about dragons expressed here: http://www.openbookproject.net/books/StudentCSP/CSPRepeatNumbers/range.html The type versus function distinction is too big an idea to get into here. Skulpt is 2.x flavored for sure. We notice that in Codesters as well. This looks like an excellent resource regardless and I plan on sharing a link to this book in class tonight, in part just to encourage a culture wherein collaboration on teaching texts is more the norm than the exception. Good work. On another topic (but related to co-authoring teaching materials): When do teachers think it's appropriate to start in with LaTeX? Given it works in Jupyter Notebooks between $s, without downloading anything fancy, I'm thinking no later than 9th grade? That's assuming the school is using Jupyter Notebooks in 9th grade. I'd hate to imagine a school that isn't (just kidding, I know that most don't, no need to imagine). I'm far from being a master of LaTeX myself, however I plan to introduce it to a class of middle-to-high schoolers later this month, when I teach Martian Math. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Thu Jun 14 15:47:36 2018 From: wes.turner at gmail.com (Wes Turner) Date: Thu, 14 Jun 2018 15:47:36 -0400 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: On Thu, Jun 14, 2018 at 3:29 PM kirby urner wrote: > > I notice the worries about dragons expressed here: > > http://www.openbookproject.net/books/StudentCSP/CSPRepeatNumbers/range.html > > The type versus function distinction is too big an idea to get into here. > Skulpt is 2.x flavored for sure. We notice that in Codesters as well. > > This looks like an excellent resource regardless and I plan on sharing a > link to this book in class tonight, in part just to encourage a culture > wherein collaboration on teaching texts is more the norm than the exception. > > Good work. > > On another topic (but related to co-authoring teaching materials): > > When do teachers think it's appropriate to start in with LaTeX? Given it > works in Jupyter Notebooks between $s, without downloading anything fancy, > I'm thinking no later than 9th grade? That's assuming the school is using > Jupyter Notebooks in 9th grade. I'd hate to imagine a school that isn't > (just kidding, I know that most don't, no need to imagine). > > I'm far from being a master of LaTeX myself, however I plan to introduce > it to a class of middle-to-high schoolers later this month, when I teach > Martian Math. > https://en.wikipedia.org/wiki/LaTeX#Example https://learnxinyminutes.com/docs/latex/ """ .. index:: MathJax .. _mathjax: MathJax ```````` | Wikipedia: https://en.wikipedia.org/wiki/MathJax | Docs: http://docs.mathjax.org/en/latest/tex.html MathJax is a :ref:`Javascript` library for displaying :ref:`mathml`, :ref:`latex`, and :ref:`ASCIIMathML` markup in a browser. * http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference MathJax and :ref:`IPython Notebook` / :ref:`Jupyter Notebook`: * http://ipython.org/ipython-doc/dev/install/install.html#mathjax * https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Typesetting%20Equations.ipynb [ https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Typesetting%20Equations.html ] * http://nbviewer.ipython.org/gist/rpmuller/5920182 """ * https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference * http://data-blog.udacity.com/posts/2016/10/latex-primer/ - This is a great resource for learning LaTeX with/for MathJax in Jupyter Notebooks. At a point, it makes a lot of sense to use executable specifications for mathematical concepts. latex2sympy converts from LaTeX to code that works with the SymPy CAS (Computer Algebra System). https://github.com/augustt198/latex2sympy $ pip install latex2sympy3 # [python3] https://en.wikipedia.org/wiki/Comparison_of_TeX_editors - https://en.wikipedia.org/wiki/LyX - https://twitter.com/wstein389/status/1002446637908811776 > Completely new LaTeX editor in https://cocalc.com . Open source, is written in React, has unlimited multipanel views, realtime collab, records all edits (TimeTravel), forward an inverse search, clickable links in the PDF,supports SageTex out of the box, and autoformat... - https://github.com/jupyterlab/jupyterlab-latex - https://www.google.com/search?q=collaborative+latex > Kirby > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at elkner.net Sun Jun 17 13:25:26 2018 From: jeff at elkner.net (Jeff Elkner) Date: Sun, 17 Jun 2018 13:25:26 -0400 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: Hi Sergio, Seems to me the most effective way of " building a learning Python environment in the context on teaching and learning math at the elementary/high school level" would be to connect with existing efforts and contribute to them. As a full time teacher, I'm in a great place to test out materials with the group of people who matter most in all this, students / learners, but I have only limited time for contributing to the development process, so I need to keep my goals modest. The action is mainly taking place on http://jupyter.org, so the thing for me to do is learn this platform and join this community, and then contribute classroom ready resources to it. Cheers, Jeff ?Let's work together to create a just and sustainable world!? ??????? Original Message ??????? On June 13, 2018 9:12 AM, Sergio Rojas wrote: > ?? > > Hi Jeff, > > In relation to your call on > > > I would be delighted to see this mailing list be used for > > > > collaboration and discussion around OER learning materials for Python. > > Perhaps we could start making it more formally, in building a > > learning Python environment in the context on teaching and learning > > math at the elementary/high school level. > > It seems that you already have a nice vigorous start up with your > > colleagues and students which can bring this collaboration to an higher level. > > revising the CSP openbook project > > [ http://www.openbookproject.net/books/StudentCSP/index.html ]. > > I also wrote to Sebastian (cc this email to him) who has > > good ideas on the same vein. Hopefully he might have some time to share > > on getting something done in this endeavor. > > > Let me know when you feel you have something ready for testing. > > It would be nice to hear recommendations for additions and modifications > > to the content of the book and to the provided codes for each book. > > At the moment I have not thought about the best way to add suggested > > modifications to the respective book, directly by everyone, but > > taken care that the project derive somewhere else. > > Currently, I am revising the write up of the Prealgebra book > > and trying to rewrite the codes in a more pythonic fashion, to add > > a chapter on coding using pure python style to gain speed in code > > execution. > > Regards, > > Sergio > > ? > > ? > > Sent:?Monday, June 11, 2018 at 11:15 AM > > From:?"Jeff Elkner" jeff at elkner.net > > To:?"Sergio Rojas" sergio_r at mail.com, "edu-sig at python.org" edu-sig at python.org > > Subject:?Collaboratively developing OER Python textbooks. > > Hi Sergio, > > I would be delighted to see this mailing list be used for collaboration and discussion around OER learning materials for Python. > > I'm working on remixing a wonderful textbook written for use with the College Board's AP CS Principles course: > > http://www.openbookproject.net/books/StudentCSP/ > > I've got the project on Gitlab at: > > https://gitlab.com/jelkner/StudentCSP[https://gitlab.com/jelkner/StudentCSP] > > Since students are the final judges of the effectiveness of education resources, I involve my students as testers / reviewers using issues tracking on Gitlab as the way for them to provide feedback. Shushantika Barua (cc'd here) proved an excellent proof reader / editor / tester. Taking a look at the issues she filed shows the process: > > https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=?&state=closed[https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=?&state=closed] > > I have a friend and colleague, Isaac Zawolo (cc'd here) who teaches math at my school. We have been talking about integrating the learning of math and computer programming for several years. We also have a large community of first language Spanish speakers at our school. > > So, Sergio, if you are interested, I would be glad to get my students involved in testing and contributing to both https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming] and https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador[https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador]. > > Let me know when you feel you have something ready for testing. > > Thanks! > > Jeff Elkner > > Arlington Career Center, Arlington, VA > > Let's work together to create a just and sustainable world! > > ??????? Original Message ??????? > > On June 11, 2018 9:35 AM, Sergio Rojas sergio_r at mail.com wrote: > > > On 10/05/18 16:15, Jeff Elkner wrote: > > > > > Dear edu-sig friends, > > > > > > We had an interesting discussion at the Education Summit today at > > > > > > Pycon about ways to better engage folks between Pycons. > > > > Hi Jeff, > > > > Are the documents of the Pycon Education Summit available on the Internet? > > > > > As a public school teacher, I have a particular interest in python in > > > > > > k12 institutions > > > > How are you using Python in teaching and learning? > > > > I finished a first crude draft of a book devoted mostly to Mathematics > > > > (Prealgebra topics ) via Python > > > > https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming] ) > > > > which I want to improve (in content and readability) > > > > and perhaps the discussions of the Educational Summit > > > > could be of help to better shape the book on the content of topics. > > > > Regards, > > > > Sergio > > > > Message: 1 > > > > Date: Thu, 10 May 2018 17:15:28 -0400 > > > > From: Jeff Elkner jeff at elkner.net > > > > To: "edu-sig at python.org" edu-sig at python.org > > > > Subject: [Edu-sig] What do folks think of creating a #python-k12 > > > > channel on freenode? > > > > Message-ID: > > > > VZIaifBvT3x43c5hYiGYuuBbco2UUmLN6mSTAcaJvyV50_KvaE9i64p83woqKoK5HY4A0zqNzpiolNsAxlMugEqQzt8I8C45aoT9XFpekS4=@elkner.net > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear edu-sig friends, > > > > We had an interesting discussion at the Education Summit today at > > > > Pycon about ways to better engage folks between Pycons. > > > > As a public school teacher, I have a particular interest in python in > > > > k12 institutions, and in addition to posting more often on this list, > > > > I am considering setting up an irc channel on freenode (#python-k12 ?) > > > > Edu-sig mailing list > > > > Edu-sig at python.org > > > > https://mail.python.org/mailman/listinfo/edu-sig[https://mail.python.org/mailman/listinfo/edu-sig] From wes.turner at gmail.com Sun Jun 17 16:32:45 2018 From: wes.turner at gmail.com (Wes Turner) Date: Sun, 17 Jun 2018 16:32:45 -0400 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: Jupyter, binder-ready, GitHub Topics, Framework :: Jupyter - https://github.com/markusschanta/awesome-jupyter awesome-jupyter - https://github.com/westurner/awesome-jupyter/blob/59e79fb96537d9e65bfb3e027b988956b2e42f42/README.md#jupyter-notebook-jupyterhub-jupyterlab - https://groups.google.com/forum/#!forum/jupyter-education There is a jupyter-education mailing list - https://github.com/topics/binder-ready Jupyter notebook projects that work with Binder can add a Binder badge to their README and/or the 'binder-ready' GitHub topic. - https://github.com/binder-examples Examples of binder-ready Jupyter projects - https://github.com/binder-examples/jupyter-extension How to install jupyter extensions with a binder-ready project: requirements.txt + postBuild https://github.com/quobit/awesome-python-in-education/blob/master/README.md#jupyter - [ ] add link to jupyter-edx-grader-xblock https://github.com/ibleducation/jupyter-edx-grader-xblock > Auto-grade a student assignment created as a Jupyter notebook, using the nbgrader Jupyter extension, and write the score in the Open edX gradebook https://open.edx.org http://docs.edx.org https://github.com/edx/ (Python, Django, JavaScript,) On Sunday, June 17, 2018, Jeff Elkner wrote: > Hi Sergio, > > Seems to me the most effective way of " building a learning Python > environment in the context on teaching and learning math at the > elementary/high school level" would be to connect with existing efforts and > contribute to them. > > As a full time teacher, I'm in a great place to test out materials with > the group of people who matter most in all this, students / learners, but I > have only limited time for contributing to the development process, so I > need to keep my goals modest. > > The action is mainly taking place on http://jupyter.org, so the thing for > me to do is learn this platform and join this community, and then > contribute classroom ready resources to it. > > Cheers, > Jeff > > > ?Let's work together to create a just and sustainable world!? > > ??????? Original Message ??????? > > On June 13, 2018 9:12 AM, Sergio Rojas wrote: > > > ?? > > > > Hi Jeff, > > > > In relation to your call on > > > > > I would be delighted to see this mailing list be used for > > > > > > collaboration and discussion around OER learning materials for Python. > > > > Perhaps we could start making it more formally, in building a > > > > learning Python environment in the context on teaching and learning > > > > math at the elementary/high school level. > > > > It seems that you already have a nice vigorous start up with your > > > > colleagues and students which can bring this collaboration to an higher > level. > > > > revising the CSP openbook project > > > > [ http://www.openbookproject.net/books/StudentCSP/index.html ]. > > > > I also wrote to Sebastian (cc this email to him) who has > > > > good ideas on the same vein. Hopefully he might have some time to share > > > > on getting something done in this endeavor. > > > > > Let me know when you feel you have something ready for testing. > > > > It would be nice to hear recommendations for additions and modifications > > > > to the content of the book and to the provided codes for each book. > > > > At the moment I have not thought about the best way to add suggested > > > > modifications to the respective book, directly by everyone, but > > > > taken care that the project derive somewhere else. > > > > Currently, I am revising the write up of the Prealgebra book > > > > and trying to rewrite the codes in a more pythonic fashion, to add > > > > a chapter on coding using pure python style to gain speed in code > > > > execution. > > > > Regards, > > > > Sergio > > > > > > > > > > > > Sent: Monday, June 11, 2018 at 11:15 AM > > > > From: "Jeff Elkner" jeff at elkner.net > > > > To: "Sergio Rojas" sergio_r at mail.com, "edu-sig at python.org" > edu-sig at python.org > > > > Subject: Collaboratively developing OER Python textbooks. > > > > Hi Sergio, > > > > I would be delighted to see this mailing list be used for collaboration > and discussion around OER learning materials for Python. > > > > I'm working on remixing a wonderful textbook written for use with the > College Board's AP CS Principles course: > > > > http://www.openbookproject.net/books/StudentCSP/ > > > > I've got the project on Gitlab at: > > > > https://gitlab.com/jelkner/StudentCSP[https://gitlab.com/ > jelkner/StudentCSP] > > > > Since students are the final judges of the effectiveness of education > resources, I involve my students as testers / reviewers using issues > tracking on Gitlab as the way for them to provide feedback. Shushantika > Barua (cc'd here) proved an excellent proof reader / editor / tester. > Taking a look at the issues she filed shows the process: > > > > https://gitlab.com/jelkner/StudentCSP/issues?scope=all& > utf8=?&state=closed[https://gitlab.com/jelkner/StudentCSP/ > issues?scope=all&utf8=?&state=closed] > > > > I have a friend and colleague, Isaac Zawolo (cc'd here) who teaches math > at my school. We have been talking about integrating the learning of math > and computer programming for several years. We also have a large community > of first language Spanish speakers at our school. > > > > So, Sergio, if you are interested, I would be glad to get my students > involved in testing and contributing to both https://github.com/ > rojassergio/Prealgebra-via-Python-Programming[https:// > github.com/rojassergio/Prealgebra-via-Python-Programming] and > https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi- > computador[https://github.com/rojassergio/Aprendiendo-a- > programar-en-Python-con-mi-computador]. > > > > Let me know when you feel you have something ready for testing. > > > > Thanks! > > > > Jeff Elkner > > > > Arlington Career Center, Arlington, VA > > > > Let's work together to create a just and sustainable world! > > > > ??????? Original Message ??????? > > > > On June 11, 2018 9:35 AM, Sergio Rojas sergio_r at mail.com wrote: > > > > > On 10/05/18 16:15, Jeff Elkner wrote: > > > > > > > Dear edu-sig friends, > > > > > > > > We had an interesting discussion at the Education Summit today at > > > > > > > > Pycon about ways to better engage folks between Pycons. > > > > > > Hi Jeff, > > > > > > Are the documents of the Pycon Education Summit available on the > Internet? > > > > > > > As a public school teacher, I have a particular interest in python in > > > > > > > > k12 institutions > > > > > > How are you using Python in teaching and learning? > > > > > > I finished a first crude draft of a book devoted mostly to Mathematics > > > > > > (Prealgebra topics ) via Python > > > > > > https://github.com/rojassergio/Prealgebra-via- > Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python- > Programming] ) > > > > > > which I want to improve (in content and readability) > > > > > > and perhaps the discussions of the Educational Summit > > > > > > could be of help to better shape the book on the content of topics. > > > > > > Regards, > > > > > > Sergio > > > > > > Message: 1 > > > > > > Date: Thu, 10 May 2018 17:15:28 -0400 > > > > > > From: Jeff Elkner jeff at elkner.net > > > > > > To: "edu-sig at python.org" edu-sig at python.org > > > > > > Subject: [Edu-sig] What do folks think of creating a #python-k12 > > > > > > channel on freenode? > > > > > > Message-ID: > > > > > > VZIaifBvT3x43c5hYiGYuuBbco2UUmLN6mSTAcaJvyV50_ > KvaE9i64p83woqKoK5HY4A0zqNzpiolNsAxlMugEqQzt8I8C45aoT9XFpekS4=@elkner.net > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Dear edu-sig friends, > > > > > > We had an interesting discussion at the Education Summit today at > > > > > > Pycon about ways to better engage folks between Pycons. > > > > > > As a public school teacher, I have a particular interest in python in > > > > > > k12 institutions, and in addition to posting more often on this list, > > > > > > I am considering setting up an irc channel on freenode (#python-k12 ?) > > > > > > Edu-sig mailing list > > > > > > Edu-sig at python.org > > > > > > https://mail.python.org/mailman/listinfo/edu-sig[ > https://mail.python.org/mailman/listinfo/edu-sig] > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.roberge at gmail.com Sun Jun 17 16:41:25 2018 From: andre.roberge at gmail.com (Andre Roberge) Date: Sun, 17 Jun 2018 17:41:25 -0300 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation: " I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. " I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students? Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant Andr? On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge wrote: > > > On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < > jurgis.pralgauskis at gmail.com> wrote: > >> Hi, >> >> usually in computer graphics Y is counted to increase downwards. >> I casn do it with: setworldcoordinates(0, 400, 600, 0) >> >> but then, "right(..)" turns to the left :/ >> >> >> I could swap: >> right, left = left, right >> >> but on errror I get a bit misleading message >> >> >>> right() >> Traceback (most recent call last): >> File "", line 1, in >> right() >> TypeError: left() takes exactly 1 argument (0 given) >> >> I thought to make this hack for kids, so better clearer error msgs... >> > >> Any Ideas? >> > > http://bugs.python.org/issue23660 (includes a proposed "permanent" fix). > > Andr? > > > >> Thanks :) >> -- >> Jurgis Pralgauskis >> tel: 8-616 77613; >> Don't worry, be happy and make things better ;) >> http://galvosukykla.lt >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sun Jun 17 21:13:25 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 17 Jun 2018 18:13:25 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: Any Ideas? > Thanks :) > -- > ?Wow I didn't know about this issue. Just import turtle turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.left(90) turtle.forward(100) performs as expected out of the box right? Forward is in the direction the turtle is facing and left and right are the turtle's own front paws. We're looking down on said turtle. https://flic.kr/p/Lb4mUf (warning: URL is case sensitive) I gather some have a preference for (0,0) as upper left versus smack dab in the middle of the screen with X right and Y up? Codesters and Scratch follow the (0,0) in the middle convention. That's how math textbooks do it. HTML Canvas object is irrelevant. Resistance is futile. Just kidding. Would be good to have a global setting, just like for cubic vs. tetra volumes. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.roberge at gmail.com Sun Jun 17 22:16:06 2018 From: andre.roberge at gmail.com (Andre Roberge) Date: Sun, 17 Jun 2018 23:16:06 -0300 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: On Sun, Jun 17, 2018 at 10:13 PM kirby urner wrote: > > > Any Ideas? >> Thanks :) >> -- >> > > > ?Wow I didn't know about this issue. > > Just > > import turtle > turtle.forward(100) > turtle.right(90) > turtle.forward(100) > turtle.left(90) > turtle.forward(100) > > performs as expected out of the box right? > ?Yes, it does. BUT, if you set the world coordinates like Jurgis reported, then left and right are inverted. There's an easy fix ... but it has been rejected.? > Forward is in the direction the turtle is facing and left and right are > the turtle's own front paws. We're looking down on said turtle. > > https://flic.kr/p/Lb4mUf (warning: URL is case sensitive) > > I gather some have a preference for (0,0) as upper left versus smack dab > in the middle of the screen with X right and Y up? > > Codesters and Scratch follow the (0,0) in the middle convention. That's > how math textbooks do it. > > HTML Canvas object is irrelevant. Resistance is futile. Just kidding. > > Would be good to have a global setting, just like for cubic vs. tetra > volumes. > > Kirby > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sun Jun 17 22:47:38 2018 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 17 Jun 2018 19:47:38 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: > > >> >> performs as expected out of the box right? >> > > ?Yes, it does. BUT, if you set the world coordinates like Jurgis reported, > then left and right are inverted. There's an easy fix ... but it has been > rejected.? > > ?OK. Thanks for the clarification. I had no idea. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergio_r at mail.com Mon Jun 18 09:48:38 2018 From: sergio_r at mail.com (Sergio Rojas) Date: Mon, 18 Jun 2018 15:48:38 +0200 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: ? Certainly, Jeff, Wes, Jupyter offer and interesting environment to develop teaching and learning materials, and for much more. And I have used it: 1.- http://nbviewer.jupyter.org/github/rojassergio/Aprendiendo-a-programar-en-Py thon-con-mi-computador/blob/master/Instalando_python.ipynb 2.- http://nbviewer.jupyter.org/github/rojassergio/Learning-Scipy/blob/master/Ot her_IPythonNotes/Numerical_Computing_via_IPython.ipynb 3.- https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-comp utador/blob/master/Jornastec2017_SergioRojas_static.pdf What bothers me is compatibility within Jupyter versions. I am not sure where Jupyther development is taking into account users of the platform. As I prefer Latex for writing, many things that use to work when I first wrote some of my notebooks does not work properly in newer versions. An example is shown in the second notebook listed above. Scrolling down to the set of equations defining the "Atractor de Lorenz" (just after input cell In [6]:), the shown box should not be there. Only the brace enclosing the equations is suppose to appear, as it did when I first wrote that notebook. Also many labels of plots using Latex does not work anymore when using Jupyter to display Matplotlib plots. So, writing a large project does not seems to be a good idea to do so in Jupyter. Even Python compatibility between versions should be considered at front when starting writing large Python programming projects (I still can compile and run fortran 77 code I wrote back in the 90's). Sergio ? Sent:?Sunday, June 17, 2018 at 4:32 PM From:?"Wes Turner" To:?"Jeff Elkner" Cc:?"Sergio Rojas" , "shushantika.barua at gmail.com" , "isaac.zawolo at gmail.com" , "guzdial at cc.gatech.edu" , "edu-sig at python.org" , "ericson at cc.gatech.edu" Subject:?Re: [Edu-sig] Collaboratively developing OER Python textbooks. Jupyter, binder-ready, GitHub Topics, Framework :: Jupyter ? - https://github.com/markusschanta/awesome-jupyter ? awesome-jupyter ? ? - https://github.com/westurner/awesome-jupyter/blob/59e79fb96537d9e65bfb3e027b988956b2e42f42/README.md#jupyter-notebook-jupyterhub-jupyterlab[https://github.com/westurner/awesome-jupyter/blob/59e79fb96537d9e65bfb3e027b988956b2e42f42/README.md#jupyter-notebook-jupyterhub-jupyterlab] ? -?https://groups.google.com/forum/#!forum/jupyter-education[https://groups.google.com/forum/#!forum/jupyter-education] ? There is a jupyter-education mailing list ? - https://github.com/topics/binder-ready[https://github.com/topics/binder-ready] ? Jupyter notebook projects that work with Binder can add a Binder badge to their README and/or the 'binder-ready' GitHub topic. ? - https://github.com/binder-examples[https://github.com/binder-examples] ? Examples of binder-ready Jupyter projects ? - https://github.com/binder-examples/jupyter-extension[https://github.com/binder-examples/jupyter-extension] ? How to install jupyter extensions with a binder-ready project: ? requirements.txt + postBuild ? https://github.com/quobit/awesome-python-in-education/blob/master/README.md#jupyter[https://github.com/quobit/awesome-python-in-education/blob/master/README.md#jupyter] ? - [ ] add link to jupyter-edx-grader-xblock ??https://github.com/ibleducation/jupyter-edx-grader-xblock[https://github.com/ibleducation/jupyter-edx-grader-xblock] ? ? >?Auto-grade a student assignment created as a Jupyter notebook, using the nbgrader Jupyter extension, and write the score in the Open edX gradebook ? https://open.edx.org[https://open.edx.org] http://docs.edx.org https://github.com/edx/ (Python, Django, JavaScript,) On Sunday, June 17, 2018, Jeff Elkner wrote:Hi Sergio, Seems to me the most effective way of " building a learning Python environment in the context on teaching and learning math at the elementary/high school level" would be to connect with existing efforts and contribute to them. As a full time teacher, I'm in a great place to test out materials with the group of people who matter most in all this, students / learners, but I have only limited time for contributing to the development process, so I need to keep my goals modest. The action is mainly taking place on http://jupyter.org[http://jupyter.org], so the thing for me to do is learn this platform and join this community, and then contribute classroom ready resources to it. Cheers, Jeff ?Let's work together to create a just and sustainable world!? ??????? Original Message ??????? On June 13, 2018 9:12 AM, Sergio Rojas wrote: > ?? > > Hi Jeff, > > In relation to your call on > > > I would be delighted to see this mailing list be used for > > > > collaboration and discussion around OER learning materials for Python. > > Perhaps we could start making it more formally, in building a > > learning Python environment in the context on teaching and learning > > math at the elementary/high school level. > > It seems that you already have a nice vigorous start up with your > > colleagues and students which can bring this collaboration to an higher level. > > revising the CSP openbook project > > [ http://www.openbookproject.net/books/StudentCSP/index.html[http://www.openbookproject.net/books/StudentCSP/index.html] ]. > > I also wrote to Sebastian (cc this email to him) who has > > good ideas on the same vein. Hopefully he might have some time to share > > on getting something done in this endeavor. > > > Let me know when you feel you have something ready for testing. > > It would be nice to hear recommendations for additions and modifications > > to the content of the book and to the provided codes for each book. > > At the moment I have not thought about the best way to add suggested > > modifications to the respective book, directly by everyone, but > > taken care that the project derive somewhere else. > > Currently, I am revising the write up of the Prealgebra book > > and trying to rewrite the codes in a more pythonic fashion, to add > > a chapter on coding using pure python style to gain speed in code > > execution. > > Regards, > > Sergio > > ? > > ? > > Sent:?Monday, June 11, 2018 at 11:15 AM > > From:?"Jeff Elkner" jeff at elkner.net[mailto:jeff at elkner.net] > > To:?"Sergio Rojas" sergio_r at mail.com[mailto:sergio_r at mail.com], "edu-sig at python.org[mailto:edu-sig at python.org]" edu-sig at python.org[mailto:edu-sig at python.org] > > Subject:?Collaboratively developing OER Python textbooks. > > Hi Sergio, > > I would be delighted to see this mailing list be used for collaboration and discussion around OER learning materials for Python. > > I'm working on remixing a wonderful textbook written for use with the College Board's AP CS Principles course: > > http://www.openbookproject.net/books/StudentCSP/[http://www.openbookproject.net/books/StudentCSP/] > > I've got the project on Gitlab at: > > https://gitlab.com/jelkner/StudentCSP[https://gitlab.com/jelkner/StudentCSP][https://gitlab.com/jelkner/StudentCSP[https://gitlab.com/jelkner/StudentCSP]] > > Since students are the final judges of the effectiveness of education resources, I involve my students as testers / reviewers using issues tracking on Gitlab as the way for them to provide feedback. Shushantika Barua (cc'd here) proved an excellent proof reader / editor / tester. Taking a look at the issues she filed shows the process: > > https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=?&state=closed[https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=?&state=closed][https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=%E2%9C%93&state=closed[https://gitlab.com/jelkner/StudentCSP/issues?scope=all&utf8=%E2%9C%93&state=closed]] > > I have a friend and colleague, Isaac Zawolo (cc'd here) who teaches math at my school. We have been talking about integrating the learning of math and computer programming for several years. We also have a large community of first language Spanish speakers at our school. > > So, Sergio, if you are interested, I would be glad to get my students involved in testing and contributing to both https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming][https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming]] and https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador[https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador][https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador[https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi-computador]]. > > Let me know when you feel you have something ready for testing. > > Thanks! > > Jeff Elkner > > Arlington Career Center, Arlington, VA > > Let's work together to create a just and sustainable world! > > ??????? Original Message ??????? > > On June 11, 2018 9:35 AM, Sergio Rojas sergio_r at mail.com[mailto:sergio_r at mail.com] wrote: > > > On 10/05/18 16:15, Jeff Elkner wrote: > > > > > Dear edu-sig friends, > > > > > > We had an interesting discussion at the Education Summit today at > > > > > > Pycon about ways to better engage folks between Pycons. > > > > Hi Jeff, > > > > Are the documents of the Pycon Education Summit available on the Internet? > > > > > As a public school teacher, I have a particular interest in python in > > > > > > k12 institutions > > > > How are you using Python in teaching and learning? > > > > I finished a first crude draft of a book devoted mostly to Mathematics > > > > (Prealgebra topics ) via Python > > > > https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming][https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming]] ) > > > > which I want to improve (in content and readability) > > > > and perhaps the discussions of the Educational Summit > > > > could be of help to better shape the book on the content of topics. > > > > Regards, > > > > Sergio > > > > Message: 1 > > > > Date: Thu, 10 May 2018 17:15:28 -0400 > > > > From: Jeff Elkner jeff at elkner.net[mailto:jeff at elkner.net] > > > > To: "edu-sig at python.org[mailto:edu-sig at python.org]" edu-sig at python.org[mailto:edu-sig at python.org] > > > > Subject: [Edu-sig] What do folks think of creating a #python-k12 > > > > channel on freenode? > > > > Message-ID: > > > > VZIaifBvT3x43c5hYiGYuuBbco2UUmLN6mSTAcaJvyV50_KvaE9i64p83woqKoK5HY4A0zqNzpiolNsAxlMugEqQzt8I8C45aoT9XFpekS4=@elkner.net[http://elkner.net] > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear edu-sig friends, > > > > We had an interesting discussion at the Education Summit today at > > > > Pycon about ways to better engage folks between Pycons. > > > > As a public school teacher, I have a particular interest in python in > > > > k12 institutions, and in addition to posting more often on this list, > > > > I am considering setting up an irc channel on freenode (#python-k12 ?) > > > > Edu-sig mailing list > > > > Edu-sig at python.org[mailto:Edu-sig at python.org] > > > > https://mail.python.org/mailman/listinfo/edu-sig[https://mail.python.org/mailman/listinfo/edu-sig][https://mail.python.org/mailman/listinfo/edu-sig[https://mail.python.org/mailman/listinfo/edu-sig]] _______________________________________________ Edu-sig mailing list Edu-sig at python.org[mailto:Edu-sig at python.org] https://mail.python.org/mailman/listinfo/edu-sig From willingc at willingconsulting.com Mon Jun 18 12:01:38 2018 From: willingc at willingconsulting.com (Carol Willing) Date: Mon, 18 Jun 2018 09:01:38 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: Hi Andre, I'm sorry that you did not like my response when I was triaging all of the open Turtle issues. I am happy to change the status back to open. All that you needed to do was ask politely and give me a chance, as a volunteer, to have the time to do so. Regards, Carol > On Jun 17, 2018, at 1:41 PM, Andre Roberge > wrote: > > So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation: > > " > I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. > " > I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students? > > Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant > > Andr? > > On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge > wrote: > > > On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis > wrote: > Hi, > > usually in computer graphics Y is counted to increase downwards. > I casn do it with: setworldcoordinates(0, 400, 600, 0) > > but then, "right(..)" turns to the left :/ > > > I could swap: > right, left = left, right > > but on errror I get a bit misleading message > > >>> right() > Traceback (most recent call last): > File "", line 1, in > right() > TypeError: left() takes exactly 1 argument (0 given) > > I thought to make this hack for kids, so better clearer error msgs... > > Any Ideas? > > http://bugs.python.org/issue23660 (includes a proposed "permanent" fix). > > Andr? > > > Thanks :) > -- > Jurgis Pralgauskis > tel: 8-616 77613; > Don't worry, be happy and make things better ;) > http://galvosukykla.lt > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.roberge at gmail.com Mon Jun 18 12:18:14 2018 From: andre.roberge at gmail.com (Andre Roberge) Date: Mon, 18 Jun 2018 13:18:14 -0300 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: Dear Carol, I apologize for letting my frustration show in this way, in a public forum. Andr? On Mon, Jun 18, 2018 at 1:01 PM Carol Willing < willingc at willingconsulting.com> wrote: > Hi Andre, > > I'm sorry that you did not like my response when I was triaging all of the > open Turtle issues. > > I am happy to change the status back to open. All that you needed to do > was ask politely and give me a chance, as a volunteer, to have the time to > do so. > > Regards, > > Carol > > On Jun 17, 2018, at 1:41 PM, Andre Roberge > wrote: > > So, a little over 3 years after I submitted a bug report (see previous > conversation below) **with a fix** so that no one would have to explain why > "right()" could result in a turtle turning left, and vice-versa, my > submission was refused and the bug report was closed with the following > explanation: > > " > > I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. > > " > > I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students? > > > Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant > > > Andr? > > > On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge > wrote: > >> >> >> On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < >> jurgis.pralgauskis at gmail.com> wrote: >> >>> Hi, >>> >>> usually in computer graphics Y is counted to increase downwards. >>> I casn do it with: setworldcoordinates(0, 400, 600, 0) >>> >>> but then, "right(..)" turns to the left :/ >>> >>> >>> I could swap: >>> right, left = left, right >>> >>> but on errror I get a bit misleading message >>> >>> >>> right() >>> Traceback (most recent call last): >>> File "", line 1, in >>> right() >>> TypeError: left() takes exactly 1 argument (0 given) >>> >>> I thought to make this hack for kids, so better clearer error msgs... >>> >> >>> Any Ideas? >>> >> >> http://bugs.python.org/issue23660 (includes a proposed "permanent" >> fix). >> >> Andr? >> >> >> >>> Thanks :) >>> -- >>> Jurgis Pralgauskis >>> tel: 8-616 77613; >>> Don't worry, be happy and make things better ;) >>> http://galvosukykla.lt >>> >>> _______________________________________________ >>> Edu-sig mailing list >>> Edu-sig at python.org >>> https://mail.python.org/mailman/listinfo/edu-sig >>> >>> >> _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From willingc at willingconsulting.com Mon Jun 18 12:24:40 2018 From: willingc at willingconsulting.com (Carol Willing) Date: Mon, 18 Jun 2018 09:24:40 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: <235F81C7-E335-46A8-BF8F-02C9E8F30061@willingconsulting.com> Dear Andre, Thank you. The issue is reopened. If others would like to test your recommended fix still applies cleanly, I will be happy to review it. Warmly, Carol > On Jun 18, 2018, at 9:18 AM, Andre Roberge > wrote: > > Dear Carol, > > I apologize for letting my frustration show in this way, in a public forum. > > Andr? > > On Mon, Jun 18, 2018 at 1:01 PM Carol Willing > wrote: > Hi Andre, > > I'm sorry that you did not like my response when I was triaging all of the open Turtle issues. > > I am happy to change the status back to open. All that you needed to do was ask politely and give me a chance, as a volunteer, to have the time to do so. > > Regards, > > Carol > >> On Jun 17, 2018, at 1:41 PM, Andre Roberge > wrote: >> >> So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation: >> >> " >> I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. >> " >> I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students? >> >> Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant >> >> Andr? >> >> On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge > wrote: >> >> >> On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis > wrote: >> Hi, >> >> usually in computer graphics Y is counted to increase downwards. >> I casn do it with: setworldcoordinates(0, 400, 600, 0) >> >> but then, "right(..)" turns to the left :/ >> >> >> I could swap: >> right, left = left, right >> >> but on errror I get a bit misleading message >> >> >>> right() >> Traceback (most recent call last): >> File "", line 1, in >> right() >> TypeError: left() takes exactly 1 argument (0 given) >> >> I thought to make this hack for kids, so better clearer error msgs... >> >> Any Ideas? >> >> http://bugs.python.org/issue23660 (includes a proposed "permanent" fix). >> >> Andr? >> >> >> Thanks :) >> -- >> Jurgis Pralgauskis >> tel: 8-616 77613; >> Don't worry, be happy and make things better ;) >> http://galvosukykla.lt >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jurgis.pralgauskis at gmail.com Mon Jun 18 12:50:11 2018 From: jurgis.pralgauskis at gmail.com (Jurgis Pralgauskis) Date: Mon, 18 Jun 2018 19:50:11 +0300 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: <235F81C7-E335-46A8-BF8F-02C9E8F30061@willingconsulting.com> References: <235F81C7-E335-46A8-BF8F-02C9E8F30061@willingconsulting.com> Message-ID: Ok, I could test it :) Should I wait for some commit and comment results on the issues site or how...? -- Jurgis Pralgauskis tel: 8-616 77613 2018-06-18, pr 19:32, Carol Willing ra??: > Dear Andre, > > Thank you. > > The issue is reopened. If others would like to test your recommended fix > still applies cleanly, I will be happy to review it. > > Warmly, > > Carol > > On Jun 18, 2018, at 9:18 AM, Andre Roberge > wrote: > > Dear Carol, > > I apologize for letting my frustration show in this way, in a public forum. > > Andr? > > On Mon, Jun 18, 2018 at 1:01 PM Carol Willing < > willingc at willingconsulting.com> wrote: > >> Hi Andre, >> >> I'm sorry that you did not like my response when I was triaging all of >> the open Turtle issues. >> >> I am happy to change the status back to open. All that you needed to do >> was ask politely and give me a chance, as a volunteer, to have the time to >> do so. >> >> Regards, >> >> Carol >> >> On Jun 17, 2018, at 1:41 PM, Andre Roberge >> wrote: >> >> So, a little over 3 years after I submitted a bug report (see previous >> conversation below) **with a fix** so that no one would have to explain why >> "right()" could result in a turtle turning left, and vice-versa, my >> submission was refused and the bug report was closed with the following >> explanation: >> >> " >> >> I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. >> >> " >> >> I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students? >> >> >> Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant >> >> >> Andr? >> >> >> On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge >> wrote: >> >>> >>> >>> On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < >>> jurgis.pralgauskis at gmail.com> wrote: >>> >>>> Hi, >>>> >>>> usually in computer graphics Y is counted to increase downwards. >>>> I casn do it with: setworldcoordinates(0, 400, 600, 0) >>>> >>>> but then, "right(..)" turns to the left :/ >>>> >>>> >>>> I could swap: >>>> right, left = left, right >>>> >>>> but on errror I get a bit misleading message >>>> >>>> >>> right() >>>> Traceback (most recent call last): >>>> File "", line 1, in >>>> right() >>>> TypeError: left() takes exactly 1 argument (0 given) >>>> >>>> I thought to make this hack for kids, so better clearer error msgs... >>>> >>> >>>> Any Ideas? >>>> >>> >>> http://bugs.python.org/issue23660 (includes a proposed "permanent" >>> fix). >>> >>> Andr? >>> >>> >>> >>>> Thanks :) >>>> -- >>>> Jurgis Pralgauskis >>>> tel: 8-616 77613; >>>> Don't worry, be happy and make things better ;) >>>> http://galvosukykla.lt >>>> >>>> _______________________________________________ >>>> Edu-sig mailing list >>>> Edu-sig at python.org >>>> https://mail.python.org/mailman/listinfo/edu-sig >>>> >>>> >>> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> >> >> > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.cole at novawebdevelopment.org Mon Jun 18 12:54:00 2018 From: kevin.cole at novawebdevelopment.org (Kevin Cole) Date: Mon, 18 Jun 2018 12:54:00 -0400 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: Sticking my nose in where it don't belong. ;-) But that's never stopped me before. ;-) First "I are not a teacher". At least, not in any formal sense of the word. Second, some would say "I are not a programmer". I don't listen to those people. In spite of the common "in computer graphics Y goes down", does that make sense to new learners? I've gotten used to various coordinate systems, but the first time I had to work with graph paper and plotting (and, for that matter, maps) one goes "up" ("north", "forward") for Y. Then again, maybe the average learner isn't quite as flexible these days, and telling them after they've gotten used to a system that they have to flip everything upside down and backwards isn't a great idea. I attribute my own flexibility not to any innate ability but rather to learning during a time when architectures OS's and languages were changing fast enough that there wasn't time to become set in one's ways. ?[Note: Grammatical "mistakes" above are meant as weak -- very weak -- humor. At least, most are.]? -- *Kevin Cole* NOVA Web Development Co-Op http://novawebdevelopment.org/ Arlington, VA -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Mon Jun 18 14:16:54 2018 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 18 Jun 2018 11:16:54 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: On Mon, Jun 18, 2018 at 9:54 AM, Kevin Cole < kevin.cole at novawebdevelopment.org> wrote: > Sticking my nose in where it don't belong. ;-) But that's never stopped me > before. ;-) > > ?Hi Kevin. I for one welcome your comments as I do think teachers need to prepare students for more than one way of doing coordinate systems. As you well know, and point out, in maths we almost always make the positives go to the right and the negatives to the left (number line). Then we add a 2nd number line going up and down, with positives increasing in magnitude going up and negatives getting bigger going down. This arrangement of two numbered lines considered "most normal" i.e. this schema is rather ubiquitous and must be considered something of a home base in classroom projects. Where to put the origin (0,0) is another question and is usually (A) at the lower left of the plot (if we don't need all four quadrants) or (B) in the middle (if we do need all quadrants), like when doing a unit circle. However if you walk around to the back and look from the other side... my right is your left and so on -- these are terms relative to a point of view, not to the object in front of us, which is where the confusion often begins. Who's left? Stage left means what again? It's the actor's left, not the audience's left. Theater practice is another place to absorb geometry. The screen is a kind of stage after all, with sprites = puppets. I always tell my Scratch students that programming is a kind of theater (stuff follows a script, objects i.e. actors, agents, sprites, do stuff i.e. act). https://www.sewwhatinc.com/blog/wp-content/uploads/2010/02/stage_diagram1.jpg Computer graphics (Blender et al) reintroduces the camera or viewpoint, which is often missing from elementary maths textbooks. Math texts don't believe in talking about an observer for some reason, or multiple observers. I expect the influence of computer science to be a positive influence in helping address that blind spot over time. MIT Scratch, by far the most popular way to introduce programming in my neck of the woods (Silicon Forest), puts (0,0) in the middle, Y up, X right. Also, should we make the Z axis go into the page or stay on the page perpendicular to X? Again, viewpoint matters. Where is the viewer in this picture, and in what direction is the viewer looking? Important questions! Getting off the XY plane to XYZ is always the next step in maths, including in computer graphics. We may introduce latitude and longitude at this point, along with spherical coordinates, in addition to XYZ. I've used POV-Ray in some of my classes, and certainly for my own Python projects. http://4dsolutions.net/ocn/pymath.html In POV-Ray the positive Z-axis points into the screen and Y goes towards the top of the screen, matching most textbooks that stick to X and Y. When I teach Codesters (Python) in the classroom, I always warn them that when they get to Codepen.io later (where we use HTML, SVG etc), the coordinate system will flip and they'll hear a lot more about H and W (height and width). We'll also talk a lot more about pixels (cells) and the level of resolution (frequency) which, in a DGGS (geospatial data system) might be hexagonal and pentagonal. http://i.stack.imgur.com/UtStp.jpg https://www.eat-the-planet.com/wp-content/uploads/2017/07/tile_resources2_comp.png Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Mon Jun 18 16:42:07 2018 From: wes.turner at gmail.com (Wes Turner) Date: Mon, 18 Jun 2018 16:42:07 -0400 Subject: [Edu-sig] Collaboratively developing OER Python textbooks. In-Reply-To: References: Message-ID: On Monday, June 18, 2018, Sergio Rojas wrote: > > Certainly, Jeff, Wes, Jupyter offer and interesting environment > to develop teaching and learning materials, and for much > more. And I have used it: > > 1.- http://nbviewer.jupyter.org/github/rojassergio/ > Aprendiendo-a-programar-en-Py > thon-con-mi-computador/blob/master/Instalando_python.ipynb > > 2.- http://nbviewer.jupyter.org/github/rojassergio/Learning- > Scipy/blob/master/Ot > her_IPythonNotes/Numerical_Computing_via_IPython.ipynb > > 3.- https://github.com/rojassergio/Aprendiendo-a- > programar-en-Python-con-mi-comp > utador/blob/master/Jornastec2017_SergioRojas_static.pdf > > > What bothers me is compatibility within Jupyter versions. I am not > sure where Jupyther development is taking into account users > of the platform. https://github.com/jupyter/help https://github.com/jupyter/nbformat/issues https://github.com/jupyter/nbformat/issues > As I prefer Latex > for writing, many things that use to work when I first wrote some of > my notebooks does not work properly in newer versions. An example is shown > in the second notebook listed above. Scrolling down to the > set of equations defining the "Atractor de Lorenz" > (just after input cell In [6]:), the shown box should not be there. > Only the brace enclosing the equations is suppose to appear, as it did > when I first wrote that notebook. Also many labels of plots using > Latex does not work anymore when using Jupyter to display Matplotlib plots. > https://github.com/matplotlib/matplotlib/issues https://github.com/mathjax/MathJax > So, writing a large project does not seems to be a good idea to do so > in Jupyter. It's possible to import from .ipynb and run an .ipynb with e.g. pytest; but importlib with plain .py/c/o is faster. Even Python compatibility between versions should be > considered at front when starting writing large Python programming > projects (I still can compile and run fortran 77 code I wrote > back in the 90's). https://github.com/jupyter/notebook/releases https://jupyter-notebook.readthedocs.io/en/stable/changelog.html https://github.com/jupyterhub/jupyterhub/blob/master/docs/source/changelog.md https://github.com/jupyterlab/jupyterlab/blob/master/CHANGELOG.md - in JupyterLab, Help > 'Classic Notebook' launches Jupyter Notebook (with support for JS in *trusted* notebooks; unlike JupyterLab, which requires jupyterlab extensions to have JS in notebooks https://github.com/jupyter/nbconvert/blob/master/docs/source/changelog.rst http://nbconvert.readthedocs.io/en/latest/changelog.html https://github.com/jupyter/nbformat/blob/master/docs/changelog.rst https://nbformat.readthedocs.io/en/latest/changelog.html https://github.com/python/core-workflow/issues/6 - Notes on NEWS, CHANGELOG, CHANGES formats and tools (Reno, towncrier, ) - CPython chose a tool called blurb for handling Misc/NEWS.d entries https://github.com/python/core-workflow/tree/master/blurb https://pypi.org/project/blurb/ Jupyter releases page: http://jupyter.readthedocs.io/en/latest/releases/content-releases.html https://github.com/jupyter/jupyter/blob/master/docs/source/releases/content-releases.rst > Note > Coming Soon > > We?re actively working on a graphic that displays each project, their current release, and a link to the changelog. Thanks for your patience > > > Sergio > > > > Sent: Sunday, June 17, 2018 at 4:32 PM > From: "Wes Turner" > To: "Jeff Elkner" > Cc: "Sergio Rojas" , "shushantika.barua at gmail.com" < > shushantika.barua at gmail.com>, "isaac.zawolo at gmail.com" < > isaac.zawolo at gmail.com>, "guzdial at cc.gatech.edu" , > "edu-sig at python.org" , "ericson at cc.gatech.edu" < > ericson at cc.gatech.edu> > Subject: Re: [Edu-sig] Collaboratively developing OER Python textbooks. > Jupyter, binder-ready, GitHub Topics, Framework :: Jupyter > > - https://github.com/markusschanta/awesome-jupyter > awesome-jupyter > > > - https://github.com/westurner/awesome-jupyter/blob/ > 59e79fb96537d9e65bfb3e027b988956b2e42f42/README.md#jupyter- > notebook-jupyterhub-jupyterlab[https://github.com/ > westurner/awesome-jupyter/blob/59e79fb96537d9e65bfb3e027b9889 > 56b2e42f42/README.md#jupyter-notebook-jupyterhub-jupyterlab] > > - https://groups.google.com/forum/#!forum/jupyter- > education[https://groups.google.com/forum/#!forum/jupyter-education] > There is a jupyter-education mailing list > > > - https://github.com/topics/binder-ready[https://github. > com/topics/binder-ready] > Jupyter notebook projects that work with Binder can add a Binder badge > to their README and/or the 'binder-ready' GitHub topic. > > - https://github.com/binder-examples[https://github.com/binder-examples] > Examples of binder-ready Jupyter projects > > - https://github.com/binder-examples/jupyter-extension[ > https://github.com/binder-examples/jupyter-extension] > How to install jupyter extensions with a binder-ready project: > requirements.txt + postBuild > > https://github.com/quobit/awesome-python-in-education/ > blob/master/README.md#jupyter[https://github.com/quobit/ > awesome-python-in-education/blob/master/README.md#jupyter] > > - [ ] add link to jupyter-edx-grader-xblock > https://github.com/ibleducation/jupyter-edx- > grader-xblock[https://github.com/ibleducation/jupyter-edx-grader-xblock] > > > Auto-grade a student assignment created as a Jupyter notebook, using > the nbgrader Jupyter extension, and write the score in the Open edX > gradebook > > https://open.edx.org[https://open.edx.org] > http://docs.edx.org > https://github.com/edx/ (Python, Django, JavaScript,) > On Sunday, June 17, 2018, Jeff Elkner jeff at elkner.net]> wrote:Hi Sergio, > > Seems to me the most effective way of " building a learning Python > environment in the context on teaching and learning math at the > elementary/high school level" would be to connect with existing efforts and > contribute to them. > > As a full time teacher, I'm in a great place to test out materials with > the group of people who matter most in all this, students / learners, but I > have only limited time for contributing to the development process, so I > need to keep my goals modest. > > The action is mainly taking place on http://jupyter.org[http://jupyter.org], > so the thing for me to do is learn this platform and join this community, > and then contribute classroom ready resources to it. > > Cheers, > Jeff > > > ?Let's work together to create a just and sustainable world!? > > ??????? Original Message ??????? > > On June 13, 2018 9:12 AM, Sergio Rojas sergio_r at mail.com]> wrote: > > > ?? > > > > Hi Jeff, > > > > In relation to your call on > > > > > I would be delighted to see this mailing list be used for > > > > > > collaboration and discussion around OER learning materials for Python. > > > > Perhaps we could start making it more formally, in building a > > > > learning Python environment in the context on teaching and learning > > > > math at the elementary/high school level. > > > > It seems that you already have a nice vigorous start up with your > > > > colleagues and students which can bring this collaboration to an higher > level. > > > > revising the CSP openbook project > > > > [ http://www.openbookproject.net/books/StudentCSP/index.html[http://www. > openbookproject.net/books/StudentCSP/index.html] ]. > > > > I also wrote to Sebastian (cc this email to him) who has > > > > good ideas on the same vein. Hopefully he might have some time to share > > > > on getting something done in this endeavor. > > > > > Let me know when you feel you have something ready for testing. > > > > It would be nice to hear recommendations for additions and modifications > > > > to the content of the book and to the provided codes for each book. > > > > At the moment I have not thought about the best way to add suggested > > > > modifications to the respective book, directly by everyone, but > > > > taken care that the project derive somewhere else. > > > > Currently, I am revising the write up of the Prealgebra book > > > > and trying to rewrite the codes in a more pythonic fashion, to add > > > > a chapter on coding using pure python style to gain speed in code > > > > execution. > > > > Regards, > > > > Sergio > > > > > > > > > > > > Sent: Monday, June 11, 2018 at 11:15 AM > > > > From: "Jeff Elkner" jeff at elkner.net[mailto:jeff at elkner.net] > > > > To: "Sergio Rojas" sergio_r at mail.com[mailto:sergio_r at mail.com], " > edu-sig at python.org[mailto:edu-sig at python.org]" edu-sig at python.org[mailto: > edu-sig at python.org] > > > > Subject: Collaboratively developing OER Python textbooks. > > > > Hi Sergio, > > > > I would be delighted to see this mailing list be used for collaboration > and discussion around OER learning materials for Python. > > > > I'm working on remixing a wonderful textbook written for use with the > College Board's AP CS Principles course: > > > > http://www.openbookproject.net/books/StudentCSP/[http:// > www.openbookproject.net/books/StudentCSP/] > > > > I've got the project on Gitlab at: > > > > https://gitlab.com/jelkner/StudentCSP[https://gitlab.com/ > jelkner/StudentCSP][https://gitlab.com/jelkner/StudentCSP[ > https://gitlab.com/jelkner/StudentCSP]] > > > > Since students are the final judges of the effectiveness of education > resources, I involve my students as testers / reviewers using issues > tracking on Gitlab as the way for them to provide feedback. Shushantika > Barua (cc'd here) proved an excellent proof reader / editor / tester. > Taking a look at the issues she filed shows the process: > > > > https://gitlab.com/jelkner/StudentCSP/issues?scope=all& > utf8=?&state=closed[https://gitlab.com/jelkner/StudentCSP/ > issues?scope=all&utf8=?&state=closed][https://gitlab.com/ > jelkner/StudentCSP/issues?scope=all&utf8=%E2%9C%93& > state=closed[https://gitlab.com/jelkner/StudentCSP/issues? > scope=all&utf8=%E2%9C%93&state=closed]] > > > > > I have a friend and colleague, Isaac Zawolo (cc'd here) who teaches math > at my school. We have been talking about integrating the learning of math > and computer programming for several years. We also have a large community > of first language Spanish speakers at our school. > > > > So, Sergio, if you are interested, I would be glad to get my students > involved in testing and contributing to both https://github.com/ > rojassergio/Prealgebra-via-Python-Programming[https:// > github.com/rojassergio/Prealgebra-via-Python-Programming][https://github. > com/rojassergio/Prealgebra-via-Python-Programming[https:/ > /github.com/rojassergio/Prealgebra-via-Python-Programming]] and > https://github.com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi- > computador[https://github.com/rojassergio/Aprendiendo-a- > programar-en-Python-con-mi-computador][https://github. > com/rojassergio/Aprendiendo-a-programar-en-Python-con-mi- > computador[https://github.com/rojassergio/Aprendiendo-a- > programar-en-Python-con-mi-computador]]. > > > > Let me know when you feel you have something ready for testing. > > > > Thanks! > > > > Jeff Elkner > > > > Arlington Career Center, Arlington, VA > > > > Let's work together to create a just and sustainable world! > > > > ??????? Original Message ??????? > > > > On June 11, 2018 9:35 AM, Sergio Rojas sergio_r at mail.com[mailto: > sergio_r at mail.com] wrote: > > > > > On 10/05/18 16:15, Jeff Elkner wrote: > > > > > > > Dear edu-sig friends, > > > > > > > > We had an interesting discussion at the Education Summit today at > > > > > > > > Pycon about ways to better engage folks between Pycons. > > > > > > Hi Jeff, > > > > > > Are the documents of the Pycon Education Summit available on the > Internet? > > > > > > > As a public school teacher, I have a particular interest in python in > > > > > > > > k12 institutions > > > > > > How are you using Python in teaching and learning? > > > > > > I finished a first crude draft of a book devoted mostly to Mathematics > > > > > > (Prealgebra topics ) via Python > > > > > > https://github.com/rojassergio/Prealgebra-via- > Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python- > Programming][https://github.com/rojassergio/Prealgebra- > via-Python-Programming[https://github.com/rojassergio/ > Prealgebra-via-Python-Programming]] ) > > > > > > which I want to improve (in content and readability) > > > > > > and perhaps the discussions of the Educational Summit > > > > > > could be of help to better shape the book on the content of topics. > > > > > > Regards, > > > > > > Sergio > > > > > > Message: 1 > > > > > > Date: Thu, 10 May 2018 17:15:28 -0400 > > > > > > From: Jeff Elkner jeff at elkner.net[mailto:jeff at elkner.net] > > > > > > To: "edu-sig at python.org[mailto:edu-sig at python.org]" edu-sig at python.org > [mailto:edu-sig at python.org] > > > > > > Subject: [Edu-sig] What do folks think of creating a #python-k12 > > > > > > channel on freenode? > > > > > > Message-ID: > > > > > > VZIaifBvT3x43c5hYiGYuuBbco2UUmLN6mSTAcaJvyV50_ > KvaE9i64p83woqKoK5HY4A0zqNzpiolNsAxlMugEqQzt8I8C45aoT9XFpekS4=@elkner.net[ > http://elkner.net] > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Dear edu-sig friends, > > > > > > We had an interesting discussion at the Education Summit today at > > > > > > Pycon about ways to better engage folks between Pycons. > > > > > > As a public school teacher, I have a particular interest in python in > > > > > > k12 institutions, and in addition to posting more often on this list, > > > > > > I am considering setting up an irc channel on freenode (#python-k12 ?) > > > > > > Edu-sig mailing list > > > > > > Edu-sig at python.org[mailto:Edu-sig at python.org] > > > > > > https://mail.python.org/mailman/listinfo/edu-sig[ > https://mail.python.org/mailman/listinfo/edu-sig][https://mail.python.org/ > mailman/listinfo/edu-sig[https://mail.python.org/ > mailman/listinfo/edu-sig]] > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org[mailto:Edu-sig at python.org] > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergio_r at mail.com Tue Jun 19 10:27:29 2018 From: sergio_r at mail.com (Sergio Rojas) Date: Tue, 19 Jun 2018 16:27:29 +0200 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: > From: Kevin Cole > In spite of the common "in computer graphics Y goes down", does that make > sense to new learners? I've gotten used to various coordinate systems, but > the first time I had to work with graph paper and plotting (and, for that > matter, maps) one goes "up" ("north", "forward") for Y. ... ... > From: kirby urner > This arrangement of two numbered lines considered "most normal" i.e. this > schema is rather ubiquitous and must be considered something of a home base > in classroom projects. ... > However if you walk around to the back and look from the other side... my > right is your left and so on -- these are terms relative to a point of > view, not to the object in front of us, which is where the confusion often > begins. Who's left? > Stage left means what again? It's the actor's left, not the audience's > left. ... > Math texts don't believe in talking about an observer for some reason, or > multiple observers. I expect the influence of computer science to be a > positive influence in helping address that blind spot over time. Perhaps teachers of physics could be called to make appreciations in their courses about the relativeness (in most cases) on chosen a coordinate system: right or left-handed or whatever helps to make computations simple (but not simpler). Some issues to keep in mind: >From the The Feynman Lectures on Physics: http://www.feynmanlectures.caltech.edu/I_52.html """ Fig. 52?1(b)! The first molecule, the one that comes from the living thing, is called L-alanine. The other one, which is the same chemically, in that it has the same kinds of atoms and the same connections of the atoms, is a ?right-hand? molecule, compared with the ?left-hand? L-alanine, and it is called D-alanine. ... ... So it looks as though the phenomena of life permit a distinction between "right" and "left," ... """ Other Related links: https://phys.org/news/2014-10-handedness-life.html http://www.iflscience.com/space/why-life-left-handed-answer-stars/ Sergio Check out the free first draft of the book: Prealgebra via Python Programming https://www.researchgate.net/publication/325473565 https://github.com/rojassergio/Prealgebra-via-Python-Programming From kirby.urner at gmail.com Tue Jun 19 12:05:50 2018 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 19 Jun 2018 09:05:50 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: On Tue, Jun 19, 2018 at 7:27 AM, Sergio Rojas wrote: > > > Some issues to keep in mind: > > From the The Feynman Lectures on Physics: > > http://www.feynmanlectures.caltech.edu/I_52.html > """ > Fig. 52?1(b)! The first molecule, the one that comes from the living > thing, is called L-alanine. The other one, which is the same chemically, > in that it has the same kinds of atoms and the same connections of the > atoms, is a ?right-hand? molecule, compared with the ?left-hand? > L-alanine, and it is called D-alanine. > ... > ... > So it looks as though the phenomena of life permit a distinction between > "right" and "left," ... > """ > > ?Yes, a very excellent suggestion and apropos in this context, Sergio. The Feynman piece is fascinating. I like that he features a "Martian" (see below). Congruent vs. Chiral: I hang out on some math teacher web groups (mostly on Facebook) and one topic that comes up a lot is "congruence". Interestingly, the math concept of "congruence" teaches us to overlook or ignore "chirality" or handedness in structures, despite these enantiomers having completely different chemical properties.? We would say the left hand is congruent to the right hand in a math class. I downloaded the PDF of your book and am reading it. Impressive! Mixing math and programming and deriving the benefits of synergy has been one of my themes as well. Regarding coordinate systems, I'm probably the only teacher to use what I call Quadrays in the classroom. Indeed, next week I'll be sharing a summer camp course in "Martian Math" with some Silicon Forest kids that features this alternative coordinate system, with four basis rays from the center of a regular tetrahedron to its four corners, using positive 4-tuples. All points in space are linear combinations of these four basis vectors. I have Python code for converting back and forth to XYZ. The centers of closest packed spheres in the CCP all have positive whole number coordinates. https://en.wikipedia.org/wiki/Quadray_coordinates https://github.com/4dsolutions/Python5/blob/master/Generating%20the%20FCC.ipynb I tell them this is what Martians use, acknowledging this is purely science fiction, and suggest that comparing and contrasting a conventional apparatus with something alien (unfamiliar) actually helps students achieve a deeper understanding of the convention. Martians also use triangles and tetrahedrons to model 2nd and 3rd powering such that 3 x 3 x 3 is a tetrahedron of 27, not a cube of 27. We have a constant for going back and forth between XYZ cubic volumes and IVM tetra volumes. http://www.4dsolutions.net/satacad/martianmath/toc.html (from my previous iteration of this class) > Other Related links: > https://phys.org/news/2014-10-handedness-life.html > http://www.iflscience.com/space/why-life-left-handed-answer-stars/ > > ?Yes very useful. Looking for chemical signatures in space leads me to Harold Kroto's discovery of C60 and its subsequent analysis and synthesis as a topic. https://youtu.be/yZ8JDDnyxC4 (another link re chirality) Thanks again! Kirby ? > Sergio > Check out the free first draft of the book: > Prealgebra via Python Programming > https://www.researchgate.net/publication/325473565 > https://github.com/rojassergio/Prealgebra-via-Python-Programming > _______________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yoshiki.Ohshima at acm.org Tue Jun 19 13:29:46 2018 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue, 19 Jun 2018 10:29:46 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: I also stick my nose here. The notion of "in computer graphics Y goes down" is not as true as some people think. The graphics you are looking at right now on your computer most likely to have gone through some programs that use "Y goes up" scheme (such as GLSL). Only if you are talking about pixels and raster graphics, you could say that there is a dominant convention to make Y go down, but in with vectors, there is no such dominance. For end-users, why does it matter how actually pixels are stored in the actual memory? Computer is medium that can simulate anything; so the decision should not be based on what computer does at the lower levels. Once we leave from what computer does at low-level, there are math text books, which are dominantly "Y-up". Why do they have to know two different conventions? Unless, of course, learning the fact that the coordinate system is just a convention and can be different. Also there may be a case where the particular turtle graphics implementation is tied to the lower level pixel representation. But is basically mixing different abstraction levels, and unless you want to teach about mixing abstraction levels, it is a bad starting point. In summary: the statement "in computer graphics Y goes down" is a wrong argument for turtle graphics to use Y-down coordinate system. Then, for turtles and for end-users, there is an existing convention to make Y go down. So that should be a better default. On Mon, Jun 18, 2018 at 9:54 AM, Kevin Cole < kevin.cole at novawebdevelopment.org> wrote: > Sticking my nose in where it don't belong. ;-) But that's never stopped me > before. ;-) > > First "I are not a teacher". At least, not in any formal sense of the > word. Second, some would say "I are not a programmer". I don't listen to > those people. > > In spite of the common "in computer graphics Y goes down", does that make > sense to new learners? I've gotten used to various coordinate systems, but > the first time I had to work with graph paper and plotting (and, for that > matter, maps) one goes "up" ("north", "forward") for Y. Then again, maybe > the average learner isn't quite as flexible these days, and telling them > after they've gotten used to a system that they have to flip everything > upside down and backwards isn't a great idea. I attribute my own > flexibility not to any innate ability but rather to learning during a time > when architectures OS's and languages were changing fast enough that there > wasn't time to become set in one's ways. > > ?[Note: Grammatical "mistakes" above are meant as weak -- very weak -- > humor. At least, most are.]? > -- > *Kevin Cole* > > NOVA Web Development Co-Op > http://novawebdevelopment.org/ > Arlington, VA > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -- -- Yoshiki -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.roberge at gmail.com Tue Jun 19 13:40:37 2018 From: andre.roberge at gmail.com (Andre Roberge) Date: Tue, 19 Jun 2018 14:40:37 -0300 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: HI, There seems to be a lot of misunderstanding about this issue. Hopefully, the following can help clear it up. 0. The turtle module includes functions named left() and right() which result in the turtle rotating in the corresponding direction on the screen. 1. The turtle implementation includes a function, setworldcoordinates(), which allows one to have user-defined coordinates (both for the width and height of the world) including a choice as to which in which direction the coordinates are increasing. The issue has nothing to do with what choice is "best"; any user is free to use whatever they want. 2. In the current implementation, if one choses some particular orientation for the coordinates, the role of left() and right() are inverted and no longer correspond to what the user sees on the screen. The submitted fix simply ensures that, no matter what one chooses for the world coordinates via setworldcoordinates, when right() is called in a program, the turtle turns right and not left. Andr? On Tue, Jun 19, 2018 at 2:29 PM Yoshiki Ohshima wrote: > I also stick my nose here. > > The notion of "in computer graphics Y goes down" is not as true as some > people think. The graphics you are looking at right now on your computer > most likely to have gone through some programs that use "Y goes up" scheme > (such as GLSL). > > Only if you are talking about pixels and raster graphics, you could say > that there is a dominant convention to make Y go down, but in with vectors, > there is no such dominance. > > For end-users, why does it matter how actually pixels are stored in the > actual memory? Computer is medium that can simulate anything; so the > decision should not be based on what computer does at the lower levels. > > Once we leave from what computer does at low-level, there are math text > books, which are dominantly "Y-up". Why do they have to know two different > conventions? Unless, of course, learning the fact that the coordinate > system is just a convention and can be different. > > Also there may be a case where the particular turtle graphics > implementation is tied to the lower level pixel representation. But is > basically mixing different abstraction levels, and unless you want to teach > about mixing abstraction levels, it is a bad starting point. > > In summary: the statement "in computer graphics Y goes down" is a wrong > argument for turtle graphics to use Y-down coordinate system. Then, for > turtles and for end-users, there is an existing convention to make Y go > down. So that should be a better default. > > > > > On Mon, Jun 18, 2018 at 9:54 AM, Kevin Cole < > kevin.cole at novawebdevelopment.org> wrote: > >> Sticking my nose in where it don't belong. ;-) But that's never stopped >> me before. ;-) >> >> First "I are not a teacher". At least, not in any formal sense of the >> word. Second, some would say "I are not a programmer". I don't listen to >> those people. >> >> In spite of the common "in computer graphics Y goes down", does that make >> sense to new learners? I've gotten used to various coordinate systems, but >> the first time I had to work with graph paper and plotting (and, for that >> matter, maps) one goes "up" ("north", "forward") for Y. Then again, maybe >> the average learner isn't quite as flexible these days, and telling them >> after they've gotten used to a system that they have to flip everything >> upside down and backwards isn't a great idea. I attribute my own >> flexibility not to any innate ability but rather to learning during a time >> when architectures OS's and languages were changing fast enough that there >> wasn't time to become set in one's ways. >> >> ?[Note: Grammatical "mistakes" above are meant as weak -- very weak -- >> humor. At least, most are.]? >> -- >> *Kevin Cole* >> >> NOVA Web Development Co-Op >> http://novawebdevelopment.org/ >> Arlington, VA >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> >> > > > -- > -- Yoshiki > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yoshiki.Ohshima at acm.org Tue Jun 19 13:58:27 2018 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue, 19 Jun 2018 10:58:27 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: On Tue, Jun 19, 2018 at 10:40 AM, Andre Roberge wrote: > HI, > > There seems to be a lot of misunderstanding about this issue. Hopefully, > the following can help clear it up. > > 0. The turtle module includes functions named left() and right() which > result in the turtle rotating in the corresponding direction on the screen. > 1. The turtle implementation includes a function, setworldcoordinates(), > which allows one to have user-defined coordinates (both for the width and > height of the world) including a choice as to which in which direction the > coordinates are increasing. The issue has nothing to do with what choice > is "best"; any user is free to use whatever they want. > 2. In the current implementation, if one choses some particular > orientation for the coordinates, the role of left() and right() are > inverted and no longer correspond to what the user sees on the screen. > > The submitted fix simply ensures that, no matter what one chooses for the > world coordinates via setworldcoordinates, when right() is called in a > program, the turtle turns right and not left. > Thank you for the clarification. I was just ranting about my pet peeve^^ Left and right should be consistent with the actual direction the turtle turns, from the POV of the turtle, yes. (Does it involve changing the "heading" of the turtle?) > Andr? > > > On Tue, Jun 19, 2018 at 2:29 PM Yoshiki Ohshima > wrote: > >> I also stick my nose here. >> >> The notion of "in computer graphics Y goes down" is not as true as some >> people think. The graphics you are looking at right now on your computer >> most likely to have gone through some programs that use "Y goes up" scheme >> (such as GLSL). >> >> Only if you are talking about pixels and raster graphics, you could say >> that there is a dominant convention to make Y go down, but in with vectors, >> there is no such dominance. >> >> For end-users, why does it matter how actually pixels are stored in the >> actual memory? Computer is medium that can simulate anything; so the >> decision should not be based on what computer does at the lower levels. >> >> Once we leave from what computer does at low-level, there are math text >> books, which are dominantly "Y-up". Why do they have to know two different >> conventions? Unless, of course, learning the fact that the coordinate >> system is just a convention and can be different. >> >> Also there may be a case where the particular turtle graphics >> implementation is tied to the lower level pixel representation. But is >> basically mixing different abstraction levels, and unless you want to teach >> about mixing abstraction levels, it is a bad starting point. >> >> In summary: the statement "in computer graphics Y goes down" is a wrong >> argument for turtle graphics to use Y-down coordinate system. Then, for >> turtles and for end-users, there is an existing convention to make Y go >> down. So that should be a better default. >> >> >> >> >> On Mon, Jun 18, 2018 at 9:54 AM, Kevin Cole > novawebdevelopment.org> wrote: >> >>> Sticking my nose in where it don't belong. ;-) But that's never stopped >>> me before. ;-) >>> >>> First "I are not a teacher". At least, not in any formal sense of the >>> word. Second, some would say "I are not a programmer". I don't listen to >>> those people. >>> >>> In spite of the common "in computer graphics Y goes down", does that >>> make sense to new learners? I've gotten used to various coordinate systems, >>> but the first time I had to work with graph paper and plotting (and, for >>> that matter, maps) one goes "up" ("north", "forward") for Y. Then again, >>> maybe the average learner isn't quite as flexible these days, and telling >>> them after they've gotten used to a system that they have to flip >>> everything upside down and backwards isn't a great idea. I attribute my own >>> flexibility not to any innate ability but rather to learning during a time >>> when architectures OS's and languages were changing fast enough that there >>> wasn't time to become set in one's ways. >>> >>> ?[Note: Grammatical "mistakes" above are meant as weak -- very weak -- >>> humor. At least, most are.]? >>> -- >>> *Kevin Cole* >>> >>> NOVA Web Development Co-Op >>> http://novawebdevelopment.org/ >>> Arlington, VA >>> >>> _______________________________________________ >>> Edu-sig mailing list >>> Edu-sig at python.org >>> https://mail.python.org/mailman/listinfo/edu-sig >>> >>> >> >> >> -- >> -- Yoshiki >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -- -- Yoshiki -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.cole at novawebdevelopment.org Tue Jun 19 14:01:08 2018 From: kevin.cole at novawebdevelopment.org (Kevin Cole) Date: Tue, 19 Jun 2018 14:01:08 -0400 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: On Tue, Jun 19, 2018 at 1:40 PM, Andre Roberge wrote: > HI, > > There seems to be a lot of misunderstanding about this issue. Hopefully, > the following can help clear it up. > > 0. The turtle module includes functions named left() and right() which > result in the turtle rotating in the corresponding direction on the screen. > 1. The turtle implementation includes a function, setworldcoordinates(), > which allows one to have user-defined coordinates (both for the width and > height of the world) including a choice as to which in which direction the > coordinates are increasing. The issue has nothing to do with what choice > is "best"; any user is free to use whatever they want. > 2. In the current implementation, if one choses some particular > orientation for the coordinates, the role of left() and right() are > inverted and no longer correspond to what the user sees on the screen. > > The submitted fix simply ensures that, no matter what one chooses for the > world coordinates via setworldcoordinates, when right() is called in a > program, the turtle turns right and not left. > > Andr? > ?Ah. Then I did indeed misunderstand the point. And now I'm of two minds as to whether or not the fix is a fix. I see it as an option, but I also see the argument that sprites, avatars, turtles, etc, often are designed with a "head" and a "tail". So, it's back to the whole "stage left" vs. "left" argument: Are we talking about the virtual creature's left or the viewer's left? (Or am I misunderstanding yet again? If I'm not misunderstanding, I would say "Make it a configuration or startup option, or attribute of setworldcoordinates, or some such." For me, if I'm giving you directions to my apartment, and say in e-mail "Turn left" I would expect you to turn to your left, even if you knew which direction I was currently facing. I would expect an avatar to turn to its left regardless of my viewing angle.)? -- *Kevin Cole* NOVA Web Development Co-Op http://novawebdevelopment.org/ Arlington, VA -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.roberge at gmail.com Tue Jun 19 14:20:48 2018 From: andre.roberge at gmail.com (Andre Roberge) Date: Tue, 19 Jun 2018 15:20:48 -0300 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: Is this Python's edu-sig or Monty Python's philosophers club? ;-) ;-) ;-) Anyone on this list could probably do the following in less than one minute... Run the following program, showing how left() results in a proper turn left >>> from turtle import * >>> forward(40) >>> left(90) >>> forward(40) Now, close the interpreter and run it again, this time with the following >>> from turtle import * >>> setworldcoordinates(-100, 100, 100, -100) >>> forward(40) >>> left(90) >>> forward(40) See how left() no longer correspond to a left() turn for the turtle? Andr? ===== For those reading this on a device that does not have Python installed, below, I show an ascii-simulated representation of forward(100) right(90) forward(100) when the turtle is oriented facing left initially, starting at the position labeled by O and ending at X (example chosen because it is the easiest for me to draw, regardless of whether a proportional font is used or not for this email) X | | | | | ---------------O In the current implementation, with a particular choice for user-defined coordinates , the same instructions might yield the following ----------------O | | | | | X i.e. a right() instruction would result in a left turn, and vice-versa. On Tue, Jun 19, 2018 at 3:01 PM Kevin Cole < kevin.cole at novawebdevelopment.org> wrote: > On Tue, Jun 19, 2018 at 1:40 PM, Andre Roberge > wrote: > >> HI, >> >> There seems to be a lot of misunderstanding about this issue. Hopefully, >> the following can help clear it up. >> >> 0. The turtle module includes functions named left() and right() which >> result in the turtle rotating in the corresponding direction on the screen. >> 1. The turtle implementation includes a function, setworldcoordinates(), >> which allows one to have user-defined coordinates (both for the width and >> height of the world) including a choice as to which in which direction the >> coordinates are increasing. The issue has nothing to do with what choice >> is "best"; any user is free to use whatever they want. >> 2. In the current implementation, if one choses some particular >> orientation for the coordinates, the role of left() and right() are >> inverted and no longer correspond to what the user sees on the screen. >> >> The submitted fix simply ensures that, no matter what one chooses for the >> world coordinates via setworldcoordinates, when right() is called in a >> program, the turtle turns right and not left. >> >> Andr? >> > > ?Ah. Then I did indeed misunderstand the point. And now I'm of two minds > as to whether or not the fix is a fix. I see it as an option, but I also > see the argument that sprites, avatars, turtles, etc, often are designed > with a "head" and a "tail". So, it's back to the whole "stage left" vs. > "left" argument: Are we talking about the virtual creature's left or the > viewer's left? (Or am I misunderstanding yet again? If I'm not > misunderstanding, I would say "Make it a configuration or startup option, > or attribute of setworldcoordinates, or some such." For me, if I'm giving > you directions to my apartment, and say in e-mail "Turn left" I would > expect you to turn to your left, even if you knew which direction I was > currently facing. I would expect an avatar to turn to its left regardless > of my viewing angle.)? > > > -- > *Kevin Cole* > > NOVA Web Development Co-Op > http://novawebdevelopment.org/ > Arlington, VA > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Jun 19 14:52:58 2018 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 19 Jun 2018 11:52:58 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: On Tue, Jun 19, 2018 at 11:20 AM, Andre Roberge wrote: > Is this Python's edu-sig or Monty Python's philosophers club? ;-) ;-) ;-) > > ?I do think we're branching out to discuss coordinate systems more generally, as a perennial feature of pedagogy. These more general concerns are distinct from turtle.py in particular. I hope contributors are not shy about continuing the higher level discussions. ? > Anyone on this list could probably do the following in less than one > minute... > > ?Yes, I just ran the following: >>> turtle.setworldcoordinates(0, -200, 400, 0) >>> turtle.forward(100) >>> turtle.right(90) >>> turtle.forward(100) >>> turtle.left(90) >>> turtle.forward(100) >>> Here's the resulting graphic output: https://flic.kr/p/28i3cDY However in this test, I did not isolate the problem. The turtle turns to its own right and then its own left. I'm assuming lower left is (0, -200) and upper right is (400, 0) i.e. Y still increases as we go vertically towards the top. I should change that... Lets make Y increasingly positive as we go down the screen. >>> turtle.setworldcoordinates(0,200,400,0) >>> turtle.forward(100) >>> turtle.left(90) >>> turtle.forward(100) >>> turtle.right(90) >>> turtle.forward(100) >>> turtle.right(90) Indeed, now I see the problem. The turtle no longer obeys it's own viewpoint but turns oppositely to what I command. Here's the graphic output this time: https://flic.kr/p/26ZJmQ2 Kirby ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergio_r at mail.com Tue Jun 19 15:14:11 2018 From: sergio_r at mail.com (Sergio Rojas) Date: Tue, 19 Jun 2018 21:14:11 +0200 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: From: kirby urner > Regarding coordinate systems, I'm probably the only teacher to > use what I call Quadrays in the classroom. ... ... > I tell them this is what Martians use, acknowledging this is > purely science fiction, Kirby, Looking way far in the back of my head, the closest thing (to the inspirational drawings of your notebook) I could recover is what is called fundamental lattice structures of solid state physics. Not sure, but in there they might use your coordinate system to better describe structures of crystals. The book by Kittel, pg 27 of the 8th Edition, has some stuff on it. Other object in that sense is the Quaternion thing https://en.wikipedia.org/wiki/Quaternion Better stop here, I am getting hurt ... Sergio Check out the free first draft of the book: Prealgebra via Python Programming https://www.researchgate.net/publication/325473565 https://github.com/rojassergio/Prealgebra-via-Python-Programming ---------------------------------------------------------------------- Message: 1 Date: Tue, 19 Jun 2018 09:05:50 -0700 From: kirby urner To: "edu-sig at python.org" Subject: Re: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? Message-ID: Content-Type: text/plain; charset="utf-8" On Tue, Jun 19, 2018 at 7:27 AM, Sergio Rojas wrote: > > > Some issues to keep in mind: > > From the The Feynman Lectures on Physics: > > http://www.feynmanlectures.caltech.edu/I_52.html[http://www.feynmanlectures.caltech.edu/I_52.html] > """ > Fig. 52?1(b)! The first molecule, the one that comes from the living > thing, is called L-alanine. The other one, which is the same chemically, > in that it has the same kinds of atoms and the same connections of the > atoms, is a ?right-hand? molecule, compared with the ?left-hand? > L-alanine, and it is called D-alanine. > ... > ... > So it looks as though the phenomena of life permit a distinction between > "right" and "left," ... > """ > > ?Yes, a very excellent suggestion and apropos in this context, Sergio. The Feynman piece is fascinating. I like that he features a "Martian" (see below). Congruent vs. Chiral: I hang out on some math teacher web groups (mostly on Facebook) and one topic that comes up a lot is "congruence". Interestingly, the math concept of "congruence" teaches us to overlook or ignore "chirality" or handedness in structures, despite these enantiomers having completely different chemical properties.? We would say the left hand is congruent to the right hand in a math class. I downloaded the PDF of your book and am reading it. Impressive! Mixing math and programming and deriving the benefits of synergy has been one of my themes as well. Regarding coordinate systems, I'm probably the only teacher to use what I call Quadrays in the classroom. Indeed, next week I'll be sharing a summer camp course in "Martian Math" with some Silicon Forest kids that features this alternative coordinate system, with four basis rays from the center of a regular tetrahedron to its four corners, using positive 4-tuples. All points in space are linear combinations of these four basis vectors. I have Python code for converting back and forth to XYZ. The centers of closest packed spheres in the CCP all have positive whole number coordinates. https://en.wikipedia.org/wiki/Quadray_coordinates[https://en.wikipedia.org/wiki/Quadray_coordinates] https://github.com/4dsolutions/Python5/blob/master/Generating%20the%20FCC.ipynb I tell them this is what Martians use, acknowledging this is purely science fiction, and suggest that comparing and contrasting a conventional apparatus with something alien (unfamiliar) actually helps students achieve a deeper understanding of the convention. Martians also use triangles and tetrahedrons to model 2nd and 3rd powering such that 3 x 3 x 3 is a tetrahedron of 27, not a cube of 27. We have a constant for going back and forth between XYZ cubic volumes and IVM tetra volumes. http://www.4dsolutions.net/satacad/martianmath/toc.html[http://www.4dsolutions.net/satacad/martianmath/toc.html] (from my previous iteration of this class) > Other Related links: > https://phys.org/news/2014-10-handedness-life.html[https://phys.org/news/2014-10-handedness-life.html] > http://www.iflscience.com/space/why-life-left-handed-answer-stars/[http://www.iflscience.com/space/why-life-left-handed-answer-stars/] > > ?Yes very useful. Looking for chemical signatures in space leads me to Harold Kroto's discovery of C60 and its subsequent analysis and synthesis as a topic. https://youtu.be/yZ8JDDnyxC4[https://youtu.be/yZ8JDDnyxC4] (another link re chirality) Thanks again! Kirby ? > Sergio > Check out the free first draft of the book: > Prealgebra via Python Programming > https://www.researchgate.net/publication/325473565[https://www.researchgate.net/publication/325473565] > https://github.com/rojassergio/Prealgebra-via-Python-Programming[https://github.com/rojassergio/Prealgebra-via-Python-Programming] > _______________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Tue, 19 Jun 2018 10:29:46 -0700 From: Yoshiki Ohshima To: "edu-sig at python.org" Subject: Re: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? Message-ID: Content-Type: text/plain; charset="utf-8" I also stick my nose here. The notion of "in computer graphics Y goes down" is not as true as some people think. The graphics you are looking at right now on your computer most likely to have gone through some programs that use "Y goes up" scheme (such as GLSL). Only if you are talking about pixels and raster graphics, you could say that there is a dominant convention to make Y go down, but in with vectors, there is no such dominance. For end-users, why does it matter how actually pixels are stored in the actual memory? Computer is medium that can simulate anything; so the decision should not be based on what computer does at the lower levels. Once we leave from what computer does at low-level, there are math text books, which are dominantly "Y-up". Why do they have to know two different conventions? Unless, of course, learning the fact that the coordinate system is just a convention and can be different. Also there may be a case where the particular turtle graphics implementation is tied to the lower level pixel representation. But is basically mixing different abstraction levels, and unless you want to teach about mixing abstraction levels, it is a bad starting point. In summary: the statement "in computer graphics Y goes down" is a wrong argument for turtle graphics to use Y-down coordinate system. Then, for turtles and for end-users, there is an existing convention to make Y go down. So that should be a better default. On Mon, Jun 18, 2018 at 9:54 AM, Kevin Cole < kevin.cole at novawebdevelopment.org> wrote: > Sticking my nose in where it don't belong. ;-) But that's never stopped me > before. ;-) > > First "I are not a teacher". At least, not in any formal sense of the > word. Second, some would say "I are not a programmer". I don't listen to > those people. > > In spite of the common "in computer graphics Y goes down", does that make > sense to new learners? I've gotten used to various coordinate systems, but > the first time I had to work with graph paper and plotting (and, for that > matter, maps) one goes "up" ("north", "forward") for Y. Then again, maybe > the average learner isn't quite as flexible these days, and telling them > after they've gotten used to a system that they have to flip everything > upside down and backwards isn't a great idea. I attribute my own > flexibility not to any innate ability but rather to learning during a time > when architectures OS's and languages were changing fast enough that there > wasn't time to become set in one's ways. > > ?[Note: Grammatical "mistakes" above are meant as weak -- very weak -- > humor. At least, most are.]? > -- > *Kevin Cole* > > NOVA Web Development Co-Op > http://novawebdevelopment.org/[http://novawebdevelopment.org/] > Arlington, VA > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig[https://mail.python.org/mailman/listinfo/edu-sig] > > -- -- Yoshiki -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ Edu-sig mailing list Edu-sig at python.org https://mail.python.org/mailman/listinfo/edu-sig[https://mail.python.org/mailman/listinfo/edu-sig] ------------------------------ End of Edu-sig Digest, Vol 178, Issue 26 **************************************** From kirby.urner at gmail.com Tue Jun 19 19:39:07 2018 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 19 Jun 2018 16:39:07 -0700 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: Message-ID: Hi Sergio -- Thanks for taking a look at the Q-ray coordinates! You're right about many bridges to crystallography in this neighborhood. ?I'm part of a tiny subculture that came up with Q-rays in a listserv long ago. http://mathforum.org/library/view/6236.html It's not that I'm the only one familiar with the ideas or that I'm the only contributor, just I know of no one else bringing it to the attention of a pre-college class, and I do that only rarely. The connection with Python is a Quadray class is implemented therein. My friend Tom has them in C++ (see Wikipedia). https://github.com/4dsolutions/Python5/blob/master/QuadraysJN.ipynb I've also dabbled in a Clojure version. https://github.com/4dsolutions/synmods/blob/master/qrays.clj I worked with Quaternions a long time ago, to do a rotating cube applet, but then applets became a deprecated technology, much to everyone's surprise and consternation. http://4dsolutions.net/ocn/oopalgebra.html Kirby ? On Tue, Jun 19, 2018 at 12:14 PM, Sergio Rojas wrote: > Kirby, > > Looking way far in the back of my head, > the closest thing (to the inspirational drawings of > your notebook) I could recover > is what is called fundamental lattice structures of > solid state physics. Not sure, but in there > they might use your coordinate system to better describe > structures of crystals. > The book by Kittel, pg 27 of the 8th Edition, has some stuff on it. > > Other object in that sense is the Quaternion thing > https://en.wikipedia.org/wiki/Quaternion > > Better stop here, I am getting hurt ... > > Sergio > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mw at creative-informatics.de Sun Jun 24 08:21:23 2018 From: mw at creative-informatics.de (mw at creative-informatics.de) Date: Sun, 24 Jun 2018 14:21:23 +0200 Subject: [Edu-sig] creative unplugged activities in computer science classes Message-ID: <003201d40bb5$ddeeae20$99cc0a60$@creative-informatics.de> Dear Python educators, teaching Python includes explaining technical facets of the programming language and initiating and scaffolding hands-on programming exercises. However, especially if the object of the course is to develop ?computational thinking? and to get a deeper understanding what computer science is, the curriculum might contain ?unplugged? activities without a computer. What do you think about unplugged activities challenging creativity? I would like to advertise a questionnaire, which is part of an international study on this type of activities in computer science education. https://goo.gl/forms/seYGUlsKHxyiqqnX2 The results will be presented in August 2018 at Constructionism in Vilnius (Lithuania) and will be available to everyone http://www.constructionism2018.fsf.vu.lt/ . Thank you and best wishes Michael Dr. Michael Weigend Fr?belstra?e 68 58454 Witten Phone +49 (0)2302 60585 Mobile +49 (0)177 565 2693 http://creative-informatics.de mw at creative-informatics.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Sun Jun 24 11:03:26 2018 From: wes.turner at gmail.com (Wes Turner) Date: Sun, 24 Jun 2018 11:03:26 -0400 Subject: [Edu-sig] creative unplugged activities in computer science classes In-Reply-To: <003201d40bb5$ddeeae20$99cc0a60$@creative-informatics.de> References: <003201d40bb5$ddeeae20$99cc0a60$@creative-informatics.de> Message-ID: On Sunday, June 24, 2018, wrote: > Dear Python educators, > > > > teaching Python includes explaining technical facets of the programming > language and initiating and scaffolding hands-on programming exercises. > > However, especially if the object of the course is to develop > ?computational thinking? and to get a deeper understanding what computer > science is, the curriculum might contain ?unplugged? activities without a > computer. > > What do you think about unplugged activities challenging creativity? I > would like to advertise a questionnaire, which is part of an international > study on this type of activities in computer science education. > > https://goo.gl/forms/seYGUlsKHxyiqqnX2 > > The results will be presented in August 2018 at Constructionism in Vilnius > (Lithuania) and will be available to everyone http://www. > constructionism2018.fsf.vu.lt/ . > > > > Thank you and best wishes > > > 1. Create an algorithm > 2. Find an example situation > 3. Create an example algorithm > 4. Create a visualization # Offline CS learning things: ## Pseudocode for algorithms ### Firefly algorithm https://en.wikipedia.org/wiki/Firefly_algorithm#Algorithm ### The Maze "The Maze" / "The Grid Puzzle Maze" is a team building activity that requires the team to find the [only?] optimal path through an NxN grid on the floor. - https://www.teampedia.net/wiki/index.php/The_Maze ### Peacemaking - Peace building / peace making activities can also tie-in with computational thinking (**win/win**). ## K12 CS Framework https://k12cs.org https://k12cs.org/navigating-the-practices/ """ To refer to a practice statement, use the following notation: P[Practice Number].[Core Practice].[Practice Statement Number] Example: P4.Developing and Using Abstractions.1 """ https://k12cs.org/navigating-the-concepts/ """ To refer to a concept statement, use the following notation: [Grade Band].[Core Concept].[Subconcept] Example: 3-5.Impacts of Computing.Culture """ ## Products (no promotions here) - TOY: Think & Learn Code-a-Pillar - TOY: Dash & Dot Robot - BOOK: "Computational Fairy Tales" by Kubica - BOOK: "The Information" by Gleick describes the mechanical context of Babbage's Difference Engine and Analytical Engine (and Ada Lovelace's programming skills). - APP: "Circuit Scramble" (Boolean logic gates/operators) - APP: "Grasshopper" (logic, conditionals, control flow, JS syntax) (We had offline tests, quizzes, *and labs* in most of the CS courses I've taken). Are there other recommendations for offline CS & Computational Thinking activities? https://en.wikipedia.org/wiki/Computational_thinking > Michael > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Sun Jun 24 11:13:35 2018 From: wes.turner at gmail.com (Wes Turner) Date: Sun, 24 Jun 2018 11:13:35 -0400 Subject: [Edu-sig] creative unplugged activities in computer science classes In-Reply-To: References: <003201d40bb5$ddeeae20$99cc0a60$@creative-informatics.de> Message-ID: > 4. Create a visualization The Khan Academy Computer Programming "Intro to JS" videos and exercises are done with ProcessingJS for visualizations: https://www.khanacademy.org/computing/computer-programming On Sunday, June 24, 2018, Wes Turner wrote: > > > On Sunday, June 24, 2018, wrote: > >> Dear Python educators, >> >> >> >> teaching Python includes explaining technical facets of the programming >> language and initiating and scaffolding hands-on programming exercises. >> >> However, especially if the object of the course is to develop >> ?computational thinking? and to get a deeper understanding what computer >> science is, the curriculum might contain ?unplugged? activities without a >> computer. >> >> What do you think about unplugged activities challenging creativity? I >> would like to advertise a questionnaire, which is part of an international >> study on this type of activities in computer science education. >> >> https://goo.gl/forms/seYGUlsKHxyiqqnX2 >> >> The results will be presented in August 2018 at Constructionism in >> Vilnius (Lithuania) and will be available to everyone >> http://www.constructionism2018.fsf.vu.lt/ . >> >> >> >> Thank you and best wishes >> >> > > 1. Create an algorithm > > 2. Find an example situation > > 3. Create an example algorithm > > 4. Create a visualization > > > # Offline CS learning things: > > ## Pseudocode for algorithms > ### Firefly algorithm > https://en.wikipedia.org/wiki/Firefly_algorithm#Algorithm > > ### The Maze > "The Maze" / "The Grid Puzzle Maze" is a team building activity that > requires the team to find the [only?] optimal path through an NxN grid on > the floor. > > - https://www.teampedia.net/wiki/index.php/The_Maze > > ### Peacemaking > - Peace building / peace making activities can also tie-in with > computational thinking (**win/win**). > > > ## K12 CS Framework > https://k12cs.org > > https://k12cs.org/navigating-the-practices/ > > """ > To refer to a practice statement, use the following notation: > > P[Practice Number].[Core Practice].[Practice Statement Number] > Example: P4.Developing and Using Abstractions.1 > """ > > https://k12cs.org/navigating-the-concepts/ > > """ > To refer to a concept statement, use the following notation: > > [Grade Band].[Core Concept].[Subconcept] > Example: 3-5.Impacts of Computing.Culture > """ > > ## Products > (no promotions here) > > - TOY: Think & Learn Code-a-Pillar > - TOY: Dash & Dot Robot > - BOOK: "Computational Fairy Tales" by Kubica > - BOOK: "The Information" by Gleick describes the mechanical context of > Babbage's Difference Engine and Analytical Engine (and Ada Lovelace's > programming skills). > - APP: "Circuit Scramble" (Boolean logic gates/operators) > - APP: "Grasshopper" (logic, conditionals, control flow, JS syntax) > > (We had offline tests, quizzes, *and labs* in most of the CS courses I've > taken). > > Are there other recommendations for offline CS & Computational Thinking > activities? > > https://en.wikipedia.org/wiki/Computational_thinking > >> Michael >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Mon Jun 25 22:58:31 2018 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 25 Jun 2018 19:58:31 -0700 Subject: [Edu-sig] creative unplugged activities in computer science classes In-Reply-To: References: <003201d40bb5$ddeeae20$99cc0a60$@creative-informatics.de> Message-ID: On Sun, Jun 24, 2018 at 8:13 AM, Wes Turner wrote: > > 4. Create a visualization > > The Khan Academy Computer Programming "Intro to JS" videos and exercises > are done with ProcessingJS for visualizations: > https://www.khanacademy.org/computing/computer-programming > > ?Glad to see ProcessingJS mentioned. Arduino programming inherits from Processing model also. One of the more effective subcultures I'm aware of, vis-a-vis Learning to Code, is spearheaded by Dan Shiffman of Coding Train fame, a ProcessingJS guru: http://worldgame.blogspot.com/2018/03/youtube-teachers.html (links to Dan's Youtube channel) Glad to see Unplugged activities getting plugged (advertised). New Zealand an early player. https://www.csunplugged.org/en/ Also happy to see Vilnius in the edu-sig news feed, having attended a EuroPython there. I became a Vilnius fan. http://worldgame.blogspot.com/2007/07/vilnius.html Kirby ? > > > On Sunday, June 24, 2018, Wes Turner wrote: > >> >> >> On Sunday, June 24, 2018, wrote: >> >>> Dear Python educators, >>> >>> >>> >>> teaching Python includes explaining technical facets of the programming >>> language and initiating and scaffolding hands-on programming exercises. >>> >>> However, especially if the object of the course is to develop >>> ?computational thinking? and to get a deeper understanding what computer >>> science is, the curriculum might contain ?unplugged? activities without a >>> computer. >>> >>> What do you think about unplugged activities challenging creativity? I >>> would like to advertise a questionnaire, which is part of an international >>> study on this type of activities in computer science education. >>> >>> https://goo.gl/forms/seYGUlsKHxyiqqnX2 >>> >>> The results will be presented in August 2018 at Constructionism in >>> Vilnius (Lithuania) and will be available to everyone >>> http://www.constructionism2018.fsf.vu.lt/ . >>> >>> >>> >>> Thank you and best wishes >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.roberge at gmail.com Wed Jun 27 21:29:06 2018 From: andre.roberge at gmail.com (Andre Roberge) Date: Wed, 27 Jun 2018 22:29:06 -0300 Subject: [Edu-sig] turtle coordinates: Y increase downards - as in most graphics API? In-Reply-To: References: <235F81C7-E335-46A8-BF8F-02C9E8F30061@willingconsulting.com> Message-ID: On Mon, Jun 18, 2018 at 1:50 PM Jurgis Pralgauskis < jurgis.pralgauskis at gmail.com> wrote: > Ok, I could test it :) > > > Should I wait for some commit and comment results on the issues site or > how...? > ?Jurgis: Could you just apply the patch I submitted locally and test it? Or would anyone else volunteer to test it? Obviously, I can provide an independent test of my own contribution. :-)? > > -- > Jurgis Pralgauskis > tel: 8-616 77613 > > 2018-06-18, pr 19:32, Carol Willing ra??: > >> Dear Andre, >> >> Thank you. >> >> The issue is reopened. If others would like to test your recommended fix >> still applies cleanly, I will be happy to review it. >> >> Warmly, >> >> Carol >> >> On Jun 18, 2018, at 9:18 AM, Andre Roberge >> wrote: >> >> Dear Carol, >> >> I apologize for letting my frustration show in this way, in a public >> forum. >> >> Andr? >> >> On Mon, Jun 18, 2018 at 1:01 PM Carol Willing < >> willingc at willingconsulting.com> wrote: >> >>> Hi Andre, >>> >>> I'm sorry that you did not like my response when I was triaging all of >>> the open Turtle issues. >>> >>> I am happy to change the status back to open. All that you needed to do >>> was ask politely and give me a chance, as a volunteer, to have the time to >>> do so. >>> >>> Regards, >>> >>> Carol >>> >>> On Jun 17, 2018, at 1:41 PM, Andre Roberge >>> wrote: >>> >>> So, a little over 3 years after I submitted a bug report (see previous >>> conversation below) **with a fix** so that no one would have to explain why >>> "right()" could result in a turtle turning left, and vice-versa, my >>> submission was refused and the bug report was closed with the following >>> explanation: >>> >>> " >>> >>> I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. >>> >>> " >>> >>> I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students? >>> >>> >>> Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant >>> >>> >>> Andr? >>> >>> >>> On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge >>> wrote: >>> >>>> >>>> >>>> On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < >>>> jurgis.pralgauskis at gmail.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> usually in computer graphics Y is counted to increase downwards. >>>>> I casn do it with: setworldcoordinates(0, 400, 600, 0) >>>>> >>>>> but then, "right(..)" turns to the left :/ >>>>> >>>>> >>>>> I could swap: >>>>> right, left = left, right >>>>> >>>>> but on errror I get a bit misleading message >>>>> >>>>> >>> right() >>>>> Traceback (most recent call last): >>>>> File "", line 1, in >>>>> right() >>>>> TypeError: left() takes exactly 1 argument (0 given) >>>>> >>>>> I thought to make this hack for kids, so better clearer error msgs... >>>>> >>>> >>>>> Any Ideas? >>>>> >>>> >>>> http://bugs.python.org/issue23660 (includes a proposed "permanent" >>>> fix). >>>> >>>> Andr? >>>> >>>> >>>> >>>>> Thanks :) >>>>> -- >>>>> Jurgis Pralgauskis >>>>> tel: 8-616 77613; >>>>> Don't worry, be happy and make things better ;) >>>>> http://galvosukykla.lt >>>>> >>>>> _______________________________________________ >>>>> Edu-sig mailing list >>>>> Edu-sig at python.org >>>>> https://mail.python.org/mailman/listinfo/edu-sig >>>>> >>>>> >>>> _______________________________________________ >>> Edu-sig mailing list >>> Edu-sig at python.org >>> https://mail.python.org/mailman/listinfo/edu-sig >>> >>> >>> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: