New paste Use cases Explore public pastes Text tools Developer API The Paste Library Security Sign in with Google

Code-sharing guides for useful technical reviews

Good code sharing preserves more than indentation. A reviewer needs the runtime, expected behavior, relevant inputs, and a safe amount of surrounding evidence. This collection focuses on reproducible, reviewable artifacts.

Code Sharing at a glance

A reviewer needs a reproducible example, the relevant environment, and an explicit expected result.

Reproduce one problem

Why it matters: Trim the sample until it still shows the issue but no longer includes unrelated project code.

Name the environment

Why it matters: State the language, runtime, command, input, expected result, and actual result a reviewer needs.

Keep the final fix elsewhere

Why it matters: Use a paste for discussion, then move lasting code and decisions into version control or documentation.

Code Sharing learning path

Practical guides for sharing code snippets, diffs, logs, SQL, and reproducible bug reports without losing technical context.

Direct answers for this topic

How small should a code example be?

Remove unrelated code until the example is short but still reproduces the same behavior with synthetic inputs. Read the complete explanation.

Which logs help a reviewer?

Include the lead-up, complete error, correlation values, and short aftermath while removing credentials and personal data. Read the complete explanation.

When is a repository better than a paste?

Use a repository when review needs multiple files, executable history, authorship, tests, branches, or a durable final change. Read the complete explanation.

How to use these guides

Start with the minimal-example guide, add only the log or runtime context needed to reproduce the fault, and move the accepted fix into version control.

Try the paste editor →