2

Most of the questions now-a-days are slightly basic and mundane, but can have an extent of using different techniques or methods to do. One such question is JavaScript hide part of input text. Here, there are two methods but I took a wiser method and answered. I didn't think if this is some kind of low quality for sure. It was good.

I didn't want to make the OP not learn by giving away the code but gave a perfect guidance on how to arrive to the solution:

  1. Execute the following in the blur event.
  2. Have a data attribute for the input with the original value.
  3. Change the value to have your desired display value.
  4. On focus, change back to the original value.

And I stopped the answer here. I am not sure if this is deemed a low quality answer! In my opinion, I am giving a guidance to the user and making them write the code, instead of providing a snippet and making them deprive of the learning ability.

Now I have posted the code, the downvotes stopped. What I reckon after this is, the user will just copy and paste the code, and they will not learn how to achieve the solution.

Guys, I attribute whatever I learnt till now to Stack Overflow, but this kind of behaviour - not only demotivates people answering but also deprives the user to learn!

My question to the community is, is my first revision of answer poor? Just curious. Really curious, where are we going?

9
  • 2
    As Nick said in their deleted comment, "Execute the following in the blur event." execute what? There's nothing "following" between the 1st and 2nd steps, so Nick assumed (and I would have done the same) that something was missing from your answer, and was helpfully advising you to check the preview before submitting answers next time to spot copy errors such as this.
    – BoltClock Mod
    Commented Jul 28, 2017 at 9:09
  • 1
    A lot of comments have been deleted in that discussion, so it's difficult to know what happened. But honestly, you don't know if people downvoted you because they want full, copy-pasteable answers. There could be a different reason as well. Nonetheless, you can always delete your answer and move on if you disagree with the downvotes (and don't think you should edit your answer). Perhaps there are better places to spend your time. Commented Jul 28, 2017 at 9:11
  • @BoltClock Ah thanks... So I understood that there was a miscommunication there, so I told him I'll add the snippet and explain. My understanding was, I posted as if I intended to post the snippet before. :( Can you update the question with a screenshot of deleted comments, if needed? Thanks BC. Commented Jul 28, 2017 at 9:12
  • @g00glen00b Yea, it is indeed a good answer right? I really don't care about the downvotes, but the other answers are kinda just code only or something like that. So I want the user to follow the right code and not the low quality, so I thought of keeping it. What do you think? Commented Jul 28, 2017 at 9:13
  • 1
    @Praveen Kumar: I should probably post what I just said as an answer, since on second look it does answer your meta question.
    – BoltClock Mod
    Commented Jul 28, 2017 at 9:14
  • 1
    @BoltClock Just to confirm, it was indeed what I, and probably everyone else, assumed. After I commented on your answer you said that you won't spoonfeed an user, which is fine, but then you shouldn't have said Execute the following. The answer was incomplete and that's why I downvoted.
    – Nick
    Commented Jul 28, 2017 at 9:14
  • @BoltClock Umm... Okay... If that was my fault then, I'll gladly accept. English isn't everyone's primary language and people tend to make mistakes. I accept it then. Commented Jul 28, 2017 at 9:14
  • @Nick Thanks. So there was a miscommunication there too! Ha ha. Either of us could have clarified. :) Commented Jul 28, 2017 at 9:15
  • @PraveenKumar what about coming here ? Commented Jul 28, 2017 at 9:23

1 Answer 1

4

As Nick said in their deleted comment, step 1 of your answer says

Execute the following in the blur event.

... except there's nothing "following" between the 1st and 2nd steps, so Nick assumed (and I would have done the same) that something was missing from your answer. That would explain why Nick suggested checking the preview before submitting answers next time — to spot copy errors such as this; again, under the assumption that you had indeed left something out by mistake (which, as you have now clarified, you didn't, and you probably meant to phrase step 1 a little differently).

Other than that, your original answer doesn't seem egregious to me. If you don't fancy spoonfeeding users, more power to you — not all answers require sample code to answer a question, even if they could benefit from it. But that one omission alone was... pretty significant, due to the use of "the following" in your answer.

You must log in to answer this question.

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