-2

Today I answered with both believing that I was being helpful to the person answering the question.

In the first question, there was an awful amount of code and the question was about flexbox. I found two articles and a tool. The code was too much to decode.

I was reprimanded and marked down as someone else felt I should have answered with a code example. Duly noted. I shan't try to answer that type of question again.

The second was a situation where I had a similar issue, already researched an answer and used it. I cut and pasted my code. There were other answers that pointed to other pages - and included links.

This time I was reprimanded because the user had not asked for code. Although the user was asking how do I do this on my site. It was a question that was tagged javascript.

Feels like there are inconsistencies here. Although I could have preceded it with extra text along the lines of 'although you did not ask for code, and on the basis you have tagged this as javascript, here is a javascript solution...

What is right here?

1

1 Answer 1

10

About situation one: Links are allowed, but only for further readings, the answer itself must contain all necessary information to be "standalone" (i.e. still be valid even if the link leads to a deleted site). And 'no', you don't need to post code if that isn't necessary. Text answers are fine as well if that is enough to (fully) answer the question.

Also see: Your answer is in another castle: when is an answer not an answer?

Situation two: It is fine to post old code you've written for your own stuff if it is able to fix OPs problem as well. But mind that code only answers aren't that helpful, so please explain your code.
About "OP didn't ask about code": that's not a good reason to not post documented/explained code snippets. Don't forget that you answer the question for everyone who reads the question, not only for OP.

But I guess the issue with that answer is that you've suggested to use a specific framework although it isn't clear if OP uses that framework as well. If stuff like this isn't mentioned at all nor tagged in the question (e.g. ), then assume it isn't used. Thus a plain Javascript answer might receive better feedback.

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