Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: On Answering Questions

by Cody Pendant (Prior)
on Feb 08, 2003 at 04:02 UTC ( #233647=note: print w/ replies, xml ) Need Help??

in reply to On Answering Questions

Two thoughts:

  1. I saw a question on a JavaScript newsgroup or forum, which was essentially "how do I get checkboxes to behave like radio buttons?" -- how to get a set of checkboxes where if one gets checked, the others become unchecked.

    Three or four people gave solutions -- it's not hard to get an array of all checkbox objects and check or uncheck them programatically in JS -- but only one said "that's a terrible idea! Checkboxes are checkboxes and radio buttons are radio buttons. You will upset and confuse your users if you do this". That's a much better response than just telling them how to do it, because they've misunderstood something fundamental, or they wouldn't be asking.

  2. I often see on PerlMonks a kind of intermediate variety of this problem. It's not "how do I do (something stupid or dangerous or wasteful)" it's "I want to do (something quite sensible-sounding) and I've already determined that I'll do it such and such a way, and I'm stuck, please help me".

    It's like someone's written "I want to get a screw into some wood, but my hammer's handle is slippery, what shall I use to make the hammer do the job better?" and you have to say that a screwdriver is the correct solution. And probably just as often, the person asking says "I want to fix two bits of wood with one of those metal things, which hammer should I use?" and you have to encourage them to explain whether it's a screw or a nail in a follow-up post.

“Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”

Comment on Re: On Answering Questions
Re: Re: On Answering Questions
by BrowserUk (Pope) on Feb 08, 2003 at 10:53 UTC

    | || | | || | . | |+---+/| | ////////__ | | |+---+\| | || | ' | || |

    The right way to use a screw is with a screw-driver right! Well, yes and no. The right way involves clearance drilling the outer peice of wood prior to screwing the two together so that the bearing surface of the screwhead comes to bear before the two pieces of wood are forced apart by the action of the screw threads. Alternatively you can use a screw with a threadless shank equal to or greater in length than the thickness of the outer piece.

    However, in the days before portable drills where commonly available, carpenters working on remote locations or temporary structures (eg. shuttering) would drive the screw part way through the outer piece of wood (think 1/2 inch ply) with a hammer. This effectively clearance drilled the outer piece, and provided a firm hold for the screw upon which they could use their "lazy susan" screw-drivers to drive the screw home into the second piece of wood and finish the job. Quick clean and secure provided you don't drive the screw too far with the hammer. It takes expertise. They even made specially hardened screws designed for the job.

    Similarly, you don't hit a screwdriver with a hammer right? When screwdrivers had wooden handles, chippy's often had screwdrivers with extended tangs (the bit that goes inside the handle) that passed all the way through the handle and protruded slightly above the end of the handle. This allowed them to strike the end without splitting the wooden handle. This is useful for loosening set or paint covered screws. It also allows the screwdriver to double as a bradawl(sp?). They could carry a seperate bradawl, but thats one more tool to carry (up and down ladders), to manipulate (when they need all three hands just to hold the 8'x4' they are fixing) and to loose.

    As with all tools, there are generally 2 ways to use it. There's the safety-first, beginners way. Then there's the expert's "I know what I can get away with" way. The best perl example of this is described much better than I could in Paradigm Shift - Don't use strict.

    "But if the guy's an expert, why does he have to ask the question? Well, he may have the expertise from another language, understand the pro's and con's but be lacking on the particular form of perl syntax. In REXX, compounding one variable with another (or a bareword in perl terms) to form a third is standard practice. If fact, using REXX's content-addressable arrays, is the only way to form any compound data structure. To create an array, you use syntax like:

    file = 'myfile' array = '' do for index=1 by 1 while lines(file) array.index = linein(file) end /* print the 5th line of the file */ say 'the fifth line was ' array.5

    Someone used to this language, might, in the absence of a REXX interpreter, try to use Perl to get them out of a hole, and might try to use symrefs, but get bitten by the syntax differences. Sure, given the time to learn the language, perl has much better ways of dealing with this situation, but time isn't always on the programmers side.

    So whilst this may be a contrived and rare example, it is concievable. Without context, they are indistinguishable from the raw beginner. Without context, they may seem to be in an indecent haste. If you've ever been an expert floundering outside your field, with enough expertise to make the suit but for the lack of a thread, you'll sympathise with my hypothetical rexxspert. (Who, by the way, isn't so hypothetical and isn't so very far away).

    Do I advocate "Give'm the rope to hang themselves"? No. Do I try (but not always suceed) to avoid saying "You don't wanna be doing't that way!". Yes. At least until I get a feel for the who, why & when of a situation.

    One man's opinion. Right or wrong is for each to make up their own mind. YMMV.

    Examine what is said, not who speaks.

    The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.

      After reading the debate on the merits of using hammers versus screwdrivers to screw two pieces of wood together, I couldn't help wondering why most of us use (and advise others to use) a "Swiss Army Chainsaw" to do it. :)

      "Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work." -- (Author Unknown)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2014-07-28 22:12 GMT
Find Nodes?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:

    Results (210 votes), past polls