[SciPy-User] peer review of scientific software
Matthew Brett
matthew.brett at gmail.com
Tue May 28 19:23:20 EDT 2013
Hi,
On Tue, May 28, 2013 at 3:44 PM, Bill Carithers <wccarithers at lbl.gov> wrote:
> As a scientist who spends the majority of my time writing code to analyze
> data, I've found this discussion fascinating. Early in my career, I actually
> coded in assembly language (remember index registers?), then Fortran for a
> couple of decades, then biting the bullet and moving to object-oriented
> languages (Java, Python, Objective C). Now I use mostly Python. I hope the
> following comments from this perspective will be useful.
Yes, thanks for sending it.
> 1. There is no "one size fits all" . Sometimes I use Python as a BASIC-style
> calculator, sometimes Python as procedural like Fortran, most of the time
> Python as fully OO. The level of documentation, testing, and version control
> need to be tailored to the problem.
That's true, but I personally use version control for everything.
Whenever I'm writing more than a few lines of code I start feeling
uncomfortable if it's not somewhere in version control and it's not
tested. Version control is so easy I do remember to do that.
Testing is hard and annoying, I sometimes press on and almost
invariably regret it.
I think that discomfort - the feeling that I'm setting myself up for
future problems if I don't do this stuff - is what I'd like to be able
to teach the next generation of scientists so they can do a better job
than we did. I'm still struggling with how to do that.
> 2. In terms of getting scientists into the "modern world" of writing
> maintainable, re-useable code, I think the most useful tool is a really good
> IDE. Then much of the documentation, version control, de-bugging tools are
> seamlessly there. I don't think I could have written acceptable Java without
> Eclipse, and I'm absolutely positive that I couldn't write Objective C
> without Xcode. I use IDLE for Python, but it is no where near the level of
> these others.
I'm a scientist, I've never taken a course in programming or CS. I've
written a lot of code in Matlab and Python. I very occasionally used
the Matlab IDE, for debugging, but I've never used a Python IDE. My
typical workflow is text editor, nosetests from terminal, IPython
console in a terminal to try stuff out. I feel this helps me think
more clearly - it separates the editing world from the testing world
and the version control world. But I might well be wrong about that.
It seems to me there's a constant and difficult tension between
making it easy and making it easier to think.
Cheers,
Matthew
More information about the SciPy-User
mailing list