PyWart: The problem with "print"
Dan Sommers
dan at tombstonezero.net
Mon Jun 3 00:20:54 EDT 2013
On Sun, 02 Jun 2013 23:23:42 -0400, Jason Swails wrote:
> On Sun, Jun 2, 2013 at 11:10 PM, Dan Sommers <dan at tombstonezero.net>
> wrote:
>> Ah, yes. The Heisenbug. ;-)
>
> Indeed. Being in the field of computational chemistry/physics, I was
> almost happy to have found one just to say I was hunting a Heisenbug.
> It seems to be a term geared more toward the physics-oriented
> programming crowd.
I'd been using the word Heisenbug for years with only a pop-culture clue
as to what it meant. Many years later, I went to college, studied
physics (and math), and had one self-study semester of computational
physics on my way to my undergraduate degree. After a career in
software development, including a few years in the financial industry,
with lots of floating point economic models, I must say that it was very
enlightening.
>> They're much harder to see in the wild with Python.
>
> Yea, I've only run into Heisenbugs with Fortran or C/C++. Every time
> I've seen one it's been due to an uninitialized variable somewhere --
> something valgrind is quite good at pinpointing ...
Uninitialized variables and off-by-one pointer operations. Little can
screw up a calculation like mistaking a stack frame link for a floating
point number. :-)
> ... (And yes, a good portion of our code is -still- in Fortran -- but
> at least it's F90+ :).
I am a huge proponent of using the right tool for the job. There is
nothing wrong with some well-placed FORTRAN, as long as the PSF
More information about the Python-list
mailing list