A small code example explains clearly
A code example is easier to use when the input, result and requirements are together. Limit the excerpt to the specific question and use made-up data. A screenshot alone makes it difficult to understand.
Step by step
- Mention the language and relevant runtime version. Describe the expected input and remove anything not needed for the behavior shown, including real keys or internal addresses.
- Run the example yourself with the given data. Compare the actual expense with your explanation and mention requirements that a new person would otherwise not know.
- Make the code available as copyable text or via an appropriate public source link. Explain an important limitation, such as the demonstration not including full error handling.
Example
"The example sorts three made-up names alphabetically and shows the expected output underneath. The explanation states the tested runtime. Credentials and the original customer file are not published."