[Pdx-pm] Fwd: Genomics at OHSU

Shlomi Fish shlomif at iglu.org.il
Mon Nov 28 15:03:08 PST 2005

Hi all!

On Monday 28 November 2005 21:02, Thomas J Keller wrote:
> > My gripe against Perl is that I can't make heads or tails out of
> > someone else's code without a language manual by my side. Do you
> > have any experience in taking and adapting someone else's largish
> > Perl code? Perhaps your experience is different.
> >

OK. My personal experiences:

1. I personally contributed to and eventually became co-mainter of WWW-Form:


I found its source code incredibly easy to understand and had no problem 
refactoring and extending it, even without any help from the author. There 
were many comments there, but I often found them distracting.

2. Test::Harness -> Test::Run :

http://use.perl.org/~Shlomi Fish/journal/27467

I took Test::Harness, a "largish" Perl module (3,590 Lines of code according 
to SLOCCount), and heavily revamped it: refactored it, changed its internal 
APIs, added more objects, etc. I had no problem understanding how to refactor 
the code, and I think I only referred to the language manual for 
understanding the perl formats.

This module was temporarily named Test::Shlomif::Harness and is now know as 
Test::Run. You can find its various history here:


I should note that I feel the code I started with was of a relatively low 
quality, but I was able to improve it.


One thing I should note is that the core Perl language is quite large, and 
requires a lot of time to familiarise oneself with it entirely. As a result, 
inexperienced programmers who read code of more experienced programmers, or 
of programmers with a different background, may find it difficult to 
understand the latter's code. But being able to express oneself in Perl in 
many different ways, often at the same time, is one thing that many Perl 
programmers like about Perl. If you prefer that the language will limit you 
in some ways, then you shouldn't use Perl.

That put aside, another issue related to understanding what a certain code 
does is understanding what it's trying to do after understanding what each 
statement does individually. This is the same problem in any language.

I should note that I find reading "real" Scheme code, written by expert 
programmers, with many macros, etc. much more difficult than reading Perl 
code. In Scheme and other LISP dialects, one can not always determine what 
piece of code does by reading it, and often it requires reading a lot of the 
rest of the code. Reading the "Structure and Interpretation of Computer 
Programs" Scheme code is easy, but I could not understand the source code of 
jacal -  http://swissnet.ai.mit.edu/~jaffer/JACAL.html


	Shlomi Fish

Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

More information about the Pdx-pm-list mailing list