SPUG:Designing Programs

Michael R. Wolf MichaelRunningWolf at att.net
Mon Jan 20 03:50:31 CST 2003


Jonathan Gardner <jgardn at alumni.washington.edu> writes:

> I'm going to be the troll today. ;-)
> 
> When writing large programs, I often reconsider when I conclude perl is the 
> best tool for the job. In my experience, perl is difficult to document, too 
> flexible, and not a good solution when you may end up having several people 
> working on the same thing.

OK, I'll play.

I'm Billy Goat Gruff....

Too flexible?  That's like "too much fun".  Yes, Perl is like a
musical, here comes a song.  First, let's learn the chorus.

    Too much fun? What's that mean?
    It's like too much money, there's no such thing
    It's like a girl too pretty, with too much class
    Being too lucky, a car too fast
    No matter what they say I've done
    I ain't never had too much fun 

Now we can learn the whole song.

Too Much Fun>  Daryle Singletary
Too Much Fun>  
Too Much Fun>  Too Much Fun (contributed by Will Hose)
Too Much Fun>  
Too Much Fun>  Blue lights flashing in my rear-view mirror
Too Much Fun>  The sheriff says, "Boy I should have known it was you
Too Much Fun>  You've got fourteen people in the back of this truck
Too Much Fun>  I've warned you twice and now I'm writing you up."
Too Much Fun>  I said, "Officer, what have I done?"
Too Much Fun>  He smiled and said, "Boy, you're having too much fun." 
Too Much Fun>  
Too Much Fun>  (Chorus)
Too Much Fun>  Too much fun? What's that mean?
Too Much Fun>  It's like too much money, there's no such thing
Too Much Fun>  It's like a girl too pretty, with too much class
Too Much Fun>  Being too lucky, a car too fast
Too Much Fun>  No matter what they say I've done
Too Much Fun>  I ain't never had too much fun 
Too Much Fun>  
Too Much Fun>  There was a fight Friday night at the Stumble Inn
Too Much Fun>  Me and ol' Harley just had to join in
Too Much Fun>  Next thing you know we were both seeing stars
Too Much Fun>  They threw us out and closed down the bar
Too Much Fun>  I said, "The Long Branch is open. The night's still young
Too Much Fun>  And we ain't never had too much fun." 
Too Much Fun>  
Too Much Fun>  (Repeat chorus) 
Too Much Fun>  
Too Much Fun>  No matter what they say I've done
Too Much Fun>  I ain't never had too much fun
Too Much Fun>  Give me the reins and let me run
Too Much Fun>  'Cause I ain't never had too much fun 


> Most big perl programs I see have all evolved that way. They started small, 
> and gradually grew until they became the big program they were never intended 
> to be. Some big perl programs are really several separate programs that run 
> together. Otherwise, it is probably a website.

That's Perl's fault?

Please Mr. Bush.  I have way too many liberties.  I have too much
flexibility.  Please, monitor my travels, phone calls, and library
withdrawals.  The freedom is killing me.  Please help me out!!

:-)

> Now here comes the trollish part. I would rather use Python than perl for 
> large projects. I think Python matches my style in more ways than one:

Thanks for sharing your style.  Despite my playful intro, I do value
other opinions, and think that style matching, although it's often
denigraded, is an important point.

[...]

> - Unlike perl, documentation is so easy to incorporate it is foolish not to. 

Could you illustrate this with a code/documentation fragment?

Aside -- Geoff, perhaps you could counter-post some of your POD, or
encapsulate some of Jonathan's illustration into a pod for your
February POD talk.

I'd be interested to see how folks are really dealing with the real
documentation.

as you continue....

> In fact, for a large project, you are shooting yourself in the foot when you 
> supply poor or no documentation, because you will forget how you were 
> supposed to use the objects you just wrote.

Again, this seems like a comment on SW development in general, not
specific to Perl or Python.  What does Python do to make this easier?

> - Unlike perl, refactoring seems to be easier, and is a much better solution 
> than devising a hack to get things to work. I find that because there are 
> only two ways to access the attributes of an object, writing regular 
> expressions to find all access to attributes is incredibly easy and mindless. 
> This is not so true for perl.

Do you have a finger on why refactoring seems easier in Python?  It
seems to me that flexibility (that stuff that Perl gives you too much
of) would be a benefit here, and that a having only two ways to access
something may get you into a bind.

[...]

Although I started out by playing (notice that's my way of learning --
I'm a mammal), I do know that constraints are often enable a solution.
Compare a my skills with that of a slug!!!  Please!!!  Seriously, a
backbone, in fact any bone, might seem awefully constaining to a slug,
but it also enables me to do things that a slug couldn't dream of.
Reflexively, a slug's flexibility has its advantages.

Happy slime trails,
Michael Wolf

-- 
Michael R. Wolf
    All mammals learn by playing!
        MichaelRunningWolf at att.net




More information about the spug-list mailing list