Looking at this question I see it has votes to close. All of them are for the "off-topic" reason, and I'm having trouble seeing why. Seems to me that the question is about a specific programming problem, it includes the desired behavior, and it provides a minimal and complete example of how to reproduce the problem. So, I don't understand why there are three votes to close it for not meeting these criteria. Can someone explain?

Did you read the OPs self answer? "Answer - I simply forgot to return the value at the end of the equation. Doh" so close as typo is correct
– chris neilsenOct 21 '19 at 3:50

Of course I read it. Why is it relevant? What if the OP didn't even realize that he was supposed to return the value? How does that square with the definition of typo exactly?
– BobRodesOct 21 '19 at 4:11

17

Don't focus on the "typo" aspect. The litmus test is, will the answer to this question help someone else in the future? ("While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers.") In this case, I think the answer is clearly no. Rubber ducky got the job done, the newbie has his answer. Is there a benefit to the larger community, to our mission of building a database of high-quality Q&A covering programming topics? I don't see one.
– Cody Gray♦Oct 21 '19 at 4:14

1 Answer
1

Questions about a problem that can no longer be reproduced or that was
caused by a simple typographical error. This can often be avoided by
identifying and closely inspecting the shortest program necessary to
reproduce the problem before posting.

In this case the 'question' was the result of the poster simply missing a return statement (in code that wasn't shown)

No, the code was shown you can't show code that is not there, the correct, on topic and helpful answer was given and yet the question closed. This is a disease on StackOverflow, it frustates me to no end. It's reproducible, and not a typo. No, people just don't want to helpful to a newbie, that simple. StackOverflow is newbie hostile can't you see? Who would've lost what to keep this open?
– chxOct 21 '19 at 4:42

13

@chx it means effectively "too trivial to be useful". there are lots of beginner mistakes, like missing parentheses, missing semicolons, missing return statements, and so on, that are not really useful to document, because they are already widely documented. it indicates a failure to research the problem. it sounds harsh but learning to figure this kind of thing out on your own is an important skill to learn.
– Dave CousineauOct 21 '19 at 5:00

3

@chx, what you call a newbie precisely? Is this a guy who can type already or not yet? Point is - there is absurd amount of mistakes one could possible do. Certain mistakes (when repeteadly asked) make sense to keep, but majority are just a noise and unlikely to be useful to future visitors. Closing question is purely cosmetic, OP knows what he did wrong. See timeline: first post review - passed, then OP self-answer, then post vote-closed/downvoted. Where do you see hostility?
– SinatrOct 21 '19 at 9:07