7

Some minutes ago one of my answers was downvoted; it solved the OPs problem, but using another technology. The downvoter (it seems that was he/she that did the downvote) said that since I used another technology (that the OP was not using) to answer, my answer was off-topic and it was downvoted because of this.

I would like to know if it is valid, since I think that answers needs to solve the OPs problem. My point of view is that using another technology may be a way to show something new to the others. Am I correct or was my downvote deserved?

The question can be see here: Print out Javascript array in table

15
  • 5
    Fair or not, downvotes and upvotes are the user's thing to decide on. I could downvote you now because it's too hot in my office. It might make me a jerk, but in all fairness, there is not much that can be done.
    – Bart
    Aug 14, 2012 at 19:35
  • 2
    If by "another technology" you meant "I gave a PHP solution to a C#" problem I'd agree it's off topic...but jQuery is a very common javascript framework and there's no indication that they can't use it. Seems fine to me unless he explicitly stated he's not using the framework.
    – Ben Brocka
    Aug 14, 2012 at 19:36
  • Apparently somebody's in favor. I flagged a Visual Basic answer to a Java question and got rejected.
    – Brad Mace
    Aug 14, 2012 at 19:37
  • 2
    @BradMace Why would you flag that? Downvote it if you must, but a flag doesn't seem appropriate.
    – Bart
    Aug 14, 2012 at 19:39
  • @Bart: I agree with your Bart, but the way the user justified him/herself, it seems that this is a "rule". Aug 14, 2012 at 19:39
  • 3
    @Bart because Answering a Java question with some Visual Basic code is not an answer. Or rather, it's not an answer to the question that was asked. And it cannot be made into such with any reasonable amount of editing.
    – Brad Mace
    Aug 14, 2012 at 19:40
  • 1
    Nah, there is no such hard rule. It's just one opinion, that's all. If your answer is not something completely outlandish and besides the point, I would just ignore it.
    – Bart
    Aug 14, 2012 at 19:40
  • @BradMace Then downvote the crap out of it. But in my experience a moderator is unlikely to act on the flag.
    – Bart
    Aug 14, 2012 at 19:41
  • @BenBrocka: Hi! As I said in that question, I didn't say anything absurd at all. Thank you Ben! Aug 14, 2012 at 19:42
  • @Bart (to your 1st comment) but that not should be the case, really. Downvoting just because you feel bad is very unjust, isn't it?
    – H2CO3
    Aug 14, 2012 at 20:04
  • @H2CO3 Oh, don't take my comment as a justification for such behavior. Morally there is none. I'm just saying that everybody is free to do with their downvotes as they wish. And if they are wrong then there is not much that can or should be done about it.
    – Bart
    Aug 14, 2012 at 20:41
  • @Bart I see. I didn't mean to insult by any means.
    – H2CO3
    Aug 14, 2012 at 20:44
  • @H2CO3 Haha, I did not feel insulted in the slightest. I don't even know why I should be. :)
    – Bart
    Aug 14, 2012 at 20:52
  • 1
    @Bart We could buy you an air conditioner. Aug 14, 2012 at 20:57
  • @DaveNewton Get me a new job instead. ;)
    – Bart
    Aug 14, 2012 at 21:01

3 Answers 3

6

I agree. Often the OP is looking for a solution but should consider doing what he/she does differently. Examples

  • using old PHP functions that are depricated or introducing SQL injections
  • DB designs that should not be worked around but changed

It is good to let the OP know what other and maybe better options there are. OP does not have to use it. But maybe another person with the same problem might look into it.

So there is nothing wrong in suggesting another approach.

1
  • 2
    +1 totally agree! another person(with another technology) with the same problem might look into it. Aug 14, 2012 at 19:42
3

As has been mentioned in comments, your answers can be downvoted for whatever reasons anyone feels like. The community as a whole does have things that are generally considered "good" reasons for downvoting and "bad" reasons for downvoting, but at the end of the day nobody will ever enforce them as rules, you just might make people mad at you (or intentionally try to counter your votes by doing the opposite).

As for whether or not it's a good idea to post an answer that's not in the same language the OP is tagged with, that depends a bit. Some questions are sufficiently general, and the answers are not using particularly unique language features, that it can still be quite useful even if it's in the "wrong" language. In some cases having an answer in a different language can be considered "pseudocode" and would be used to demonstrate a higher level approach, without intending to be a copy/paste solution.

On the other side of things, if the question is highly tied to a language, or an answer is using language features so closely tied to that language that it is not useful in any other contexts, then your answer is less likely to be helpful and will plausibly result in downvotes as a result.

In your particular case, rather than providing code in another language for the reader to translate, you essentially told the reader to switch to using a different language, ("You should drop that JavaScript code and use JQuery."). In this case, it's entirely dependant on context for whether or not it's a feasible option. It might be worth asking, in a comment, "Are you able to use JQuery instead, it would make the answer simpler?" The same issue applies here with using newer versions of the language, "Do you have access to version X.Y? It adds Foo which makes doing this much easier." If no, don't use it in your answer, if yes, feel free.

Just keep in mind that no matter what you do, I will always downvote you. Just because.

4
  • Re: "you essentially told the reader to switch to using a different language" - Since when was jQuery a language in its own right? The OP didn't tell the asker to switch to using a different language, the OP provided a solution that is still written in Javascript but happens to use a Javascript library called jQuery.
    – In silico
    Aug 14, 2012 at 20:59
  • @Insilico That is correct. I feel that the post applies equally to posts in a different language as to posts using an additional technology/tool within that language, but I'm too lazy to edit every single reference to "language" with "langauge/technology".
    – Servy
    Aug 14, 2012 at 21:00
  • And that's where I respectfully disagree. There's a huge difference between answering a Javascript question with, for example, a C++ answer and answering a Javascript question with a Javascript answer that happens to use an external Javascript library. The former doesn't even answer the question, while the latter can be a good or even the best answer depending on the question.
    – In silico
    Aug 14, 2012 at 21:07
  • @Insilico I would consider, in both of those examples, that you have not provided sufficient information. You can provide C++ code to a JavaScript question that answers the question, and a JQuery answer to a JavaScript question that doesn't. In both cases it just depends, which is what my answer here is saying.
    – Servy
    Aug 14, 2012 at 21:16
0

I can't generalize and talk by all tags, but in the case of the tag, it is certainly not encouraged.

If he didn't tag with a library (eg: , ), it is because either he don't know about it or want an answer using pure JavaScript. Either case, if functions of a library solves (or facilitates) his problems, I would leave a comment telling him about this awesome technology.

The reason of why posting these answers is not good, is because we would start seeing lots of answers from unknown technologies, maybe jQuery is very popular at the moment, but with time there will be a lot more new libraries, and some other will disappear. All of these answers will inevitably become a mess eventually.

Also, one must first include these libraries (that are often not small in file-size) just to make the answer work. Adding thousands of lines of code just to use few functions of the library isn't profitable in most of the cases. So, the best thing to do in my opinion, is to leave a comment telling of this technology, if he finds it interesting, he will start coding with it and make it worth to include the library for his projects.

But posting unknown technologies is not the way to go (regardless of how popular they are)

You must log in to answer this question.

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