2

I just saw the "Convert Swift to Objective-c?" question was closed, but I was surprised the close reason is something like 'debug help'.

Is this question closed because it is asking for code conversion? Or it is just closed because the code to convert is too long?

0

3 Answers 3

9

I disagree with the close reason since the OP does not have any non-working code and isn't asking for debugging help, but the question should be closed (as too broad or unclear).

The reason is because it isn't actually a question, it is a work order. A good question is something you could walk over to a colleague and ask for an answer. But you wouldn't actually ask your colleague that question since you would be assigning him a task (so it is something your manager would ask of you or one of your teammates).

Pure code conversion questions ("Write this for me in x") are almost never on-topic because it is extremely difficult to write them in any other way other than a work order.

But you can ask a question about converting code. For example

I am trying to convert this code from language Foo to language Bar

*[small snippet of code you are trying to convert]*.  

So far, I've managed to write

*[your converted code]*.

But when I convert it, I am getting the following syntax error on this line of code

[Syntax error here]

The difference is you did the work yourself and you are asking for a specific problem you had converting the code.

2
  • Upvote but I have to throw in: you can walk to your coworker and ask "Can you do this for me? I'll owe you two" - it is not a real indicator of a good or bad SO question ;)
    – Gimby
    Nov 10, 2015 at 12:20
  • @Gimby fair enough, but the point was trying to draw a line between asking a question, and assigning a task to someone. Normally, you can get away with asking a coworker to do a task for you, but yiu usually can't do it twice :-) Nov 10, 2015 at 14:07
3

"Here is the code I got it from web"

My initial reaction to this question was that there has been no research effort from the OP - I didn't see/vote on this question but I imagine it was put on hold because it's effectively asking someone to just do the whole thing for them, whereas a good, on-topic SO question should be along the lines of "I'm trying to do _________ but I've come across this issue and I don't know how to fix it" (very rough example to demonstrate my point)

The question doesn't show that the OP has actually tried anything themselves, and so I agree it should be put on hold.

0

Many times people assume ( incorrectly) the responders should be able to tell the goals just from code. There should also be a detailed explanation in natural language.

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