I'm horrified by it daily when I have to use scripts written by older bioinformaticians. The best benefits I've heard are string processing speed (<3 you Ruby) and package management (hello Python, Ruby, R).
I'm horrified by it daily when I have to use scripts written by older bioinformaticians. The best benefits I've heard are string processing speed (<3 you Ruby) and package management (hello Python, Ruby, R).
sub tokenize {
while ($_[0] =~ m!
(?<whitespace> [\x20\x09]+ ) |
(?<lf> [\x0a] ) |
(?<cr> [\x0d] ) |
(?<ident> [A-Za-z_]+[A-Za-z0-9_]* ) |
(?<float> [0-9]*\.[0-9]+ ) |
(?<float> [0-9]+\.[0-9]* ) |
(?<int> [0-9]+ ) |
# ...
(?<unknown> . )
!gsx) {
my ($k, $v) = each %+;
# $k: token, $v: data
# pos($_[0]): current offset
# ...
}
}The answer is that your sample is flawed. Scientists can turn anything into a "disgusting mashup of a language". Perl is in its position for a reason.
Yes--people who have practical experience writing and maintaining code that has to be maintained tend to write maintainable code.
Scientists (and, in my experience, especially bioinformaticians) tend to make horrible, awful messes no matter how maintainable you think a language is. (You can hand them Inform 7 and it'll still end up looking like Fortran ate the csh manual and vomited all over an APL keyboard.)
You have made my day.
(Not speaking for myself here, BTW. A decade ago I tried Python & never looked back.)
In your case, part of the problem may not be due so much to the language, as to the authors of those scripts you mention. People who have not studied software development as their primary discipline have typically not been exposed to ideas about good design, writing maintainable code, etc.
In-progress code for my PhD is mostly on Github: http://github.com/Blahah
See also BioRuby, biogems.info, sequenceserver.com
Please rank several other languages by the same criteria so we can judge your objectivity.