[BiO BB] Python or Perl

Joe Landman landman at scalableinformatics.com
Mon Jan 22 00:23:21 EST 2007

Hi Tim:

tim wrote:
> Hi,
> I am a final year Molecular Sciences student (chemistry and molecular
> biology) and am trying to teach myself some bioinformatics programming.
> My history is in Basic from years ago. Because of this, I find Python a
> bit easier to understand. Having said this, is biopython widely used, or
> would I be as well persevering with learning Perl, and then bioperl
> which seems to have  a bigger following?

(Caution: comments below come from a 'hardcore' Perl guy)

Use the language that fits you best.  What I used to joke about Perl was
that I could write my Perl in Fortran.  Or Basic.  Or even something
that looked moderately like assembler (if you take a code, pull its core
out, rework it as hand tuned assembler that you teach yourself in order
to get more speed for an experiment control, you understand the
simultaneous thrill and awe of the forces at your control ... even more
so the first time you disable all interrupts, and send the system into
an infinite loop .... )

One thing I like about Perl is that it really isn't too hard to get your
mind around, get productive quickly.  This is good and bad.  The bad
part is when you realized what you were doing when you started learning
it, and that there were/are far more elegant ways of expressing ones self.

Ann made a comment about english and esperanto.  I am not sure I got it
(simplicity of expression)?

Python offers lots.  It gives people who use it a relatively rigid world
view (IMO) that helps contain the almost free-form world view of "there
is more than one way to do it" within perl.  I have heard that as the
biggest reason why people have switched to Python from Perl.  Then
again, I have heard that reasons people have switched the other way have
to do with the richness and power of expression in the language, the
CPAN library, see http://search.cpan.org (I had asked a while ago if
there was anything similar for Python ...  as of a few years ago there
may have been, but nothing of the size or utility of Perl's).

You can run Perl in debugger consoles if you wish, as you can with
Python.  You can natively export objects to permanent storage for later

I personally use the Komodo IDE and debugger.  The nice thing is that it
works fine for Perl, Python, Ruby, and others.  Makes a handy XML
folding editor too.

The part that took me longest to get in Perl were regular expressions.
If you don't grasp them, think of a terse semi-mathematical language you
can use to describe something.  This language is extraordinarily
powerful.  I wrote a parser for fasta files originally in about 12-20
lines of Perl.  Once I understood regular expressions well enough, the
parser portion was a single line.  A more comprehensible single line.

One thing that turned me off to Fortran (and other rigid formatted
languages) was that one good turn with a paragraph reformatter and your
new code just increased information entropy in the universe.  At least
these days, in Fortran, it has a saner non-rigid mode.  Having used
Fortran for somewhat more than 10 years before picking up perl, and
written parsers and other nice things in it (Fortran), I am not too keen
on getting back to it.

This may be my own bias showing through.

The most important thing that (I would hope) employers look for are not
specific language skills, but the ability to learn new things,
languages, techniques, and apply them.  In "real time".

When I look for technical people, I want to see evidence of non-rigid
thinking.  I want to see the ability to take a concept and do something
productive with it.  The language used is, to a degree, just a vehicle
for expression of the solution to the problem concept, and the elegance
or lack thereof that is demonstrated in wielding it *may be* secondary.
 Not always, but sometimes how you say it (to a computer) isn't really
as important as what you are saying (to the computer).

Put another way, the important thing is not necessarily what you use but
how you use it.  The tool needs to fit you and your goals.

There are languages out there that appear to be in search of a problem
to solve.  There are languages out there that rapidly let you solve
problems.  Python and Perl belong to the latter group.  As does Ruby
(which I have heard people describe as a Perlization of Lisp or
something like that).

> Just one more question. Are most people involved in bioinformatics
> programming  working in industry/academia , are are there  people 
> involved in open access , internet based projects? - just curious!
> Tim
> _______________________________________________
> General Forum at Bioinformatics.Org - BiO_Bulletin_Board at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/bio_bulletin_board

Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: landman at scalableinformatics.com
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615

More information about the BBB mailing list