Re: [Edu-sig] a common misconception

2016-01-23 Thread John Zelle
er any method invocation a "function call", I consider the constructor invocation to be a function call. I concede your technical point, but I stand by my (and other authors') decision on how to treat this. Cheers, --John John Zelle, PhD Professor of Computer Science Wartburg College ___

Re: [Edu-sig] Parallel computing

2014-03-31 Thread John Zelle
We've had good luck in the past using pypar (http://code.google.com/p/pypar/) in a college scientific computing class for students who have had a single programming course in Python. At that time (2 years ago), it seemed to be the simplest entry point for Python-based MPI type programs. John

Re: [Edu-sig] a short essay about programming

2012-04-22 Thread John Zelle
that as an excuse to make single-threaded code hard to reason about as well. --John John Zelle, PhD Professor of Computer Science Wartburg College From: da...@handysoftware.com [da...@handysoftware.com] Sent: Sunday, April 22, 2012 5:06 PM To: John Zelle

Re: [Edu-sig] a short essay about programming

2012-04-21 Thread John Zelle
read is a standard part of a sentinel loop, and both examples are shorter than the versions that retest or assign a conditional inside the loop. John Zelle, PhD Professor of Computer Science Wartburg College From: edu-sig-bounces+john.zelle=wartburg

Re: [Edu-sig] a short essay about programming

2012-04-21 Thread John Zelle
Oops, I think I have an off by one error in my last example. I would change the conditional at the bottom to: if guess == secret: print(You guessed it!) else: print(You maxed out.) That's clearer anyway. John Zelle, PhD Professor of Computer Science Wartburg College

Re: [Edu-sig] a short essay about programming

2012-04-21 Thread John Zelle
to accomplish. Together not C and INV should be sufficient to convince yourself (and others reading your code) that your loop has accomplished exactly what you wanted it to. --John John Zelle, PhD Professor of Computer Science Wartburg College From: edu-sig-bounces

Re: [Edu-sig] mac python graphics

2011-12-07 Thread John Zelle
. Cheers, --John John Zelle, PhD Professor of Computer Science Wartburg College From: edu-sig-bounces+john.zelle=wartburg@python.org [edu-sig-bounces+john.zelle=wartburg@python.org] on behalf of Andrew Harrington [ahar...@luc.edu] Sent: Wednesday, December

Re: [Edu-sig] mac python graphics

2011-12-07 Thread John Zelle
compatibility), and I consider the API now to be at the limit of what I can expect my CS1 students to reasonably master. John Zelle, PhD Professor of Computer Science Wartburg College From: anharring...@gmail.com [anharring...@gmail.com] on behalf of Andrew

Re: [Edu-sig] Interesting gotcha

2011-03-29 Thread John Zelle
Hi, I agree that the behavior of booleans in Python can sometimes lead to subtle errors, but I think it's important to stress to students that writing things like: if xy == True: is _really_ bad style. After pointing that out, I start taking points away for doing this. Code like this shows

Re: [Edu-sig] looking for explanations... globals dynamic dict

2011-03-28 Thread John Zelle
Hello, Isn't the issue here simply that globals does not return a copy of the globals dictionary, it returns THE actual globals dictionary. It's not some sort of callable, it is the globals dictionary, period. There is no such thing as a static dictionary, they are mutable, and this one

Re: [Edu-sig] What version of Python to teach ....

2009-04-19 Thread John Zelle
Hi, On Sunday 19 April 2009 18:44:30 michel paul wrote: On Sun, Apr 19, 2009 at 2:48 PM, Gregor Lingl gregor.li...@aon.at wrote: How do you explain the nature of range to beginners? How about using list(range())? Something like: # Here's how you can create a list of integers:

Re: [Edu-sig] Scratch pad nuttiness... (re generators)

2009-03-16 Thread John Zelle
Hi Kirby, I happen to be working through some Python3.0 issues right now. A couple comments: On Monday 16 March 2009 10:42:24 kirby urner wrote: So then it occurs to me, would there by a way to do a kind of special names overloading such that __next__ (that which triggers the next cycling

Re: [Edu-sig] looking for references

2008-07-26 Thread John Zelle
Barry Schwartz's book, The Cost of Living: How Market Freedom Erodes the Best Things in Life, has a chapter titled The Debasing of Education: Turning Play into Work that summarizes various evidence and makes a similar argument along these lines. On Sat, 2008-07-26 at 10:11 -0500, Daniel Ajoy

Re: [Edu-sig] Pass by Reference

2008-05-21 Thread John Zelle
Hi David, I gave a detailed description of my definitions in a post a while back. In that, I referred to the traditional view of a variable as a named location. As per your request: In call-by-value the formal parameter is a local variable whose content is initialized with a copy of the value of

Re: [Edu-sig] Pass by Reference

2008-05-20 Thread John Zelle
Hi John, I can't agree with this. On Tue, 2008-05-20 at 10:50 -0400, John Posner wrote: ... and stop trying to invent new names for a parameter passing mechanism that is identical in function to traditional call by value. Yeah, but ... it will be difficult to stick to a call-by-value

Re: [Edu-sig] Pass by Reference

2008-05-20 Thread John Zelle
a serious misunderstanding of what I am saying. At 06:36 PM 5/19/2008 -0500, John Zelle wrote: You insist on writing/thinking/reasoning as if Python variables contain the objects they refer to, but that simply is not the case for the traditional use of the term variable

Re: [Edu-sig] Pass by Reference

2008-05-20 Thread John Zelle
Hi Warren, Some interesting thoughts. You have given me something of a new insight. (So call this a post on a related topic :-) On Tue, 2008-05-20 at 18:35 -0700, Warren Sande wrote: I would argue that from a functional point of view (black box, the way it behaves), Python does behave like

Re: [Edu-sig] Pass by Reference

2008-05-19 Thread John Zelle
. I'll pause once more to see if I've made any mistakes, before the third and final step - deciding what to call this thing that Python does in passing an argument. -- Dave At 12:41 PM 5/15/2008 -0700, David MacQuigg wrote: At 04:30 PM 5/14/2008 -0500, John Zelle wrote: At some point, I

Re: [Edu-sig] Sticky-note Analogy

2008-05-14 Thread John Zelle
At some point, I have to just let this go, as I think we all on this list have a pretty good understanding of the differences between C and Python in terms of assignment and parameter passing. But let's _not_ use the term pass by reference when talking about Python. You CANNOT CHANGE THE CONTENTS

Re: [Edu-sig] How does Python do Pointers?

2008-05-06 Thread John Zelle
David, Actually, I don't think there is that much confusion among the folks who understand/design/study programming languages. Python uses call by value, period, as that term is technically used. But your note below shows the continued confusion (among programmers) about what parameter passing

Re: [Edu-sig] Scratch interface for Python, and network programming games.

2007-08-27 Thread John Zelle
This is a very interesting assignment, but I would just point out that this is hardly an intro CS course. They are doing these particular projects in an intermediate/advanced data structures/algorithms class. That would be a 3rd semester college-level course for those who entered without a

[Edu-sig] Fwd: Re: Using IDLE with students

2007-08-17 Thread John Zelle
PROTECTED] To: John Zelle [EMAIL PROTECTED] I remember installing a patch when I couldn't get IDLE to restart on my Windows computer. Here's a discussion of said patch: http://mail.python.org/pipermail/patches/2006-July/020360.html - Original Message From: John Zelle [EMAIL PROTECTED

Re: [Edu-sig] Using IDLE with students

2007-08-16 Thread John Zelle
On Thursday 16 August 2007 8:01 am, Andy Judkis wrote: When teaching Python to beginners and using IDLE, it seems that one of the dangers would be to have them assigning variables in the interactive mode and then maybe using them in a script they're writing. Then, when they run the

Re: [Edu-sig] spinning 'self'

2007-08-14 Thread John Zelle
On Monday 13 August 2007 11:30 pm, kirby urner wrote: On 8/13/07, John Zelle [EMAIL PROTECTED] wrote: I would quibble about self not doing any work (you need it to access its attributes), but I understand the point you are making. Again, though this makes things seem a bit more mysterious

Re: [Edu-sig] spinning 'self'

2007-08-13 Thread John Zelle
On Monday 13 August 2007 3:43 pm, kirby urner wrote: Python is remarkably liberal in its design, in that 'self' is not a keyword. You're free to use other names for this important place in memory. Yet there's still self-imposed discipline (another way of saying 'self discipline'), such that

Re: [Edu-sig] a non-rhetorical question

2007-07-06 Thread John Zelle
Hi All, I am very interested in responses to Andy's question because it was just this sort of frustration with students' inability to write simple programs that led me to using Python (as opposed to C++ or Java) in CS1. After my switch to Python and back to basics CS1 back in 1999, my results

Re: [Edu-sig] a non-rhetorical question

2007-07-06 Thread John Zelle
I agree with Kirby that madlibs are a fun example. On Friday 06 July 2007 2:12 pm, kirby urner wrote: As I mention in my slides for EuroPython (looking forward to meeting Laura again tomorrow), Madlibs proved appealing to most students, little stories where they have to prompt

Re: [Edu-sig] Strange transitive import problem

2007-02-12 Thread John Zelle
. A clue, then: it's not the transitive importing that causes the problem, it's the importing of a file that calls GraphWin(). Peter Drake Assistant Professor of Computer Science Lewis Clark College http://www.lclark.edu/~drake/ On Feb 9, 2007, at 1:09 PM, John Zelle wrote: Peter, I

Re: [Edu-sig] Strange transitive import problem

2007-02-09 Thread John Zelle
Peter, I should have caught this when you posted your file. There is a bizarre import interaction that I am aware of, but can't say that I fully understand regarding my graphics library. It seems that Python imports are in some-way, somewhat atomic, and with the way my graphics library is set

Re: [Edu-sig] Using objects early was Procedural front end for Zelle's graphics.py

2007-02-07 Thread John Zelle
On Wednesday 07 February 2007 10:54 am, Peter Drake wrote: Your philosophy may differ, but I'd like to see control structures explained sooner. You currently don't introduce if for 200 pages. I find that it's hard to come up with interesting assignments without if. (My idea of interesting

Re: [Edu-sig] Interactive Tkinter graphics under IDLE

2007-02-06 Thread John Zelle
Hi Peter, Just a quick question for you. I am wondering if you have checked out the simple graphics package that I built on top of Tkinter for doing these sorts of simple manipulations. It's also name graphics.py. If you haven't seen it, you can check it out at:

Re: [Edu-sig] experiences teaching Python with turtle graphics?

2006-11-17 Thread John Zelle
On Friday 17 November 2006 8:07 am, Ernesto Costa wrote: Hi, Returning to the question of a good module about graphics. I'm using Zohn Zelle's book for my course. It has a interesting and simple to use graphics module. It would be nice if that module could be merged with xturtle i.e to

Re: [Edu-sig] Truth values and comparisons

2006-10-30 Thread John Zelle
On Monday 30 October 2006 10:49 am, Arthur wrote: [EMAIL PROTECTED] wrote: I've not used .any or .all, but having just taught my CS1 students about boolean operators, I was reminded that Python works as the following example describes: x = a and b # if both a and b are true, x is

Re: [Edu-sig] The Fate of VPyton BLENDER ??

2006-10-13 Thread John Zelle
Jason, I've looked into Blender a number of times, and while I would like to learn it, I have never had time for the learning curve. VPython is something my students and I can use immediately to solve problems at hand. If my goal were to become a 3D artist, then something like Blender would be

Re: [Edu-sig] The fate of vpython

2006-10-09 Thread John Zelle
On Monday 09 October 2006 3:59 pm, Dethe Elza wrote: On 9-Oct-06, at 11:15 AM, Arthur Siegel wrote: My other hope for VPython would be to build it on a more capable 3D system, such as Ogre or Panda3D (Mike Fletcher keeps a large list of such systems: http://www.vrplumber.com/py3d.py). In

Re: [Edu-sig] The fate of vpython

2006-10-09 Thread John Zelle
On Monday 09 October 2006 6:56 pm, Arthur Siegel wrote: On Mon, 2006-10-09 at 18:41 -0500, John Zelle wrote: Just curious, is PyOpenGL easy to install for both Mac and Windows? I know it's dead simple on most Linux distributions. I think it's pretty easy for Windows, but have no experience

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-16 Thread John Zelle
On Saturday 16 September 2006 9:35 am, Arthur wrote: John Zelle wrote: no, No, NO. I never said this. At least I didn't intend to. Please see the top of the message where I ask (virtually beg) for clarification on what you are saying. I thought you were saying that it's OK to teach

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-13 Thread John Zelle
A new twist on this thread: discussing the very nature of intro courses. Should we read more code and program less, should our programs build to something and not be a bunch of random scripts? I think it's obvious to everyone that a course that tackles real world problems will be more

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-13 Thread John Zelle
On Wednesday 13 September 2006 10:22 am, Arthur wrote: John Zelle wrote: I think it's obvious to everyone that a course that tackles real world problems will be more interesting than one that doesn't. But that doesn't mean simple scripts can't address real world issues. But there is a basic

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-09 Thread John Zelle
On Friday 08 September 2006 4:27 pm, kirby urner wrote: On 9/8/06, kirby urner [EMAIL PROTECTED] wrote: You're not making a monkey out of your mom, by making her loop through some little menu, oblivious of the language underneath, its logic and design. You're protecting you mother (aka

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-09 Thread John Zelle
On Saturday 09 September 2006 12:35 pm, you wrote: snip But mostly I'm advocating going to the other extreme: drop GUI as a topic and just code up a namespace, reach into the grab bag for functions, like f(x) or cos(x). We pretend kids don't have the background, but if they did *any* work

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-08 Thread John Zelle
First up, I support the petition/ suggestion whatever you want to call it. I'm somewhat disappointed that our discussion here seems to have gotten derailed by Arthur's comments that it's all about ease of teaching. I think I put forward a number or solid arguments about IO being core to

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-06 Thread John Zelle
On Wednesday 06 September 2006 8:00 am, Arthur Siegel wrote: Being dispassionate on the issue itself - I have *never* used raw_input() and, as it happens, I am generally literate enough at this point so that the intentions of sys.stdin.readline is *clearer* to me than is raw_input() - I am

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-05 Thread John Zelle
On Monday 04 September 2006 11:03 pm, Toby Donaldson wrote: I don't care about input. Its there now and hasn't ever been useful to me (eval(raw_input(...)) is a fine alternative), and, more importantly, has apparently not caused confusion among students. Again, for similar reasons to those

Re: [Edu-sig] The fate of raw_input() in Python 3000

2006-09-04 Thread John Zelle
On Monday 04 September 2006 8:56 pm, Dethe Elza wrote: On 4-Sep-06, at 5:45 PM, Andre Roberge wrote: The following is something I have been pondering for quite a while now and am wondering what other people on this list think. According to PEP 3100

Re: [Edu-sig] What was that syntax again?

2006-08-15 Thread John Zelle
Is this what you're looking for: d = dict(key1=52, key2=12) d {'key2': 12, 'key1': 52} Of course this only works for keys that are strings. --John On Tuesday 15 August 2006 1:28 am, kirby urner wrote: Someone (Dethe? Ian?) showed me syntax I'd never seen before around Python dictionary

Re: [Edu-sig] Smalltalk syntax benefits

2006-08-10 Thread John Zelle
On Thursday 10 August 2006 10:24 am, Paul D. Fernhout wrote: What about constructors like Line origin: 10 @ 10 angle: 35 degrees distance: 10 mm (which is easy to have in Smalltalk syntax) and so on? And I bet you can read what it means not even knowing Smalltalk. Would you rather read:

Re: [Edu-sig] digits of pi

2006-07-28 Thread John Zelle
:-) In the paper, this was done in a lazy functional language. I was mostly interested to see how it would translate to a Python generator. # pi.py -- imlementation of Gibbons' spigot algorithm for pi # John Zelle 4-5-06 def pi_digits(): generator for digits of pi q,r,t,k,n,l = 1,0,1,1,3,3

Re: [Edu-sig] Setting a variable's value

2006-05-11 Thread John Zelle
On Thursday 11 May 2006 16:19, you wrote: snip We're straying a bit from the original thread here, but I couldn't resist this comment. Ergo my point: I don't look to mathematicians to tell me how to write math, but to computer scientists such as Kenneth Iverson. Although sure, I'll take

Re: [Edu-sig] PySqueak: more on the cultural divide among paradigms

2006-05-06 Thread John Zelle
On Saturday 06 May 2006 11:40, Winston Wolff wrote: On May 6, 2006, at 11:25 AM, John Zelle wrote: To me, it seems that a 2D/3D persistent scene-graph API paired with a GUI toolkit, both based on PyOpenGL is the obvious first step toward this goal. snip But I'd like some clarification

Re: [Edu-sig] Don't kids program anymore?

2006-04-30 Thread John Zelle
This has been an interesting thread. I haven't had time to contribute, but I saw something here that I felt I had to address. On Sunday 30 April 2006 14:47, kirby urner wrote: On 4/30/06, Michael Tobis [EMAIL PROTECTED] wrote: Most kids, most humans in general, will voluntarily spend many

Re: [Edu-sig] How to Think Like A Computer Scientist

2006-03-28 Thread John Zelle
On Tuesday 28 March 2006 09:42, kirby urner wrote: So we have different levels of mutability. A complex type which doesn't allow resassignment of real and imaginary parts might look like: Immutable: c = Complex(1,2) c = c.real(3) # assigning a new value c = c.imag(4) # yet another new

Re: [Edu-sig] Properties use case

2006-03-23 Thread John Zelle
Since my name was invoked recently on this thread (albeit with a question mark), let me try to summarize: We all agree that mutability introduces interesting issues, particularly in the face of true concurrency. Language designers are very interested in languages with semantics that avoid or

Re: [Edu-sig] Properties use case

2006-03-18 Thread John Zelle
On Saturday 18 March 2006 16:39, Michael Tobis wrote: So, is there a problem with wrapping them thus: ### class mcx(object): def __init__(self,val): self.val = complex(val) def __add__(self,other): and similarly for most other special methods return

Re: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16)

2006-03-08 Thread John Zelle
I also like the simplicity of lightning, but it would need some enhancements before I could imagine using it in class. For example, it doesn't seem to auto-indent and requires typing the filename on a save. I'm sure it would not be hard to tidy up those things. I'd also like to handle multiple

Re: [Edu-sig] Low Enrollments - programming as anti-intellectualism

2005-11-04 Thread John Zelle
Kirby Urner wrote: I think there's a shortage of computer pros with strong presentation skills. Like, at Europython we got a 5 minute upbraiding by one of the few female geeks, complaining that we collectively mumbled too much, failed to project our enthusiasm for our topics. We must do more

Re: [Edu-sig] Low Enrollments - programming as anit-intellectualism.

2005-11-02 Thread John Zelle
Arthur wrote: A business trip had me passing through New Haven. As a lover of books, and therefore bookstores, I took the opportunity to stop to look for a bookstore near the Yale campus - figuring I would find a bookstore with significantly more depth than those to which I normally have

Re: [Edu-sig] Python as a first language for computer sciencist

2005-10-17 Thread John Zelle
Carlos, I doubt that you'll get much disagreement on this list about Python being an excellent first language choice. Hence, there is unlikely to be much of a discussion. I wrote a paper titled Python as a First Language back in 1998, you can find it at: http://mcsp.wartburg.edu/zelle/python

Re: [Edu-sig] Microsoft's KPL

2005-10-08 Thread John Zelle
As usual, I don't have time to comment on all the intriguing things that have come out of this thread. But gender balance is something that I've spent a lot of time thinking about and working on as regards our own program. So I felt compelled to say something. Laura Creighton wrote: Why

Re: [Edu-sig] Brute force solutions

2005-09-22 Thread John Zelle
On Wed, Sep 21, 2005 at 09:31:41AM -0700, Kirby Urner wrote: Of course all of this requires temporarily ignoring the fact that algebraic methods give us a way to compute phi as simply (1 + math.sqrt(5))/2.0. I've been considering this a bit. The closed form here begs the question, what is

Re: [Edu-sig] Brute force solutions

2005-09-21 Thread John Zelle
David Handy wrote: On Wed, Sep 21, 2005 at 09:31:41AM -0700, Kirby Urner wrote: Mine original draft makes sense to set the stage, cuz the reasoning is so dang primitive. Yours adds a layer of sophistication more reflective of how real world programmers learn to squeeze the most out of their

Re: [Edu-sig] quantum instance

2005-09-18 Thread John Zelle
Arthur wrote: My only objection to it being there - in fact - is the lack of consensus as to the compelling reason it is necessary. There seems to be agreement, in fact, on only this one aspect of the reason for its presence as a built_in function. The fact that the reason is

Re: [Edu-sig] quantum instance

2005-09-15 Thread John Zelle
Arthur, It often seems to me that I agree with you, but you think that you don't agree with me. This may be one of those cases. Arthur wrote: -Original Message- I'm confused I tell you ;) Scott David's Triangle did *not* use a property for area. I think that was quite

[Edu-sig] Updated graphics library

2005-06-14 Thread John Zelle
Hello all, For those of you who use my graphics.py library for teaching, I wanted to let you know that I've just released an update to version 3.2. This version has two important improvements over the last release (3.0): 1. Significantly improved performance of communication with the Tk

Re: [Edu-sig] Python for CS101

2005-05-06 Thread John Zelle
Toby Donaldson wrote: For instance, to write an efficient queue data structure (where adding and removing form the queue are always constant-time operations) in LISP/Scheme requires using arrays. Hi Toby, I don't think this is a valid criticism. If the point of using a queue is to teach how

Re: [Edu-sig] FW: RFS: python-visual - VPython 3D scientific visualization library

2005-04-03 Thread John Zelle
Arthur wrote: Floris Bruynooghe has created a VPython Debian distribution and is in process of attempting to have it accepted as official Debian package. Not being familiar with the process I am having trouble following the dialogue - sponsorship vs. adoption, etc. Obviously I would like to see

Re: [Edu-sig] 9. Best approach to teaching OOP and graphics

2005-03-23 Thread John Zelle
Lloyd Hugh Allen wrote: On Wed, 23 Mar 2005 14:02:15 +0200, Linda Grandell [EMAIL PROTECTED] wrote: I wonder if letting the students pair up for themselves could work? That would more or less be a variant of the second alternative above. Or does this introduce the risk of weaker students pairing

Re: [Edu-sig] Hypertoons!

2005-03-12 Thread John Zelle
Kirby, Thanks for the update. I had tried to run this earlier and noticed the missing dependency, but had not yet tracked down what was up. I've got it running now (with a couple tweaks for Python 2.3). This is a nifty application for demonstrating stereo visualization. Just set scene2.stereo

Re: [Edu-sig] 3d goggles -- any recommendations

2005-02-09 Thread John Zelle
Hans, There are lots of sources for the cheap (= $0.40 US) anaglyph (red-blue) glasses on the net. I have recently ordered from RainbowSymphony and had decent results (not wild about the packaging but otherwise fine). As for the shutterglasses, it depends on what you are trying to achieve.

Re: [Edu-sig] IDLE and Matplotlib

2005-01-11 Thread John Zelle
Hans, I know you are already in communication/waiting for a bugfix on this, but I have a quick inquiry. This sounds related to issues I've had with my graphics library (now solved, knock on wood). I would think that running IDLE -n would solve this problem for you. Please see my question