Hello! I have a colleague who is interested in learning a scripting language to
- parse files in various formats relevant to computational biology (BAM,VCF,bed, genes lists in plain text etc,,,)
- automate processes
- do computations of course
I tried to encourage her to learn as much bash as she can but the shell has its limits. When a awk command becomes so convoluted and bloated, a little script can be helpful.
Now I am trying to think what is the best scripting language to learn for someone with no programming experience that will give her the best bang for her buck. First, a few reasons I dislike Perl
- Programming community not as active, there seems to be more libraries for the biological sciences in Python
- Can be hard to read/interpret
and reasons why I dislike python:
- The @$@#( indentation system drives me insane
- Seems slower than Perl, maybe it's just in my head
- Lack of "plug and play" regular expressions
- The weird type system. I fine with the rigid C++ type system and the anything goes of Perl. But python's system can be a pain.
What are your thoughts? Should I teach that person Perl or Python? What is easier and better in the long run?
That "obfuscated perl" is typically just a redundant phrase is argument enough for me to prefer python :)
My main problem with python is memory management, but with numpy and such there are usually good ways around that. Plus, ipython notebook and pandas are really useful, not sure if similar things exist for perl (they very well might, I honestly don't know).
Here we go (again) :-)
If nothing else, this thread is proving to be a treasure trove of witticisms :)
Here I am in the morning - trying to get some work done - instead I am laughing out loud -
I like lambdas - I try to replace my 'for loops' with function application via map and 'if conditionals' with filters - and I've come to believe that doing so makes code shorter and more robust. It seems those sections of code rarely have bugs. But then I do agree the code does look quite different - never considered it deer skin poncho though.
You would be the first person I've spoken with that feels this way, almost every other case it is complaining. For the level of grief the python community will give someone over using these features, I've always wondered why they haven't been dropped from the language.
Add me to the "lambdas are awesome" group.
map
,reduce
,filter
, and list comprehension syntax make life super-easy.This a somewhat divisive issue and your post made me look into what the current zeitgeist might be on the subject.
Along the way I found this article: The Fall Of Perl, The Web's Most Promising Language - now it captures what I think - but then it might just be confirmation bias.
A similar article was published on DDJ by Andrew Binstock, and there is a good response by brian d foy about why this type of analysis may be flawed. Regardless, I do agree with the main point that Perl is declining because fewer libraries are being published and more Python is being used. I think this is natural, Perl is over 25 years old so I would expect there to be stable libraries and less need to create new ones, and likewise, Python will decline at some point. I would not expect either to go away for a long time though, unless something revolutionary comes along (Perl 6? :-) ).