9

Oftentimes, I come across a question from tag/language X and think "hmm, this would be an interesting problem to solve in language Y".

For example, I asked this question in based on this question in just the other day. My rationale for doing so is that the question had to do with "given some input X, how do you get Y", and this question was applicable to not only R, but literally any relevant data crunching tool out there.

In hindsight, I should've asked first before posting that question. But before I do this any more, I just want to get an official response on this. I ask on the off chance that this could be considered plagiarism.

So, to recap, my question is: Is it alright to take a question from one tag and re-ask it in another, under the assumption that the question remains relevant for both tags and that there is no existing duplicate?

9
  • 3
    You provided the answer there, but I would be wary of this because it may seem like you are asking people to write the code for you. "Is it possible?" is usually a yes or no type of question, and most of these are downvoted and closed as too broad.
    – tima
    Sep 7, 2017 at 1:04
  • @tima In this case I thought it could pass because I had posted my own attempt at solving the same in an answer. But in a general case, you're right.
    – cs95
    Sep 7, 2017 at 1:06
  • Definitely yes. Imagine how many duplicates there would be otherwise, considering there is basically a Hello World! question for every language out there.
    – Chris
    Sep 7, 2017 at 7:24
  • 3
    I am personally no fan of fake questions, they have a knack for generating fake answers that are not actually useful to anybody. A proper, correct and likely to be most helpful answer in a case like this one could be "Use r, it was made for this". But nobody can post that. It is not likely that anybody is going to stop you, but at least make it obvious that this is muscle flexing and not code that is used in production. Sep 7, 2017 at 8:15
  • @HansPassant Why would it be considered a fake if it is a genuine problem with more than one possible solution? I am just asking here because the reasoning for your stance is not very clear. Tomorrow, the product lead might say, "we need to support future applications with python only, so you need to redo this in pandas"... in that case, this would be useful to have. If not, the takeaway would be the application of these solutions to similar problems.
    – cs95
    Sep 7, 2017 at 8:33
  • 2
    This reminds me a lot of this situation. I guess your question is less complex, but other than that I'm not really sure why you haven't had the same end result. Maybe the Python tag is more lenient? Sep 7, 2017 at 13:57
  • @cᴏʟᴅsᴘᴇᴇᴅ it is very hard to ask good question that you have no good practical reason to ask. It is even harder to judge answers to such questions as you have no way to verify that solution fits into non-existent use case. You can scan through discussions related to self-answered questions as it feel to me as very close topic (self-answered questions benefit from likely being answer to concrete problem author encountered over pure "I'd like to know if..." questions) Sep 7, 2017 at 17:22
  • @AlexeiLevenkov I think you have a fair point in that it is hard to judge the usefulness of such answers. In some situations you could fall back on speed/performance/memory/etc, but in the general case that isn't possible. Thank you for your feedback.
    – cs95
    Sep 7, 2017 at 17:44
  • @AndrewMyers Because, unlike the one you're linking to, this is neither broad nor off topic.
    – cs95
    Sep 7, 2017 at 17:53

3 Answers 3

3

I know I'm not the most experienced member, but here's my take on this. I'm categorizing these questions in three categories, because sometimes it's more appropriate than other times

You just can't figure it out how to get it to work in another programming language

If you've done proper research, made a good-faith attempt, and CAN'T figure it out, then yes, it's a good question for StackOverflow. But share your research and your attempt (why you can't port the solution for the other language and such).

You want feedback/alternate/more efficient approaches for another programming language

If you can port the solution from the other programming language, but are wondering if it could be done more efficiently or in a different way, post it on https://codereview.stackexchange.com/. It's more on-topic there, because it's really just a review and a fresh pair of eyes on existing code.

You find the question educational for this specific programming language too, and want to post a self-answered question

Using other questions to post self-answered questions can be helpful, in my opinion, but we're at risk of low-quality self answered questions, and people using copied self-answered questions for rep boosting.

Normally, people post self-answered questions after having overcome a problem with difficulty, and share their approach. This means they have encountered this problem in the real world, done proper research, and still find it worthy of posting a self-answered question.

There are other self-answered questions too, when someone has encountered a recurring problem in other questions, and wants to properly ask it, so the question is easy-to-find and minimal. In this case, it also is a real world problem, and you're also posting it to help others. These could previously be posted in documentation, but we don't have that anymore.

This opens a new type of self-answered question, where the person posting it can put little effort in both asking (because it's just a copy-paste from the other question) and answering (because he can port the solution from the other answer). In my opinion, that's a reason to be restrictive in these kind of self-answered questions. Users could use these kind of questions in an attempt to quickly boost their reputation.

Then, how do we judge those new copied self-answered questions?

In my opinion, there are several things that should be true for these questions:

  1. It's an actual relevant problem for this programming language (This isn't CodeGolf. Sure, it's cool you can do advanced statistics in JS, but noone's trying that.)
  2. You're properly referring to your sources (name the author of the question, link to it, and when basing your answer on an existing approach in a different programming language, do the same for the answer)
  3. It's not an "Open and shut" answer (take the question referred to in the question. I can answer that in SQL in less than 1 minute, but really, even most beginners should be able to figure out how to answer that)
4
  • You find hundreds of thousands of questions on stack overflow saying... "I tried this but I don't think it's the right way"... does that imply those questions are off topic for stack overflow? Some of them have thousands of upvotes.
    – cs95
    Sep 7, 2017 at 17:39
  • There's a certain overlap between SO and Codereview. I'm just saying that SO is more for the "real problems", e.g. "I don't think this code is properly written, and I can't find the right way to do this even though I've done my research", while Codereview is more about learning and optimizing, e.g. "This is my approach, I'd like to optimize it, and learn if there's a better way to do this". It's a subtle nuance, but especially if you can write the code yourself, and your interest is more of an academic nature, I think Codereview might be a better place for your question.
    – Erik A
    Sep 7, 2017 at 18:30
  • 1
    This guidance doesn't seem to allow any room for instant-self-answered questions, despite those being some of the most valuable (as well as, admittedly, the most difficult to formulate). Sep 7, 2017 at 21:41
  • @NathanTuggy very true, my opinion on self-answered questions for this subject is somewhat more complex, but I should've included that right away. See the current edit for my standing on that subject
    – Erik A
    Sep 8, 2017 at 7:33
9

Absolutely yes because the exact implementation - and therefore the answer - can be different language by language. Each language has different syntax, slightly different core functions, common libraries.

So, as long as the question is relevant for the second language, go ahead and ask it!

3
  • Feels like a bad (or just incomplete) guidance - posting question already answered in another language at very least requires reasoning why answers in other languages give no hints to solution... Also to make complete answer consider addressing asking for fun part of the question - "would be an interesting problem to solve in language Y". Sep 7, 2017 at 17:29
  • @AlexeiLevenkov as explained in my answer, a solution to the same question can be different in one language than in another. Also, I think it is irrelevant why somebody asks a question, as long as it fits into the rules and guidance here on SO.
    – Shadow
    Sep 7, 2017 at 23:21
  • OP's example does not fit into guidance as it shows zero research and simply requests code in another language. If you have good example - would be nice to link from your answer. Sep 8, 2017 at 1:51
0

This is functionally identical to all of the, "I have this C++ code and I need someone to translate it into C# for me" questions. All you're doing in that case is asking people to translate a solution into another language for you. Those aren't acceptable questions.

If you have a working solution in one language, and you want it in another language, translate it yourself. If you run into a specific problem trying to translate your solution, after spending time trying to figure out how to translate it and doing research into how to solve that particular problem in the other language, then there might be a question there in which you explain what your problem is, how you're trying to solve it, and why (specifically) your attempted solution currently isn't working.

10
  • 1
    You'll notice the question is self answered. So technically I did translate it myself, and all I'm doing it "recording" my methodology. Why should I only post a question when I have a problem?
    – cs95
    Sep 7, 2017 at 17:38
  • 1
    @cᴏʟᴅsᴘᴇᴇᴅ Self answering a question in no way changes a questions quality standards. It's not acceptable to post whatever question you want, even if it's not acceptable by the site's standards, just because you have also posted an answer. The question needs to stand on it's own as an appropriate question without considering the answer.
    – Servy
    Sep 7, 2017 at 17:40
  • What qualifies the question to stand on its own? The fact that I need it to have been a genuine problem that I was facing? That seems... incorrect.
    – cs95
    Sep 7, 2017 at 17:40
  • @cᴏʟᴅsᴘᴇᴇᴅ It doesn't need to necessarily be a problem that you needed to actually solve (although it does need to be a problem of practical value, meaning that it should be a problem that others could have and that would be useful for them to have a solution to). As for problems with these types of questions, see my answer above. A question just asking people to translate an entire program's code for you isn't an acceptable question, that you've posted an answer for it is irrelevant to the question's appropriateness.
    – Servy
    Sep 7, 2017 at 17:43
  • I can see where you're coming from. But literally every language has a "Hello, World!" question... and more of the nature of... "I know I could do this in x... but how do I do it in y?" These questions garner hundreds of votes - I've even seen them rise to the top of network posts. Those seem to fit the bill in your argument as "translate this code" questions, so what would you do about those?
    – cs95
    Sep 7, 2017 at 17:48
  • I have a more pointed question. If you were to close questions like this, what would your reason be?
    – cs95
    Sep 7, 2017 at 17:50
  • 1
    @cᴏʟᴅsᴘᴇᴇᴅ Unfortunately, some bad questions get upvotes. Voting isn't perfect. The specifics may of course vary based on the question, but often these will fall under Too Broad, although other reasons may also apply.
    – Servy
    Sep 7, 2017 at 17:59
  • @Servy Yes, some bad questions get a few upvotes. But if a question is getting hundreds of upvotes, that's a pretty good sign it's helping people. Sep 7, 2017 at 18:29
  • @NathanArthur So you think that "here's a whole bunch of code, translate it into another language for me" questions are good questions, and that we want to encourage those kinds of questions here? And your reasoning for that is that a tiny percentage of those questions that have been asked in the past have been upvoted, even though most don't get upvoted?
    – Servy
    Sep 7, 2017 at 19:01
  • 1
    @Servy Wow, you read a lot into that! No, I meant precisely what I said--a question with hundreds of upvotes is probably a question that helped a lot of people, regardless of how well it fits into the standard mold. Sep 7, 2017 at 19:17

You must log in to answer this question.

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