6

I've come across many questions, with varying styles of answers, and I was wondering which way is the best way to answer.

Obviously I want to take into account the askers common sense, but I'm never sure if I should nudge them in the right direction, without writing the code for them. Helping more only if asked for.

Or if I should try and hold their hand through the answer? Explaining everything related to the answer, and essentially writing the code for them?

EDIT:
Louis in the comments said:

The one more likely to teach someone the principle involved (teach them to fish rather than fish for them)?

What I mean is along those lines, personally, I'd prefer to teach them how to come to the solution themselves rather than explicitly giving them the answer. To me, doing it that way would be more of a learning experience, rather than giving them the ability to copy and paste and forget about why the code should be like that.
I'm just concerned that doing things that way would be seen as vague by other users and be downvoted for it...

4
  • From FAQ: Brevity is acceptable, but fuller explanations are better.
    – Trilarion
    May 23, 2014 at 10:45
  • 1
    You say "I was wondering which way is the best to answer." "Best" in what sense? The fastest? The easiest? The one most likely to get you quick reputation? The one most likely to get you reputation in the long run? The one more likely to teach someone the principle involved (teach them to fish rather than fish for them)? Etc.
    – Louis
    May 23, 2014 at 10:47
  • 1
    You may assume a basic level of knowledge of the reader when writing your answer. When they then comment "But how do I split a string?", you can decide whether or not to put any more effort in it.
    – CodeCaster
    May 23, 2014 at 10:52
  • I think the answer to this will be very subjective and will depend on how much effort the original poster has put into their question.
    – Albzi
    May 23, 2014 at 14:31

2 Answers 2

9

Hand holding is typically the term one would use for not just giving them all of the code, but rather helping them do one step of the problem without giving them a solution, then providing the next step when they come back with problems, and so on back and forth until they get to the solution themselves. It's actually far more work than actually giving someone a solution.

It's the difference between answering a question and tutoring someone. Tutoring someone is great, if you do it well, but its extremely time consuming and draining, so it doesn't scale to the number of questions that SO gets. It's great when someone wants to take the time to do this (although recognize that some people will actually benefit from this effort spend, and others won't learn a damn thing no matter how much time you spend tutoring them, so try to recognize a lost cause), but the site doesn't really tend to expect this from users, simply because its impractical to try to do so for every question asked.

To your question of whether it's best to actually provide a complete working solution with full ready-to-copy-paste code, to provide the direction an answer should go in without any code, or somewhere in the middle, that's something you need to decide for yourself, based on the context of the question.

3

No. That gives the newbie the chance to be lazy and to let the person answering do more work than what they have to. Give them the answer and be done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .