How to Ask a Coding Question That Gets a Real Answer
A student in my Thursday group spent eleven days stuck on the same program. She had asked for help twice, both times with the message "my code doesn't work, can someone help", and both times nobody replied.

A student in my Thursday group spent eleven days stuck on the same program. She had asked for help twice, both times with the message "my code doesn't work, can someone help", and both times nobody replied. She assumed the channel was unfriendly. It was not. She had sent a question that no human being could answer, and nobody wanted to be the one to say so.
Asking well is a skill with a short learning curve and an unreasonably large payoff. The same question, rewritten in about four minutes, got her three answers in under ten. Nothing about her knowledge changed. What changed was that she gave the people reading it something they could act on, and in every community I have coached in, that is the whole difference between silence and help.
Why "my code doesn't work" gets no reply
Put yourself on the other side of the message. Someone volunteering an evening sees a request with no error text, no code, and no description of what should have happened. To help, they have to ask three follow up questions, wait for replies that might come tomorrow, and only then start thinking about the actual problem. That is twenty minutes of back and forth before any thinking begins.
Meanwhile, two messages below, someone has posted fourteen lines of code, the last three lines of a traceback and a sentence saying what they expected. That one gets answered first, because it can be answered in ninety seconds. Helpers are not ranking questioners by merit. They are picking the problems they can actually solve with the time they have.
There is a second reason, less comfortable to hear. A vague question often signals that the asker has not yet read the error message, and experienced programmers can tell. Reading a traceback properly solves a surprising share of beginner problems without any help at all, which is why I send students to reading a Python error message before they type a word in a help channel.
The six parts of a question that gets answered
Here is the shape I teach, in the order it should appear. The whole thing takes four or five minutes once you have done it twice.
- One sentence saying what you are trying to do. Not the assignment title. The actual goal, as in "I want to count how many times each word appears in a text file and print the top five".
- What happens instead. Either the error, or the wrong output. If the output is wrong, show both: what you got and what you expected. "It prints 0 for every word, I expected counts like 14 and 9" is a complete problem statement.
- The error message, as text, copied in full. Not a photograph of your screen, not retyped from memory, and not just the last line. The traceback names the file and line number where it broke, and that is frequently the answer by itself.
- The smallest piece of code that still fails. This is the part people skip and the part that matters most. Delete everything unrelated until removing one more line makes the error disappear. Fifteen lines someone can run beats two hundred they cannot.
- Your version and setup, in one line. Python 3.12 on Windows, run from the terminal. Python 3.8 on a school Chromebook through a browser editor. The number of problems caused purely by an old version or an odd environment is much higher than beginners expect.
- What you already tried. Two or three specifics, with what happened each time. This stops people suggesting the thing you did an hour ago, and it changes the tone of the whole exchange.
Step four does something people do not expect. In my own notes from last year, roughly a third of the students who trimmed their code down to a minimal example found the bug while trimming and never sent the message. The act of removing unrelated lines is itself a debugging technique, and it is the reason I keep the step even though it feels like extra work.
The advice I disagree with
The standard line in programming communities is that you should exhaust every option before asking: search the error, read the documentation, try again, and only ask when you are truly stuck. I have watched that advice cost students entire weekends, and I now tell mine something different.
Set a timer. Twenty five minutes of genuine attempts on the same error, and if you are still in the same place, write the question. You will often solve it while writing, which costs you nothing. If you do not, you have lost twenty five minutes rather than two days, and you have not built the belief that being stuck is a personal failing.
The exhaust everything rule exists because experienced programmers remember being asked lazy questions, and it is aimed at a different person from the one it usually reaches. Someone four weeks into learning does not have the vocabulary to search effectively yet. They search the error, find a thread about a library they have never heard of, and conclude the problem is beyond them. That is not persistence. It is just a slower kind of stuck, and getting unstuck on your own has its own set of moves, which I have written about in getting unstuck without peeking at the answer.
One more piece of common advice needs a caveat rather than a rebuttal. People will tell you never to post screenshots, and for code and error text they are right, because nobody can copy a picture into their editor or search for text inside it. But if your problem is visual, a mangled layout, a chart drawing in the wrong place, a window that opens empty, then a screenshot is the clearest thing you can provide. Post both: the image for what it looks like, the text for what it says.
Where you ask changes how you ask
A club help channel, a large Discord server and a public question site each reward different formatting, and knowing this saves frustration.
In a chat channel, put the code in a fenced block using three backticks before and after, otherwise the formatting collapses and your indentation vanishes, which for Python means your code is no longer the code you wrote. If it runs past about thirty lines, use a paste service link instead of thirty messages. Write the whole question in one message rather than sending "hi", then "can someone help", then "with python", because three pings earn irritation and one message earns answers.
On public question sites the bar is higher and the audience is permanent. Those answers get read for years, so the expectation is a self contained question with a title describing the actual problem. A title like "Python help please" is the main reason questions get closed. "Counter returns 0 for every word when reading from a file" tells a passing expert in six words whether they can help.
With an AI assistant the format is similar but the failure mode is different: it will answer confidently even when your question is incomplete, and you will spend an hour on a fix for a problem you do not have. Give it the same six parts you would give a person. Then check what it tells you against the real error.
The habit worth building this week is small. Keep a plain text file called questions, and the next three times you get stuck, write the six parts into it before asking anyone. Mine is four years old now and the early entries are a surprisingly honest record of what I misunderstood at the time. The rest of our first steps guides cover the surrounding basics, from installing tools to breaking a problem into pieces.
FAQ
How long should I struggle before asking for help?
Twenty five minutes on the same error is a sensible ceiling for a beginner, and about an hour once you are comfortable reading tracebacks. The number matters less than having one, because an open ended rule turns into either asking instantly or never asking at all.
Is it rude to ask something that has been answered before?
In a club or small server, no. People expect it and answering is part of why they are there. On public sites a duplicate will be closed with a link to the original, which is annoying but harmless, and the link is usually the thing you needed.
What if I cannot even explain what I am trying to do?
Then that is the question. "I have been asked to reverse a list and I do not understand what the task wants" is clear, answerable and far more useful than a guess at code. Confusion about the goal is a different problem from a bug, and mixing them up wastes everyone's time.
Should I share my whole project folder?
Almost never. A repository link is fine as supporting material, but the question itself needs the fifteen line version that reproduces the failure. Asking someone to clone a project and set it up is asking for a lot more than help with a bug.
More in First Steps
First Steps
How to Escape Tutorial Hell and Build Something Real
One of our club members turned up last autumn having watched roughly sixty hours of Python video across four months.
First Steps
How to Debug With Print Statements as a Beginner
A student I coach spent most of a Tuesday evening convinced that Python was adding numbers wrong.
First Steps
How to Use AI to Learn Coding Without Skipping the Thinking
You ask an AI chatbot to write a Python program that counts words in a file, it hands you 14 working lines, and you feel great...