Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: "Don't try this at home"

by Anonymous Monk
on Sep 17, 2002 at 16:13 UTC ( [id://198534]=note: print w/replies, xml ) Need Help??


in reply to "Don't try this at home"

(apologies for mistakes; I have to leave in a hurry and re-read atm.)

Based on the replies so far, this post isn't going to get very many upvotes. But: ferrency's points strike me as sounding good on the surface, but really counter productive and pretty much impossible to actually follow.

Blatantly obvious isn't, in the chatterbox. The person reading your chats or posts might not understand you're kidding.

So, what are you saying here? Label all jokes as *** JOKE ***? Don't make any jokes at all? Make sure that all your jokes are clean, healthy, and couldn't possibly cause anyone any damage? (Is that possible?)

If you post code, there's always a chance, no matter how small, that someone will run it. As root. On a production server. At 5pm on a Friday afternoon before a long weekend, when you're manning the pager.

Right! Of course there is! In fact, it's probably the reason you've got a pager in the first place - because there's a high likelihood that at some point in the future, someone is going to mess up and break things.

So don't post coode that you don't want people to run, even if it's completely obvious that you don't want people to run it (see #1).

What, don't post code that shouldn't be run even as an example? Or as a joke? What about if someone says "what would be a bad way to do this?"? Because even then there's a chance that, say, someone will only catch the last half of the conversation and misinterpret things. Does that mean the conversation shouldn't have happened in the first place?

Don't run code that you don't understand.

Does that include modules? Code you're trying to debug? Do you mean just perl, or any language? Should you avoid running code you don't understand when trying to learn perl? What about compiled code?

This can be a bit tricky when obfuscation is involved.

From Webster's Revised Unabridged Dictionary (1913) :

Obfuscate \Ob*fus"cate\, v. t. [imp. & p. p. Obfuscated; p. pr. & vb. n. Obfuscating.] To darken; to obscure; to becloud; hence, to confuse; to bewilder.

Any code that you don't understand - code that confuses or bewilders you - is obfuscated by definition. I'm sure you meant intentionally obfuscated, but does it make much difference to the beclouded user?

There is a valid side to your points, though: basically, "be careful". But being careful should mean expecting errors and being prepared for them: setting yourself up in a safe environment where it's OK to break things - in fact, where breaking things is good, because you'll hopefully learn something in the process. Trying to ensure everything you do and say is foolproof, even at the cost of humour and the possibility of learning through trial and error, is the wrong way to go about things.

Besides, your example wouldn't have worked. rm would have balked at the -c. And even if it had worked, aren't you already breaking your first two rules? :)

Replies are listed 'Best First'.
Re: Re: "Don't try this at home"
by ferrency (Deacon) on Sep 17, 2002 at 16:53 UTC
    And even if it had worked, aren't you already breaking your first two rules? :)

    The whole point was that I only realized these guidelines (maybe "rule of thumb" sounds too much like an edict to some people) after I was convinced that this person had just deleted their root filesystem.

    Besides, your example wouldn't have worked. rm would have balked at the -c.

    The -c was a switch to the adduser command, not to the rm command, if you reread the original code.

    You're right, my whole post can probably be boiled down to "be careful." I didn't intend to say "never make a joke," I intended to say, "don't make a joke if you Know it may cause irreversible harm to someone." There are lines that can be drawn between acceptable and unacceptable behavior, though they aren't always very clear. I believe I may have crossed the line in this case.

    Alan

      I stand in complete defense of ferrency who has taken the high road during this whole situation. He could have had a snooze-you-lose attitude toward whom he was trying to help, but he didn't. The guidelines he proposes are as much to protect the person acting as 'mentor' as to protect the person being helped. As a bystander, I remember being glued to the CB with a sense of total awe and sinking disbelief while the (newly enrolled) monk he was helping said, 'umm, now the box won't reboot.' I can only imagine what ferrency was feeling. I would hate to ever be on either end of that situation. That's the wisdom in his guidelines.

      To be honest, I've been watching this thread from the sidelines and wondering what to say. If someone has no clue that rm -rf / means tabula rasa, should they have root on a production server in the first place?

      I understand what you're trying to say, and I respect the intent, but I think your appeal is misguided. I can't help feeling like it's just political correctness in a different context, an attempt to offer a safe and wholesome experience for the whole family. Ultimately, that is an excercise in absurdity.

      Where do you draw the line? Should the rm command print a WARNING: this command may cause loss of data. Are you really sure you want to proceed?[n] ? No amount of disclaimers can ever be a substitute for a healthy dose of common sense.

      Update: I feel I have to add what I just figured out was the reason that this thread irked me - the whole thing erupted out of what amounted to a practical joke on ferrency's expense rather than an actual disaster. So while I can understand the shock, there doesn't seem to be any actual evidence.

      Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-03-28 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found