16

I recently asked a question on a peculiar problem with figure printing in MATLAB that only happens with a particular dataset. This problem, however, doesn't exist with any other case for the best of my knowledge.

Having said this, I know the importance of a Minimal, Complete, and Verifiable example for describing a problem, and others to reproduce the same. However, if the problem falls into the above-mentioned class, then how can one also give the data that causes such problems. I am asking this because the only way I know is to provide the data through a Google Drive, Dropbox, etc., but this is definitely not a reliable way to share the resources.

So, what are the possible ways to provide the necessary data along with the scripts for reproducing the problem when other users want to test and provide a solution? Moreover, this is not the same question/discussion in the sense that I am not asking what is the recommended place to give the attachment, but what is a possible way if at all an attachment is indeed necessary.

For example, if you see my question on the MATLAB figure printing issue, it is a peculiar case, as it happens only for that particular dataset only and everything else works fine.

21
  • 16
    Well, I don't know what MWE is but if the problem is impossible to reproduce without 7MB worth of data then it may just not be a fit for this site. I don't really see a way to contain the necessary info in the question itself unless you can get that smaller.
    – BSMP
    May 5, 2017 at 14:21
  • 6
    @BSMP MWE issue corrected (sorry for using the texSE acronym), and I don't completely agree with you, as I believe, sometimes important bugs present in a software are found via these peculiar cases which definitely require the one set of data that can point out the bug (IMHO, these acts like a generator that will tickle the bug and make them say YAYY!! I am here :D). May 5, 2017 at 14:25
  • 13
    I'm not saying I don't think there's a bug, I'm saying it might not be possible to ask your question in a way that complies with the site's rules.
    – BSMP
    May 5, 2017 at 14:27
  • 1
    @BSMP This aspect I completely agree with you :) and that is why asking how else such a problem could be posted/discussed here, so that people may find it useful when they face the same May 5, 2017 at 14:28
  • Reporting bug to creators of software may be better approach. Since presumably you've done your research and this is really the smallest data file to reproduce the problem I don't see it being useful question on SO. (Side note: you should replace title of your linked post - "I found bug" type of title is completely useless) May 5, 2017 at 15:00
  • @AlexeiLevenkov Both done :) May 5, 2017 at 15:16
  • 2
    I get you like word "peculiar"... but title should inform about the problem so visitors can immediately see if it has chance to match what they are interested in or not, "peculiar problem" is as useless as "possible bug". Please review my edit of the title and improve if you find it imprecise. (And edit in information that you've already reported bug to manufacturer, preferably with link to track it). May 5, 2017 at 15:32
  • 1
    It's not your big file that is causing the problem, but a particular part of it. You have to find a MVCE to ask a question here. Posting such a big file and saying it's a bug in a established software is not what we are looking for. It is most likely not a bug, but an error on your site.
    – baao
    May 5, 2017 at 20:18
  • 1
    I wonder if this is also an issue in the statistics/data science Stack Exchange sites and what's their approach to it. May 5, 2017 at 21:43
  • 1
    @RaajaG You don't have to create MVCE! Nobody may force you to produce MVCE in order to ask on stackoverflow. Don't listen to people, why say otherwise. There is nothing in rules, that says, that MVCE are mandatory. But you have to actively work towards solving the problem, that prompted the question. And creating MVCE is the only fool-proof way to show, that you are doing so. In fact, creating MVCE amounts to 99% of work, required to solve any problem. Once you did that, you should be able to solve the problem without asking on QA sites (hence why MVCE is not mandatory in the first place) May 5, 2017 at 22:03
  • 10
    There is nothing in rules, that says, that MVCE are mandatory. @user1643723 - That's not true at all. From stackoverflow.com/help/on-topic : Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. All debugging questions have to have an MVCE, it's literally the first close reason listed in the help center.
    – BSMP
    May 5, 2017 at 23:58
  • 3
    @BSMP "All debugging questions have to have an MVCE" — of course, they have. In other words — nobody is forcing you to ask debugging questions on stackoverflow. By the time a topic is sufficiently researched by question author, it should no longer fit into "debuggin help" format anyway. May 6, 2017 at 0:39
  • 1
    nobody is forcing you to ask debugging questions on stackoverflow @user1643723 But that doesn't mean that the rule for debugging questions doesn't exist, which is what your original comment says. There is no good reason to confuse to new users about what the rules are.
    – BSMP
    May 6, 2017 at 13:56
  • 2
    @BSMP you make it sound like MVCE is the primary sign of good questions. This isn't the case. Many top-voted question of all times on stackoverflow don't contain MVCE. Presence of MVCE merely complies with bare minimal requirements for not having a debugging question instantly deleted. The actual value of question has little to do with self-contained code snippet and comes from extensive research, done by question author. Without such research MVCE is worthless. May 6, 2017 at 14:11
  • 1
    you make it sound like MVCE is the primary sign of good questions @user1643723 Then you're misreading my comment, which is solely about what the site rules are and says nothing about question quality.
    – BSMP
    May 6, 2017 at 14:15

2 Answers 2

5

Disclaimer: I don't know Matlab. Maybe I am wrong.

Creating a MCVE isn't easy all the time. It is a little bit like thinking backwards.

To create it, we always need to start to debug and find the point, where an error occurs.

Now the correct course of action would be in trying to reproduce the occured problem by forgetting all programmcode above the error. Create a fakecode that reproduce the orginal state in a few lines. If some potential answerer is reading your question, this person don't want know all the other things that are going on (Business Code etc).

So instead of retrieving data from a database/or file you want to make a variable of an array/list.

(Pseudocode)

Wrong:

//Bunch of code for Database
//...
VAR = Database.Get(someComplicatedData); //Wrong

//Or
VAR = File.Get(someFile); //Wrong

Correct:

VAR = { problem_data1, problem_data2} //Some buildin array/list or other data type the represents your data

Remember: Remove everything that has nothing to do with the acutal problem.

If that is not possible, remember Stack Overflow is meant to be helpfull for every future visitor. I am sorry to say, but your problem might be to localized (to broad), if it is not possible to create a MCVE.

4
  • 5
    OP clearly stated in their question that they have multiple data sets, and only one of them produces the problem with the (presumably) same post-processing code. Of course they could try to determine the nature of the difference between their data sets, but this is much more cumbersome than your usual MCVE-creation process. So in this case I think it's fine to ask in the mean time on SO, in case someone answers "Oh right, I ran into the same problem when the number of nans in my dataset is a Mersenne prime". May 6, 2017 at 11:53
  • 5
    "...might be to localized (to broad), if it is not possible to create a MCVE." Doesn't have to be. I know Matlab and it is very data centric. It might well be a very general problem, but still not (easily) possible to create a code only MCVE. That can happen with in the data centric problem solving domains. May 7, 2017 at 15:20
  • 2
    @Trilarion actually, the vast majority of odd behaviour MATLAB questions can be boiled down to pretty simple MCVEs. This is one of the exceptions, where it's very unclear a priori why one dataset produced the problem and the others don't. May 8, 2017 at 0:31
  • 1
    @AndrasDeak I agree but then you rely on the asker to be savy enough to boil their question down. Many askers aren't. Do you still want them to ask? And in case of an exception that cannot be boiled down you still need some alternative. May 8, 2017 at 9:01
3

So, what are the possible ways to provide the necessary data along with the scripts for reproducing the problem when other users want to test and provide a solution?

My favorite way would be to create the necessary minimal data within the script. That means instead of taking your usual data you model your data (possible including random variations) and hope that this still produces your error. The advantage is that by this you can include a minimal, verifiable, complete example within this site.

If this is not possible, I would just store additional data anywhere in the Internet (wherever it is convenient for you). After all, neither Dropbox nor Google Drive nor any other of these services gives you any long term guarantees. It's not much different from linking to pictures really. The risk is that this additional data may be lost after some time (very likely even if you ask me) and then the question may not be useful anymore. Not sure of the general stance of the StackOverflow community about this.

The preferred solution is therefore to invest time and try to generate necessary data within your example. I bet with you that for your example and many other cases one can indeed do that and the cases where you really need additional data are very, very rare.

As a side note: It probably decreases your chances significantly of getting answers when you need the readers to download additional data (especially if there is a lot of additional data to download).

3
  • 1
    There's one important difference with pictures: Stack Overflow has an agreement with Imgur so that they won't remove images that are linked from here.
    – jscs
    May 7, 2017 at 19:34
  • 1
    @JoshCaswell Yes, but Imgur is an external service. Even if they promise to not remove images it is hardly a solid guarantee. Imgur could go down as a whole and then? It could maybe be a feature request to add attachments to questions (say up to 1 MB) for such cases. May 8, 2017 at 8:58
  • 2
    Granted they could go down, but it's more than just a "promise". There's an actual service agreement between SE and Imgur: meta.stackexchange.com/questions/213547/… and meta.stackexchange.com/a/94286/159251
    – jscs
    May 8, 2017 at 11:53

You must log in to answer this question.

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