On Thursday, Nov 13, 2003, at 12:29 US/Pacific, Chuk Goodin wrote: [..]
While that would indeed be the Best Practice, as a beginner just learning,
one of the things I like about perl are the differences from other
(usually compiled) languages that I'm used to.
[..]

Chuk, et al,

a part of the reason that we all like perl is that
we can hack quick and get something done, down and dirty.
The PROBLEM is that we can hack quick and regret at leisure.

So it is precisely BECAUSE you are in the 'learning' phase
that it is best to 'keep your eye on the prize' and remember
that "Just Because you CAN", is rarely a good enough excuse.

From my experience I actually do have all three of the
directories I have recommended

        $ENV{HOME}/
                src/ #
                        perl/ # illustrative code things
                        c/ # illustrative c89/c99 code things
                        java/ #illustrative java things
                        scripts/ # sh and awk stuff
                        tarballs/ # projects and stuff
                projects/ # projects, both gigs and for fun
                tmp/ # generic play space

as well as:

                bin/ # my apps here
                lib/ # my lib stuff - while I decide if it should be installed
                        perl/ # the root of the perl foo for moi
                                  # so that I can test with
                                  # use lib "$ENV{HOME}/lib/perl";
                docs/ # stuff that documents code stuff
                man/ # where manpages go...

so that I can work on ideas that I find interesting that
are not related to any specific 'paying gig' and/or
'proprietary code' - but things that make my life easier.

In this personal approach, I don't actually 'source code control'
with SSCS|RCS|Perforce|yourWidgetWingDingHere but the simpler model
of either keeping the snippets in my home src directory, or,
in the case of interesting ideas, I did the 'make dist' and
saved off the foo_bar_baz.tar.Z and stuffed it away in the tarballs
for some other day to play with it.

When the contract/gig has a source code control system,
then I use that, and well, my 'home directory' in those
cases, look just like my home directory everywhere else.
So yes, there are 'perl scripts' and there are 'perl code'
and folks need to respect BOTH classes of madness for their
appropriate use. In my case I use the *.plx so that it is
'obvious' when ported over to places that need a TLA. But
I also have 'code' that has no extension because, well,
it is just code and it just runs.

As the saying goes, the person wanted to have an idea about
how to start, so I thought I would thump the bully pulpit
on the point of starting right so as not to start bad habits
that will need to be fixed.

We of course have not stepped into 'POD' yet, but of course
that too is IMPORTANT, since if you write your POD well,
I personally have opted for the foo.pod and foo.pm and
deliver both, then when I am using foo, I just cut and
past from the pod into the code... So I raise that as
a part of the process now. It is also fun to create the
POD for the applications as well, and you can 'manify' it
so that your 'old guy unix heads' can do

man WingDingDing

and get a 'unix style manpage' on what WingDingDing as
an application is suppose to do, just like every other
vol one application...

In my own case, I finally broke down, and to simplify my
life I hung illustrative code on my web-pages, so that
way I could send the URL, vice the code. I thought I was
being Polite until one day I needed a 'trick' that I could
not remember and found myself at google doing a search on
my site for the token..... It was 'easier', it was embarrasing,
but it got cut and pasted into the code I was cutting and
worked as I wanted it.

At which point we have a nice working space in which to
go about dealing with the idioms of perl, the questions
of good form, and with any luck you will not be the
source of those postings

        Need Perl Coder who can write good clean perl
                based upon awkward and ungainly perl code....

and that on going problem of folks who figure out that
there are all sorts of 'operation'|QA code that is out
there that no one really knows about that keeps the shop working
but now needs to be brought under source code control
and dealt with as RealCode[tm] that has actually become
'mission critical'.

As I warned one of my friends,

        If you code it,
                It will go into production.

He thought I was joking right up to the moment that
he got his first bug report on his code, and there
were engineers standing around wanting to actually
know how it actually worked....

Start Right, Live Well,
        laugh at the stuff you have to...

ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to