[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Why is C so popular?

On Thu, 28 Aug 2003 01:51:23 -0500
Alex Malinovich <demonbane@the-love-shack.net> wrote:
> You know, I think I've written 2 shell scripts in my life. And I think
> the most complex of the two was 6 lines long and used a for loop. On the
> other hand, I generally write 2 Perl scripts daily that could quite
> possibly be done as shell scripts. But I'm so addicted to the string
> handling functions that I can't help it. I've actually found myself
> cursing C++ and Java when I catch myself starting to type
> myStringVariable =~ s/ /_/; or some such only to realize that it won't
> work. :)

    I'm with you there.  At my past two jobs I had to work on several shell
scripts.  Step 1 was to take the shell script and rewrite it in Perl.  No
matter how complex the shell script was it didn't take me long to rewrite it
in Perl.  Step 2 was then to make the modifications requested.  I found that
if I just rewrote to Perl I'd get the job done in a fraction of the time it
would otherwise take me.

    Of course now step 1 has been replaced with "rewrite in Python".  I still
have Perl coursing through my veins though.  The other day I caught myself
trying to upper(s) a string instead of string.upper().  The deciding day that
I committed myself to Python was the day when I was able to take a Perl script
and convert it to a multi-threaded Python script that was not only under a
page long but was also readable to my coworker who didn't know either Perl or
Python.  All I gotta say is that os.path.walk() is a godsend.  :)

         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 8B6E99C5       | main connection to the switchboard of souls.

Attachment: pgpgSqY0IhQ7v.pgp
Description: PGP signature

Reply to: