|
From: Bruce S. <ba...@an...> - 2001-03-25 19:35:33
|
I realized that the following reply to an individual might be of interest
to the VPython user group in general:
--On Sunday, March 25, 2001 09:18 -0800 Dale Yocum <da...@yo...> wrote:
> I'm considering using VPython for a intro to computer science course I'm
> developing for high school students. Can you give me some idea of how
> stable it is for such an application. Will the students get confused due
> to hitting bugs frequently?
David Binger at Centre College (bi...@ce...) has used VPython in an
intro programming course, so you might like to ask him about his
experiences.
We have found VPython to be exceptionally stable on Windows, the only
platform on which we have had extensive personal experience. The Mac
version has had little testing and does not yet have a full integrated
programming environment. Linux versions seem to be subject to difficulties
in installing, but as far as I know they work well once this is
straightened out.
During the fall semester we did experience some crashes on Windows, but
these went away after we installed a later version of the video driver. It
appears that video driver support for OpenGL has been improving, but that
earlier drivers didn't always do the right thing. Even in the fall our
students didn't experience loss of work, because on Windows the VPython
version of IDLE automatically saves the file when you run (and there is
unlimited undo). After updating the video drivers our students have not
experienced any crashes.
There are some language issues to watch for, though I judge them to be
vastly less severe than in say C++ or Java (and some are shared with these
other languages). For our purposes in a physics course, it is quite
unfortunate that 1/2 is zero rather than 0.5, and we have to continually
warn our students about this. Guido van Rossum has indicated a strong
interest in addressing this problem in future versions of Python (done in a
way to preserve compatibility with older programs).
Because names in Python are just labels for structures in memory, the
following can be confusing:
a = [1, 2, 3]
b = a
b[0] = 555
print a # prints [555, 2, 3]
Changing b[0] changes the same cell in memory as changing a[0]; b = a isn't
a copy but just the creation of another label for the same list. This holds
only for "mutable" objects such as lists.
This "bug" ("feature" of Python) affected our students very rarely, given
the nature of the physics modeling they were doing.
A recent amusing "bug" surfaced, having to do with vectors and Numeric:
B = vector(0,1,0) # magnetic field
omega = e*B/m # angular speed of proton in circular orbit
E = E0*cos(omega*t) # no error message
The student should have written omega = (e/m)*mag(B), because omega is a
scalar, not a vector. But the calculation of E gave no error message; it
evaluated a vector corresponding to the three components of omega. Subtle.
Like the problem of 1/2 not being 0.5, the nasty bugs are the ones that
give no error messages (or if you like, they do exactly what you told
Python to do, not what you wanted it to do or expected it to do).
An issue (or non-issue) kicking around the Python community is that
supposedly the case sensitivity of Python is a big problem for novices. We
have seen absolutely no evidence for such a problem with novice
programmers. The data supporting there being a problem were collected in
circumstances that call the data into question.
> Also, what are the future plans for VPython given your busy school
> schedules?
Several of us continue working on VPython and its upkeep. We also hope that
additional contributions will come from the growing VPython community.
Bruce Sherwood
|