Sometimes questions on this forum fail to get a quick answer for reasons that may not be obvious to the person who opened the topic, but could be fixed easily when known. This is a list of suggestions that are commonly made, with the intention to make it linkable instead of being repeated every time.
Keywords are highlighted to make it easier to refer to specific points.
Post quoted code, enclosing code blocks in triple-backticks
```julia function f(x, y) x + y end ```
This will highlight the syntax and use a monospace font.
Don’t post your code as a screenshot, as it becomes very difficult to read and impossible to copy-paste, so many people will just ignore it.
Indent your code to reflect its block structure (your editor should help you with this). Our eyes are used to indented code, and find it more easier for spotting errors.
Make your example self-contained (“minimal working example”, MWE), so that it runs (or at least gets to the error that you want help with) as is, without any additional steps. This means including package loading, eg
and, if applicable, data that the code operates on. If your data is large or proprietary, generate test data and include the functions for that.
Simplify your problem. Unless you are absolutely certain that the whole code is needed to exhibit what you want to show, make an effort come up with a simpler version. This step takes the most effort, but often this alone helps with locating the problem. Also, shorter and simpler examples get answers quicker.
Include code instead of REPL output, except when the latter is relevant.
People assume that you are using the latest stable version of Julia and released packages (you can ensure the latter with
pkg> up). If this is not the case, make sure you note the relevant versions.
If you have a plotting (style) question, including a plot with the desired output (possibly generated with other software) is helpful.
You may not get a response here for packages with a very narrow audience. In that case, you may want to consider opening an issue on Github (or Gitlab, etc) for the package repository, just to ask a question. Most packages are OK with this.