20

Suppose a user asks:

"How can I do thing X with this framework?"

Suppose further that:
The maintainers of the framework have clearly stated that doing thing X is and will always be unsupported for ideological principles. However, in the current code base there is a private implementation of X that might be callable with some hacking.

Should Stack Overflow, in its aim to help, honor the framework, and safe programming principles and dissuade people form using X? Or should Stack Overflow blindly help in the use of X?

Is the question even valid?

13
  • 38
    If such a question is otherwise valid, why would it not be on topic? There can be several reasons why someone would need to maintain an application using languages or frameworks that are (no longer) supported by its creators. A comment explaining why a certain practice is not recommended is fine but most of the time the developers who are forced to deal with it will already be painfully aware. If someone is, due to factors outside their control, forced to use X I don't see why we shouldn't help them do it.
    – ivarni
    Commented Feb 6, 2018 at 21:17
  • The language/framework is supported. The feature is not. Suppose we have a language LC which implement the lambda calculus. Someone asks "In LC, how can I implement a function which accepts the number 1, and returns the current time?". Well, by definition that isn't possible and doesn't really make sense. So should we point that out, or blindly hack away at LC until it isn't LC but answers the OPs question? Commented Feb 6, 2018 at 21:29
  • Or if my above comment wasn't clear enough. Suppose I want to implement number factorization with a banana. Is that a valid SO question? It is about programming (bananas). Or can we say "bananas aren't really a great way to model computation"? If we can't ask about programming bananas, why should we be able to ask about something being used against it's intended use? Commented Feb 6, 2018 at 21:42
  • 11
    For all I know bananas is some kind of javascript framework (and as it turns out, its a hapi logging thing on npm) but if you're talking about the berry then that would be off-topic. Asking about doing something with an actual programming language or framework/library is something I would consider on-topic, even if the answer is "No, you can't do that because Y". That's what happened here and I personally think that's a valid question even if it's not solvable, otherwise I wouldn't have asked it.
    – ivarni
    Commented Feb 7, 2018 at 7:15
  • 2
    Why not both? Start with the standard boilerplate: "You shouldn't even think about trying to do that" followed by "This worked but really, don't try it".
    – Clearer
    Commented Feb 7, 2018 at 8:49
  • 17
    This question would be better served by a good example - the two you've given so far are of impossible requests, rather than (as in the q body) unsupported requests
    – AakashM
    Commented Feb 7, 2018 at 12:00
  • 3
    "...that isn't possible and doesn't really make sense. So should we point that out, or blindly hack away at LC until it isn't LC but answers the OPs question" Either would be a valid answer, according to your inclination.
    – jscs
    Commented Feb 7, 2018 at 13:31
  • 3
    @z5h, your objections in comments don't seem to characterize the situation you describe in the question, in which "in the current code base there is a private implementation of X that might be callable with some hacking". You've framed the question as being about whether SO should take certain third-party philosophical concerns into consideration when evaluating questions and answers. In those terms, then, no, SO collectively neither can nor should attempt to do so. Commented Feb 7, 2018 at 15:25
  • 2
    Based on the comments, it seems like the scope of this question has evolved way far beyond the title and body of this question; not sure I understand what the problem here is anymore. "Can users ask about unofficial code?" Yeah, I can think of useful examples of various hacks that work around problematic design decisions in the API. "Can users ask about mathematically problematic situations (e.g., how do I divide by zero)?" -- could point out that you can return inf for floats or something I guess, mentioning caveats and limitations, though I don't think that would be successful on SO.
    – jrh
    Commented Feb 7, 2018 at 15:53
  • For the latter, if it's something like a data science algorithm that doesn't converge, and your calling code needs an answer, there might be a question of the form "What does my function return if algorithm X doesn't converge", the answer would be <use your error handling method of choice>, i.e., depending on your preference, design choices, and language choice, would be returning null, an error code, throwing an exception, returning some default value, etc... or are you saying your question would be how to modify the algorithm to support that condition, possibly involving additional math?
    – jrh
    Commented Feb 7, 2018 at 15:58
  • 1
    An example that more closely matches the description in the question is one of private APIs that are not intended to be called in client code - but those questions tend to be deemed off-topic for being store policy questions more than technical problems.
    – BoltClock Mod
    Commented Feb 7, 2018 at 16:57
  • 2
    I have answered so many questions with a “what you are trying to do is not possible because […] but here is how you could/should solve the problem instead […]” – I don’t see why that shouldn’t be the proper way to handle this. Attempts to solve a problem are great to read in a question, even if they go in the completely wrong direction.
    – poke
    Commented Feb 8, 2018 at 16:28
  • 2
    Don't worry. I'm sure any question doing something with a framework that's a REALLY bad idea would just get downvoted into oblivion! stackoverflow.com/questions/48270127/…
    – aquinas
    Commented Feb 9, 2018 at 2:13

1 Answer 1

39

No one is obliged to help them "break" the framework (or its limits), but I see no reason to reject the efforts of someone who has found a way of doing what the OP wants.

Obviously, any such answer should be caveated with appropriate warnings about the dire (or otherwise) consequences of implementing such a solution, but it should be up to the OP (or others in a similar situation) to make their own decision, remembering:

  • If it's only an ideological objection (as opposed to a technical one), then I really see no problem.

  • Where there are (potential) technical issues, these should be clearly pointed out1.

  • Some people have little choice than to attempt X in framework Y. Their only viable alternative to using a "hack" might be to effectively replicate much of the framework at much greater time and cost.

  • Almost any answer on SO could potentially be misused by someone who doesn't know what they're doing, or where the answer's "limits" are... should all answers carry a "Government Health Warning"? (Ans: No).


1. Case in point: a recent thread on the SQLite mailing list asked about setting "semi-global configuration parameters" for user-defined functions. One solution would have technically invalidated the DETERMINISTIC flag that can be applied to such functions (used as a hint to the query planner). However, when used judiciously the solution was perfectly "safe".

You must log in to answer this question.

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