What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

So as we all know, Stack Overflow is for specific questions which are related to programming. It is inappropriate to ask for the opinion of others, look for recommendations or solicit polling.

I am aware of the fact that over at Programmers.SE, it's OK to ask conceptual questions and questions concerning design decisions/patterns. However, I've just run into a question I want to ask, and I am not sure if it would be a good fit for SO, Prog.SE, Code Review or perhaps another SE site.

My question goes something like this:

I know that generally, one should use function foo() like this in order not to leak memory, but I've found this and this use case where I think it's not necessary because of reason X. Am I justified not to obey the de facto good practice in this case?

So this is kind of a "semi-conceptual" question: it's about good practices (that's why it may be suited for Prog.SE), but it's also very specific, it has a narrow scope (that's why SO would be perhaps the right place to ask it). Furthermore, my code is working, this would be a valid reason to ask it on Code Review, I believe.

Searching Meta for questions similar to this one brought up this question and this question and this answer, however, after having read them, I am still not entirely confident as to which Stack Exchange site I should choose. (I would really like to get it right because pollution and off-topic garbage are horrible, and I'm also one of those who frown upon this the most frequently...)

What do you say about that?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I think it's fine on Stack Overflow. You're asking a specific question about code that is narrowly-scoped and requires expert-level knowledge to be answered. That's exactly the type of question we want.

If you were posting a whole bunch of completed, working code, then I would say you should look into Code Review. But in this case, you're asking about only a single function and how it should be used. That's fine for Stack Overflow.

share|improve this answer
Very good. Your answer also confirms what I already commented on Ernest's answer - I think I'll opt to formulate the question so that it's appropriate for Stack Overflow. –  H2CO3 Aug 4 '13 at 17:21
The point is to ask a good question. If you ask one of those on the wrong site, it can be moved to a better place. (You know, just in case I'm wrong.) The stuff no one likes is not just off-topic, it's also crap. –  Cody Gray Aug 4 '13 at 17:24
Exactly, exactly. –  H2CO3 Aug 4 '13 at 17:29

I think the answer to this question depends on an additional subtlety that you haven't addressed:

  1. If the question is about people's opinions of whether your proposed practice is OK or not, aesthetically or otherwise, then the question is not OK to ask. Similarly, if there's no clear way to determine whether an answer is right or wrong, then the question is inappropriate.
  2. But if the question is about whether in your specific use case, there's guaranteed to never be a memory leak, and so therefore it's OK to ignore best practice, then I believe the question is appropriate. It's conceptual, but not opinion-based, and so it will be fine to ask.
share|improve this answer
Thanks for your answer. I'm yet hesitating between the two. I think it would be better to ask about the real problem, so that I can make sure my code doesn't leak memory. –  H2CO3 Aug 4 '13 at 17:09

You must log in to answer this question.

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