Skip to content

Instantly share code, notes, and snippets.

@Tiny-Giant
Created May 28, 2019 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tiny-Giant/92cc8c50ae1eddac1d86c12bb3b4a1fe to your computer and use it in GitHub Desktop.
Save Tiny-Giant/92cc8c50ae1eddac1d86c12bb3b4a1fe to your computer and use it in GitHub Desktop.

How to create a programming problem

Programming problems must be both well defined and reasonably scoped.

  • Well defined programming problems are clear and unambiguous. They must not be open to interpretation and all important variables(?) must be defined and accounted for.

    // Examples of poorly defined and well defined programming problems

  • Reasonably scoped programming problems are distilled to a specific problem, without being overly specific. Trying to cover too much ground and including too many details both reduce the usefulness of the question and the likeliness of receiving an answer, and can lead to question closure.

    // Examples of poorly scoped and reasonably scoped programming problems

Programming problems must also include example input and the expected output.

  • Example input must be complete and compilable, and must include any edge cases that solutions must account for,

  • Expected output must also be complete and compilable, and must demonstrate how solutions are meant to account for edge cases


How to ask for solutions to a programming problem

// How-To Questions

Questions asking for solutions to programming problems must include:

  • Exactly one [programming problem] complete with expected input and example output,
  • Exactly one clear and objective question statement

// Examples of good and bad questions and further advice


How to ask for alternatives to a programming problem solution

// Performance Questions

Questions asking for alternatives to a programming problem solution must include:

  • Exactly one [programming problem] complete with expected input and example output,
  • Exactly one [minimal reproducible example] that solves the problem posed,
  • An explanation of why the provided solution is insufficient, as well as clear and objective requirements for a sufficient solution
  • Exactly one clear and objective question statement

// Examples of good and bad questions and further advice


How to ask about a solution to a programming problem

// Follow-Up/Explanation Questions

Questions asking about solutions to programming problems must include:

  • Exactly one [programming problem] complete with expected input and example output,
  • Exactly one [minimal reproducible example] that solves the problem posed,
  • Exactly one clear and objective question statement

// Examples of good and bad questions and further advice


How to ask about an attempted solution to a programming problem

// Debugging Questions

Questions asking about attempted solutions to programming problems must include:

  • Exactly one [programming problem] complete with expected input and example output,
  • Exactly one [minimal reproducible example] that attempts to solve the problem posed but doesn't,
  • An explanation of how it does not solve the problem posed
  • Any error or warning messages that you may have received
  • Exactly one clear and objective question statement

// Examples of good and bad questions and further advice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment