Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

•Re: Re: Re: Re: DON'T USE THIS CODE

by merlyn (Sage)
on Sep 16, 2002 at 15:36 UTC ( [id://198272]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: DON'T USE THIS CODE
in thread File::DumbLock

People learn a lot more by being shown the why of something than from just being hit upside the head and told not to do it, no matter how experienced the person doing the hitting.
No, you're missing the purpose of my "don't do this" post.

Going back to the innoculation metaphor, I'm providing emergency-room treatment. Surely, this is not a substitute for a person going out to learn how to avoid catching communicable diseases. That happens later (or hopefully earlier).

Getting back to the literal issue here, I'm just saying "stop, don't". And that's a first round of response. But I'm not about to quote the plenty existing literature about why the solution is broken. If there was something not well known about why the solution is broken, I'd have provided more pointers. If you review my posts, you'll see that I've done that frequently.

But knowing that you have to do an atomic operation to provide a lock is fairly basic knowledge. And as I showed in my google reference, the first dozen hits for "perl lock" were all quite informed, so there's almost no excuse for the code that triggered my outburst, except that this is a KLB (in #perl parlance) and will likely lead others astray unless muzzled until they get a clue.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Monks of the Round Table
by Solo (Deacon) on Sep 16, 2002 at 17:22 UTC
    Is it possible that PM needs the Monks of the Round Table whom merlyn could advise of the horrid mistake being made by King Author, and could take the time to provide corrective assistance with a gentler hand?

    Perhaps merlyn, whence stumbling upon dangerous code, could then post a warning, e.g. "This code may have dangerous side-effects and is awaiting review by the Monks of the Round Table."

    --
    May the Source be with you.

    You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.

      and could take the time to provide corrective assistance with a gentler hand?
      No gentleness is needed, just assistance. Saying "this sucks, there are better ways" without saying what the better ways are is just useless.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://198272]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-03-28 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found