Appreciation for the importance of readability (was: Choosing Perl/Python for my particular niche)

Michele Simionato michele.simionato at poste.it
Sun Mar 28 02:42:39 EST 2004


claird at lairds.com (Cameron Laird) wrote in message news:<106ce9eaed1sk61 at corp.supernews.com>...
> Some scientists are very successful with "slash-and-burn"
> techniques.  That manifests itself in this area as "con-
> science-free" coding:  they write whatever programs get
> them the results they're after, and don't care that no
> one else can reproduce their results, nor can they them-
> selves, six months later.  A LOT of that goes on.
> 
> It makes me uncomfortable.  A lesson I've learned over
> and over is that computer programs live far longer than
> you expect.  It pays to do 'em better at the beginning,
> 'cause you're likely to live with them quite a while.
> 
> I'm not a successful scientist, though; odds are long
> against me ever being one.
> 

The relation between programming and science is rather complex.
There are still lots of sciences where the programming part is
very minor and the "slash-and-burn" technique is the right thing
to do. For instance, I have worked with very successful scientists
using "slash-and-burn". Their requirements were the following:

1. we want to spend at most 5% of our time doing coding and 95% doing
   science;
2. our group is composed by two persons and our code will never be
   released;
3. if a Ph. D. student reach the group and has to study the code, we 
   will explain it to him in person;
4. the largest program we will ever write is a thousand lines long;
   for the rest we will use standard routines and write as little code
   as possible;
5. we don't care at all about fancy graphics: the output will be a list
   of numbers write on a file and displayed by gnuplot; 
6. all we care is numerical performance in floating point computations;
   the logic of the program will be trivial.

They actually used old fashioned Fortran 77 and I think they made the perfect 
choice given their requirements; they essentially had to do numerical 
integrations and solving differential equations, tasks were Fortran is
incredibly strong. Other persons I know doing particle Physics and doing a 
good deal of programming (good deal means something like 50% of their time
spent on programming; spending more than 50% means that you are actually
a programmer, and scientists don't want to do that) were using a mixture
of Fortran and C. Here I am referring to people doing numerically
intensive tasks; I have seen a trend to switch to C++ for large projects,
since there is a perception than C++ scales better than Fortran. In
any case, the core routines are still in Fortran and always will be.
For scripting tasks, scripting languages are used; I know a few
astronomers who were using Perl to control the telescope movement.
Many physicists/astronomers use Python too. Specialized languages
and tools (Mathematica, Maple, Matlab, Octave, Yorick, etc. etc.)
have their place.

Finally, it may be weird in XXI century, but there are still scientists 
not doing programming. For instance, the only programming language I used 
for my scientific research was Latex, to write the papers; my reseach tools 
were paper and pencil and blackboard, which are still as effective as
ever.

             Michele Simionato



More information about the Python-list mailing list