Kodokon kodokon.com

Asking a question that gets answered

Structure your requests for help to get fast answers, and discover the minimal reproducible example.

7 min · 3 questions

Open this lesson in Kodokon

Asking for help is not an admission of weakness: everyone does it, every day, including the most experienced. A badly asked question, though, often goes unanswered, and not out of unkindness. "It doesn't work, help me" simply contains no usable information: nobody can guess your code, your system, or what you have already tried.

A good question has five ingredients. What you are trying to achieve, in one sentence. What you did, with the code involved. What you expected as a result. What actually happens, with the error message copied exactly. And what you have already tried, so nobody hands you the same lead three times. Add your environment: system, language and version.

TEXT
Goal: display the list of articles on my page.
Context: Python 3.12 on Windows 11.
Code: (the small snippet causing the problem)
Expected: the 3 titles show up.
Got: TypeError: 'NoneType' object is not iterable
Already tried: checked the file name, added a print.
A question template to copy: six lines are enough.

The best tool for getting help is called the minimal reproducible example. The idea: cut your code down to the smallest piece that still reproduces the problem. You remove everything unrelated, line after line, until only the essentials remain. This effort has a surprising side effect: very often you find the cause yourself along the way, before you even ask the question.

One last thing, often forgotten: once you have been helped, say thank you and write down what worked. A question that is well asked and well closed becomes an answer for the hundred people who will hit the same problem after you. That is how the whole community you have just joined works, and you are already part of it.

Knowledge check

Make sure you remember the key points of this lesson.

  1. Why does a question like "it doesn't work, help me" go unanswered?
    • Because it is seen as too casual
    • Because it contains no usable information
    • Because you always have to pay to get an answer
  2. Why paste your code as text rather than as a screenshot?
    • So it can be copied, tested and searched
    • Because images are banned on forums
    • Because text displays faster
  3. What is a minimal reproducible example?
    • The whole project compressed into an archive
    • The smallest piece of code that still reproduces the problem
    • A description of the problem with no code at all
    • A screenshot of the complete error