[Bioclusters] education II

Adam S. Moskowitz bioclusters@bioinformatics.org
Sun, 15 Sep 2002 13:49:17 -0400 (EDT)

"Daniel Comesana" <dcomesana@gemabiotech.com> wrote:
> I want to put on the table the Python language.
> . . . however Perl is widely used, since it was used for a lot of years

I have my own biases against Python, but the real reason I don't
recommend it is exactly what you said: Perl is more widely used. I'm
betting that enough bio tools are written in Perl that you probably need
to learn it, at least enough to modify/extend those tools. Given that,
the effort to learn a second language is harder to justify. Also, if
more BIFX people write Perl (now), it's going to be easier to get help
from your peers.

Mind you, I'm not saying Perl *has* to stay on the top of the list;
there's evidence that Python may surpass perl, and even more evidence
(in my mind) that Ruby may surpass both Perl and Python -- but so far,
neither has, and so I continue to recommend Perl.

On second thought, I will air my biggest bias against Python:
Indentation is good, but makin indentation an integral part of the
language is a bad idea. First, the structure of a program should not
depend on the formatting. What happens if someone mails you a program
and your mailer (or his) munges the spaces or tabs? Goodbye program.
Worse, you don't know how to put it back together. And if your mailer
doesn't do this, somebody's tool (like ClearCase or some such) will.
It's just asking for trouble.

Second, as a systems guy, it's common for me to write programs that
write other programs. Hell, in my current project, program A writes
program B, which munges program C into Program D, and then (finally)
runs program D. If the indentation of program C changes, I have to
either change program A to know about it, or I have to make program A
(or is it B?) smart enough to figure out what the indentation of C is
and do the right thing. With C and Perl, I can pretty much ignore
indentation and just edit lines as needed. Yes, this makes B, C, and D
ugly, but those programs are never read by humans (they're deleted at
the end of the run), so why should I care if they're pretty? But
Python's use of indentation as program structure means I have to do the
extra work. Screw that -- programs A and B are hard enough already.

Third, encouraging good programming style (and indeed, good software
engineering practices in general) is a Noble Goal -- but enforcing it is
just Wrong. Unix had the right idea: If I want to shoot myself in the
foot, let me. If anything, help me do it, so there's a nice, clean hole
exactly where I want it.