Moving files

Kevin D. Clark kclark at CetaceanNetworks.com
Mon Jan 6 16:31:57 EST 2003


I hope this is my last post in this stupid thread.  I initially
responded to this thread just trying to be helpful, and the aftermath
has become painful.



Derek Martin <gnhlug at sophic.org> writes:

> Very often Perl hackers (on this list or elsewhere) will spout a Perl
> one-liner in response to someone's request for help.  Given that such
> solutions are likely to be understood only by Perl hackers, they must
> know that the original poster will not likely understand the solution,
> as if they did, they would have no need to ask in the first place.

Bzzzt.  Wrong.  When I post a Perl solution to a problem, I am doing
so because I think that Perl is a good solution to the problem.  If
people who see my solution don't understand my code, then I would hope
that they'd do a bit of research to figure out how my code works
(***).  This process is how I learned a lot of what I know about
programming and computers, and I have to say, that I had a lot of fun
doing this -- I hope other people experience this joy too.

But I am more than willing to explain how the code works if I am asked
nicely.  Check the archives -- I've done this before.

  *** I am getting the impression that you are unwilling to do this,
      Again, I strongly suggest that you be more open-minded.


None of the code that I offer as a a solution is so bizarre, weird,
twisted, or obfuscated that it wouldn't be worth your time to
understand how it works.  But then, this seems to be only my opinion.
Nevertheless, I stand by this assertion.

> Implicit in the decision to post such a one-liner is the poster's
> assertion that they are trustworthy, and their solution works as
> intended without doing anything harmful to the OP's data or system.
> If there /were/ something wrong with the program, the OP would have to
> rely on some other Perl hacker being on the list and noticing the
> problem.  You illustrated this idea quite nicely by finding the fault
> in Kevin's solution.

<shrug> The fault in my initial implementation (which is far clearer
than the solution that you posted, BTW) had to do with an extra
feature that I added that your solution did not handle.

I quickly fixed my bug, when it was pointed out to me.  Apart from
this bug in this extra feature, my code was sound.  Even with the
bugfix, my code was clearer and more elegant than your code.

I have yet to see anybody else post code that implements these features
(recursing + renaming the directories with names containing spaces).  

Perhaps you should provide an elegant solution to this problem that
matches my program's functionality.  Since you seem to be harping on
how lousy Perl is for readability, I suggest you implement your
program in ADA, or, better yet, Algol.

In the meanwhile, I will continue to solve real problems using
readable, elegant, and correct Perl code.

--kevin
-- 
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc




More information about the gnhlug-discuss mailing list