1

I have a bug in my numerical methods code (related to scientific computing). I understand that in order to ask for help, such as for identifying a bug in the code, one has to provide a minimal working example. However, the nature of this scientific code is such that it is impossible to make a minimal example with fewer than a few hundred lines. Would it still be allowable to submit such a working example?

My minimal example would consist of a few Fortran source files containing several hundred lines of code altogether.

  • 1
    Welcome to Meta Stack Exchange! As this question is about a situation on one specific site in the Stack Exchange network, unfortunately, we have to mark this question as "off-topic" for this site. Each site has a per-site meta where you can ask questions about that site, which can be accessed through the site switcher on the top right corner. Questions on this site, Meta Stack Exchange, are expected to relate to the entire SE network as a whole, not just one specific site. – Sonic the Anonymous Hedgehog Jan 9 at 1:46
6

There is no limit per se. The important thing is that your code must be minimal with respect to the problem that you are trying to solve. This is not always obvious, so you have to do some research into the nature of the exact problem you are having. For example, a complex set of calculations may be failing because of a numerical rounding issue in one step. Once you have identified that step, you can create code that demonstrates just that issue.

If you have a problem that involves a single operation with a lot of variables, work to determine which of those variables contribute to the problem. You can likely "zero", set to default, or otherwise simplify the rest of the values for your example. As an analogy, if you want to build a house to demonstrate a roof leak, you don't care about the carpet. There's no need to specify the operations to select an appropriate size, color, texture, height, fabric, etc. Just throw in a basic towel you can get off the shelf at any housewares shop and move on.

If you can't find a way to simplify your code and don't have any idea why it might be failing (debug my wall of code), you aren't ready to post on a Stack Exchange site.

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