23

I'm having trouble using a piece of code that belongs to a GitHub repository. The problem does not seem to be caused by a bug, but rather me not understanding something about the code (although it could well be a bug). I did raise an issue in the repository, but it seems not to be maintained anymore as virtually all issues raised since a few months are left unanswered.

Is it appropriate to ask for help on Stack Overflow, at least so that I know whether I missed something or that it actually is a bug?

8
  • 9
    Depends on the question. If it's a question that pertains to a general programming problem, then it's probably fine. If it's a nuance in the specific code, or anything else that would involve speculation on our part, then it's definitely off-topic.
    – Joe C
    Jan 28, 2018 at 15:46
  • @Joe C In my case the problem is an "undefined variable". I'm completely unable to figure how the variable is supposed to be defined. I want to say it wouldn't involve speculation in the sense that "there is no way you can know" would be a perfectly good answer, as it would help me move on to try something else.
    – nayriz
    Jan 28, 2018 at 15:55
  • 17
    It's unlikely that we'll be able to help you with that.
    – Joe C
    Jan 28, 2018 at 16:03
  • Are you getting the error in your own code?
    – PM 77-1
    Jan 29, 2018 at 14:50
  • 1
    Perhaps you could share a draft of your question here so we can see what it looks like and give you more specific pointers.
    – BoltClock
    Jan 31, 2018 at 4:42
  • @PM77-1 depends what you mean by own code. I don't make changes to the script, and apply it to a dataset for which the function I call was explicitly written.
    – nayriz
    Feb 3, 2018 at 5:50
  • @BoltClock sure, but what would be the best way to do this? In a comment?
    – nayriz
    Feb 3, 2018 at 5:50
  • As an edit to your question here.
    – BoltClock
    Feb 3, 2018 at 5:51

2 Answers 2

61

We don't really care if the code came from GitHub or any other source.

As long as your question fully describes the problem, demonstrates understanding and has all the information we need to understand it, then post it, regardless of its origin.

9
  • 8
    The main issue that the OP would have is to give a mcve. Most likely it will not be possible to make the question self-contained…
    – Didier L
    Jan 29, 2018 at 10:05
  • 3
    @DidierL Unless OP is referring to a very specific part of the code, which is itself self-contained.
    – Maroun
    Jan 29, 2018 at 10:06
  • 3
    It has to be MCVE. If OP can't make one - he shouldn't ask the question. Some libraries are popular and are getting own tags on SO, then such tag must be used with question and it's ok to post question which only this tag expert can answer. Such case is an exception: it doesn't have to be a MCVE for everybody, but good enough for an expert to be able to: 1) understand the problem 2) reproduce it and solve or see obvious mistakes in OP code.
    – Sinatr
    Jan 29, 2018 at 11:25
  • 4
    A potential additional impediment to creating an MCVE is that the OP may not be able to re-license the original code as CC BY-SA, as he is obligated to do if he wants to include it or a derivative in his question. It would be ideal to prepare an MCVE from scatch, but that might not be a viable option for the OP. Jan 29, 2018 at 15:22
  • @JohnBollinger He wouldn't need to if he's using it as a library right? import ProtectedLibrary as PL; PL.get_error() would be enough to reproduce the error for an MVCE, I think. Jan 29, 2018 at 22:53
  • 1
    @TankorSmash, if the issue the OP is struggling with is in the third-party code, then it is the relevant characteristics of that code that must be captured in an MCVE, in the question itself. Otherwise it is not complete, so no, what you propose would not be sufficient for an MCVE. After all, if that were enough then just call_my_buggy_function() would be an MCVE for any and everything. Jan 30, 2018 at 5:19
  • 1
    @Sinatr: Your comment is confusing. First you say that the asker has to supply an MCVE no matter what, then you say that they don't have to...?
    – BoltClock
    Jan 31, 2018 at 4:21
  • @BoltClock, MCVE can be less self-contained if library is used, but only if there is a tag available. Tag = there is a group of peoples who can answer, no need to target wide audience, but it's important to target them.
    – Sinatr
    Jan 31, 2018 at 8:44
  • 1
    From the MCVE link: "When asking a question about a problem caused by your code, you will get much better answers if you provide code people can use to reproduce the problem.". There's no requirement on it, but it's strongly recommended. I disagree with @Sinatr 's "It has to be".
    – FooBar
    Jan 31, 2018 at 10:02
2

As per @Maroun's answer + comments, there is nothing wrong with asking a Question about an open source library, provided that the Question has enough detail to be answerable. An MCVE is advisable, but the point about licensing is a red herring. (An MCVE doesn't mean you need to copy the library into your question. An MCVE could say "download the library and compile against it" for example.)

But there are two other issues:

  1. If the library is virtually unmaintained, this suggests that the community of people using it is small or not the "contributing" type1. That would suggest that your question is unlikely to get answers. Especially if the problems you are asking about are deep or obscure.

  2. Assuming that you do decide that you have found a bug, where do you go from there? Submitting an issue is unlikely to get you anywhere. So do you clone the repo and fix the problem yourself? (Is that sustainable? Does it need to be sustainable?)

I would suggest a different course of action. Look for an alternative to the library.


1 - If this were not true, you would expect to see a forest of forks on GitHub, and over time one would emerge as the defacto replacement for the unmaintained original.

You must log in to answer this question.

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